Commit 38625b7b authored by zjz1994's avatar zjz1994

体力获取有无转盘奖励

parent d0e648fb
......@@ -41,54 +41,56 @@ export default class BloodPanel extends Panel {
}
//切换显示状态,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;
}
NetManager.ins.getConfigInfo((s,res)=>{
console.log("收到获取是否展示转盘",s,res);
//是否显示抽奖得体力
var showcj:boolean = false;
if(res&&res.data&&res.data.luckyDrawConf&&res.data.luckyDrawConf.enable){
showcj = true;
}
//显示条数
var tipnum:number = 3;
//有无按钮
var havebtn:boolean = true;
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;
}
//界面根据体力数量显示长短两个
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{
if(havebtn){
bgheight = 1010;
cutheight = 170
}else{
bgheight = 891;
cutheight = 50;
}
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["bg2"].height = bgheight;
this["botinfo"].y = bgheight-cutheight-75-40;
})
this['price1Txt'].text = `${window['price1']}个元宝=1个体力值`;
this['resumeBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
......
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