Commit 381060c5 authored by wildfirecode13's avatar wildfirecode13

u

parent efbafed9
......@@ -11,6 +11,12 @@
<meta name="screen-orientation" content="portrait" />
<meta name="x5-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="//yun.duiba.com.cn/db_games/libs0924/fyge2018.minSpine.js" crossorigin="anonymous"></script>
......
{
"code": null,
"data": {
"surplusCount": 456,
"credits": 78900,
"needCredits": 12345,
"type": 1,
"isMember":1
},
"data": 123,
"message": null,
"success": true
}
\ No newline at end of file
......@@ -5,29 +5,16 @@
"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
"optionId": "thanks",
"optionImg": null,
"optionName": "谢谢参与",
"position": null,
"prizeId": "thanks",
"prizeType": 0,
"ruleId": "ru_1",
"sendCount": 1,
"url": null,
"userRecordId": null
}
]
},
......
{
"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,
"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,
"credits": 235,
"needCredits": 110,
"type": 2,
"type": 1,
"isMember":1
},
"message": null,
"success": true
}
\ No newline at end of file
}
......@@ -18,40 +18,45 @@ export class CostPanel extends Panel {
const cost = 1234567890;
getObject(this, "cost_tips").text = `消耗${cost}积分拆开1个盲盒`;
}
cost_open() {
sendLog("click",1);
this.dispatchEvent("stopIndexEnterFrame", { });
sendLog("click", 1);
this.dispatchEvent("stopIndexEnterFrame", {});
this.hidePanel();
this.getPrize();
}
getPrize = async () => {
const indexResult = getWebData(WebNetName.index);
const result = await sendWebNet(WebNetName.getCreditCost, {
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=>{
layers.stage.dispatchEvent('updateIndexData')
})
if (prizeData && prizeData.success) {
if (prizeData.data && prizeData.data.options) {
if (prizeData.data.options.optionId == "thanks") {
showPanel(NoPrizePanel)
} else {
showPanel(PrizePanel);
}
const params: any = {
toPlaywayId: 'dazzle', toActionId: 'drawPrize'
};
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')
})
if (prizeData && prizeData.success) {
if (prizeData.data && prizeData.data.options) {
if (prizeData.data.options[0].optionId == "thanks") {
showPanel(NoPrizePanel)
} else {
showPanel(PrizePanel);
}
}
}
}
}
get groupNames() {
......@@ -66,7 +71,7 @@ export class CostPanel extends Panel {
var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y);
centerTextField(getObject(this, "cost_tips"), 496);
sendLog("exposure",1);
sendLog("exposure", 1);
}
initEvents() {
......@@ -96,7 +101,7 @@ export class CostPanel extends Panel {
this.stage.dispatchEvent("restartEnterFrame", {})
this.hidePanel();
}
}
......@@ -7,11 +7,10 @@ import { sendLog } from "../WebNet";
let section;
export class NoPrizePanel extends Panel {
// share_share_go(){
// console.log('share_share_go');
// }
hidePanel(){
this.stage.dispatchEvent("restartEnterFrame",{})
super.hidePanel();
sendLog("click",3);
}
......@@ -25,27 +24,12 @@ export class NoPrizePanel extends Panel {
initUi() {
super.initUi();
sendLog("exposure",3);
super.initUi();
var skin = RES.getSkinDataByName(this.skinName);
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() {
......
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