feat: 更新

This commit is contained in:
dengtongyu committed 2023-04-17 09:11:07 +08:00
1 parent 145fbcf834
commit 851c940895
3 files changed
+18 -7

No files matched your search

+4 -4
View File
@@ -87,8 +87,8 @@ export default {
"remainTicketNum",
"drawType",
"maxVauePrizeIndex",
"curTicketRuleValue",
"lotteryPrizeItemList"
"lotteryPrizeItemList",
"curLotteryTimesPrize"
]),
prizesImages() {
if (this.drawType === "turntable1") return this.blueImages;
@@ -222,10 +222,10 @@ export default {
);
if (
this.remainTicketNum === 0 ||
this.remainTicketNum < this.curTicketRuleValue
this.remainTicketNum < this.curLotteryTimesPrize
) {
// this.$toast.fail("余额不足!");
const dValue = this.curTicketRuleValue - this.remainTicketNum;
const dValue = this.curLotteryTimesPrize - this.remainTicketNum;
if (localNoticeStatus) {
this.buyAndLottery(dValue);
return;
+6 -1
View File
@@ -18,6 +18,10 @@ const host = (PASSID, GATEWAY) => {
const money = "金币";
const unit = "门票";
const turntable = {
turntable1: 2,
turntable2: 5
};
module.exports = {
appName,
@@ -25,5 +29,6 @@ module.exports = {
VUE_APP_PROXY,
host,
money,
unit
unit,
turntable
};
+8 -2
View File
@@ -11,7 +11,7 @@ import {
buyPack
} from "@/api";
import { getMsgFromDevice, getQueryString } from "@/lib/tool";
import { unit } from "@/config";
import { unit, turntable } from "@/config";
const info = getMsgFromDevice();
const locateObj = getQueryString();
@@ -115,6 +115,12 @@ export default new Vuex.Store({
ticketRuleConfig: state => {
return state.ticketRuleConfig;
},
curLotteryPrize: state => {
return turntable[state.drawType];
},
curLotteryTimesPrize: (state, getters) => {
return getters.curLotteryPrize * getters.curTicketRuleValue;
},
ticketRuleList: (state, getters) => {
const list = [];
if (!getters.ticketRule) return list;
@@ -124,7 +130,7 @@ export default new Vuex.Store({
const { times } = val;
list.push({
label: element.name,
desc: `${times}${unit}`,
desc: `${times * getters.curLotteryPrize}${unit}`,
value: times,
ruleType: element.ruleType
});