Commit 37a6c2f1 authored by wildfirecode's avatar wildfirecode

1

parent bb8cc5c5
...@@ -19,7 +19,7 @@ export default class PrizePanel extends Panel { ...@@ -19,7 +19,7 @@ export default class PrizePanel extends Panel {
setGray(this['picc']); setGray(this['picc']);
this._level = parseInt(data.level + ''); this._level = parseInt(data.level + '');
const itemid = DataManager.ins.getData('getPlugOrderStatus').lottery.itemId; const itemid = DataManager.ins.getData('getPlugOrderStatus').lottery.itemId;
this.data.img = `http://yun.duiba.com.cn/db_games/0916/${itemid}.png`; this.data.img = `http://yun.duiba.com.cn/db_games/0926/${itemid}.png`;
this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this['shareBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
NetManager.ins.clickLog(getlogItem(15)); NetManager.ins.clickLog(getlogItem(15));
......
...@@ -1268,6 +1268,7 @@ export class NetManager extends ABNetManager { ...@@ -1268,6 +1268,7 @@ export class NetManager extends ABNetManager {
param: { param: {
id: signActivityId id: signActivityId
}, },
hideMsg:true,
callback: callback callback: callback
}; };
this.send(net); this.send(net);
......
...@@ -37,12 +37,15 @@ export default class MapScene extends Scene { ...@@ -37,12 +37,15 @@ export default class MapScene extends Scene {
const { signInfoVO } = DataManager.ins.getData('getSignInfo'); const { signInfoVO } = DataManager.ins.getData('getSignInfo');
if(signInfoVO.continueDay >=7) return; if(signInfoVO.continueDay >=7) return;
const date = new Date(); // const date = new Date();
date.setHours(0, 0, 0, 0); // date.setHours(0, 0, 0, 0);
const nowTimerStr = date.getTime() + ''; // const nowTimerStr = date.getTime() + '';
const oldTimerStr = localStorage.getItem('nowTimerStr' + window['CFG'].consumerId); // const oldTimerStr = localStorage.getItem('nowTimerStr' + window['CFG'].consumerId);
if (oldTimerStr != nowTimerStr) { // if (oldTimerStr != nowTimerStr) {
localStorage.setItem('nowTimerStr' + window['CFG'].consumerId, nowTimerStr); // localStorage.setItem('nowTimerStr' + window['CFG'].consumerId, nowTimerStr);
// PanelCtrl.instance.show('sign');
// }
if(signInfoVO.todaySigned == 0){
PanelCtrl.instance.show('sign'); PanelCtrl.instance.show('sign');
} }
......
...@@ -14,7 +14,7 @@ export default class BoxPanel extends Panel { ...@@ -14,7 +14,7 @@ export default class BoxPanel extends Panel {
// this.data.img = DataManager.ins.getData('getPlugOrderStatus').lottery.imgurl; // this.data.img = DataManager.ins.getData('getPlugOrderStatus').lottery.imgurl;
const itemid = DataManager.ins.getData('getPlugOrderStatus').lottery.itemId; const itemid = DataManager.ins.getData('getPlugOrderStatus').lottery.itemId;
this.data.img = `http://yun.duiba.com.cn/db_games/0916/${itemid}.png`; this.data.img = `http://yun.duiba.com.cn/db_games/0926/${itemid}.png`;
} }
showlog() { showlog() {
NetManager.ins.showLog(getlogItem(17)); NetManager.ins.showLog(getlogItem(17));
......
...@@ -41,12 +41,18 @@ export default class SignPanel extends Panel { ...@@ -41,12 +41,18 @@ export default class SignPanel extends Panel {
]; ];
const func = (data,item:SignItem) => { const func = (data,item:SignItem) => {
NetManager.ins.doSign((s)=>{ NetManager.ins.doSign((s)=>{
this.hidePanel();
if(s) { if(s) {
const {customInfo} =DataManager.ins.getData(['dosign']); const {customInfo,success} =DataManager.ins.getData(['dosign']);
if(customInfo.code==100004 || !customInfo.success) { if(!success || !customInfo.success || customInfo.prizeType =='none') {
showToast('哎呀!奖励与您擦肩而过~'); if(customInfo.code==100004) {
showToast('哎呀,奖励擦肩而过!明天再来试试吧!');
}else {
showToast('哎呀,奖励擦肩而过!');
}
return; return;
} }
item.setSinged(); item.setSinged();
// showToast('签到成功!快去闯关吧~'); // showToast('签到成功!快去闯关吧~');
PanelCtrl.instance.show('signPrize'); PanelCtrl.instance.show('signPrize');
...@@ -58,7 +64,7 @@ export default class SignPanel extends Panel { ...@@ -58,7 +64,7 @@ export default class SignPanel extends Panel {
}, window['collectRuleId']); }, window['collectRuleId']);
}); });
}else { }else {
showToast('哎呀!奖励与您擦肩而过~'); showToast('哎呀,奖励擦肩而过!');
} }
}, window['signActivityId']) }, window['signActivityId'])
console.log(data); console.log(data);
......
...@@ -12,8 +12,12 @@ export default class SignPrizePanel extends Panel { ...@@ -12,8 +12,12 @@ export default class SignPrizePanel extends Panel {
//奖品类型,none无奖励, object实物,virtual虚拟商品,coupon券,道具prop,元宝coin,体力times, //奖品类型,none无奖励, object实物,virtual虚拟商品,coupon券,道具prop,元宝coin,体力times,
const {customInfo} =DataManager.ins.getData(['dosign']); const {customInfo} =DataManager.ins.getData(['dosign']);
const prizeType= customInfo.prizeType ; const prizeType= customInfo.prizeType ;
if(customInfo.itemId) if(customInfo.logo && prizeType!= 'times' && prizeType!= 'coin'&& prizeType!= 'prop') {
this['img'].source = `http://yun.duiba.com.cn/db_games/0916/${customInfo.itemId}.png`; this['img'].source = customInfo.logo;
} else {
if(customInfo.itemId)
this['img'].source = `http://yun.duiba.com.cn/db_games/0926/${customInfo.itemId}.png`;
}
this['nums'].text ='x'+ customInfo.prizeCount; this['nums'].text ='x'+ customInfo.prizeCount;
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
"customInfo":{ "customInfo":{
"success":true, "success":true,
"errorMsg":null, "errorMsg":null,
"code":"000000", "code":"",
"prizeType":"", "prizeType":"object",
"prizeName":"奖品名称", "prizeName":"奖品名称",
"logo":"奖品图片", "logo":"http://yun.duiba.com.cn/db_games/activity/game/guideImage/guide2.png",
"prizeCount":10, "prizeCount":10,
"itemId":59521 "itemId":59521
} }
......
{ {
"success": true, "success": true,
"signInfoVO": { "signInfoVO": {
"continueDay": 1, "continueDay": 6,
"todaySigned": 0 "todaySigned": 0
} }
} }
\ No newline at end of file
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