|
@@ -208,10 +208,14 @@ router.beforeEach(async(to, from, next) => {
|
|
|
/* 沙盘详情name添加 */
|
|
|
if (to.path === "/sandflow") {
|
|
|
to.matched[1].name = to.query.SandboxId? "编辑逻辑": "添加逻辑";
|
|
|
+ //支持英文
|
|
|
+ to.matched[1].meta.name_en = to.query.SandboxId? "Edit Logic": "Add Logic";
|
|
|
}
|
|
|
|
|
|
if (to.path === "/analyseVariety") {
|
|
|
to.matched[1].name = to.query.type === "look" ? "查看品种" : "分析品种";
|
|
|
+ //支持英文
|
|
|
+ to.matched[1].meta.name_en = to.query.type === "look" ? "View Variety" : "Analyse Variety";
|
|
|
}
|
|
|
|
|
|
if (to.path) {
|
|
@@ -231,10 +235,15 @@ router.beforeEach(async(to, from, next) => {
|
|
|
|
|
|
|
|
|
router.afterEach((to, from, next) => {
|
|
|
- // 改变页面标题
|
|
|
+ /* // 改变页面标题
|
|
|
document.title = to.matched[to.matched.length - 1].name
|
|
|
? `${to.matched[to.matched.length - 1].name}`
|
|
|
- : setting.name;
|
|
|
+ : setting.name; */
|
|
|
+ //改变页面标题-中英文
|
|
|
+ const titleZh = to.matched[to.matched.length - 1].name||''
|
|
|
+ const titleEn = to.matched[to.matched.length - 1].meta.name_en||''
|
|
|
+ const title = i18n.locale==='zh'?titleZh:titleEn
|
|
|
+ document.title = title||setting.name
|
|
|
|
|
|
window.scrollTo(0, 0);
|
|
|
if(stores.state.hasTrialUserPermisson){
|