完成抽奖页面,结果页面事件逻辑,待给到设计稿更新页面
This commit is contained in:
@@ -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
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user