소스 검색

Merge branch 'feature/faceid-risk/20260206' into pre

yuanmingze 1 개월 전
부모
커밋
57df9709b9
4개의 변경된 파일4개의 추가작업 그리고 6개의 파일을 삭제
  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) {