黄琪勇 1 년 전
부모
커밋
3e78916c65
3개의 변경된 파일16개의 추가작업 그리고 13개의 파일을 삭제
  1. 1 1
      src/hooks/useSecureAnth/secureAnth.vue
  2. 1 1
      src/libs/axios.ts
  3. 14 11
      src/viewsframe/login/login.vue

+ 1 - 1
src/hooks/useSecureAnth/secureAnth.vue

@@ -217,7 +217,7 @@ const elScrollbarDom = ref<InstanceType<typeof ElScrollbar>>()
 // 下载证书
 function handleDownload() {
    if (isMac) {
-      window.open("https://oss.dayaedu.com/https-ssl/安全证书.p12")
+      window.open("https://oss.dayaedu.com/https-ssl/yjt/安全证书.p12")
    } else {
       window.open("https://oss.dayaedu.com/https-ssl/安全证书.pfx")
    }

+ 1 - 1
src/libs/axios.ts

@@ -77,7 +77,7 @@ class HttpAsynAxios {
             // }
             if (error.response?.status === 511) {
                // isLogin=true 带有这个是登录时候的判断弹窗验证证书  其他的走正常弹窗
-               if (/isLogin=true/.test(error.request?.responseURL)) {
+               if (/isLogin=true/.test(error.config?.url)) {
                   return Promise.reject({
                      code: 511,
                      message: "没有安装证书",

+ 14 - 11
src/viewsframe/login/login.vue

@@ -69,17 +69,20 @@ function handleQrcodeStatus() {
          if (status === "FINISH") {
             // 登录成功
             userStoreHook.login(res.data).then(() => {
-               httpAjaxLoading(mutualTLSQuery_gym).then(res => {
-                  if (res.code === 511) {
-                     useSecureAnth({
-                        onCancel() {
-                           router.push({ path: "/" })
-                        }
-                     })
-                  } else {
-                     router.push({ path: "/" })
-                  }
-               })
+               // 目前管乐迷才有安全证书
+               res.data.appKey === "GYM"
+                  ? httpAjaxLoading(mutualTLSQuery_gym).then(res => {
+                       if (res.code === 511) {
+                          useSecureAnth({
+                             onCancel() {
+                                router.push({ path: "/" })
+                             }
+                          })
+                       } else {
+                          router.push({ path: "/" })
+                       }
+                    })
+                  : router.push({ path: "/" })
             })
             return
          }