Browse Source

fix:转发

liushengqiang 1 year ago
parent
commit
09892b63f6
3 changed files with 4 additions and 4 deletions
  1. 1 1
      src/page-instrument/api.ts
  2. 2 2
      src/page-instrument/main.ts
  3. 1 1
      vite.config.ts

+ 1 - 1
src/page-instrument/api.ts

@@ -6,7 +6,7 @@ export const studentQueryUserInfo = async () => {
 };
 /** 获取老师信息 */
 export const teacherQueryUserInfo = () => {
-	return request.get(`/student/queryUserInfo`);
+	return request.get(`/teacher/queryUserInfo`);
 };
 /** 后台用户信息 */
 export const employeeQueryUserInfo = () => {

+ 2 - 2
src/page-instrument/main.ts

@@ -15,8 +15,8 @@ import "./theme.css";
 	const u = navigator.userAgent;
 	setStoreData({
 		isApp: u.includes("COLEXIUTEACHER") || u.includes("COLEXIUSTUDENT"),
-		platformApi: u.includes("COLEXIUTEACHER") ? "/api-teacher" : "/api-student",
-		platformType: u.includes("COLEXIUTEACHER") ? "TEACHER" : "STUDENT",
+		platformApi: u.includes("COLEXIUSTUDENT") ? "/api-student" : "/api-teacher",
+		platformType: u.includes("COLEXIUSTUDENT") ? "STUDENT" : "TEACHER",
 		proxy: import.meta.env.DEV ? "/instrument" : ""
 	});
 })();

+ 1 - 1
vite.config.ts

@@ -73,7 +73,7 @@ export default defineConfig({
 				rewrite: (path) => path.replace(/^\/orchestra/, ""),
 			},
 			"^/instrument/.*": {
-				target: "https://dev.colexiu.com",
+				target: "https://dev.kt.colexiu.com",
 				// target: "https://online.colexiu.com",
 				changeOrigin: true,
 				rewrite: (path) => path.replace(/^\/instrument/, ""),