Commit 381060c5 authored by wildfirecode13's avatar wildfirecode13

u

parent efbafed9
...@@ -11,6 +11,12 @@ ...@@ -11,6 +11,12 @@
<meta name="screen-orientation" content="portrait" /> <meta name="screen-orientation" content="portrait" />
<meta name="x5-fullscreen" content="true" /> <meta name="x5-fullscreen" content="true" />
<meta name="360-fullscreen" content="true" /> <meta name="360-fullscreen" content="true" />
<script src="https://yun.duiba.com.cn/db_games/debug/vconsole.min.js"></script>
<script>
// init vConsole
var vConsole = new VConsole();
console.log('Hello world');
</script>
<script src="//res.wx.qq.com/open/js/jweixin-1.3.2.js"></script> <script src="//res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
<!-- 渲染引擎 --> <!-- 渲染引擎 -->
<script src="//yun.duiba.com.cn/db_games/libs0924/fyge2018.minSpine.js" crossorigin="anonymous"></script> <script src="//yun.duiba.com.cn/db_games/libs0924/fyge2018.minSpine.js" crossorigin="anonymous"></script>
......
{ {
"code": null, "code": null,
"data": { "data": 123,
"surplusCount": 456,
"credits": 78900,
"needCredits": 12345,
"type": 1,
"isMember":1
},
"message": null, "message": null,
"success": true "success": true
} }
\ No newline at end of file
...@@ -5,29 +5,16 @@ ...@@ -5,29 +5,16 @@
"options": [ "options": [
{ {
"extra": null, "extra": null,
"optionId": "et esse laborum", "optionId": "thanks",
"optionImg": "https://yun.duiba.com.cn/db_games/sxbank.png", "optionImg": null,
"optionName": "aliquip dolore qui nulla", "optionName": "谢谢参与",
"position": -13810392, "position": null,
"prizeId": "non labore eiusmod consequat", "prizeId": "thanks",
"prizeType": -25600732, "prizeType": 0,
"ruleId": "fugiat minim in adipisicing", "ruleId": "ru_1",
"sendCount": 3860338, "sendCount": 1,
"url": "eu veniam ipsum tempor", "url": null,
"userRecordId": -15254782 "userRecordId": null
},
{
"extra": null,
"optionId": "et esse laborum",
"optionImg": "https://yun.duiba.com.cn/db_games/sxbank.png",
"optionName": "aliquip dolore qui nulla",
"position": -13810392,
"prizeId": "non labore eiusmod consequat",
"prizeType": -25600732,
"ruleId": "fugiat minim in adipisicing",
"sendCount": 3860338,
"url": "eu veniam ipsum tempor",
"userRecordId": -15254782
} }
] ]
}, },
......
{
"code": null,
"data": {
"extra": null,
"options": [
{
"extra": null,
"optionId": "thanks",
"optionImg": null,
"optionName": "谢谢参与",
"position": null,
"prizeId": "thanks",
"prizeType": 0,
"ruleId": "ru_1",
"sendCount": 1,
"url": null,
"userRecordId": null
}
]
},
"message": null,
"success": true
}
\ No newline at end of file
{
"code": null,
"data": {
"extra": null,
"options": [
{
"extra": null,
"optionId": "et esse laborum",
"optionImg": "https://yun.duiba.com.cn/db_games/sxbank.png",
"optionName": "aliquip dolore qui nulla",
"position": -13810392,
"prizeId": "non labore eiusmod consequat",
"prizeType": -25600732,
"ruleId": "fugiat minim in adipisicing",
"sendCount": 3860338,
"url": "eu veniam ipsum tempor",
"userRecordId": -15254782
},
{
"extra": null,
"optionId": "et esse laborum",
"optionImg": "https://yun.duiba.com.cn/db_games/sxbank.png",
"optionName": "aliquip dolore qui nulla",
"position": -13810392,
"prizeId": "non labore eiusmod consequat",
"prizeType": -25600732,
"ruleId": "fugiat minim in adipisicing",
"sendCount": 3860338,
"url": "eu veniam ipsum tempor",
"userRecordId": -15254782
}
]
},
"message": null,
"success": true
}
\ No newline at end of file
{
"code": null,
"data": {
"surplusCount": 1,
"credits": 1992008,
"options": [
{
"degree": "10",
"icon": "//yun.dui88.com/projectxh5/credit-250-250.png",
"icon2": null,
"id": "oca13f7f4",
"index": 1,
"name": "积分",
"prizeId": "sss_2",
"prizeType": 2,
"refId": "",
"refType": "increase-credits",
"sendCount": 1
},
{
"degree": null,
"icon": "//yun.duiba.com.cn/db-m/app/turntable/circle/images/prize/谢谢参与_6311f27.png",
"icon2": null,
"id": "thanks",
"index": 2,
"name": "谢谢参与",
"prizeId": "thanks",
"prizeType": 0,
"refId": null,
"refType": null,
"sendCount": 1
}
],
"type": 2
},
"message": null,
"success": true
}
\ No newline at end of file
{ {
"code": null, "code": null,
"data": { "data": {
"options": [
{
"degree": "10",
"icon": "//yun.dui88.com/projectxh5/credit-250-250.png",
"icon2": null,
"id": "oca13f7f4",
"index": 1,
"name": "积分",
"prizeId": "sss_2",
"prizeType": 2,
"refId": "",
"refType": "increase-credits",
"sendCount": 1
},
{
"degree": null,
"icon": "//yun.duiba.com.cn/db-m/app/turntable/circle/images/prize/谢谢参与_6311f27.png",
"icon2": null,
"id": "thanks",
"index": 2,
"name": "谢谢参与",
"prizeId": "thanks",
"prizeType": 0,
"refId": null,
"refType": null,
"sendCount": 1
}
],
"surplusCount": 10, "surplusCount": 10,
"credits": 235, "credits": 235,
"needCredits": 110, "needCredits": 110,
"type": 2, "type": 1,
"isMember":1 "isMember":1
}, },
"message": null, "message": null,
"success": true "success": true
} }
...@@ -20,8 +20,8 @@ export class CostPanel extends Panel { ...@@ -20,8 +20,8 @@ export class CostPanel extends Panel {
} }
cost_open() { cost_open() {
sendLog("click",1); sendLog("click", 1);
this.dispatchEvent("stopIndexEnterFrame", { }); this.dispatchEvent("stopIndexEnterFrame", {});
this.hidePanel(); this.hidePanel();
this.getPrize(); this.getPrize();
} }
...@@ -29,20 +29,27 @@ export class CostPanel extends Panel { ...@@ -29,20 +29,27 @@ export class CostPanel extends Panel {
getPrize = async () => { getPrize = async () => {
const indexResult = getWebData(WebNetName.index); const indexResult = getWebData(WebNetName.index);
const result = await sendWebNet(WebNetName.getCreditCost, { const params: any = {
toPlaywayId: 'dazzle', toActionId: 'drawPrize', toPlaywayId: 'dazzle', toActionId: 'drawPrize'
credits:indexResult.data.needCredits };
});
if (result && result.success) {
const prizeData = await sendWebNetWithToken(WebNetName.drawPrize, { ticket: result.data });
sendWebNet(WebNetName.index).then(res=>{ let result, prizeData;
if (indexResult.data.type == 1) {
params.credits = indexResult.data.needCredits;
result = await sendWebNet(WebNetName.getCreditCost, params);
prizeData = await sendWebNetWithToken(WebNetName.drawPrize, { ticket: result.data });
}
else {
prizeData = await sendWebNetWithToken(WebNetName.drawPrize);
}
sendWebNet(WebNetName.index).then(res => {
layers.stage.dispatchEvent('updateIndexData') layers.stage.dispatchEvent('updateIndexData')
}) })
if (prizeData && prizeData.success) { if (prizeData && prizeData.success) {
if (prizeData.data && prizeData.data.options) { if (prizeData.data && prizeData.data.options) {
if (prizeData.data.options.optionId == "thanks") { if (prizeData.data.options[0].optionId == "thanks") {
showPanel(NoPrizePanel) showPanel(NoPrizePanel)
} else { } else {
showPanel(PrizePanel); showPanel(PrizePanel);
...@@ -50,8 +57,6 @@ export class CostPanel extends Panel { ...@@ -50,8 +57,6 @@ export class CostPanel extends Panel {
} }
} }
}
} }
get groupNames() { get groupNames() {
...@@ -66,7 +71,7 @@ export class CostPanel extends Panel { ...@@ -66,7 +71,7 @@ export class CostPanel extends Panel {
var skin = RES.getSkinDataByName(this.skinName); var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y); this.position.set(skin.x, skin.y);
centerTextField(getObject(this, "cost_tips"), 496); centerTextField(getObject(this, "cost_tips"), 496);
sendLog("exposure",1); sendLog("exposure", 1);
} }
initEvents() { initEvents() {
......
...@@ -7,11 +7,10 @@ import { sendLog } from "../WebNet"; ...@@ -7,11 +7,10 @@ import { sendLog } from "../WebNet";
let section; let section;
export class NoPrizePanel extends Panel { export class NoPrizePanel extends Panel {
// share_share_go(){
// console.log('share_share_go');
// }
hidePanel(){ hidePanel(){
this.stage.dispatchEvent("restartEnterFrame",{})
super.hidePanel(); super.hidePanel();
sendLog("click",3); sendLog("click",3);
} }
...@@ -25,27 +24,12 @@ export class NoPrizePanel extends Panel { ...@@ -25,27 +24,12 @@ export class NoPrizePanel extends Panel {
initUi() { initUi() {
super.initUi(); super.initUi();
sendLog("exposure",3); sendLog("exposure",3);
super.initUi();
var skin = RES.getSkinDataByName(this.skinName); var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y); this.position.set(skin.x, skin.y);
centerTextField(getObject(this, 'prize_name'), 731);
centerTextField(getObject(this, 'prize_tips'), 731);
const prizePop = getObject(this, "prizeInner");
prizePop.visible = false;
const indexsvga = new FYGE.MovieClip(RES.getRes('盲盒开启-打开-输出.svga'));
const container = this.prizeContainer = prizePop.addChild(new FYGE.Sprite);
container.position.set(286, 276);
indexsvga.mouseChildren = indexsvga.mouseEnable = false;
indexsvga.position.set(731/2-750/2,720/2-1624/2)
this.addChild(indexsvga);
this.addChild(prizePop)
indexsvga.addEventListener(FYGE.Event.ENTER_FRAME, () => {
if (indexsvga.currentFrame == indexsvga.totalFrames-13) {
prizePop.visible = true;
}
},this)
indexsvga.startAniRange(1, indexsvga.totalFrames, 1, () => {
this.removeChild(indexsvga)
});
} }
initEvents() { initEvents() {
......
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