|
|
@@ -5,7 +5,7 @@ import { checkTokenLoop, handleTokenCheck } from '@/services/bus/token';
|
|
|
import { getAllEnums, GetPCMenus, getServerTime, queryErrorInfos, QueryTableDefine } from '@/services/go/commonService/index';
|
|
|
import { getAppConfig, getCommonApiUrl } from '@/services/go/config';
|
|
|
import { LoginQuery } from '@/services/go/useInfo/index';
|
|
|
-import { setServiceURL } from '@/services/request/serviceURL';
|
|
|
+import { handleOem, setServiceURL } from '@/services/request/serviceURL';
|
|
|
import ProtobufCtr from '@/services/socket/protobuf/index';
|
|
|
import { localStorageUtil } from '@/utils/storage';
|
|
|
import { message } from 'ant-design-vue';
|
|
|
@@ -58,6 +58,31 @@ export async function globalDataRefresh(): Promise<string> {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function getIco(): string {
|
|
|
+ const { OemType, getOem } = handleOem()
|
|
|
+ let result = 'favicon'
|
|
|
+ if (getOem(OemType.manager)) {
|
|
|
+ result = 'favicon'
|
|
|
+ } else if (getOem(OemType.wrspot)) {
|
|
|
+ result = 'favicon1'
|
|
|
+ }
|
|
|
+
|
|
|
+ return `./${result}.ico`
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+function setIcon() {
|
|
|
+ const link: any = document.querySelector("link[rel*='icon']") || document.createElement('link');
|
|
|
+ const obj = {
|
|
|
+ type: 'image/x-icon',
|
|
|
+ rel: 'shortcut icon',
|
|
|
+ href: getIco(),
|
|
|
+ }
|
|
|
+ Object.assign(link, obj)
|
|
|
+ document.title = 'WebPC'
|
|
|
+ document.getElementsByTagName('head')[0].appendChild(link);
|
|
|
+}
|
|
|
/**
|
|
|
* 全局依赖的数据查询,涉及各个方面
|
|
|
*/
|
|
|
@@ -70,7 +95,7 @@ async function queryDependencies(): Promise<number> {
|
|
|
const apiUrl = await getCommonApiUrl(config.data.apiUrl);
|
|
|
|
|
|
if (apiUrl.data.code === 200) setServiceURL(apiUrl.data.data);
|
|
|
-
|
|
|
+ setIcon()
|
|
|
// await APP.connectQuote();
|
|
|
/** 数据返回 */
|
|
|
return Promise.resolve(1);
|