liuyu 5 anos atrás
pai
commit
a4a95870ee
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      src/views/live/roomDetail.vue

+ 4 - 1
src/views/live/roomDetail.vue

@@ -20,7 +20,7 @@
           <el-col :span="24">
           <el-col :span="24">
             <van-swipe :autoplay="3000">
             <van-swipe :autoplay="3000">
               <van-swipe-item v-for="(advert, index) in roomInfos.adverts" :key="index">
               <van-swipe-item v-for="(advert, index) in roomInfos.adverts" :key="index">
-                <img width="100%" height="100%" v-lazy="advert.imgdir" />
+                <img width="100%" height="100%" v-lazy="advert.imgdir" @click="imgclick(advert.imgurl)" />
               </van-swipe-item>
               </van-swipe-item>
             </van-swipe>
             </van-swipe>
           </el-col>
           </el-col>
@@ -124,6 +124,9 @@ export default {
         });
         });
       }
       }
     },
     },
+    imgclick(url) {
+      location.href = url;
+    },
   },
   },
   computed: {
   computed: {
     ...mapState(['user']),
     ...mapState(['user']),