فهرست منبع

修改针对页面拦截

yuanmingze 2 ماه پیش
والد
کامیت
d7b5c358ab
4فایلهای تغییر یافته به همراه5 افزوده شده و 4 حذف شده
  1. 1 0
      .env.development
  2. 1 1
      .env.production
  3. 3 1
      src/hooks/useInvoice.ts
  4. 0 2
      src/services/request/index.ts

+ 1 - 0
.env.development

@@ -1,3 +1,4 @@
 VITE_APP_ENV = dev
 VITE_APP_URL = https://hcppreapi.yaoyi.net
 
+# VITE_APP_URL = https://hcpapi.yaoyi.net

+ 1 - 1
.env.production

@@ -1,2 +1,2 @@
 VITE_APP_ENV = prod
-VITE_APP_URL = https://hcppreapi.yaoyi.net
+VITE_APP_URL = https://hcpapi.yaoyi.net

+ 3 - 1
src/hooks/useInvoice.ts

@@ -61,8 +61,10 @@ export function useInvoice() {
           faceAuthResult.value = true
         }
       }
-    } catch (err) {
+    } catch (err: any) {
       console.error('获取认证结果失败', err)
+      showToast(err!.message || '获取认证结果失败,请稍后重试')
+      btnDisabled.value = true
     }
   }
 

+ 0 - 2
src/services/request/index.ts

@@ -98,8 +98,6 @@ const handleNetworkError = (response: AxiosResponse, silent?: boolean) => {
 
   const userStore = useUserStoreWithOut()
 
-  console.log('response', response)
-
   // 先处理401登录失效问题
   if (status === 401) {
     showToast('您的登录状态已失效,请重新登录')