Commit 5163e0f6 authored by wildfirecode13's avatar wildfirecode13

11

parent 6b9e17c8
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
"data": { "data": {
"needPop":0, "needPop":0,
"activityOver": false, "activityOver": false,
"surplusCount": 1, "surplusCount": 0,
"credits": 10, "credits": 222,
"needCredits": 111, "needCredits": 111,
"type": 1, "type": 2,
"options": [{ "options": [{
"degree": null, "degree": null,
"icon": "//yun.duiba.com.cn/images/202108/ma00scey0f.png", "icon": "//yun.duiba.com.cn/images/202108/ma00scey0f.png",
......
...@@ -8,6 +8,8 @@ import getQueryParams from "../common/getQueryParams"; ...@@ -8,6 +8,8 @@ import getQueryParams from "../common/getQueryParams";
import TestButton from "../common/TestButton"; import TestButton from "../common/TestButton";
import { isMember } from "../isMember"; import { isMember } from "../isMember";
import { getTimesPanel } from "../panels/getTimes"; import { getTimesPanel } from "../panels/getTimes";
import { notEnoughMoneySharePanel } from "../panels/notEnoughMoneyShare";
import { notEnoughMoneyShareHasTimesPanel } from "../panels/notEnoughMoneyShareHasTimes";
import { RulePanel } from "../panels/RulePanel"; import { RulePanel } from "../panels/RulePanel";
import { SharePanel } from "../panels/share"; import { SharePanel } from "../panels/share";
import { timesNotEnoughPanel } from "../panels/timesNotEnough"; import { timesNotEnoughPanel } from "../panels/timesNotEnough";
...@@ -185,10 +187,29 @@ export class IndexScene extends Scene { ...@@ -185,10 +187,29 @@ export class IndexScene extends Scene {
} }
handleShare = async () => { handleShare = async () => {
if (indexData.data.type == 2 && indexData.data.surplusCount <= 0) { // if (indexData.data.type == 2 && indexData.data.surplusCount <= 0) {
showPanel(timesNotEnoughPanel); // showPanel(timesNotEnoughPanel);
// } else {
// showPanel(getTimesPanel);
// }
if (indexData.data.type == 1) {
if (indexData.data.surplusCount <= 0) { //没次数
showPanel(notEnoughMoneySharePanel);
} else {
if (indexData.data.needCredits > indexData.data.credits) {
showPanel(notEnoughMoneyShareHasTimesPanel);
} else {
}
}
} else { } else {
showPanel(getTimesPanel);
if (indexData.data.surplusCount > 0) {//有次数
} else {
}
} }
} }
...@@ -228,6 +249,7 @@ export class IndexScene extends Scene { ...@@ -228,6 +249,7 @@ export class IndexScene extends Scene {
getBoxButton.visible = true; getBoxButton.visible = true;
shareButton.visible = false; shareButton.visible = false;
if (result.data.needCredits > result.data.credits) { if (result.data.needCredits > result.data.credits) {
hand.visible = true;
getBoxButton.visible = false; getBoxButton.visible = false;
shareButton.visible = true; shareButton.visible = true;
} }
......
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