Browse Source

[edit][替换链接图]

zhangwei 2 years ago
parent
commit
3153923067
2 changed files with 10 additions and 2 deletions
  1. 10 2
      pages/toolbox/index.vue
  2. BIN
      static/img/img-default.png

+ 10 - 2
pages/toolbox/index.vue

@@ -4,7 +4,7 @@
         <div v-if="device == 'chrome' || device == 'no-chrome'" class="content">
             <v-logo></v-logo>
             <div class="tool-cover">
-                <img :src="detail.postBizData.linkImagePath" alt="">
+                <img :src="img_url" alt="">
             </div>
             <!-- 非chrome -->
             <div v-if="device == 'no-chrome'">
@@ -56,7 +56,8 @@ export default {
             title: 'Install DeNet Plugin to Participate',
             metaTitle: 'Install DeNet Plugin to Participate',
             device: '',
-            detail: {}
+            detail: {},
+            img_url: ''
         }
     },
     head() {
@@ -131,6 +132,13 @@ export default {
         }
     },
     mounted() {
+        if (this.detail.postBizData.linkImagePath.indexOf('default') > 0) {
+            this.img_url = '/img/img-default.png'
+        } else {
+            this.img_url = this.detail.postBizData.linkImagePath
+        }
+
+
         this.copy_link = window.location.href
         this.device = getBrowserType()
         console.log('device', this.device)

BIN
static/img/img-default.png