feat: 会员中心 hgcloud 主题初始化 + drone 部署步骤
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
- 解压官方默认主题 default_yfMBA.tar.gz 到 clientarea/hgcloud/ - .gitignore 排除压缩包和临时解压目录 - drone 新增步骤: 同步 hgcloud 到 /clientarea/template/pc/
This commit is contained in:
23
clientarea/hgcloud/lang/index.js
Normal file
23
clientarea/hgcloud/lang/index.js
Normal file
@@ -0,0 +1,23 @@
|
||||
(function () {
|
||||
const Element_lang = {
|
||||
"en-us": "en",
|
||||
"zh-cn": "zhCN",
|
||||
"zh-hk": "zhTW",
|
||||
};
|
||||
let DEFAULT_LANG;
|
||||
if (localStorage.getItem("jwt") && localStorage.getItem("lang")) {
|
||||
DEFAULT_LANG = localStorage.getItem("lang");
|
||||
} else {
|
||||
DEFAULT_LANG = getBrowserLanguage();
|
||||
localStorage.setItem("lang", DEFAULT_LANG);
|
||||
}
|
||||
document.writeln(
|
||||
`<script src="${url}lang/${DEFAULT_LANG}/element-lang.js"><\/script>`
|
||||
);
|
||||
document.writeln(
|
||||
`<script src="${url}lang/${DEFAULT_LANG}/index.js?v=${system_version}"><\/script>`
|
||||
);
|
||||
document.writeln(
|
||||
`<script>ELEMENT.locale(ELEMENT.lang.${Element_lang[DEFAULT_LANG]})<\/script>`
|
||||
);
|
||||
})();
|
||||
Reference in New Issue
Block a user