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
} }
\ No newline at end of file
...@@ -18,40 +18,45 @@ export class CostPanel extends Panel { ...@@ -18,40 +18,45 @@ export class CostPanel extends Panel {
const cost = 1234567890; const cost = 1234567890;
getObject(this, "cost_tips").text = `消耗${cost}积分拆开1个盲盒`; getObject(this, "cost_tips").text = `消耗${cost}积分拆开1个盲盒`;
} }
cost_open() { cost_open() {
sendLog("click",1); sendLog("click", 1);
this.dispatchEvent("stopIndexEnterFrame", { }); this.dispatchEvent("stopIndexEnterFrame", {});
this.hidePanel(); this.hidePanel();
this.getPrize(); this.getPrize();
} }
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) { let result, prizeData;
const prizeData = await sendWebNetWithToken(WebNetName.drawPrize, { ticket: result.data }); if (indexResult.data.type == 1) {
params.credits = indexResult.data.needCredits;
sendWebNet(WebNetName.index).then(res=>{ result = await sendWebNet(WebNetName.getCreditCost, params);
layers.stage.dispatchEvent('updateIndexData') prizeData = await sendWebNetWithToken(WebNetName.drawPrize, { ticket: result.data });
}) }
else {
if (prizeData && prizeData.success) { prizeData = await sendWebNetWithToken(WebNetName.drawPrize);
if (prizeData.data && prizeData.data.options) { }
if (prizeData.data.options.optionId == "thanks") {
showPanel(NoPrizePanel) sendWebNet(WebNetName.index).then(res => {
} else { layers.stage.dispatchEvent('updateIndexData')
showPanel(PrizePanel); })
}
if (prizeData && prizeData.success) {
if (prizeData.data && prizeData.data.options) {
if (prizeData.data.options[0].optionId == "thanks") {
showPanel(NoPrizePanel)
} else {
showPanel(PrizePanel);
} }
} }
}
}
} }
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() {
...@@ -96,7 +101,7 @@ export class CostPanel extends Panel { ...@@ -96,7 +101,7 @@ export class CostPanel extends Panel {
this.stage.dispatchEvent("restartEnterFrame", {}) this.stage.dispatchEvent("restartEnterFrame", {})
this.hidePanel(); this.hidePanel();
} }
} }
...@@ -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