|
@@ -11,7 +11,7 @@ import { employeeQueryUserInfo, studentQueryUserInfo, teacherQueryUserInfo } fro
|
|
|
export default defineComponent({
|
|
|
name: "App",
|
|
|
setup() {
|
|
|
- const query: any = getQuery()
|
|
|
+ const query: any = getQuery();
|
|
|
/** 获取用户信息 */
|
|
|
const getUserInfo = async () => {
|
|
|
if (storeData.platformType === "WEB") {
|
|
@@ -31,21 +31,25 @@ export default defineComponent({
|
|
|
if (query.Authorization) {
|
|
|
setToken(query.Authorization);
|
|
|
}
|
|
|
- if (!getToken()){
|
|
|
- const token = location.origin.includes('kt.colexiu.com') ? 'bearer 3527f6b3-9953-41de-80f0-334dec910eac' : 'bearer 529d1359-20c6-4ea2-b2ba-2694cdeda8a4'
|
|
|
- setToken(token)
|
|
|
+ if (!getToken()) {
|
|
|
+ const token = /(dev\.kt\.colexiu\.com|192|localhost)/gi.test(location.origin)
|
|
|
+ ? "bearer 529d1359-20c6-4ea2-b2ba-2694cdeda8a4"
|
|
|
+ : "bearer 3527f6b3-9953-41de-80f0-334dec910eac";
|
|
|
+ setToken(token);
|
|
|
}
|
|
|
setUser();
|
|
|
- setBehaviorId(getRandomKey())
|
|
|
+ setBehaviorId(getRandomKey());
|
|
|
});
|
|
|
onMounted(() => {
|
|
|
- const _loading = document.getElementById("loading")
|
|
|
- _loading && (document.body.removeChild(_loading))
|
|
|
- })
|
|
|
+ const _loading = document.getElementById("loading");
|
|
|
+ _loading && document.body.removeChild(_loading);
|
|
|
+ });
|
|
|
|
|
|
const inited = computed(() => {
|
|
|
return storeData.status === "login";
|
|
|
});
|
|
|
- return () => <>{storeData.status === "error" ? <TheError /> : inited.value ? <RouterView /> : null}</>;
|
|
|
+ return () => (
|
|
|
+ <>{storeData.status === "error" ? <TheError /> : inited.value ? <RouterView /> : null}</>
|
|
|
+ );
|
|
|
},
|
|
|
});
|