Commit 1cb0b973 authored by 邱旭's avatar 邱旭

1

parent f45f777a
......@@ -73,18 +73,18 @@ export default class Turntable extends Panel {
}
onTapStart() {
// this.setBtnTouch(false); // 锁定按钮
// Loading.instace.show();
// GDispatcher.dispatchEvent('queryPrize');
this.setBtnTouch(false); // 锁定按钮
Loading.instace.show();
GDispatcher.dispatchEvent('queryPrize');
//1换个姿势再来一次2 奖励溜走了3 离奖励只差一毫米
//抽奖结束
//如果是刮刮卡类型
this.updateIcon();
loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => {
// await wait(100);
PanelCtrl.instance.show('TurnPrize2Panel', {mv: mv});
});
// this.updateIcon();
// loadSvga(getResPath() + 'resource/assets/svgas/turnprize.svga').then(async (mv: any) => {
// // await wait(100);
// PanelCtrl.instance.show('TurnPrize2Panel', {mv: mv});
// });
}
updateIcon() {
......@@ -108,6 +108,22 @@ export default class Turntable extends Panel {
* 开始游戏
*/
private doJoin() {
NetManager.ins.hc_turnableDojoin((success, res)=>{
Loading.instace.hide();
if(!success){
return;
}
this.rotateByPrize(res.data.option.categoryType, () => {
// if(!res.lottery || res.lottery.type == 'thanks') { // 如果未中奖
// PanelCtrl.instance.show(ModuleTypes.NO_PRIZE_PANEL);
// this.setBtnTouch(true); // 开启按钮
// } else {
// PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL, res.lottery);
// GDispatcher.dispatchEvent('getCount'); // 更新免费抽奖次数
// this.setBtnTouch(true); // 开启按钮
// }
});
})
/////////////////////////////////////////// 开始转盘并查询奖品 ///////////////////////////////////////////
// hdGameDoDojoin((success, res) => {
//
......@@ -201,12 +217,17 @@ export default class Turntable extends Panel {
if(!success) {
return;
}
let prizeList = Utils.deepClone(res.data.prizeList);
let prizeList = [];
for(let v of res.data.luckyDrawInfo.prizeList){
prizeList.push(Utils.deepClone(v));
}
prizeList.push({
categoryType: 'thanks',
}, {
categoryType: 'scratch',
});
for(let i = 0; i < prizeList.length; i++) {
let v = prizeList[i];
let prizeImg = "";
......
......@@ -32,12 +32,12 @@
"title":"奖品信息"
},
{
"categoryType":8,
"categoryType":3,
"num":10,
"propType":2,
"rate":"30",
"title":"奖品信息"
},
}
]
},
"remainTimes":1,
......
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