seimin 1 年之前
父节点
当前提交
2b02f22835
共有 2 个文件被更改,包括 6 次插入4 次删除
  1. 5 3
      src/components/AppHeader.vue
  2. 1 1
      src/main.js

+ 5 - 3
src/components/AppHeader.vue

@@ -7,7 +7,7 @@
7
       <div class="app-header__main--leftBottom"></div>
7
       <div class="app-header__main--leftBottom"></div>
8
       <div class="app-header__main--rightBottom"></div>
8
       <div class="app-header__main--rightBottom"></div>
9
       <h1 class="app-header__title">
9
       <h1 class="app-header__title">
10
-        <img class="app-header__logo" :src="logoUrl" />
10
+        <img class="app-header__logo" :src="faviconUrl" />
11
         {{logoTitle}}
11
         {{logoTitle}}
12
       </h1>
12
       </h1>
13
     </div>
13
     </div>
@@ -46,6 +46,8 @@ export default {
46
   },
46
   },
47
   data () {
47
   data () {
48
     return {
48
     return {
49
+      logoTitle: '',
50
+      faviconUrl: '',
49
       time: new Date().getTime(), // 时间戳
51
       time: new Date().getTime(), // 时间戳
50
       timer: null, // 时间定时器
52
       timer: null, // 时间定时器
51
       week: '' // 星期
53
       week: '' // 星期
@@ -102,8 +104,8 @@ export default {
102
       get('/auth/getSysNameAndLogo')
104
       get('/auth/getSysNameAndLogo')
103
         .then((result) => {
105
         .then((result) => {
104
           this.logoTitle = result.largeScreenName || ''
106
           this.logoTitle = result.largeScreenName || ''
105
-          this.logoUrl = result.favicon || ''
106
-          document.querySelector('#favicon').href = result.favicon || ''
107
+          this.faviconUrl = location.origin + '/file' + result.favicon || ''
108
+          document.querySelector('#favicon').href = this.faviconUrl
107
           document.title = this.logoTitle
109
           document.title = this.logoTitle
108
         })
110
         })
109
     }
111
     }

+ 1 - 1
src/main.js

@@ -14,7 +14,7 @@ Vue.use(fullScreenContainer)
14
 Vue.prototype.$moment = moment
14
 Vue.prototype.$moment = moment
15
 
15
 
16
 Vue.config.productionTip = false
16
 Vue.config.productionTip = false
17
-console.info('v2.4.2')
17
+console.info('v2.4.3')
18
 
18
 
19
 new Vue({
19
 new Vue({
20
   router,
20
   router,