feat:修改正则

This commit is contained in:
lixg
2023-03-07 21:41:29 +08:00
parent beca407c8e
commit ad63266ef4
8 changed files with 137 additions and 88 deletions

View File

@@ -1,7 +1,7 @@
import router from "@/router";
import { reactive, ref, toRefs, watch } from "vue";
import axios from 'axios';
import { getCookie } from "@/api/utils";
import { getCookie, delCookie } from "@/api/utils";
import JSONBigInt from 'json-bigint';
const JSONBigIntStr = JSONBigInt({ storeAsString: true });
@@ -99,7 +99,8 @@ export async function request(_url, params) {
if (response.code !== 200 && response.code !== 0) {
console.log('window.location.', window, router)
if (response.code === 1000) {
(import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({ path: '/login', query: { returnUrl: router.currentRoute.value.fullPath } }) : window.open(window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL + window.location.protocol + import.meta.env.VITE_BOE_BASE_URL + import.meta.env.VITE_BASE + router.currentRoute.value.fullPath, '_top')
delCookie()
(import.meta.env.MODE === 'development' || import.meta.env.MODE === 'test') ? router.push({ path: '/login', query: { returnUrl: router.currentRoute.value.fullPath } }) : window.open(window.location.protocol + import.meta.env.VITE_BASE_LOGIN_URL + window.location.protocol + import.meta.env.VITE_BOE_BASE_URL + import.meta.env.VITE_BASE + router.currentRoute.value.fullPath, '_top')
}
if (response.code === 2001) {
router.push({ path: '/FaceTeachSignUp', query: { courseId: router.currentRoute.value.query.courseId, type: 3 } })