소스 검색

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";