Commit 1d86372f authored by wildfirecode's avatar wildfirecode

1

parent b89cd1a2
......@@ -928,7 +928,7 @@ export class NetManager extends ABNetManager {
this.send(net);
})
}
public hc_turnableBaseInfo(callback: Function, propType?: number): void {
public hc_turnableBaseInfo(callback: Function): void {
const d: any = {
activityId: DataManager.ins.customCfgData.actId
};
......@@ -943,7 +943,7 @@ export class NetManager extends ABNetManager {
};
this.send(net);
}
public hc_turnableDojoin(callback: Function, propType?: number): void {
public hc_turnableDojoin(callback: Function): void {
const d: any = {
activityId: DataManager.ins.customCfgData.actId,
detect: window['detect'],
......
......@@ -61,7 +61,7 @@
"name": "prize2"
},
{
"keys": "startpanel通关条件_png,startpanel数量_png,startpanel数量 副本 3_png,startpanel目标33_png,startpanel目标3_png,startpanel按钮_png,startpanel_icon3_png,startpanel_icon2_png,startpanel_icon1_png,startpanel_icon_png,startpanel_ele9_png,startpanel_ele8_png,startpanel_ele7_png,startpanel_ele6_png,startpanel_ele5_png,startpanel_ele4_png,startpanel_ele3_png,startpanel_ele2_png,startpanel_ele1_png,startpanel_ele0_png,startpanel_block2_png,startpanel_bg2_png,startpanel_avatar_png",
"keys": "startpanel通关条件_png,startpanel数量_png,startpanel数量 副本 3_png,startpanel目标33_png,startpanel目标3_png,startpanel按钮_png,startpanel_icon3_png,startpanel_icon2_png,startpanel_icon1_png,startpanel_icon_png,startpanel_ele9_png,startpanel_ele8_png,startpanel_ele7_png,startpanel_ele6_png,startpanel_ele5_png,startpanel_ele4_png,startpanel_ele3_png,startpanel_ele2_png,startpanel_ele1_png,startpanel_ele0_png,startpanel_block2_png,startpanel_bg2_png,startpanel_avatar_png,startpanel_ele10_png",
"name": "startpanel"
},
{
......@@ -157,7 +157,7 @@
"name": "back"
},
{
"keys": "turprize继续闯关按钮_png,turprizebg_png",
"keys": "turprize继续闯关按钮_png,turprizebg_png,turnprize_icon1_png,turnprize_icon2_png,turnprize_icon3_png",
"name": "turntableprize"
},
{
......@@ -2747,6 +2747,26 @@
"url": "assets/turntable/turnable_icon3.png",
"type": "image",
"name": "turnable_icon3_png"
},
{
"url": "assets/turntableprize/turnprize_icon1.png",
"type": "image",
"name": "turnprize_icon1_png"
},
{
"url": "assets/turntableprize/turnprize_icon2.png",
"type": "image",
"name": "turnprize_icon2_png"
},
{
"url": "assets/turntableprize/turnprize_icon3.png",
"type": "image",
"name": "turnprize_icon3_png"
},
{
"url": "assets/startpanel2/startpanel_ele10.png",
"type": "image",
"name": "startpanel_ele10_png"
}
]
}
\ No newline at end of file
......@@ -12,5 +12,6 @@
<e:Image id="icon7" width="60" height="60" source="startpanel_ele7_png"/>
<e:Image id="icon8" width="60" height="60" source="startpanel_ele8_png"/>
<e:Image id="icon9" width="60" height="60" source="startpanel_ele9_png"/>
<e:Image id="icon10" width="60" height="60" source="startpanel_ele10_png"/>
<e:BitmapLabel id="txt" text="X0" font="nums2_fnt" scaleX="0.4" scaleY="0.4" y="46" horizontalCenter="0"/>
</e:Skin>
\ No newline at end of file
......@@ -28,10 +28,10 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="status2" text="(免费次数:1)" x="69.3" y="62.66" size="22" touchEnabled="false"/>
<e:Label id="status2" text="(免费次数:1)" x="69.3" y="62.66" size="22" touchEnabled="false" visible="false"/>
<e:Group id="status1" x="52" y="60" touchChildren="false" touchEnabled="false">
<e:Label text=")" x="132" y="2" size="22" touchEnabled="false"/>
<e:Label id="nums" text="(-50" x="0" y="0" size="22" textAlign="right" width="82" touchEnabled="false"/>
<e:Label id="nums" text="(-50" x="0" y="3" size="22" textAlign="right" width="82" touchEnabled="false"/>
<e:Image source="common_yuanbao_png" x="91.99" y="1.67"/>
</e:Group>
</e:Group>
......
......@@ -5,8 +5,15 @@
<e:Image id="light2" source="invitebg2_png" x="376" y="297" anchorOffsetX="356" anchorOffsetY="296"/>
<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="turprizebg_png" y="161" horizontalCenter="0.5"/>
<e:Image width="508" height="225" source="{data.url}" horizontalCenter="0" y="355.76"/>
<e:Image id="bg" source="turprizebg_png" y="161" horizontalCenter="0.5"/>
<e:Image id="img" width="508" height="225" source="{data.url}" horizontalCenter="0" y="355.76"/>
<e:Image id="prop" horizontalCenter="0" y="333.03" source="turnprize_icon1_png" scaleY="0.8" scaleX="0.8" visible="false"/>
<e:Image id="money" source="signprize元宝_png" y="336.2" horizontalCenter="0" scaleX="0.8" scaleY="0.8" visible="false"/>
<e:Image id="blood" source="singprize体力_png" y="298.8" horizontalCenter="0" visible="false"/>
<e:Group id="numsgroup" x="396.38" y="344.4" visible="false">
<e:Image id="numsbg0" source="signprize_numsbg_png" x="0" y="0"/>
<e:Label id="nums0" text="X8" size="22" horizontalCenter="0" verticalCenter="0" verticalAlign="middle" textAlign="center"/>
</e:Group>
<e:Button id="closeBtn" label="" y="242.88" x="615">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -32,11 +39,11 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Group id="status1" x="52" y="60" visible="false">
<e:Label text=")" x="132" y="2" size="22" touchEnabled="false"/>
<e:Label id="nums" text="(-50" x="0" y="0" size="22" textAlign="right" width="82" touchEnabled="false"/>
<e:Group id="status1" x="52" y="60">
<e:Label text=")" x="128.96" y="2" size="22" touchEnabled="false"/>
<e:Label id="nums" text="(-50" x="3.04" y="1.52" size="22" textAlign="right" width="82" touchEnabled="false"/>
<e:Image source="common_yuanbao_png" x="91.99" y="1.67"/>
</e:Group>
</e:Group>
<e:Label id="satus2" text="(免费次数:1)" x="169.3" y="693.66" size="22" touchEnabled="false" visible="false"/>
<e:Label id="status2" text="(免费次数:1)" x="169.3" y="693.66" size="22" touchEnabled="false" visible="false"/>
</e:Skin>
\ No newline at end of file
......@@ -75,6 +75,15 @@ export default class MapScene extends Scene {
async start(data?) {
super.start();
NetManager.ins.hc_turnableDojoin((s,res)=>{
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => {
const data = res.data;
const _data = Utils.deepClone(data);
_data.mv = mv;
PanelCtrl.instance.show('TurnPrizePanel', _data);
});
});
this.addIcon(); // 添加Icon
this.sendInvite();
......@@ -484,7 +493,7 @@ export default class MapScene extends Scene {
if (!success || !res.data) {
return;
}
let flag = res.data.completeFlag;
const flag = res.data.completeFlag;
switch (true) {
case (flag == 0): // 未完成
this.loadsvga(res);
......@@ -561,7 +570,7 @@ export default class MapScene extends Scene {
if (!success || !res.data) {
return;
}
let flag = res.data.completeFlag;
const flag = res.data.completeFlag;
if (this.inviteTimer) {
this.inviteTimer.stop();
}
......@@ -611,7 +620,7 @@ export default class MapScene extends Scene {
// 倒计时
private inviteCutTimer() {
let timer = this.convertTime(this.cutTime -= 1000);
const timer = this.convertTime(this.cutTime -= 1000);
if (timer.hour === "00"
&& timer.min === "00"
&& timer.sec === "00") {
......@@ -623,9 +632,9 @@ export default class MapScene extends Scene {
// 通过时间戳获取时间计数(时,分,秒)
private convertTime(time: number) {
let hour = ~~(time / 3600000); // 小时
let min = ~~((time - hour * 3600000) / 60000); // 分
let sec = ~~((time - hour * 3600000 - min * 60000) / 1000); // 秒
const hour = ~~(time / 3600000); // 小时
const min = ~~((time - hour * 3600000) / 60000); // 分
const sec = ~~((time - hour * 3600000 - min * 60000) / 1000); // 秒
return {
hour: Utils.prefixInteger(hour, 2),
......
......@@ -17,13 +17,12 @@ export default class TurntableNoPrizePanel extends Panel {
this['tips' + data.type].visible = true;
NetManager.ins.hc_turnableBaseInfo((success, res) => {
const data = res.data;
this['status1'].visible=data.remainTimes <=0;
this['status2'].visible=!this['status1'].visible;
this['nums'].text=`(-${data.remainTimes}`;
this['status2'].text=`免费次数:\n${data.remainTimes}次`;
this['status1'].visible = data.remainTimes <= 0;
this['status2'].visible = !this['status1'].visible;
this['nums'].text = `(-${data.nextTimeNeedCoin}`;
this['status2'].text = `免费次数:${data.remainTimes}次`;
});
}
showlog() {
......
......@@ -4,6 +4,7 @@ import { gotoNextLevel } from "../gotoNextLevel";
import PanelCtrl from "../../../libs/new_wx/ctrls/panelCtrl";
import { loadSvga } from "../../loadSvga";
import getResPath from "../../../libs/new_tc/getResPath";
import { NetManager } from "../../../libs/tw/manager/NetManager";
export default class TurnPrizePanel extends Panel {
start(data) {
......@@ -19,6 +20,21 @@ export default class TurnPrizePanel extends Panel {
this.playBgAni();
}, this);
this['container'].addChild(data.mv);
NetManager.ins.hc_turnableBaseInfo((success, res) => {
const data = res.data;
this['status1'].visible = data.remainTimes <= 0;
this['status2'].visible = !this['status1'].visible;
this['nums'].text = `(-${data.nextTimeNeedCoin}`;
this['status2'].text = `免费次数:${data.remainTimes}次`;
});
console.log(data)
this.updateOption(data.option);
}
updateOption(option: any) {
const { categoryType } = option;
}
playBgAni() {
......@@ -45,7 +61,7 @@ export default class TurnPrizePanel extends Panel {
console.log('再来一次');
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100);
PanelCtrl.instance.show('turnTable', { onceAgain: 1,mv:mv });
PanelCtrl.instance.show('turnTable', { onceAgain: 1, mv: mv });
});
}
onTap_btn2() {
......
......@@ -40,9 +40,9 @@
}
]
},
"remainTimes":0,
"remainTimes":11,
"costCoinJoinTimes":10,
"nextTimeNeedCoin":10000
"nextTimeNeedCoin":999999
},
"desc":"OK",
"success":true,
......
{
"code":"600051",
"code":"600015",
"data":{
"isScratchCard":false,
"option":{
......
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