Browse Source

fix: 🧩 活动详情为空时点击无效果

pull/28/head
liyongle 3 years ago
parent
commit
e6cdd99f4b
  1. 12
      src/views/Activity/Activity.vue

12
src/views/Activity/Activity.vue

@ -53,12 +53,14 @@ const modules = [Autoplay, Pagination]
const currentItem = ref<Activity>()
const showDetail = ref(false)
function clickItem(item: Activity, code: string) {
if (mySwiper.value) {
mySwiper.value.autoplay.stop()
}
item.list = shopAcList.value.filter(info => info.content.typeId[0] === code)
currentItem.value = item
showDetail.value = true
if ((item.type === '档期活动' && item.fileUrl_h.length) || (item.type !== '档期活动' && item.list.length)) {
if (mySwiper.value) {
mySwiper.value.autoplay.stop()
}
currentItem.value = item
showDetail.value = true
}
}
//

Loading…
Cancel
Save