【fix】优化代码
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="group-list">
|
||||
<div class="group-list" v-if="productList.length > 0">
|
||||
<div class="group-warp">
|
||||
<div class="header">
|
||||
<div class="header-warp">
|
||||
@ -8,15 +8,15 @@
|
||||
</div>
|
||||
<a v-show="componentContent.showMore" class="btn-all a-link" @click="jumpGroupWorks(componentContent.id)">查看更多</a>
|
||||
</div>
|
||||
<div v-if="productList.length > 0">
|
||||
<div>
|
||||
<swiper class="swiper pro-box"
|
||||
:disable-touch="productList.length < 3"
|
||||
:circular="false"
|
||||
:indicator-dots="false"
|
||||
:autoplay="productList.length > 2"
|
||||
:display-multiple-items="2"
|
||||
:previous-margin="swiperCurrent === productList.length - 2?'60rpx':'0rpx'"
|
||||
:next-margin="swiperCurrent === productList.length - 2?'0rpx':'60rpx'"
|
||||
:previous-margin="swiperCurrent === productList.length - 2 && productList.length.length > 2?'60rpx':'0rpx'"
|
||||
:next-margin="swiperCurrent === productList.length - 2 && productList.length.length > 2?'0rpx':'60rpx'"
|
||||
@change="swiperChange">
|
||||
<swiper-item class="swiper-slide pro-item-warp" v-for="(item,index) in productList" :key="index" @click="jumpProductDetail(item)">
|
||||
<div class="pro-item-inner">
|
||||
|
@ -22,7 +22,6 @@ export default function (componentContent, typeId, shopId) {
|
||||
})
|
||||
|
||||
function getData () {
|
||||
if (componentContent.value.id) {
|
||||
beforeGetData()
|
||||
const params = {
|
||||
method: 'POST',
|
||||
@ -42,9 +41,6 @@ export default function (componentContent, typeId, shopId) {
|
||||
afterGetData()
|
||||
}
|
||||
)
|
||||
} else {
|
||||
productList.value = []
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
Reference in New Issue
Block a user