Commit 7bd2d8c8 authored by 邱旭's avatar 邱旭

1

parent 5f39409f
...@@ -45,6 +45,7 @@ export default class Turntable extends Panel { ...@@ -45,6 +45,7 @@ export default class Turntable extends Panel {
this['container2'].touchEnabled = false; this['container2'].touchEnabled = false;
this['container2'].touchChildren = false; this['container2'].touchChildren = false;
this['nums'].text = `当前可用元宝:${getHomeData().wealth}`; this['nums'].text = `当前可用元宝:${getHomeData().wealth}`;
this['btnLabel'].text = "";
this.initUI(); this.initUI();
} }
...@@ -127,7 +128,7 @@ export default class Turntable extends Panel { ...@@ -127,7 +128,7 @@ export default class Turntable extends Panel {
id = "thanks"; id = "thanks";
} else if(data.isScratchCard) { } else if(data.isScratchCard) {
id = "scratch"; id = "scratch";
}else { } else {
id = data.option.categoryType; id = data.option.categoryType;
} }
this.rotateByPrize(id, () => { this.rotateByPrize(id, () => {
...@@ -246,10 +247,13 @@ export default class Turntable extends Panel { ...@@ -246,10 +247,13 @@ export default class Turntable extends Panel {
// 添加奖品 // 添加奖品
let prizeList = []; let prizeList = [];
for(let v of data.luckyDrawInfo.prizeList) { for(let v of data.luckyDrawInfo.prizeList) {
if(v.categoryType == 1) {
continue;
}
prizeList.push(Utils.deepClone(v)); prizeList.push(Utils.deepClone(v));
} }
prizeList.push({ prizeList.unshift({
categoryType: 'thanks', categoryType: 'thanks',
}, { }, {
categoryType: 'scratch', categoryType: 'scratch',
...@@ -293,6 +297,9 @@ export default class Turntable extends Panel { ...@@ -293,6 +297,9 @@ export default class Turntable extends Panel {
v.prizeImg = prizeImg; v.prizeImg = prizeImg;
RotaryData.key.push(v.categoryType); RotaryData.key.push(v.categoryType);
RotaryData.data[v.categoryType] = [{start: i * 60 - 20, end: i * 60 + 20}]; RotaryData.data[v.categoryType] = [{start: i * 60 - 20, end: i * 60 + 20}];
if(i>=6){
return;
}
this[`img${i}`].source = v.prizeImg; this[`img${i}`].source = v.prizeImg;
if(this.data.onceAgain) { // 再抽一次 if(this.data.onceAgain) { // 再抽一次
......
{ {
"code":"0000000000", "success": true,
"data":{ "code": "0000000000",
"luckyDrawInfo":{ "desc": "OK",
"baseCount":50, "timestamp": 1572263074076,
"bonusCount":10, "data": {
"enable":true, "remainTimes": null,
"id":"1234", "costCoinJoinTimes": 0,
"prizeList":[ "nextTimeNeedCoin": 20,
"luckyDrawInfo": {
"enable": true,
"id": null,
"baseCount": 20,
"bonusCount": 0,
"prizeList": [
{ {
"categoryType":4, "id": "",
"coinType":1, "day": null,
"maxValue":10, "categoryType": 2,
"minValue":10, "title": "11",
"rate":"20", "rate": "11",
"title":"奖品信息" "minValue": null,
"maxValue": null,
"coinType": null,
"propType": null,
"num": 3,
"img": "",
"appItemId": null,
"name": "",
"value": ""
}, },
{ {
"appItemId":2099, "id": "",
"categoryType":5, "day": null,
"img":"虚拟商品图片", "categoryType": 4,
"name":"虚拟商品名称", "title": "11",
"rate":"30", "rate": "11",
"title":"奖品信息", "minValue": 11,
"value":"虚拟商品编码" "maxValue": null,
"coinType": 1,
"propType": null,
"num": null,
"img": "",
"appItemId": null,
"name": "",
"value": ""
}, },
{ {
"categoryType":7, "id": "",
"num":10, "day": null,
"propType":2, "categoryType": 2,
"rate":"30", "title": "111",
"title":"奖品信息" "rate": "11",
"minValue": null,
"maxValue": null,
"coinType": null,
"propType": null,
"num": 2,
"img": "",
"appItemId": null,
"name": "",
"value": ""
}, },
{ {
"categoryType":3, "id": "",
"num":10, "day": null,
"propType":2, "categoryType": 3,
"rate":"30", "title": "11",
"title":"奖品信息" "rate": "11",
"minValue": null,
"maxValue": null,
"coinType": null,
"propType": 2,
"num": null,
"img": "",
"appItemId": null,
"name": "",
"value": ""
},
{
"id": "",
"day": null,
"categoryType": 3,
"title": "11",
"rate": "11",
"minValue": null,
"maxValue": null,
"coinType": null,
"propType": 2,
"num": null,
"img": "",
"appItemId": null,
"name": "",
"value": ""
},
{
"id": "",
"day": null,
"categoryType": 2,
"title": "11",
"rate": "1",
"minValue": null,
"maxValue": null,
"coinType": null,
"propType": null,
"num": 2,
"img": "",
"appItemId": null,
"name": "",
"value": ""
},
{
"id": "",
"day": null,
"categoryType": 3,
"title": "1111",
"rate": "11",
"minValue": null,
"maxValue": null,
"coinType": null,
"propType": 2,
"num": null,
"img": "",
"appItemId": null,
"name": "",
"value": ""
} }
] ]
}, }
"remainTimes":11, }
"costCoinJoinTimes":10, }
"nextTimeNeedCoin":999999 \ No newline at end of file
},
"desc":"OK",
"success":true,
"timestamp":1572060015013
}
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