Commit 27e06b4d authored by wildfirecode's avatar wildfirecode

1

parent 19bbe03a
......@@ -8,7 +8,7 @@
"globalBackgroundHeight": -1,
"globalBackgroundColor": "#c1c1c1",
"globalBackgroundImage": "",
"globalAutoLayerMarkEnable": true
"globalAutoLayerMarkEnable": false
},
"1667fb18fa6": {
"bindingDataTestObj": [
......
......@@ -77,6 +77,7 @@ import { GDispatcher } from "../tc/util/GDispatcher";
import ShopTipPanel from "../../src/panels/ShopTipPanel";
import RechargePanel from "../../src/panels/RechargePanel";
import BombTips2Panel from "../../src/panels/BombTips2Panel";
import BackIndexPanel from "../../src/panels/BackIndexPanel";
export default class MainBase extends eui.UILayer {
constructor() {
......@@ -138,6 +139,7 @@ export default class MainBase extends eui.UILayer {
['signPrize', { cls: SignPrizePanel }],
['taskPrize', { cls: TaskPrizePanel }],
['back', { cls: BackPanel }],
['BackIndex', { cls: BackIndexPanel }],
['invite', { cls: InvitePanel }],
['invitePrize', { cls: InvitePrizePanel }],
['inviteCutTime', { cls: InviteCutTimePanel }],
......@@ -475,16 +477,13 @@ export default class MainBase extends eui.UILayer {
});
}
// getBackReward() {
// return new Promise((r) => {
// try {
// if(window['getRST']) window['getRST']();
// } catch(error) { }
// NetManager.ins.hc_getBackReward(() => {
// r();
// })
// });
// }
getBackReward() {
return new Promise((r) => {
NetManager.ins.hc_hasBackReward(() => {
r();
})
});
}
ajaxElement() {
return new Promise((r) => {
......@@ -525,7 +524,7 @@ export default class MainBase extends eui.UILayer {
this.getAd(),
this.ajaxElement(),
this.hc_userInfo(),
// this.getBackReward(),
this.getBackReward(),
this.hcRedBoobBaseInfo(),
]);
......
......@@ -982,23 +982,36 @@ export class NetManager extends ABNetManager {
this.send(net);
}
// public hc_getBackReward(callback: Function): void {
// const d: any = {
// activityId: DataManager.ins.customCfgData.actId,
// detect: window['detect'],
// deviceSessionId: window['_device_session_id']
// };
// const net: INetData = {
// name: 'hc_getBackReward',
// uri: window['duiba'] + '/customActivity/happyclear/getBackReward',
// type: 'get',
// dataType: 'json',
// hideMsg:true,
// param: d,
// callback: callback
// };
// this.send(net);
// }
public hc_getBackReward(callback: Function): void {
const d: any = {
activityId: DataManager.ins.customCfgData.actId,
detect: window['detect'],
deviceSessionId: window['_device_session_id']
};
const net: INetData = {
name: 'hc_getBackReward',
uri: window['duiba'] + '/customActivity/happyclear/getBackReward',
type: 'get',
dataType: 'json',
hideMsg:true,
param: d,
callback: callback
};
this.send(net);
}
public hc_hasBackReward(callback: Function): void {
const d: any = { };
const net: INetData = {
name: 'hc_hasBackReward',
uri: window['duiba'] + '/customActivity/happyclear/hasBackReward',
type: 'get',
dataType: 'json',
hideMsg:true,
param: d,
callback: callback
};
this.send(net);
}
public hc_turnableDojoin(callback: Function): void {
const d: any = {
activityId: DataManager.ins.customCfgData.actId,
......
{"options":{"layoutMath":"2","sizeMode":"2n","useExtension":1,"layoutGap":1,"extend":0},"projectName":"backindex","version":5,"files":["../assets/backindex/backindex.png"]}
\ No newline at end of file
......@@ -229,8 +229,8 @@
"name": "redbombalert"
},
{
"name": "preload",
"keys": "candydiebg_json,candysub_json,candydis4_json,candydis0_json,candydis3_json,candydis2_json,candydis1_json"
"keys": "backindex_png",
"name": "backindex"
}
],
"resources": [
......@@ -4167,46 +4167,51 @@
"subkeys": "破碎猪_00000,破碎猪_00001,破碎猪_00002,破碎猪_00003,破碎猪_00004,破碎猪_00005,破碎猪_00006,破碎猪_00007,破碎猪_00008,破碎猪_00009,破碎猪_00010,破碎猪_00011,破碎猪_00012"
},
{
"name": "candydiebg_json",
"type": "sheet",
"url": "assets/mc/candydiebg.json",
"subkeys": "糖果消失光_00013,糖果消失光_00012,糖果消失光_00011,糖果消失光_00010,糖果消失光_00009,糖果消失光_00008,糖果消失光_00007,糖果消失光_00006,糖果消失光_00005,糖果消失光_00004,糖果消失光_00003,糖果消失光_00002,糖果消失光_00001,糖果消失光_00000"
"type": "sheet",
"name": "candydiebg_json",
"subkeys": "糖果消失光_00000,糖果消失光_00001,糖果消失光_00002,糖果消失光_00003,糖果消失光_00004,糖果消失光_00005,糖果消失光_00006,糖果消失光_00007,糖果消失光_00008,糖果消失光_00009,糖果消失光_00010,糖果消失光_00011,糖果消失光_00012,糖果消失光_00013"
},
{
"name": "candysub_json",
"type": "sheet",
"url": "assets/mc/candysub.json",
"subkeys": "数字减少星星_00015,数字减少星星_00014,数字减少星星_00013,数字减少星星_00012,数字减少星星_00011,数字减少星星_00010,数字减少星星_00009,数字减少星星_00008,数字减少星星_00007,数字减少星星_00006,数字减少星星_00005,数字减少星星_00004,数字减少星星_00003,数字减少星星_00002,数字减少星星_00001,数字减少星星_00000"
"type": "sheet",
"name": "candysub_json",
"subkeys": "数字减少星星_00000,数字减少星星_00001,数字减少星星_00002,数字减少星星_00003,数字减少星星_00004,数字减少星星_00005,数字减少星星_00006,数字减少星星_00007,数字减少星星_00008,数字减少星星_00009,数字减少星星_00010,数字减少星星_00011,数字减少星星_00012,数字减少星星_00013,数字减少星星_00014,数字减少星星_00015"
},
{
"name": "candydis4_json",
"type": "sheet",
"url": "assets/mc/candydis4.json",
"subkeys": "猪糖果_00011,猪糖果_00010,猪糖果_00009,猪糖果_00008,猪糖果_00007,猪糖果_00006,猪糖果_00005,猪糖果_00004,猪糖果_00003,猪糖果_00002,猪糖果_00001,猪糖果_00000"
"type": "sheet",
"name": "candydis4_json",
"subkeys": "猪糖果_00000,猪糖果_00001,猪糖果_00002,猪糖果_00003,猪糖果_00004,猪糖果_00005,猪糖果_00006,猪糖果_00007,猪糖果_00008,猪糖果_00009,猪糖果_00010,猪糖果_00011"
},
{
"name": "candydis0_json",
"type": "sheet",
"url": "assets/mc/candydis0.json",
"subkeys": "兔子糖果_00011,兔子糖果_00010,兔子糖果_00009,兔子糖果_00008,兔子糖果_00007,兔子糖果_00006,兔子糖果_00005,兔子糖果_00004,兔子糖果_00003,兔子糖果_00002,兔子糖果_00001,兔子糖果_00000"
"type": "sheet",
"name": "candydis0_json",
"subkeys": "兔子糖果_00000,兔子糖果_00001,兔子糖果_00002,兔子糖果_00003,兔子糖果_00004,兔子糖果_00005,兔子糖果_00006,兔子糖果_00007,兔子糖果_00008,兔子糖果_00009,兔子糖果_00010,兔子糖果_00011"
},
{
"name": "candydis3_json",
"type": "sheet",
"url": "assets/mc/candydis3.json",
"subkeys": "狮子糖果_00011,狮子糖果_00010,狮子糖果_00009,狮子糖果_00008,狮子糖果_00007,狮子糖果_00006,狮子糖果_00005,狮子糖果_00004,狮子糖果_00003,狮子糖果_00002,狮子糖果_00001,狮子糖果_00000"
"type": "sheet",
"name": "candydis3_json",
"subkeys": "狮子糖果_00000,狮子糖果_00001,狮子糖果_00002,狮子糖果_00003,狮子糖果_00004,狮子糖果_00005,狮子糖果_00006,狮子糖果_00007,狮子糖果_00008,狮子糖果_00009,狮子糖果_00010,狮子糖果_00011"
},
{
"name": "candydis2_json",
"type": "sheet",
"url": "assets/mc/candydis2.json",
"subkeys": "牛糖果_00011,牛糖果_00010,牛糖果_00009,牛糖果_00008,牛糖果_00007,牛糖果_00006,牛糖果_00005,牛糖果_00004,牛糖果_00003,牛糖果_00002,牛糖果_00001,牛糖果_00000"
"type": "sheet",
"name": "candydis2_json",
"subkeys": "牛糖果_00000,牛糖果_00001,牛糖果_00002,牛糖果_00003,牛糖果_00004,牛糖果_00005,牛糖果_00006,牛糖果_00007,牛糖果_00008,牛糖果_00009,牛糖果_00010,牛糖果_00011"
},
{
"name": "candydis1_json",
"type": "sheet",
"url": "assets/mc/candydis1.json",
"subkeys": "鸟糖果_00011,鸟糖果_00010,鸟糖果_00009,鸟糖果_00008,鸟糖果_00007,鸟糖果_00006,鸟糖果_00005,鸟糖果_00004,鸟糖果_00003,鸟糖果_00002,鸟糖果_00001,鸟糖果_00000"
"type": "sheet",
"name": "candydis1_json",
"subkeys": "鸟糖果_00000,鸟糖果_00001,鸟糖果_00002,鸟糖果_00003,鸟糖果_00004,鸟糖果_00005,鸟糖果_00006,鸟糖果_00007,鸟糖果_00008,鸟糖果_00009,鸟糖果_00010,鸟糖果_00011"
},
{
"url": "assets/backindex/backindex.png",
"type": "image",
"name": "backindex_png"
}
]
}
\ No newline at end of file
......@@ -6,6 +6,7 @@
"resource/skins/ADSmallSkin.exml",
"resource/skins/AlertSkin.exml",
"resource/skins/AvatarSkin.exml",
"resource/skins/BackIndexSkin.exml",
"resource/skins/BackSkin.exml",
"resource/skins/BagItem2Skin.exml",
"resource/skins/BagItemSkin.exml",
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="BackSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16e0235c541"/>
<e:Button id="closeBtn" label="" x="24" y="80">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="backindex_png" source.down="backindex_png" source.disabled="backindex_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Skin>
\ No newline at end of file
......@@ -179,10 +179,10 @@ export default class MapScene extends Scene {
localStorage.setItem('nowTimer2Str' + window['CFG'].consumerId, nowTimerStr2);
}
// const backData = DataManager.ins.getData('hc_getBackReward');
// if (backData.success && backData.data) {
// panels.push('back');
// }
const backData = DataManager.ins.getData('hc_hasBackReward');
if (backData.success) {
panels.push('BackIndex');
}
const { signInfoVO } = DataManager.ins.getData('getSignInfo');
if (signInfoVO.continueDay < 7) { //表示明天还可以签到
......
import Panel from "../../libs/new_wx/components/Panel";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { DataManager } from "../../libs/tw/manager/DataManager";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
export default class BackIndexPanel extends Panel {
start(data) {
super.start();
}
onTouchTap_closeBtn() {
this['closeBtn'].touchEnabled = false;
NetManager.ins.hc_getBackReward(() => {
this['closeBtn'].touchEnabled = true;
const backData = DataManager.ins.getData('hc_getBackReward');
if (backData.success && backData.data) {
PanelCtrl.instance.addToShowPanels('back');
}
this.hidePanel();
});
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
get skinKey() { return 'BackIndex' }
}
\ No newline at end of file
......@@ -3,6 +3,9 @@ const config = {
'/crecord/getrecord': {
data: './happyclear/getrecord.json'
},
'/customActivity/happyclear/hasBackReward': {
data: './happyclear/hasBackReward.json'
},
'/customActivity/happyclear/getBackReward': {
data: './happyclear/getBackReward.json'
},
......
{
"code":"0000000000",
"data":null,
"data":1,
"desc":"OK",
"success":0,
"success":1,
"timestamp":1572079274940
}
\ No newline at end of file
{
"code":"0000000000",
"data":null,
"desc":"OK",
"success":1,
"timestamp":1572079274940
}
\ 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