Browse Source

更新动态titile 动态角标

master
Eddie 3 years ago
parent
commit
654fc40ad2
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/views/index.vue

+ 2
- 2
src/views/index.vue View File

@@ -60,13 +60,13 @@ export default {
this.modeInit = JSON.parse(res.data.mod_list[0].data); this.modeInit = JSON.parse(res.data.mod_list[0].data);


// 设置title 和 网页小角标 // 设置title 和 网页小角标
document.title = "智莺生活";
document.title = this.modeInit.title;
var link = var link =
document.querySelector("link[rel*='icon']") || document.querySelector("link[rel*='icon']") ||
document.createElement("link"); document.createElement("link");
link.type = "image/x-icon"; link.type = "image/x-icon";
link.rel = "shortcut icon"; link.rel = "shortcut icon";
link.href = "http://h5.99813608.zhiyingos.com/static/favicon.png";
link.href = this.modeInit.icon;
document.getElementsByTagName("head")[0].appendChild(link); document.getElementsByTagName("head")[0].appendChild(link);
}); });




Loading…
Cancel
Save