|
@@ -40,7 +40,7 @@ import { ref, computed } from "vue"
|
|
|
import userStore from "@/store/modules/user"
|
|
|
import { useRouter } from "vue-router"
|
|
|
import useSecureAnth from "@/hooks/useSecureAnth"
|
|
|
-import { mutualTLSQuery_gym } from "@/api/user.api"
|
|
|
+import { mutualTLSQuery_gym, mutualTLSQuery_gyt } from "@/api/user.api"
|
|
|
import { httpAjaxLoading } from "@/plugin/httpAjax"
|
|
|
|
|
|
const userStoreHook = userStore()
|
|
@@ -69,20 +69,18 @@ function handleQrcodeStatus() {
|
|
|
if (status === "FINISH") {
|
|
|
// 登录成功
|
|
|
userStoreHook.login(res.data).then(() => {
|
|
|
- // 目前管乐迷才有安全证书
|
|
|
- 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: "/" })
|
|
|
+ // 安全证书
|
|
|
+ httpAjaxLoading(res.data.appKey === "GYM" ? mutualTLSQuery_gym : mutualTLSQuery_gyt).then(res => {
|
|
|
+ if (res.code === 511) {
|
|
|
+ useSecureAnth({
|
|
|
+ onCancel() {
|
|
|
+ router.push({ path: "/" })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ router.push({ path: "/" })
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
return
|
|
|
}
|