💊 fix: 修复banner图链接跳转bug

This commit is contained in:
wangsongsole 2023-08-31 16:46:21 +08:00
parent c0cf51f6b5
commit f9a40cf6f0
2 changed files with 12 additions and 4 deletions

View File

@ -58,7 +58,8 @@
</div> </div>
</div> </div>
<div class="fictitious" v-if="viewConfig.search.iswitch==='1'"></div> <div class="fictitious" v-if="viewConfig.search.iswitch==='1'"></div>
<img class="banner" :src="viewConfig.top_image" alt="" @click="location.href=viewConfig.bannerUrl"> <img class="banner" :src="viewConfig.top_image" alt=""
@click="viewConfig.bannerUrl&&(location.href=viewConfig.bannerUrl)">
</div> </div>
<!-- 配置的图片 --> <!-- 配置的图片 -->

View File

@ -48,7 +48,7 @@
<div class="topBanner"> <div class="topBanner">
<img class="backpresty" @click="backgoodsFn" v-if="goodsShow&&!iskey" <img class="backpresty" @click="backgoodsFn" v-if="goodsShow&&!iskey"
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt=""> src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
<img :src="topImg" alt="" @click="location.href=bannerUrl"> <img :src="topImg" alt="" @click="bannerTo">
</div> </div>
<!-- //轮播 --> <!-- //轮播 -->
<div class="saleNull" v-if="!goodsNum"> <div class="saleNull" v-if="!goodsNum">
@ -93,7 +93,7 @@
<div class="topBanner"> <div class="topBanner">
<img class="backpresty" @click="backgoodsFn" v-if="goodsShow&&!iskey" <img class="backpresty" @click="backgoodsFn" v-if="goodsShow&&!iskey"
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt=""> src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
<img :src="topImg" alt=""> <img :src="topImg" alt="" @click="bannerTo">
</div> </div>
<div class="saleNull" v-if="!goodsNum"> <div class="saleNull" v-if="!goodsNum">
<img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/saleNull.png" alt=""> <img src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/saleNull.png" alt="">
@ -123,7 +123,7 @@
<div class="topBanner"> <div class="topBanner">
<img class="backpresty" @click="backgoodsFn" v-if="goodsShow&&!iskey" <img class="backpresty" @click="backgoodsFn" v-if="goodsShow&&!iskey"
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt=""> src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
<img :src="topImg" alt=""> <img :src="topImg" alt="" @click="bannerTo">
</div> </div>
<div class="saleNull" v-if="!goodsNum"> <div class="saleNull" v-if="!goodsNum">
@ -551,6 +551,13 @@
} }
} }
}, },
/* banner外链跳转 */
bannerTo () {
if (this.bannerUrl) {
location.href = this.bannerUrl;
}
}
} }
}) })
</script> </script>