Commit 25c7d43f authored by tyyin lan's avatar tyyin lan

fix: 礼品兑换后次数没更新

parent 322d93db
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
import { fetchGiftCodeRedemption } from '@/apis/gift-redemption' import { fetchGiftCodeRedemption } from '@/apis/gift-redemption'
import type { FormInst } from 'naive-ui' import type { FormInst } from 'naive-ui'
import { ref, shallowReadonly, useTemplateRef } from 'vue' import { ref, shallowReadonly, useTemplateRef } from 'vue'
import { useUserStore } from '@/store/modules/user'
const isShowGiftCodeRedemptionModal = defineModel<boolean>('isShowGiftCodeRedemptionModal', { default: false }) const isShowGiftCodeRedemptionModal = defineModel<boolean>('isShowGiftCodeRedemptionModal', { default: false })
const exchangeInfoFormRef = useTemplateRef<FormInst>('exchangeInfoFormRef') const exchangeInfoFormRef = useTemplateRef<FormInst>('exchangeInfoFormRef')
const userStore = useUserStore()
const exchangeInfoForm = ref({ const exchangeInfoForm = ref({
redemptionCode: '', redemptionCode: '',
...@@ -41,6 +43,8 @@ function handleExchangeSubmit() { ...@@ -41,6 +43,8 @@ function handleExchangeSubmit() {
size: 'medium', size: 'medium',
}, },
}) })
userStore.fetchUpdateUserInfo()
}, 100) }, 100)
}) })
.catch(() => { .catch(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment