Commit 37a6c2f1 authored by wildfirecode's avatar wildfirecode

1

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