fix: 根据配置隐藏多语言选择
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
* =============== Zh ===============
|
||||
* - Nginx部署
|
||||
* 删除loading.js同级下同名文件,Nginx代理地址: /omc-api
|
||||
*
|
||||
*
|
||||
* - 非Nginx部署
|
||||
* 请将当前文件与loading.js同级,将host变量值修改为数据服务访问地址
|
||||
* !!!注意: 修改当前文件后,建议关闭浏览器后重新访问
|
||||
*
|
||||
*
|
||||
* =============== En ===============
|
||||
* - Nginx Deployment
|
||||
* Delete the file with the same name under the same level of loading.js, Nginx proxy address: /omc-api
|
||||
@@ -20,11 +20,22 @@
|
||||
// host = ip:prot
|
||||
const host = '192.168.2.166:3030';
|
||||
|
||||
// Service Address 服务地址
|
||||
const baseUrl = `http://${host}`;
|
||||
sessionStorage.setItem('baseUrl', baseUrl);
|
||||
const configs = {
|
||||
// internationalization 国际化禁用,默认语言选择
|
||||
i18nDisable: false,
|
||||
i18nDisableDefault: 'en_US',
|
||||
// Service Address 服务地址
|
||||
baseUrl: `http://${host}`,
|
||||
// websocket Address
|
||||
wsUrl: `ws://${host}`,
|
||||
};
|
||||
|
||||
if(!configs.i18nDisable){
|
||||
localStorage.setItem('cache:local:i18n', configs.i18nDisableDefault);
|
||||
}
|
||||
for (const key in configs) {
|
||||
console.log(key, `${configs[key]}`);
|
||||
sessionStorage.setItem(key, `${configs[key]}`);
|
||||
}
|
||||
|
||||
// websocket Address
|
||||
const wsUrl = `ws://${host}`;
|
||||
sessionStorage.setItem('wsUrl', wsUrl);
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user