Преглед на файлове

feat: 业务接口判断修改

TIANYONG преди 3 седмици
родител
ревизия
7fa55ecc2a
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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";