ソースを参照

图片地址修改

wangrulan 2 年 前
コミット
efbbc4ea47
1 ファイル変更5 行追加2 行削除
  1. 5 2
      src/components/home/index.vue

+ 5 - 2
src/components/home/index.vue

@@ -18,7 +18,7 @@
             <div  class="content pointer">
               <div class="img" @click="jump(it)">
                 <!-- <i class="el-icon-s-tools"></i> -->
-                <img :src="it.webIcon" alt="" style="width: 30px; height: 30px"/>
+                <img :src="windowHref + '/'+it.webIcon" alt="" style="width: 30px; height: 30px"/>
                 <!-- <div :class="'icon icon' + it.id"></div> -->
               </div>
               <span class="name" @click="jump(it)">{{ it.name }}</span>
@@ -48,12 +48,15 @@ export default {
   data() {
     return {
       userInfo: {},
+      windowHref:'',
     };
   },
   computed: {},
   watch: {},
   created() {
-    console.log(this.$route);
+    // console.log(window.location);
+    this.windowHref = window.location.origin
+    console.log('this.windowHref: ', this.windowHref);
     this.init();
   },
   methods: {