Commit 7c2f2c3b authored by 邱旭's avatar 邱旭

1

parent c63f272d
......@@ -5,10 +5,8 @@
<e:Image id="light1" source="invitebg2_png" x="386" y="307" anchorOffsetX="356" anchorOffsetY="296"/>
<e:Group id="container" y="-98.45" x="-3"/>
<e:Image source="turnprize2bg_png" y="159" horizontalCenter="0"/>
<e:Group y="326" horizontalCenter="0">
<e:Image width="508" height="225" source="{data.url}" horizontalCenter="0" verticalCenter="0"/>
<e:Image id="scratch_progress" y="0" x="0" source="scratch_card_98_png"/>
</e:Group>
<e:Image y="323" source="scratch_card_bg_png" horizontalCenter="0"/>
<e:Image id="prizeImg" width="508" height="225" source="" x="121" y="345"/>
<e:Button id="closeBtn" label="" y="242.88" x="615">
<e:skinName>
<e:Skin states="up,down,disabled">
......
......@@ -13,30 +13,31 @@ import { getlogItem } from "../Main";
export default class ScratchPanel extends Panel {
private cutTimer: CutTimer;
private myShape: egret.Shape = new egret.Shape();
constructor(data) {
super();
this.data = data;
}
private myShape: egret.Shape = new egret.Shape();
private pIndex = 0;
setGtaphics(x, y) {
setTimeout(() => {
if(this.pIndex % 2 == 0){ // 双数
if(this.pIndex % 2 == 0) { // 双数
y -= 25;
if(y <= this["prizeImg"].y){
if(y <= this["prizeImg"].y) {
this.pIndex++;
}
}else { // 单数
} else { // 单数
y += 25;
if(y >= (this["prizeImg"].y + this["prizeImg"].height)){
if(y >= (this["prizeImg"].y + this["prizeImg"].height)) {
this.pIndex++;
}
}
x += 5;
this.myShape.graphics.lineTo(x, y);
if(x > (+this.data.completePercent) / 100 * this["prizeImg"].width + 10){
if(x > this["prizeImg"].x + (+this.data.completePercent) / 100 * this["prizeImg"].width - 60) {
return;
}
this.setGtaphics(x, y);
......@@ -55,10 +56,10 @@ export default class ScratchPanel extends Panel {
this["prizeImg"].mask = this.myShape;
this.myShape.graphics.lineStyle(130, 0xff0000, 1);
this.myShape.graphics.moveTo(this["prizeImg"].x - 30, this["prizeImg"].y + this["prizeImg"].width);
this.myShape.graphics.moveTo(this["prizeImg"].x - 30, this["prizeImg"].y + this["prizeImg"].height);
setTimeout(()=>{
this.setGtaphics(this["prizeImg"].x, this["prizeImg"].y + this["prizeImg"].height);
setTimeout(() => {
this.setGtaphics(this["prizeImg"].x - 30, this["prizeImg"].y + this["prizeImg"].height);
}, 500);
const scratchData = DataManager.ins.getData('hc_turnableDojoin');
......
......@@ -31,11 +31,11 @@ export default class ScratchRulePanel extends Panel {
private addRule() {
const text =
`<br>1、用户每天邀请指定数量的新玩家参与闯关,可获得指定的现金券奖励。
2、用户发起邀请后,需在24小时内完成邀请任务;超过24小时,邀请任务失败,无法获得奖励,需重新发起邀请
3、新用户仅包含未参与过狮狮连萌活动的用户
4、用户不可为自己助力,或重复为好友助力。
5、完成邀请任务后,玩家可点击首页“邀请得现金券”图标领取现金券。
`<br>1、用户每天邀请指定数量的玩家助力刮卡,可获得指定的现金券奖励。
2、用户抽中刮刮卡后,需在24小时内完成刮卡任务;超过24小时,刮卡任务失败,则无法获得奖励,且此张刮卡失效
3、用户每天只能助力2位好友,但不可为自己刮卡或重复为同一个好友助力刮卡
4、好友点击邀请页面中的“去看看”按钮进入游戏即可完成助力。
5、完成刮卡任务后,玩家可点击首页“刮现金红包”图标领取现金券。
6、发放的奖励请在规定的有效时间内尽快领取或使用,逾期未领取或使用的会失效哦。
7、活动过程中,凡以不正当手段(包括但不限于作弊、恶意套现、扰乱系统、网络攻击等违规行为)参与本次活动的用户,苏宁易购有权终止其参加活动,并取消其获得奖励的资格。
8、极少数特殊情况下,若用户在完成活动的任务中被系统判定异常账户或风控账户,则可能导致奖励发放异常。
......
......@@ -10,12 +10,55 @@ import { getlogItem } from "../../Main";
import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
export default class TurnPrize2Panel extends Panel {
private myShape: egret.Shape;
private pIndex = 0;
setGtaphics(x, y) {
setTimeout(() => {
if(this.pIndex % 2 == 0){ // 双数
y -= 25;
if(y <= this["prizeImg"].y){
this.pIndex++;
}
}else { // 单数
y += 25;
if(y >= (this["prizeImg"].y + this["prizeImg"].height)){
this.pIndex++;
}
}
x += 5;
this.myShape.graphics.lineTo(x, y);
if(x > this["prizeImg"].x + (+this.data.option.completePercent) / 100 * this["prizeImg"].width - 60){
return;
}
this.setGtaphics(x, y);
}, 20);
}
start(data) {
this.data = data;
super.start();
this.showlog();
this["progressGroup"].mask = this["progressMask"];
this.setProgress(+data.option.completePercent);
this.data.url = data.option.prizeImage;
// this.data.url = data.option.prizeImage;
this["prizeImg"].source = this.data.option.prizeImage;
this.myShape = new egret.Shape();
this.myShape.graphics.beginFill(0xff0000, 0);
this.myShape.graphics.drawRect(this["prizeImg"].x, this["prizeImg"].y, this["prizeImg"].width, this["prizeImg"].height);
this.myShape.graphics.endFill();
this.addChild(this.myShape);
this["prizeImg"].mask = this.myShape;
this.myShape.graphics.lineStyle(130, 0xff0000, 1);
this.myShape.graphics.moveTo(this["prizeImg"].x - 30, this["prizeImg"].y + this["prizeImg"].height);
setTimeout(()=>{
this.setGtaphics(this["prizeImg"].x - 30, this["prizeImg"].y + this["prizeImg"].height);
}, 500);
this['light1'].visible = this['light2'].visible = false;
addAdComp(84, 816, this,48);
data.mv.gotoAndPlay(10, true)
......@@ -38,25 +81,6 @@ export default class TurnPrize2Panel extends Panel {
const dProgress = Math.abs(progress - this["progress"].width / this["progressBg"].width); // 比当前进度的差值的绝对值
const _duration = 1000 * dProgress / 100; // 算出变化的时间
egret.Tween.get(this["progress"]).to({width: _width}, _duration);
const i = new eui.Image();
if(progress >= 100) {
this["scratch_progress"].visible = false;
} else if(progress >= 98 && progress < 100) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_98_png";
} else if(progress >= 96 && progress < 98) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_96_png";
} else if(progress >= 94 && progress < 96) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_94_png";
} else if(progress >= 92 && progress < 96) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_92_png";
} else if(progress < 92) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_90_png";
}
}
......
......@@ -4,22 +4,12 @@
"desc": "OK",
"timestamp": 1572327888728,
"data": {
"isScratchCard": false,
"isScratchCard": true,
"option": {
"id": "",
"day": null,
"categoryType": 2,
"title": "11",
"rate": "11",
"minValue": null,
"maxValue": null,
"coinType": null,
"propType": null,
"num": 3,
"img": "",
"appItemId": null,
"name": "",
"value": ""
"scratchCardTaskId": 7,
"prizeImage": "//yun.dui88.com/images/201910/e6pmpk2pne.png",
"completePercent": "98",
"remainPercent": null
},
"orderNum": null
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment