feat:更新
This commit is contained in:
1 parent
f0ed36e25c
commit
39022f3711
3 files changed
+37
-10
No files matched your search
@@ -88,7 +88,7 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["ruleType", "prizeIdList"]),
|
||||
...mapGetters(["ruleType", "prizeIdList", "remainTicketNum"]),
|
||||
drawType() {
|
||||
if (this.mode === "blue") return "turntable1";
|
||||
return "turntable2";
|
||||
@@ -154,10 +154,12 @@ export default {
|
||||
getQueryPrizeInfo() {
|
||||
queryPrizeInfo({ drawType: this.drawType })
|
||||
.then(res => {
|
||||
const { code, data } = res;
|
||||
const { code, data, msg } = res;
|
||||
if (code === 200) {
|
||||
this.SetPrizeInfo(data);
|
||||
this.prizes = this.configPrizes(data);
|
||||
} else {
|
||||
this.$toast.fail(msg);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -165,6 +167,14 @@ export default {
|
||||
});
|
||||
},
|
||||
postDoLottery() {
|
||||
if (
|
||||
this.remainTicketNum === 0 ||
|
||||
this.remainTicketNum < this.curTicketRuleValue
|
||||
) {
|
||||
this.$toast.fail("余额不足!");
|
||||
return;
|
||||
}
|
||||
|
||||
this.timeout = false;
|
||||
this.request = false;
|
||||
this.$refs.LuckDraw.play();
|
||||
@@ -176,7 +186,7 @@ export default {
|
||||
deviceId: "abc",
|
||||
ruleType: this.ruleType
|
||||
}).then(res => {
|
||||
const { code, data } = res;
|
||||
const { code, data, msg } = res;
|
||||
if (code === 200) {
|
||||
this.request = true;
|
||||
this.lotteryData = data;
|
||||
@@ -184,6 +194,8 @@ export default {
|
||||
if (this.timeout && this.request)
|
||||
this.stopLuckDraw(this.maxVauePrizeIndex);
|
||||
this.postSaveLog();
|
||||
} else {
|
||||
this.$toast.fail(msg);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user