2 Commits 6c7720268d ... 57df9709b9

Auteur SHA1 Bericht Datum
  yuanmingze 57df9709b9 Merge branch 'feature/faceid-risk/20260206' into pre 1 maand geleden
  yuanmingze 2dc4e0a804 修改认证登录状态保存 1 maand geleden
4 gewijzigde bestanden met toevoegingen van 4 en 6 verwijderingen
  1. 0 3
      src/hooks/useInvoice.ts
  2. 1 2
      src/stores/modules/user.ts
  3. 0 1
      src/views/face-recognition/index.vue
  4. 3 0
      src/views/login/index.vue

+ 0 - 3
src/hooks/useInvoice.ts

@@ -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)

+ 1 - 2
src/stores/modules/user.ts

@@ -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'],
   },
 })

+ 0 - 1
src/views/face-recognition/index.vue

@@ -38,7 +38,6 @@ const getConfirmInvoiceInfo = async () => {
     pushRecordId: userStore.pushRecordId,
     callbackUrl,
   }
-
   const res = await getFaceAuthInfoApi(params)
   if (res.code === 0 && res.data?.faceAuthUrl) {
     // 直接跳转进行人脸识别

+ 3 - 0
src/views/login/index.vue

@@ -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) {