|
@@ -13,8 +13,15 @@ import "./theme.css";
|
|
|
|
|
|
(function () {
|
|
(function () {
|
|
const u = navigator.userAgent;
|
|
const u = navigator.userAgent;
|
|
|
|
+ const instance: any =
|
|
|
|
+ (window as any).DAYA ||
|
|
|
|
+ (window as any).webkit?.messageHandlers?.DAYA ||
|
|
|
|
+ (window as any).COLEXIU ||
|
|
|
|
+ (window as any).webkit?.messageHandlers?.COLEXIU ||
|
|
|
|
+ (window as any).ORCHESTRA ||
|
|
|
|
+ (window as any).webkit?.messageHandlers?.ORCHESTRA;
|
|
setStoreData({
|
|
setStoreData({
|
|
- isApp: u.includes("COLEXIUTEACHER") || u.includes("COLEXIUSTUDENT"),
|
|
|
|
|
|
+ isApp: instance ? true : false,
|
|
platformApi: u.includes("COLEXIUSTUDENT") ? "/api-student" : "/api-teacher",
|
|
platformApi: u.includes("COLEXIUSTUDENT") ? "/api-student" : "/api-teacher",
|
|
platformType: u.includes("COLEXIUSTUDENT") ? "STUDENT" : "TEACHER",
|
|
platformType: u.includes("COLEXIUSTUDENT") ? "STUDENT" : "TEACHER",
|
|
proxy: import.meta.env.DEV ? "/instrument" : ""
|
|
proxy: import.meta.env.DEV ? "/instrument" : ""
|