Commit e1b36368 authored by zjz1994's avatar zjz1994

调整体力补给界面

parent 094ed204
......@@ -125,7 +125,7 @@ export default class MainBase extends eui.UILayer {
['bag', { cls: BagPanel }],
['bagquit', { cls: BagQuitPanel }],
['bloodPanel', { cls: BloodPanel }],
['blood2Panel', { cls: BloodPanel2 }],
['blood2Panel', { cls: BloodPanel }],
['GoldPanel', { cls: GoldPanel }],
['Shop', { cls: ShopPanel }],
['StartPanel', { cls: StartPanel }],
......
......@@ -7,6 +7,10 @@ import PanelCtrl from "../ctrls/panelCtrl";
export default class TurnRulePanel extends Panel {
public labContent: eui.Label;
public scroller: eui.Scroller;
constructor(data?){
super();
this.data = data;
}
start() {
super.start();
......@@ -30,7 +34,7 @@ export default class TurnRulePanel extends Panel {
super.onTouchTap_closeBtn();
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// 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' }
......
......@@ -2449,4 +2449,22 @@ export class NetManager extends ABNetManager {
};
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,11 +241,11 @@
"name": "eleDisNew"
},
{
"keys": "help_invite2_png,help_invite2_text4_png,help_invite2_text3_png,help_invite2_text2_png,help_invite2_text_png,help_invite2_btn2_png,help_invite2_btn_png,help_invite_text_png,help_invite_success_png,help_invite_success_txt_png,help_invite_success_btn_png,help_invite_fail_png,help_invite_fail_text4_png,help_invite_fail_text3_png,help_invite_fail_text2_png,help_invite_fail_text1_png,help_invite_fail_btn_png,help_invite_btn1_png,help_invite_bg_png,help_closebtn1_png,help_blood_success_png,help_blood_success_text2_png,help_blood_success_text_png,help_blood_fail_png,help_blood_fail_text4_png,help_blood_fail_text3_png,help_blood_fail_text2_png,help_blood_fail_text_png,help_blood_fail_btn_png,help_blood_1_text_png,help_blood_1_btn_png,help_blood_1_bg_png",
"keys": "help_invite2_text4_png,help_invite2_text3_png,help_invite2_text2_png,help_invite2_text_png,help_invite2_btn2_png,help_invite2_btn_png,help_invite_text_png,help_invite_success_txt_png,help_invite_success_btn_png,help_invite_fail_text4_png,help_invite_fail_text3_png,help_invite_fail_text2_png,help_invite_fail_text1_png,help_invite_fail_btn_png,help_invite_btn1_png,help_invite_bg_png,help_closebtn1_png,help_blood_success_text2_png,help_blood_success_text_png,help_blood_fail_text4_png,help_blood_fail_text3_png,help_blood_fail_text2_png,help_blood_fail_text_png,help_blood_fail_btn_png,help_blood_1_text_png,help_blood_1_btn_png",
"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"
}
],
......@@ -5001,11 +5001,6 @@
"type": "image",
"name": "turntable_paneldi_png"
},
{
"url": "assets/help/help_blood_1_bg.png",
"type": "image",
"name": "help_blood_1_bg_png"
},
{
"url": "assets/help/help_blood_1_btn.png",
"type": "image",
......@@ -5016,11 +5011,6 @@
"type": "image",
"name": "help_blood_1_text_png"
},
{
"url": "assets/help/help_blood_fail.png",
"type": "image",
"name": "help_blood_fail_png"
},
{
"url": "assets/help/help_blood_fail_btn.png",
"type": "image",
......@@ -5046,11 +5036,6 @@
"type": "image",
"name": "help_blood_fail_text4_png"
},
{
"url": "assets/help/help_blood_success.png",
"type": "image",
"name": "help_blood_success_png"
},
{
"url": "assets/help/help_blood_success_text.png",
"type": "image",
......@@ -5066,11 +5051,6 @@
"type": "image",
"name": "help_closebtn1_png"
},
{
"url": "assets/help/help_invite2.png",
"type": "image",
"name": "help_invite2_png"
},
{
"url": "assets/help/help_invite2_btn.png",
"type": "image",
......@@ -5111,11 +5091,6 @@
"type": "image",
"name": "help_invite_btn1_png"
},
{
"url": "assets/help/help_invite_fail.png",
"type": "image",
"name": "help_invite_fail_png"
},
{
"url": "assets/help/help_invite_fail_btn.png",
"type": "image",
......@@ -5141,11 +5116,6 @@
"type": "image",
"name": "help_invite_fail_text4_png"
},
{
"url": "assets/help/help_invite_success.png",
"type": "image",
"name": "help_invite_success_png"
},
{
"url": "assets/help/help_invite_success_btn.png",
"type": "image",
......@@ -5205,6 +5175,31 @@
"url": "assets/TaskCenterPrize/taskPrize_chuizi.png",
"type": "image",
"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"
}
]
}
\ No newline at end of file
<?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:Image y="46" horizontalCenter="0" source="blood体力补济站_png"/>
<e:Label text="元宝兑换得体力" y="504.08" size="26" x="216.88" textColor="0xC33700"/>
<e:Label text="分享活动得体力" y="646.22" size="26" x="219.39" textColor="0xC33700"/>
<e:Label id="invitTxt" text="(已领0/1)" y="682.12" size="22" x="217.84" textColor="0xC33700"/>
<e:Label id="price1Txt" text="30个元宝=1个体力值" y="541.08" x="216.32" size="22" textColor="0xC33700"/>
<e:Button id="closeBtn" label="" x="614" y="241">
<e:Image id="bg2" fillMode="clip" y="-75.58" source="blooduanm_png" horizontalCenter="0" scale9Grid="140,498,445,80"/>
<e:Group id="topinfo" width="750" height="50" y="355.57" horizontalCenter="0">
<e:Image source="bloodhert_png" x="293.98" scaleX="0.4" scaleY="0.4" verticalCenter="2.5"/>
<e:Label text="剩余:" textColor="0xF54500" size="30" horizontalCenter="0" x="330" scaleX="1" scaleY="1" verticalCenter="0" fontFamily="FZY3JW"/>
<e:Label id="bloodTxt" text="5" textColor="0xF54500" size="40" horizontalCenter="45.5" x="330" scaleX="1" scaleY="1" verticalCenter="0" fontFamily="FZY3JW"/>
</e:Group>
<e:Button id="closeBtn" label="" x="614" y="241" visible="false">
<e:skinName>
<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"/>
......@@ -13,38 +18,75 @@
</e:Skin>
</e:skinName>
</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:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="buyBtn" label="" x="433" y="496">
<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:Button id="inviteBtn" label="" x="433" y="635">
<e:skinName>
<e:Group id="selbox" width="531" y="427.37" horizontalCenter="0.5">
<e:Group id="zhuanpan" width="531" height="121" scaleX="1" scaleY="1" horizontalCenter="0" top="0">
<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="0.5" textAlign="left" fontFamily="FZY3JW" textColor="0xc17343" strokeColor="0xffe9c0" stroke="2" bold="true"/>
<e:Button id="choujiangbtn" label="" x="328" y="23">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="choujiang_png" source.down="choujiang_png" source.disabled="choujiang_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
</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: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: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:Button id="inviteBtn2" label="" x="433" y="635" 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: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:skinName>
</e:Button>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -25,7 +25,7 @@ export default class CountDown extends egret.EventDispatcher {
const h = Math.floor( left / 3600);
const m = Math.floor ( (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) {
this._txt.text = this._func(this._txt.text);
}
......
......@@ -15,6 +15,9 @@ import BloodPanel2 from "./BloodPanel2";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import { showShareCodePanel, CodeChannels } from "./ShareCodePanel";
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 {
//修改,暂时只能根据接口获取
......@@ -31,16 +34,68 @@ export default class BloodPanel extends Panel {
this.askForEnergyCount = res.data;
this['invitTxt'].text = `(已领${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)
}
//切换显示状态,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['resumeBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
gotoNextLevel();
}, this);
// setGlow(this["price1Txt"],0xffffff,1);
// setGlow(this["invitTxt"],0xffffff,1);
}
showlog() {
......@@ -54,21 +109,24 @@ export default class BloodPanel extends Panel {
private updateData() {
if (this._countDown == null) {
this._countDown = new CountDown(this['countdownTxt'], (str) => `距离下一次体力补给时间:${str}`);
this._countDown = new CountDown(this['countdownTxt'], (str) => `恢复 : ${str}`);
}
const homeData = getHomeData();
this['bloodTxt'].text = `你的可用体力值为:${homeData.remainEnargy}`;
this['bloodTxt'].text = `${homeData.remainEnargy}`;
const data = getHomeData();
this['invitTxt'].text = `(已领${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) { //满了
this['bloodTxt'].text = `你的可用体力值为:${homeData.remainEnargy}`;
this['bloodTxt'].text = `${homeData.remainEnargy}`;
this._countDown.stop();
this['countdownTxt'].visible = false;
this['countheart'].visible=this['countdownTxt'].visible = false;
} 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);
this._countDown.reset(left);
}
......@@ -80,9 +138,10 @@ export default class BloodPanel extends Panel {
initEvents() {
super.initEvents();
this['inviteBtn'].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['inviteBtn'].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["choujiangbtn"].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onChouJiang, this);
}
onTapBuy() {
......@@ -107,6 +166,15 @@ export default class BloodPanel extends Panel {
}, 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() {
// if(iswx()) {
......
......@@ -173,7 +173,7 @@ export default class RechargePanel extends Panel {
if(this.data.from == 'turnTable') {
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100);
PanelCtrl.instance.show('turnTable', {mv: mv})
PanelCtrl.instance.show('turnTable', {mv: mv,from:this.data&&this.data.turnfrom||null})
})
} else {
PanelCtrl.instance.show(this.data.from, this.data.data);
......
......@@ -21,7 +21,7 @@ export default class ShopTipPanel extends Panel {
if(this.data.from == 'turnTable') {
loadSvga(getResPath() + 'resource/assets/svgas/turntable.svga').then(async (mv: any) => {
// await wait(100);
PanelCtrl.instance.show('turnTable', {mv: mv})
PanelCtrl.instance.show('turnTable', {mv: mv,from:this.data&&this.data.turnfrom||null})
})
} else {
PanelCtrl.instance.show(this.data.from, this.data.data);
......
......@@ -73,6 +73,9 @@ export default class Turntable extends Panel {
onTouchTap_closeBtn() {
super.onTouchTap_closeBtn();
if(this.data&&this.data.from&&this.data.from=="bloodPanel"){
PanelCtrl.instance.show('bloodPanel')
}
}
removeEvents() {
......@@ -83,7 +86,7 @@ export default class Turntable extends Panel {
}
onTapRulebtn() {
PanelCtrl.instance.show('TurnRulePanel')
PanelCtrl.instance.show('TurnRulePanel',{turnfrom:this.data&&this.data.from||null});
}
onTapStart() {
......@@ -92,7 +95,7 @@ export default class Turntable extends Panel {
Loading.instace.show();
if(this.remainTimes <= 0 && (getHomeData().wealth < this.nextTimeNeedCoin)) {
// 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();
this.setBtnTouch(true);
return;
......@@ -164,14 +167,14 @@ export default class Turntable extends Panel {
this.hidePanel();
break;
case (code == "600015"): // 命中风控参与规则
PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 1});
PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 1,turnfrom:this.data&&this.data.from||null});
break;
case (code == "600016"): // 苏宁风控 命中
PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 1});
PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 1,turnfrom:this.data&&this.data.from||null});
break;
default:
PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 3});
PanelCtrl.instance.show("TurntableNoPrizePanel", {type: 3,turnfrom:this.data&&this.data.from||null});
break;
}
return;
......@@ -183,14 +186,16 @@ export default class Turntable extends Panel {
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => {
let _data = Utils.deepClone(data);
_data.mv = mv;
_data['turnfrom']=this.data&&this.data.from||null
PanelCtrl.instance.show('TurnPrize2Panel', _data);
});
} 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 {
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => {
// let _data = Utils.deepClone(data);
data.mv = mv;
data['turnfrom']=this.data&&this.data.from||null
PanelCtrl.instance.show('TurnPrizePanel', data);
});
}
......
......@@ -12,7 +12,7 @@ export default class TurntableNoPrizePanel extends Panel {
start(data) {
super.start();
this.showlog();
this.data = data;
addAdComp(84,707, this,48);
if (this['tips' + data.type])
this['tips' + data.type].visible = true;
......@@ -46,7 +46,7 @@ export default class TurntableNoPrizePanel 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 ,from:this.data&&this.data.turnfrom||null});
})
}
onTap_btn2() {
......
......@@ -91,7 +91,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 ,from:this.data&&this.data.turnfrom||null});
});
}
onTap_btn2() {
......
......@@ -200,7 +200,11 @@ const config = {
},
'/activtyShareCode/doHelpNew':{
data: './happyclear/doHelpNew.json'
}
},
//////////////////// 测试展示体力补给是否显示转盘获取 ////////////////////
'/customActivity/happyclear/getTestShowTurntable':{
data:'./happyclear/getTestShowTurntable.json'
},
};
for (let item in config) {
......
{
"success": 1,
"code": "0000000000",
"desc": "OK",
"timestamp": 1572332426229,
"data": {
"showcj":true
}
}
\ 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