Commit ac0b53f2 authored by wildfirecode13's avatar wildfirecode13

111

parent 36b52d7a
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
"data": { "data": {
"needPop":0, "needPop":0,
"activityOver": false, "activityOver": false,
"surplusCount": 0, "surplusCount": 1,
"credits": 10, "credits": 10,
"needCredits": 1, "needCredits": 111,
"type": 1, "type": 1,
"options": [{ "options": [{
"degree": null, "degree": null,
......
...@@ -17,7 +17,7 @@ import { BoxGroup } from "./BoxGroup"; ...@@ -17,7 +17,7 @@ import { BoxGroup } from "./BoxGroup";
import { initNonmemberMask } from "./initNonmemberMask"; import { initNonmemberMask } from "./initNonmemberMask";
import { ScrollItem } from "./ScrollItem"; import { ScrollItem } from "./ScrollItem";
if(!getQueryParams().notwatchtag) { if (!getQueryParams().notwatchtag) {
watchPageVisibility((visible) => { watchPageVisibility((visible) => {
console.log('页面visible', visible); console.log('页面visible', visible);
if (visible) { if (visible) {
...@@ -80,16 +80,16 @@ export class IndexScene extends Scene { ...@@ -80,16 +80,16 @@ export class IndexScene extends Scene {
const credits = getObject(this, 'index_moneytips2'); const credits = getObject(this, 'index_moneytips2');
credits.position.set(420, 1130); credits.position.set(420, 1130);
credits.size = 25; credits.size = 25;
const ruleBtn = getObject(this,'index_rule'); const ruleBtn = getObject(this, 'index_rule');
const myPrizeBtn = getObject(this,'index_record'); const myPrizeBtn = getObject(this, 'index_record');
const title1 = getObject(this, 'index_logo1'); const title1 = getObject(this, 'index_logo1');
const title2 = getObject(this, 'index_logo2'); const title2 = getObject(this, 'index_logo2');
const border = getObject(this, 'index_bg2'); const border = getObject(this, 'index_bg2');
ruleBtn.y = (1624 - layers.stageHeight) / 2 + layers.stageHeight*0.05; ruleBtn.y = (1624 - layers.stageHeight) / 2 + layers.stageHeight * 0.05;
myPrizeBtn.y = (1624 - layers.stageHeight) / 2 + layers.stageHeight*0.05; myPrizeBtn.y = (1624 - layers.stageHeight) / 2 + layers.stageHeight * 0.05;
title1.y = (1624 - layers.stageHeight) / 2 + layers.stageHeight * 0.05; title1.y = (1624 - layers.stageHeight) / 2 + layers.stageHeight * 0.05;
// title2.y = (1624 - layers.stageHeight) / 2 + layers.stageHeight * 0.05 + 89; // title2.y = (1624 - layers.stageHeight) / 2 + layers.stageHeight * 0.05 + 89;
title2.y = (border.y + title1.y - title2.height)/2; title2.y = (border.y + title1.y - title2.height) / 2;
// const index_moneytips = getObject(this, 'index_moneytips'); // const index_moneytips = getObject(this, 'index_moneytips');
// index_moneytips.position.set(480, 1131); // index_moneytips.position.set(480, 1131);
...@@ -124,7 +124,7 @@ export class IndexScene extends Scene { ...@@ -124,7 +124,7 @@ export class IndexScene extends Scene {
this.stage.addEventListener('updateIndexData', this.getIndex, this); this.stage.addEventListener('updateIndexData', this.getIndex, this);
this.stage.addEventListener('handleShare', this.handleShare, this); this.stage.addEventListener('handleShare', this.handleShare, this);
if(result.data.needPop){ if (result.data.needPop) {
setTimeout(() => { setTimeout(() => {
showPanel(SharePanel); showPanel(SharePanel);
}, 10); }, 10);
...@@ -227,11 +227,15 @@ export class IndexScene extends Scene { ...@@ -227,11 +227,15 @@ export class IndexScene extends Scene {
} else { } else {
getBoxButton.visible = true; getBoxButton.visible = true;
shareButton.visible = false; shareButton.visible = false;
if (result.data.needCredits > result.data.credits) {
getBoxButton.visible = false;
shareButton.visible = true;
}
} }
} else { } else {
if (result.data.surplusCount > 0) { if (result.data.surplusCount > 0) {
needCredits.text = '免费拆盒'; needCredits.text = '免费拆盒';
reDegree.text = `${result.data.surplusCount}`; reDegree.text = `${result.data.surplusCount}`;
getBoxButton.visible = true; getBoxButton.visible = true;
shareButton.visible = false; shareButton.visible = false;
......
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