Commit 8093b395 by sunchao

轮播图没有跳转链接判断&控制台userId经常报错bug修复

parent 93559250
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" <swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration"> :duration="duration">
<swiper-item v-for="bannerItem in carouselList"> <swiper-item v-for="bannerItem in carouselList">
<uni-link :href="bannerItem.destinationAddress"> <!-- <uni-link :href="bannerItem.destinationAddress?bannerItem.destinationAddress:'#'"> -->
<image :src="bannerItem.filePath" mode="widthFix"></image> <image :src="bannerItem.filePath" mode="widthFix" @click="jumpUrl(bannerItem.destinationAddress)"></image>
</uni-link> <!-- </uni-link> -->
</swiper-item> </swiper-item>
</swiper> </swiper>
</template> </template>
...@@ -26,7 +26,16 @@ ...@@ -26,7 +26,16 @@
console.log(this.carouselList) console.log(this.carouselList)
}, },
methods:{ methods:{
jumpUrl(url){
if(!url){
return false
}else{
// // #ifdef H5
// window.open(url);
// // #endif
window.location.href = url;
}
}
} }
} }
</script> </script>
......
...@@ -723,6 +723,8 @@ ...@@ -723,6 +723,8 @@
let startTime = uni.getStorageSync('h5_startTime') let startTime = uni.getStorageSync('h5_startTime')
if (endTime - startTime > 3600 * 24) { if (endTime - startTime > 3600 * 24) {
uni.setStorageSync('cffp_userId', '') uni.setStorageSync('cffp_userId', '')
uni.setStorageSync('isLogin','')
uni.setStorageSync('loginType','')
} }
uni.setStorageSync('h5_coursesharing', this.coursesharing); uni.setStorageSync('h5_coursesharing', this.coursesharing);
this.getshareData() this.getshareData()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment