Browse Source

feat: 业务接口判断修改

TIANYONG 3 weeks ago
parent
commit
7fa55ecc2a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/utils/index.ts

+ 2 - 1
src/utils/index.ts

@@ -140,7 +140,8 @@ export const getRequestHostname = () => {
 	let blank = ["dev.colexiu.com/teacher/", "test.colexiu.com/teacher/", "online.colexiu.com/teacher/"];
 	let webBlank = ["dev.colexiu.com/accompany/", "test.colexiu.com/accompany/", "online.colexiu.com/accompany/"];
 	const host = location.hostname + location.pathname
-	if (blank.includes(host) || query.systemType === "teacher" || storeData.isTeacher) {
+	const u = navigator.userAgent;
+	if (blank.includes(host) || query.systemType === "teacher" || u.includes('COLEXIUTEACHER')) {
 		return "/api-teacher";
 	} else if (webBlank.includes(host) || query.systemType === "web") {
 		return "/api-admin";