Commit 011cc831 authored by 邱旭's avatar 邱旭

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into dev

parents b94b9b4f d69f262c
...@@ -81,6 +81,7 @@ import BackIndexPanel from "../../src/panels/BackIndexPanel"; ...@@ -81,6 +81,7 @@ import BackIndexPanel from "../../src/panels/BackIndexPanel";
import HelpBloodPanel from "../../src/panels/help/HelpBloodPanel"; import HelpBloodPanel from "../../src/panels/help/HelpBloodPanel";
import HelpInvitePanel from "../../src/panels/help/HelpInvitePanel"; import HelpInvitePanel from "../../src/panels/help/HelpInvitePanel";
import HelpScratchPanel from "../../src/panels/help/HelpScratchPanel"; import HelpScratchPanel from "../../src/panels/help/HelpScratchPanel";
import HelpInvitePanel2 from "../../src/panels/help/HelpInvitePanel2";
export default class MainBase extends eui.UILayer { export default class MainBase extends eui.UILayer {
constructor() { constructor() {
...@@ -125,7 +126,7 @@ export default class MainBase extends eui.UILayer { ...@@ -125,7 +126,7 @@ export default class MainBase extends eui.UILayer {
['bag', { cls: BagPanel }], ['bag', { cls: BagPanel }],
['bagquit', { cls: BagQuitPanel }], ['bagquit', { cls: BagQuitPanel }],
['bloodPanel', { cls: BloodPanel }], ['bloodPanel', { cls: BloodPanel }],
['blood2Panel', { cls: BloodPanel2 }], ['blood2Panel', { cls: BloodPanel }],
['GoldPanel', { cls: GoldPanel }], ['GoldPanel', { cls: GoldPanel }],
['Shop', { cls: ShopPanel }], ['Shop', { cls: ShopPanel }],
['StartPanel', { cls: StartPanel }], ['StartPanel', { cls: StartPanel }],
...@@ -171,6 +172,7 @@ export default class MainBase extends eui.UILayer { ...@@ -171,6 +172,7 @@ export default class MainBase extends eui.UILayer {
['recharge', { cls: RechargePanel }], ['recharge', { cls: RechargePanel }],
['HelpBloodPanel', { cls: HelpBloodPanel }], ['HelpBloodPanel', { cls: HelpBloodPanel }],
['HelpInvitePanel', { cls: HelpInvitePanel }], ['HelpInvitePanel', { cls: HelpInvitePanel }],
['HelpInvitePanel2', { cls: HelpInvitePanel2 }],
['HelpScratchPanel', { cls: HelpScratchPanel }], ['HelpScratchPanel', { cls: HelpScratchPanel }],
]; ];
......
...@@ -7,6 +7,10 @@ import PanelCtrl from "../ctrls/panelCtrl"; ...@@ -7,6 +7,10 @@ import PanelCtrl from "../ctrls/panelCtrl";
export default class TurnRulePanel extends Panel { export default class TurnRulePanel extends Panel {
public labContent: eui.Label; public labContent: eui.Label;
public scroller: eui.Scroller; public scroller: eui.Scroller;
constructor(data?){
super();
this.data = data;
}
start() { start() {
super.start(); super.start();
...@@ -30,7 +34,7 @@ export default class TurnRulePanel extends Panel { ...@@ -30,7 +34,7 @@ export default class TurnRulePanel extends Panel {
super.onTouchTap_closeBtn(); super.onTouchTap_closeBtn();
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => { loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100); // await wait(100);
PanelCtrl.instance.show('turnTable', { mv: mv }); PanelCtrl.instance.show('turnTable', { mv: mv ,from:this.data&&this.data.turnfrom||null});
}) })
} }
get skinKey() { return 'TurnRule' } get skinKey() { return 'TurnRule' }
......
...@@ -2449,4 +2449,22 @@ export class NetManager extends ABNetManager { ...@@ -2449,4 +2449,22 @@ export class NetManager extends ABNetManager {
}; };
this.send(net); this.send(net);
} }
/**
* 测试体力补充是否展示转盘
* @param callback
*/
public getTestShowTurntable(callback:Function){
const net: INetData = {
name: "getTestShowTurntable",
uri: window['duiba'] + '/customActivity/happyclear/getTestShowTurntable',
type: 'get',
dataType: 'json',
hideMsg: true,
param: {
activityId: DataManager.ins.customCfgData.actId,
},
callback: callback
};
this.send(net);
}
} }
\ No newline at end of file
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
"name": "helpGroup" "name": "helpGroup"
}, },
{ {
"keys": "help_blood_fail_text2_png,help_blood_fail_text3_png,help_blood_fail_text4_png,help_invite2_text3_png,help_invite2_text4_png,commom_prop_bg2_png,turnprize_icon12_png,turnprize_icon22_png,turnprize_icon32_png,recharge_icon2_png,turntabletit_png,turntable_paneldi_png,turntable_paneldi2_png,turntabletit2_png,sign_mask_png,signitemno_png,signitemyes_png", "keys": "help_blood_fail_text2_png,help_blood_fail_text3_png,help_blood_fail_text4_png,help_invite2_text3_png,help_invite2_text4_png,commom_prop_bg2_png,turnprize_icon12_png,turnprize_icon22_png,turnprize_icon32_png,recharge_icon2_png,turntabletit_png,turntable_paneldi_png,turntable_paneldi2_png,turntabletit2_png,sign_mask_png,signitemno_png,signitemyes_png,choujiang_png,itembg_png,bloodhert_png,blooduan_png,blooduanm_png",
"name": "preload" "name": "preload"
} }
], ],
...@@ -5162,6 +5162,31 @@ ...@@ -5162,6 +5162,31 @@
"type": "image", "type": "image",
"name": "taskPrize_chuizi_png" "name": "taskPrize_chuizi_png"
}, },
{
"name": "choujiang_png",
"type": "image",
"url": "assets/blood/choujiang.png"
},
{
"name": "itembg_png",
"type": "image",
"url": "assets/blood/itembg.png"
},
{
"name": "bloodhert_png",
"type": "image",
"url": "assets/blood/bloodhert.png"
},
{
"name": "blooduan_png",
"type": "image",
"url": "assets/blood/blooduan.png"
},
{
"name": "blooduanm_png",
"type": "image",
"url": "assets/blood/blooduanm.png"
},
{ {
"url": "assets/invite/cutTime/invateCut_bg.png", "url": "assets/invite/cutTime/invateCut_bg.png",
"type": "image", "type": "image",
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="BloodSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="BloodSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image y="46" horizontalCenter="0" source="blood体力补济站_png"/> <e:Image id="bg2" fillMode="clip" y="-75.58" source="blooduanm_png" horizontalCenter="0" scale9Grid="140,498,445,80"/>
<e:Label text="元宝兑换得体力" y="504.08" size="26" x="216.88" textColor="0xC33700"/> <e:Group id="topinfo" width="750" height="50" y="355.57" horizontalCenter="0">
<e:Label text="分享活动得体力" y="646.22" size="26" x="219.39" textColor="0xC33700"/> <e:Image source="bloodhert_png" x="293.98" scaleX="0.4" scaleY="0.4" verticalCenter="2.5"/>
<e:Label id="invitTxt" text="(已领0/1)" y="682.12" size="22" x="217.84" textColor="0xC33700"/> <e:Label text="剩余:" textColor="0xF54500" size="30" horizontalCenter="0" x="330" scaleX="1" scaleY="1" verticalCenter="0" fontFamily="FZY3JW"/>
<e:Label id="price1Txt" text="30个元宝=1个体力值" y="541.08" x="216.32" size="22" textColor="0xC33700"/> <e:Label id="bloodTxt" text="5" textColor="0xF54500" size="40" horizontalCenter="45.5" x="330" scaleX="1" scaleY="1" verticalCenter="0" fontFamily="FZY3JW"/>
<e:Button id="closeBtn" label="" x="614" y="241"> </e:Group>
<e:Button id="closeBtn" label="" x="607.34" y="237.67">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing"> <e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/> <e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
...@@ -13,38 +18,75 @@ ...@@ -13,38 +18,75 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="resumeBtn" label="" y="805" horizontalCenter="0">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="blood按钮_png" source.down="blood按钮_png" source.disabled="blood按钮_png"/> <e:Group id="selbox" width="531" y="427.37" horizontalCenter="0.5">
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/> <e:Group id="zhuanpan" width="531" height="121" scaleX="1" scaleY="1" horizontalCenter="0" top="0">
</e:Skin> <e:Image source="itembg_png" horizontalCenter="0" verticalCenter="0"/>
</e:skinName> <e:Image source="bloodhert_png" x="12" verticalCenter="6.5"/>
</e:Button> <e:Label text="+1" x="38" y="48.6" size="24" fontFamily="FZY3JW"/>
<e:Button id="buyBtn" label="" x="433" y="496"> <e:Label text="转盘抽奖得体力" size="24" x="105" scaleX="1" scaleY="1" verticalCenter="0.5" textAlign="left" fontFamily="FZY3JW" textColor="0xc17343" strokeColor="0xffe9c0" stroke="2" bold="true"/>
<e:skinName> <e:Button id="choujiangbtn" label="" x="328" y="23">
<e:Skin states="up,down,disabled"> <e:skinName>
<e:Image width="100%" height="100%" source="blood按钮 副本_png" source.down="blood按钮 副本_png" source.disabled="blood按钮 副本_png"/> <e:Skin states="up,down,disabled">
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/> <e:Image width="100%" height="100%" source="choujiang_png" source.down="choujiang_png" source.disabled="choujiang_png"/>
</e:Skin> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:skinName> </e:Skin>
</e:Button> </e:skinName>
<e:Button id="inviteBtn" label="" x="433" y="635"> </e:Button>
<e:skinName> </e:Group>
<e:Group id="yuanbao" width="531" height="121" scaleX="1" scaleY="1" y="141">
<e:Image source="itembg_png" horizontalCenter="0" verticalCenter="0"/>
<e:Image source="bloodhert_png" x="12" verticalCenter="6.5"/>
<e:Label text="+1" x="38" y="48.6" size="24" fontFamily="FZY3JW"/>
<e:Label text="使用元宝兑换" size="24" x="105" scaleX="1" scaleY="1" verticalCenter="-19.5" textAlign="left" fontFamily="FZY3JW" textColor="0xc17343" bold="true" stroke="2" strokeColor="0xffe9c0"/>
<e:Label id="price1Txt" text="30个元宝=1个体力值" x="105" size="23" scaleX="1" scaleY="1" y="67" textAlign="left" fontFamily="FZY3JW" textColor="0xc17343" bold="true" strokeColor="0xffe9c0" stroke="2"/>
<e:Button id="buyBtn" label="" x="328" scaleX="1" scaleY="1" y="23">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="blood按钮 副本_png" source.down="blood按钮 副本_png" source.disabled="blood按钮 副本_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
<e:Group id="fenxiang" width="531" height="121" scaleX="1" scaleY="1" y="282">
<e:Image source="itembg_png" horizontalCenter="0" verticalCenter="0"/>
<e:Image source="bloodhert_png" x="12" verticalCenter="6.5"/>
<e:Label text="+1" x="38" y="48.6" size="24" fontFamily="FZY3JW"/>
<e:Label text="分享活动得体力" size="24" x="105" scaleX="1" scaleY="1" y="28" fontFamily="FZY3JW" textColor="0xc17343" stroke="2" bold="true" strokeColor="0xffe9c0"/>
<e:Label id="invitTxt" text="(已领0/1)" size="24" x="105" scaleX="1" scaleY="1" textAlign="left" y="67" fontFamily="FZY3JW" textColor="0xc17343" bold="true" strokeColor="0xffe9c0" stroke="2"/>
<e:Button id="inviteBtn" label="" x="328" scaleX="1" scaleY="1" y="23">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="blood按钮 副本1_png" source.down="blood按钮 副本1_png" source.disabled="blood按钮 副本1_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="inviteBtn2" label="" x="318" scaleX="1" scaleY="1" y="23" visible="false">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="blood去分享_png" source.down="blood去分享_png" source.disabled="blood去分享_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</e:Group>
</e:Group>
<e:Group id="botinfo" width="750" height="170" y="846.45" horizontalCenter="0">
<e:Image id="countheart" source="bloodhert_png" x="273.28" scaleX="0.4" scaleY="0.4" y="11"/>
<e:Label id="countdownTxt" text="恢复:00:32:41" size="24" width="509" verticalAlign="middle" textAlign="left" x="314" scaleX="1" scaleY="1" y="13" textColor="0xc17343" fontFamily="FZY3JW" bold="false"/>
<e:Button id="resumeBtn" label="" y="50" horizontalCenter="0" x="189" scaleX="1" scaleY="1">
<e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="blood按钮 副本1_png" source.down="blood按钮 副本1_png" source.disabled="blood按钮 副本1_png"/> <e:Image width="100%" height="100%" source="blood按钮_png" source.down="blood按钮_png" source.disabled="blood按钮_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/> <e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="inviteBtn2" label="" x="433" y="635" visible="false"> </e:Group>
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="blood去分享_png" source.down="blood去分享_png" source.disabled="blood去分享_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label id="bloodTxt" text="你的可用体力值为:5" y="303.92" horizontalCenter="0" textColor="0xF54500" size="33"/>
<e:Label id="countdownTxt" text="距离下一次体力补给时间:" y="753.76" size="22" width="509" horizontalCenter="0.5" verticalAlign="middle" textAlign="center" textColor="0x86533A"/>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -25,7 +25,7 @@ export default class CountDown extends egret.EventDispatcher { ...@@ -25,7 +25,7 @@ export default class CountDown extends egret.EventDispatcher {
const h = Math.floor( left / 3600); const h = Math.floor( left / 3600);
const m = Math.floor ( (left % 3600) / 60 ); const m = Math.floor ( (left % 3600) / 60 );
const s = left % 3600 % 60; const s = left % 3600 % 60;
this._txt.text = `${this.getNumber(h)}:${this.getNumber(m)}:${this.getNumber(s)}`; this._txt.text = `${this.getNumber(h)} : ${this.getNumber(m)} : ${this.getNumber(s)}`;
if(this._func) { if(this._func) {
this._txt.text = this._func(this._txt.text); this._txt.text = this._func(this._txt.text);
} }
......
...@@ -74,8 +74,8 @@ export default class MapScene extends Scene { ...@@ -74,8 +74,8 @@ export default class MapScene extends Scene {
else if (code.indexOf("12345678") == -1) { // 邀请有礼 else if (code.indexOf("12345678") == -1) { // 邀请有礼
const dojoin = DataManager.ins.getData('hc_doJoin'); const dojoin = DataManager.ins.getData('hc_doJoin');
if (!dojoin) { if (!dojoin) {
showToast("开启消除之旅"); panels.push('HelpInvitePanel2');
return false; return true;
} }
const netCallback = () => { doHelpFlag = true; }; const netCallback = () => { doHelpFlag = true; };
panels.push('HelpInvitePanel'); panels.push('HelpInvitePanel');
......
...@@ -15,6 +15,9 @@ import BloodPanel2 from "./BloodPanel2"; ...@@ -15,6 +15,9 @@ import BloodPanel2 from "./BloodPanel2";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import { showShareCodePanel, CodeChannels } from "./ShareCodePanel"; import { showShareCodePanel, CodeChannels } from "./ShareCodePanel";
import { DataManager } from "../../libs/tw/manager/DataManager"; import { DataManager } from "../../libs/tw/manager/DataManager";
import { loadSvga } from "../loadSvga";
import getResPath from "../../libs/new_tc/getResPath";
import setGlow from "../setGlow";
export default class BloodPanel extends Panel { export default class BloodPanel extends Panel {
//修改,暂时只能根据接口获取 //修改,暂时只能根据接口获取
...@@ -31,16 +34,68 @@ export default class BloodPanel extends Panel { ...@@ -31,16 +34,68 @@ export default class BloodPanel extends Panel {
this.askForEnergyCount = res.data; this.askForEnergyCount = res.data;
this['invitTxt'].text = `(已领${this.askForEnergyCount /*data.askForEnergy*/}/${BloodPanel.MAX})`; this['invitTxt'].text = `(已领${this.askForEnergyCount /*data.askForEnergy*/}/${BloodPanel.MAX})`;
if (this.askForEnergyCount/*data.askForEnergy*/ >= BloodPanel.MAX) { if (this.askForEnergyCount/*data.askForEnergy*/ >= BloodPanel.MAX) {
this['inviteBtn2'].visible = true; // this['inviteBtn2'].visible = true;
} }
} }
}, DataManager.ins.getData("getUserShareCode").data) }, DataManager.ins.getData("getUserShareCode").data)
} }
//切换显示状态,todo
NetManager.ins.getTestShowTurntable((s,res)=>{
// console.log("收到获取是否展示转盘",s,res);
if(res&&res.data){
//显示条数
var tipnum:number = 3;
//有无按钮
var havebtn:boolean = true;
//是否显示抽奖得体力
var showcj:boolean = res.data.showcj;
this["zhuanpan"].visible = showcj;
if(showcj){
this["zhuanpan"].y = 0;
this["yuanbao"].y = (121+20)*1;
this["fenxiang"].y = (121+20)*2;
tipnum = 3;
}else{
this["yuanbao"].y = 0;
this["fenxiang"].y = 121+20;
tipnum = 2;
}
//界面根据体力数量显示长短两个
const homeData = getHomeData();
havebtn = this["resumeBtn"].visible = homeData.remainEnargy>0?true:false;
var bgheight:number;
var cutheight:number;
if(tipnum==3){
if(havebtn){
bgheight = 1130;
cutheight = 170;
}else{
cutheight = 50;
bgheight = 1010;
}
}else{
if(havebtn){
bgheight = 1010;
cutheight = 170
}else{
bgheight = 891;
cutheight = 50;
}
}
this["bg2"].height = bgheight;
this["botinfo"].y = bgheight-cutheight-75-40;
}
})
this['price1Txt'].text = `${window['price1']}个元宝=1个体力值`; this['price1Txt'].text = `${window['price1']}个元宝=1个体力值`;
this['resumeBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => { this['resumeBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
gotoNextLevel(); gotoNextLevel();
}, this); }, this);
// setGlow(this["price1Txt"],0xffffff,1);
// setGlow(this["invitTxt"],0xffffff,1);
} }
showlog() { showlog() {
...@@ -54,21 +109,24 @@ export default class BloodPanel extends Panel { ...@@ -54,21 +109,24 @@ export default class BloodPanel extends Panel {
private updateData() { private updateData() {
if (this._countDown == null) { if (this._countDown == null) {
this._countDown = new CountDown(this['countdownTxt'], (str) => `距离下一次体力补给时间:${str}`); this._countDown = new CountDown(this['countdownTxt'], (str) => `恢复 : ${str}`);
} }
const homeData = getHomeData(); const homeData = getHomeData();
this['bloodTxt'].text = `你的可用体力值为:${homeData.remainEnargy}`; this['bloodTxt'].text = `${homeData.remainEnargy}`;
const data = getHomeData(); const data = getHomeData();
this['invitTxt'].text = `(已领${this.askForEnergyCount /*data.askForEnergy*/}/${BloodPanel.MAX})`; this['invitTxt'].text = `(已领${this.askForEnergyCount /*data.askForEnergy*/}/${BloodPanel.MAX})`;
if (this.askForEnergyCount/*data.askForEnergy*/ >= BloodPanel.MAX) { if (this.askForEnergyCount/*data.askForEnergy*/ >= BloodPanel.MAX) {
this['inviteBtn2'].visible = true; // this['inviteBtn2'].visible = true;
} }
if (data.remainEnargy >= BLOOD_NUMS_MAX) { //满了 if (data.remainEnargy >= BLOOD_NUMS_MAX) { //满了
this['bloodTxt'].text = `你的可用体力值为:${homeData.remainEnargy}`; this['bloodTxt'].text = `${homeData.remainEnargy}`;
this._countDown.stop(); this._countDown.stop();
this['countdownTxt'].visible = false; this['countheart'].visible=this['countdownTxt'].visible = false;
} else { } else {
this['countdownTxt'].visible = true; this['countheart'].visible=this['countdownTxt'].visible = true;
//模拟下次增加时间
// data.refectionCountdown = Math.floor(new Date().getTime() / 1000)+60*5;
const left = data.refectionCountdown - Math.floor(new Date().getTime() / 1000); const left = data.refectionCountdown - Math.floor(new Date().getTime() / 1000);
this._countDown.reset(left); this._countDown.reset(left);
} }
...@@ -80,9 +138,10 @@ export default class BloodPanel extends Panel { ...@@ -80,9 +138,10 @@ export default class BloodPanel extends Panel {
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this) this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
this['inviteBtn2'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this) this['inviteBtn2'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this);
this['buyBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapBuy, this) this['buyBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapBuy, this);
this["choujiangbtn"].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onChouJiang, this);
} }
onTapBuy() { onTapBuy() {
...@@ -107,6 +166,15 @@ export default class BloodPanel extends Panel { ...@@ -107,6 +166,15 @@ export default class BloodPanel extends Panel {
}, 1); }, 1);
} }
onChouJiang(){
this["choujiangbtn"].enabled = false;
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100);
this["choujiangbtn"].enabled = true;
PanelCtrl.instance.show('turnTable', {mv:mv,from: 'bloodPanel'});
})
}
// onTapInvite() { // onTapInvite() {
// if(iswx()) { // if(iswx()) {
......
...@@ -173,7 +173,7 @@ export default class RechargePanel extends Panel { ...@@ -173,7 +173,7 @@ export default class RechargePanel extends Panel {
if(this.data.from == 'turnTable') { if(this.data.from == 'turnTable') {
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => { loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100); // await wait(100);
PanelCtrl.instance.show('turnTable', {mv: mv}) PanelCtrl.instance.show('turnTable', {mv: mv,from:this.data&&this.data.turnfrom||null})
}) })
} else { } else {
PanelCtrl.instance.show(this.data.from, this.data.data); PanelCtrl.instance.show(this.data.from, this.data.data);
......
...@@ -21,7 +21,7 @@ export default class ShopTipPanel extends Panel { ...@@ -21,7 +21,7 @@ export default class ShopTipPanel extends Panel {
if(this.data.from == 'turnTable') { if(this.data.from == 'turnTable') {
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => { loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100); // await wait(100);
PanelCtrl.instance.show('turnTable', {mv: mv}) PanelCtrl.instance.show('turnTable', {mv: mv,from:this.data&&this.data.turnfrom||null})
}) })
} else { } else {
PanelCtrl.instance.show(this.data.from, this.data.data); PanelCtrl.instance.show(this.data.from, this.data.data);
......
...@@ -73,6 +73,9 @@ export default class Turntable extends Panel { ...@@ -73,6 +73,9 @@ export default class Turntable extends Panel {
onTouchTap_closeBtn() { onTouchTap_closeBtn() {
super.onTouchTap_closeBtn(); super.onTouchTap_closeBtn();
if(this.data&&this.data.from&&this.data.from=="bloodPanel"){
PanelCtrl.instance.show('bloodPanel')
}
} }
removeEvents() { removeEvents() {
...@@ -83,7 +86,7 @@ export default class Turntable extends Panel { ...@@ -83,7 +86,7 @@ export default class Turntable extends Panel {
} }
onTapRulebtn() { onTapRulebtn() {
PanelCtrl.instance.show('TurnRulePanel') PanelCtrl.instance.show('TurnRulePanel',{turnfrom:this.data&&this.data.from||null});
} }
onTapStart() { onTapStart() {
...@@ -92,7 +95,7 @@ export default class Turntable extends Panel { ...@@ -92,7 +95,7 @@ export default class Turntable extends Panel {
Loading.instace.show(); Loading.instace.show();
if(this.remainTimes <= 0 && (getHomeData().wealth < this.nextTimeNeedCoin)) { if(this.remainTimes <= 0 && (getHomeData().wealth < this.nextTimeNeedCoin)) {
// showToast("元宝不足咯~快去闯关赢元宝吧"); // showToast("元宝不足咯~快去闯关赢元宝吧");
PanelCtrl.instance.show('shopTip', {from: 'turnTable', data: null}); PanelCtrl.instance.show('shopTip', {from: 'turnTable', data: null,turnfrom:this.data&&this.data.from||null});
Loading.instace.hide(); Loading.instace.hide();
this.setBtnTouch(true); this.setBtnTouch(true);
return; return;
...@@ -164,14 +167,14 @@ export default class Turntable extends Panel { ...@@ -164,14 +167,14 @@ export default class Turntable extends Panel {
this.hidePanel(); this.hidePanel();
break; break;
case (code == "600015"): // 命中风控参与规则 case (code == "600015"): // 命中风控参与规则
PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 1}); PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 1,turnfrom:this.data&&this.data.from||null});
break; break;
case (code == "600016"): // 苏宁风控 命中 case (code == "600016"): // 苏宁风控 命中
PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 1}); PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 1,turnfrom:this.data&&this.data.from||null});
break; break;
default: default:
PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 3}); PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 3,turnfrom:this.data&&this.data.from||null});
break; break;
} }
return; return;
...@@ -183,14 +186,16 @@ export default class Turntable extends Panel { ...@@ -183,14 +186,16 @@ export default class Turntable extends Panel {
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => { loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => {
let _data = Utils.deepClone(data); let _data = Utils.deepClone(data);
_data.mv = mv; _data.mv = mv;
_data['turnfrom']=this.data&&this.data.from||null
PanelCtrl.instance.show('TurnPrize2Panel', _data); PanelCtrl.instance.show('TurnPrize2Panel', _data);
}); });
} else if(!data.option || data.categoryType == 1) { } else if(!data.option || data.categoryType == 1) {
PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 3}); PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 3,turnfrom:this.data&&this.data.from||null});
} else { } else {
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => { loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => {
// let _data = Utils.deepClone(data); // let _data = Utils.deepClone(data);
data.mv = mv; data.mv = mv;
data['turnfrom']=this.data&&this.data.from||null
PanelCtrl.instance.show('TurnPrizePanel', data); PanelCtrl.instance.show('TurnPrizePanel', data);
}); });
} }
......
...@@ -12,7 +12,7 @@ export default class TurntableNoPrizePanel extends Panel { ...@@ -12,7 +12,7 @@ export default class TurntableNoPrizePanel extends Panel {
start(data) { start(data) {
super.start(); super.start();
this.showlog(); this.showlog();
this.data = data;
addAdComp(84,707, this,48); addAdComp(84,707, this,48);
if (this['tips' + data.type]) if (this['tips' + data.type])
this['tips' + data.type].visible = true; this['tips' + data.type].visible = true;
...@@ -46,7 +46,7 @@ export default class TurntableNoPrizePanel extends Panel { ...@@ -46,7 +46,7 @@ export default class TurntableNoPrizePanel extends Panel {
console.log('再来一次'); console.log('再来一次');
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => { loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100); // await wait(100);
PanelCtrl.instance.show('turnTable', { onceAgain: 1, mv: mv }); PanelCtrl.instance.show('turnTable', { onceAgain: 1, mv: mv ,from:this.data&&this.data.turnfrom||null});
}) })
} }
onTap_btn2() { onTap_btn2() {
......
...@@ -91,7 +91,7 @@ export default class TurnPrizePanel extends Panel { ...@@ -91,7 +91,7 @@ export default class TurnPrizePanel extends Panel {
console.log('再来一次'); console.log('再来一次');
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => { loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100); // await wait(100);
PanelCtrl.instance.show('turnTable', { onceAgain: 1, mv: mv }); PanelCtrl.instance.show('turnTable', { onceAgain: 1, mv: mv ,from:this.data&&this.data.turnfrom||null});
}); });
} }
onTap_btn2() { onTap_btn2() {
......
...@@ -11,16 +11,15 @@ import wait from "../../../libs/new_tc/wait"; ...@@ -11,16 +11,15 @@ import wait from "../../../libs/new_tc/wait";
export default class HelpBloodPanel extends Panel { export default class HelpBloodPanel extends Panel {
netCallback; netCallback;
code; code;
// mv1; success;
// mv2;
list: any[]; list: any[];
async start(data) { async start(data) {
this.netCallback = data.netCallback; this.netCallback = data.netCallback;
this.code = data.code; this.code = data.code;
NetManager.ins.showLog(getlogItem(87)); NetManager.ins.showLog(getlogItem(87));
const s = new egret.Sprite(); const s = new egret.Sprite();
this.addChildAt(s,0); this.addChildAt(s, 0);
s.y=-250; s.y = -250;
this['txt_standby'].visible = true; this['txt_standby'].visible = true;
this['helpbtn'].visible = true; this['helpbtn'].visible = true;
...@@ -46,11 +45,14 @@ export default class HelpBloodPanel extends Panel { ...@@ -46,11 +45,14 @@ export default class HelpBloodPanel extends Panel {
loadSvga(getResPath() + 'resource/assets/svgas/bloodbg.svga', s); loadSvga(getResPath() + 'resource/assets/svgas/bloodbg.svga', s);
} }
onclick_gobtn() { onclick_gobtn() {
NetManager.ins.clickLog(getlogItem(88)); if (this.success)
NetManager.ins.clickLog(getlogItem(88));
// else
// NetManager.ins.clickLog(getlogItem(0));
this.hidePanel(); this.hidePanel();
gotoNextLevel(); gotoNextLevel();
} }
...@@ -58,11 +60,11 @@ export default class HelpBloodPanel extends Panel { ...@@ -58,11 +60,11 @@ export default class HelpBloodPanel extends Panel {
onClick() { onClick() {
NetManager.ins.clickLog(getlogItem(87)); NetManager.ins.clickLog(getlogItem(87));
NetManager.ins.showLog(getlogItem(88));
NetManager.ins.doHelpNew(async (s, res) => { NetManager.ins.doHelpNew(async (s, res) => {
this.netCallback(); this.netCallback();
if (s) { if (s) {
this.success = 1;
NetManager.ins.showLog(getlogItem(88));
play2(this.list[1]); play2(this.list[1]);
this.list[0].visible = false; this.list[0].visible = false;
this.list[1].visible = true; this.list[1].visible = true;
...@@ -72,6 +74,7 @@ export default class HelpBloodPanel extends Panel { ...@@ -72,6 +74,7 @@ export default class HelpBloodPanel extends Panel {
this['txt_standby'].visible = false; this['txt_standby'].visible = false;
this['txt_success'].visible = true; this['txt_success'].visible = true;
} else { } else {
// NetManager.ins.showLog(getlogItem(0));
this.list[2].visible = true; this.list[2].visible = true;
play2(this.list[2]); play2(this.list[2]);
this['helpbtn'].visible = false; this['helpbtn'].visible = false;
......
...@@ -6,20 +6,22 @@ import { NetManager } from "../../../libs/tw/manager/NetManager"; ...@@ -6,20 +6,22 @@ import { NetManager } from "../../../libs/tw/manager/NetManager";
import { loadSvga } from "../../loadSvga"; import { loadSvga } from "../../loadSvga";
import { gotoNextLevel } from "../gotoNextLevel"; import { gotoNextLevel } from "../gotoNextLevel";
import { getlogItem } from "../../Main"; import { getlogItem } from "../../Main";
import wait from "../../../libs/new_tc/wait";
export default class HelpInvitePanel extends Panel { export default class HelpInvitePanel extends Panel {
netCallback; netCallback;
code; code;
success;
async start(data) { async start(data) {
this.netCallback = data.netCallback; this.netCallback = data.netCallback;
this.code = data.code; this.code = data.code;
NetManager.ins.showLog(getlogItem(91));
const s = new egret.Sprite(); const s = new egret.Sprite();
this.addChildAt(s,0); this.addChildAt(s, 0);
this['txt_standby'].visible = true; this['txt_standby'].visible = false;
this['helpbtn'].visible = true; this['helpbtn'].visible = false;
this['gobtn'].visible = true;
loadSvga(getResPath() + 'resource/assets/svgas/invitebg.svga', this).then((mv: egret.DisplayObject) => { loadSvga(getResPath() + 'resource/assets/svgas/invitebg.svga', this).then((mv: egret.DisplayObject) => {
s.addChild(mv); s.addChild(mv);
...@@ -33,45 +35,47 @@ export default class HelpInvitePanel extends Panel { ...@@ -33,45 +35,47 @@ export default class HelpInvitePanel extends Panel {
]); ]);
// this['list'][0].visible=false; // this['list'][0].visible=false;
this['list'][1].visible=false; this['list'][1].visible = false;
this['list'][2].visible=false; this['list'][2].visible = false;
this['list'][0].y=-140; this['list'][0].y = -140;
this['list'][1].y=-140; this['list'][1].y = -140;
this['list'][2].y=-140; this['list'][2].y = -140;
this.addChild(this['list'][0]); this.addChild(this['list'][0]);
this.addChild(this['list'][1]); this.addChild(this['list'][1]);
this.addChild(this['list'][2]); this.addChild(this['list'][2]);
this['gobtn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_gobtn, this); this['gobtn'].once(egret.TouchEvent.TOUCH_TAP, this.onclick_gobtn, this);
this['helpbtn'].once(egret.TouchEvent.TOUCH_TAP, this.onClick, this);
// wait(100).then(()=>{
this.onClick();
// })
} }
onclick_gobtn() { onclick_gobtn() {
// NetManager.ins.clickLog(getlogItem(88)); // NetManager.ins.clickLog(getlogItem(88));
this.hidePanel(); this.hidePanel();
gotoNextLevel(); gotoNextLevel();
NetManager.ins.clickLog(getlogItem(92)); if (this.success)
NetManager.ins.clickLog(getlogItem(92));
// else
// NetManager.ins.clickLog(getlogItem(0));
} }
onClick() { onClick() {
NetManager.ins.clickLog(getlogItem(91));
NetManager.ins.showLog(getlogItem(92));
this['helpbtn'].visible = false;
this['gobtn'].visible = true;
const dojoin = DataManager.ins.getData('hc_doJoin'); const dojoin = DataManager.ins.getData('hc_doJoin');
NetManager.ins.doHelp((success, res) => { NetManager.ins.doHelp((success, res) => {
this.netCallback(); this.netCallback();
this['list'][0].visible=false; this['list'][0].visible = false;
this['txt_standby'].visible = false;
if (success) { if (success) {
this['list'][1].visible=true; this.success = 1;
NetManager.ins.showLog(getlogItem(92));
this['list'][1].visible = true;
this['list'][1].gotoAndPlay(1); this['list'][1].gotoAndPlay(1);
this['txt_success'].visible = true; this['txt_success'].visible = true;
} else { } else {
// NetManager.ins.showLog(getlogItem(0));
this['list'][2].gotoAndPlay(1); this['list'][2].gotoAndPlay(1);
this['list'][2].visible=true; this['list'][2].visible = true;
var codeMsgs = { var codeMsgs = {
"400017": "您不是新用户呢~", "400017": "您不是新用户呢~",
"0000022": "不可以给自己助力哦~", "0000022": "不可以给自己助力哦~",
......
import getResPath from "../../../libs/new_tc/getResPath";
import Panel from "../../../libs/new_wx/components/Panel";
import { showToast } from "../../../libs/new_wx/ctrls/toastCtrl";
import { DataManager } from "../../../libs/tw/manager/DataManager";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import { loadSvga } from "../../loadSvga";
import { gotoNextLevel } from "../gotoNextLevel";
import { getlogItem } from "../../Main";
export default class HelpInvitePanel2 extends Panel {
// netCallback;
// code;
async start(data) {
// this.netCallback = data.netCallback;
// this.code = data.code;
NetManager.ins.showLog(getlogItem(91));
const s = new egret.Sprite();
this.addChildAt(s,0);
this['txt_standby'].visible = true;
this['helpbtn'].visible = true;
loadSvga(getResPath() + 'resource/assets/svgas/invitebg.svga', this).then((mv: egret.DisplayObject) => {
s.addChild(mv);
mv.y = -180;
});
this['list'] = await Promise.all([
loadSvga(getResPath() + 'resource/assets/svgas/inviteAct1.svga')
]);
this['list'][0].y=-140;
this.addChild(this['list'][0]);
this['helpbtn'].once(egret.TouchEvent.TOUCH_TAP, this.onClick, this);
}
onClick() {
NetManager.ins.clickLog(getlogItem(91));
this.hidePanel();
gotoNextLevel();
}
get skinResKey() { return 'helpGroup' }
get skinKey() { return 'HelpInvite' }
}
\ No newline at end of file
...@@ -9,6 +9,7 @@ import wait from "../../../libs/new_tc/wait"; ...@@ -9,6 +9,7 @@ import wait from "../../../libs/new_tc/wait";
import { getlogItem } from "../../Main"; import { getlogItem } from "../../Main";
export default class HelpScratchPanel extends Panel { export default class HelpScratchPanel extends Panel {
netCallback; netCallback;
code; code;
list: any[]; list: any[];
...@@ -85,12 +86,6 @@ export default class HelpScratchPanel extends Panel { ...@@ -85,12 +86,6 @@ export default class HelpScratchPanel extends Panel {
await play2(this.list[0]); await play2(this.list[0]);
this['light'].visible = true; this['light'].visible = true;
}); });
// setTimeout(() => {
// }, 2000);
} }
startAni() { startAni() {
...@@ -109,6 +104,7 @@ export default class HelpScratchPanel extends Panel { ...@@ -109,6 +104,7 @@ export default class HelpScratchPanel extends Panel {
onclick_gobtn2() { onclick_gobtn2() {
this.hidePanel(); this.hidePanel();
gotoNextLevel(); gotoNextLevel();
// NetManager.ins.clickLog(getlogItem(0));
} }
onClick() { onClick() {
...@@ -130,6 +126,7 @@ export default class HelpScratchPanel extends Panel { ...@@ -130,6 +126,7 @@ export default class HelpScratchPanel extends Panel {
await play2(this.list[1]); await play2(this.list[1]);
this['light'].visible = true; this['light'].visible = true;
} else { } else {
// NetManager.ins.showLog(getlogItem(0));
this['go2btn'].visible = true; this['go2btn'].visible = true;
this.list[2].visible = true; this.list[2].visible = true;
var codeMsgs = { var codeMsgs = {
......
...@@ -200,7 +200,11 @@ const config = { ...@@ -200,7 +200,11 @@ const config = {
}, },
'/activtyShareCode/doHelpNew':{ '/activtyShareCode/doHelpNew':{
data: './happyclear/doHelpNew.json' data: './happyclear/doHelpNew.json'
} },
//////////////////// 测试展示体力补给是否显示转盘获取 ////////////////////
'/customActivity/happyclear/getTestShowTurntable':{
data:'./happyclear/getTestShowTurntable.json'
},
}; };
for (let item in config) { for (let item in config) {
......
{ {
"success":0, "success":1,
"code":"0200202", "code":"0200202",
"desc":null, "desc":null,
"timestamp":1566199822308, "timestamp":1566199822308,
......
{ {
"success": 1, "success": 0,
"code": "2002002036", "code": "2002002036",
"desc": "OK", "desc": "OK",
"timestamp": 1571052938097, "timestamp": 1571052938097,
......
{
"success": 1,
"code": "0000000000",
"desc": "OK",
"timestamp": 1572332426229,
"data": {
"showcj":true
}
}
\ No newline at end of file
...@@ -2904,7 +2904,7 @@ ...@@ -2904,7 +2904,7 @@
"num": 3 "num": 3
} }
], ],
"remainEnargy": 99, "remainEnargy": 4,
"askForEnergy": false, "askForEnergy": false,
"canReceiveTreasureBoxNum": 10, "canReceiveTreasureBoxNum": 10,
"nextRangeStarsNum": 150 "nextRangeStarsNum": 150
......
{ {
"success":1, "success":0,
"code":"0000023", "code":"0000023",
"desc":null, "desc":null,
"timestamp":1566199822308, "timestamp":1566199822308,
......
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