完成抽奖页面,结果页面事件逻辑,待给到设计稿更新页面

This commit is contained in:
Andy Leong
2024-01-15 18:44:31 +08:00
parent 96ad18a766
commit 1024c33440
21 changed files with 385 additions and 50 deletions

View File

@@ -1,17 +1,28 @@
// pinia仓库
import { defineStore } from "pinia"
export const useMainStore = defineStore("counter", {
state: () => {
return {
name: '超级管理员',
prizeCode: 'DKS18',
prizeMoney: '8.88',
token: '',
MBTI: '', //测试结果
prizeCode: 'DKS18', //兑换码
prizeMoney: '8.88', //金额
}
},
// 相当于computed属性对state进行二次加工
getters: {},
// 异步处理方法
actions: {},
actions: {
updateToken(token) {
this.token = token
},
updatePrize(code, money) {
this.prizeCode = code
this.prizeMoney = money
},
updateMBTI(type) {
this.MBTI = type
}
},
})