@@ -95,10 +95,8 @@ export function useInvoice() {
const submitInvoiceApply = async () => {
if (btnDisabled.value) return
-
try {
const res = await submitInvoiceApplyApi(params)
if (res.code === 0 && res.data) {
showSuccessToast('提交成功')
setTimeout(() => {
@@ -107,7 +105,6 @@ export function useInvoice() {
}, 800)
return
}
showToast(res.msg)
} catch (err: any) {
console.error('提交失败', err)
@@ -31,10 +31,9 @@ export const useUserStore = defineStore('user', {
this.needFaceId = false
},
persist: {
key: 'user-store',
- storage: sessionStorage,
+ storage: localStorage,
pick: ['access_token', 'needFaceId', 'tenant_id', 'pushRecordId'],
})
@@ -38,7 +38,6 @@ const getConfirmInvoiceInfo = async () => {
pushRecordId: userStore.pushRecordId,
callbackUrl,
const res = await getFaceAuthInfoApi(params)
if (res.code === 0 && res.data?.faceAuthUrl) {
// 直接跳转进行人脸识别
@@ -392,6 +392,9 @@ onActivated(() => {
onBeforeMount(() => {
+ const userStore = useUserStore()
+ userStore.$reset()
+ localStorage.removeItem('user-store')
registerUrlParams.value.returnUrl = `${location.origin}/h5${route.fullPath}`
const pushRecordId = route.query.pushRecordId
if (!pushRecordId) {