优化语言处理
This commit is contained in:
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=UTF-8><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>molistar</title><link href=./static/css/app.bb843346557c31268f17149ed3d6d9ae.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.fa131b43c166e43d16e4.js></script><script type=text/javascript src=./static/js/vendor.ef63a6e67767f10f7bb6.js></script><script type=text/javascript src=./static/js/app.142c8e9ce2dbb46760ca.js></script></body></html>
|
||||
<!DOCTYPE html><html><head><meta charset=UTF-8><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>molistar</title><link href=./static/css/app.bb843346557c31268f17149ed3d6d9ae.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.fa131b43c166e43d16e4.js></script><script type=text/javascript src=./static/js/vendor.ef63a6e67767f10f7bb6.js></script><script type=text/javascript src=./static/js/app.9a4a07f5aace7ca9665f.js></script></body></html>
|
File diff suppressed because one or more lines are too long
@@ -8,11 +8,22 @@ Vue.use(VueI18n);
|
||||
|
||||
const i18n = new VueI18n({ //从sessionStorage中取,没有就默认
|
||||
// locale: 'zh',
|
||||
locale: window.sessionStorage.getItem('language') || 'en',
|
||||
locale: window.sessionStorage.getItem('language') ? indow.sessionStorage.getItem('language') : getQueryString().lang ? getQueryString().lang : 'en',
|
||||
messages,
|
||||
silentTranslationWarn: true,
|
||||
})
|
||||
|
||||
function getQueryString() {
|
||||
var _url = location.search;
|
||||
var theRequest = new Object();
|
||||
if (_url.indexOf('?') != -1) {
|
||||
var str = _url.substr(1);
|
||||
strs = str.split('&');
|
||||
for (var i in strs) {
|
||||
theRequest[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
|
||||
}
|
||||
}
|
||||
return theRequest;
|
||||
}
|
||||
// console.log('i18n.messages',i18n.messages);
|
||||
// console.log('i18n.locale',i18n.locale);
|
||||
export default i18n
|
@@ -6,7 +6,7 @@ window.getMessage = (key, value) => {
|
||||
info[key] = value;
|
||||
|
||||
}
|
||||
export default function getId () {
|
||||
export default function getId() {
|
||||
let browser = checkVersion()
|
||||
if (browser.app) {
|
||||
window.sessionStorage.clear();
|
||||
@@ -31,17 +31,30 @@ export default function getId () {
|
||||
} else {
|
||||
// info.uid = sessionStorage.getItem("uid") ? sessionStorage.getItem("uid") : '';
|
||||
// info.ticket = sessionStorage.getItem("ticket") ? sessionStorage.getItem("ticket") : '';
|
||||
info.uid='2917',
|
||||
info.ticket='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aWNrZXRfdHlwZSI6bnVsbCwidWlkIjoyOTE3LCJ0aWNrZXRfaWQiOiI5ZDM4YmYyNi03NzE0LTQ4NTItOGEzMi0zOWQzNTUyODFkNzUiLCJleHAiOjM2MDAsImNsaWVudF9pZCI6ImVyYmFuLWNsaWVudCJ9.kg_Dj8BJM-bKfx039S3ccktNEzrZALDuOosRQrHsZJg',
|
||||
info.deviceInfo = {
|
||||
app: 'molistar',
|
||||
appVersion: '0.0.0',
|
||||
os: '0.0.0',
|
||||
osVersion: '0.0.0',
|
||||
channel: 'browser',
|
||||
client: 'h5',
|
||||
'Accept-Language':'en'
|
||||
}
|
||||
// 获取地址栏参数
|
||||
function getQueryString() {
|
||||
var _url = location.search;
|
||||
var theRequest = new Object();
|
||||
if (_url.indexOf('?') != -1) {
|
||||
var str = _url.substr(1);
|
||||
strs = str.split('&');
|
||||
for (var i in strs) {
|
||||
theRequest[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
|
||||
}
|
||||
}
|
||||
return theRequest;
|
||||
}
|
||||
info.uid = '0',
|
||||
info.ticket = '0',
|
||||
info.deviceInfo = {
|
||||
app: 'molistar',
|
||||
appVersion: '0.0.0',
|
||||
os: '0.0.0',
|
||||
osVersion: '0.0.0',
|
||||
channel: 'browser',
|
||||
client: 'h5',
|
||||
'Accept-Language': getQueryString().lang ? getQueryString().lang : 'en'
|
||||
}
|
||||
}
|
||||
}
|
||||
// export default function getJurisdiction() {
|
||||
|
Reference in New Issue
Block a user