diff --git a/src/stores/couple.js b/src/stores/couple.js new file mode 100644 index 0000000..2d660b2 --- /dev/null +++ b/src/stores/couple.js @@ -0,0 +1,40 @@ +import { defineStore } from 'pinia' + +export const useCoupleStore = defineStore('couple', { + state: () => ({ + TipsShow: false, // 金币不足提示 + needCheckInTipsShow: false, // 需要补签提示 + signInSuccessShow: false, // 签到成功提示 + + crystal: 0, //水晶数量 + debris: 0, //碎片数量 + + rewardShow: false, //奖励弹窗 + reward: {}, //奖励 + + resultShow: false, + result: [], //抽奖结果 + + drawRecordShow: false, + myRecords: [], //我的抽奖记录 + + receiveRecordShow: false, + receiveRecord: [], //领取水晶&碎片记录 + + signInInfo: {}, // 签到奖池 + + exchangeConfirmShow: false, // 兑换确认弹窗 + exchangeItem: null, // 当前兑换的物品 + }), + actions: { + setResult(data) { + this.result = data + }, + setMyRecords(data) { + this.myRecords = data + }, + setRecord(data) { + this.record = data + }, + }, +})