|
|
@ -19,12 +19,19 @@ |
|
|
enter-active-class="animate__faster animate__animated animate__fadeInRight" |
|
|
enter-active-class="animate__faster animate__animated animate__fadeInRight" |
|
|
leave-active-class="animate__animated animate__fadeOutDown" |
|
|
leave-active-class="animate__animated animate__fadeOutDown" |
|
|
> |
|
|
> |
|
|
<ScrollView ref="actScroll" :list="actList" :refresh-delay="200" :scroll-x="true" :scrollbar="true" class="act-scroll"> |
|
|
|
|
|
|
|
|
<ScrollView |
|
|
|
|
|
v-if="actList.length" |
|
|
|
|
|
ref="actScroll" |
|
|
|
|
|
:list="actList" |
|
|
|
|
|
:refresh-delay="200" |
|
|
|
|
|
:scroll-x="true" |
|
|
|
|
|
:scrollbar="true" |
|
|
|
|
|
class="act-scroll" |
|
|
|
|
|
> |
|
|
<ul class="act-list"> |
|
|
<ul class="act-list"> |
|
|
<ActivityItem v-for="(item, index) in actList" :key="index" :act-info="item" @click="clickItem"></ActivityItem> |
|
|
<ActivityItem v-for="(item, index) in actList" :key="index" :act-info="item" @click="clickItem"></ActivityItem> |
|
|
</ul> |
|
|
</ul> |
|
|
</ScrollView> |
|
|
</ScrollView> |
|
|
<!-- --> |
|
|
|
|
|
<!-- <swiper |
|
|
<!-- <swiper |
|
|
v-if="showList" |
|
|
v-if="showList" |
|
|
class="act-scroll" |
|
|
class="act-scroll" |
|
|
@ -57,6 +64,7 @@ |
|
|
</swiper-slide> |
|
|
</swiper-slide> |
|
|
</swiper> --> |
|
|
</swiper> --> |
|
|
</transition> |
|
|
</transition> |
|
|
|
|
|
<img v-if="showEmpty" class="tra" src="@/assets/images/empty_big_tra.svg" alt="" /> |
|
|
<activityDetail v-if="showDetail" :act-info="currentItem" @close="showDetail = false"></activityDetail> |
|
|
<activityDetail v-if="showDetail" :act-info="currentItem" @close="showDetail = false"></activityDetail> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
@ -123,6 +131,8 @@ function handleSwitch(index: number) { |
|
|
// list[index].fun() |
|
|
// list[index].fun() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 展示敬请期待 |
|
|
|
|
|
const showEmpty = ref(false) |
|
|
function getData(type: 'mall' | 'shop') { |
|
|
function getData(type: 'mall' | 'shop') { |
|
|
const fun = type === 'mall' ? getMallActivity() : getShopActivity() |
|
|
const fun = type === 'mall' ? getMallActivity() : getShopActivity() |
|
|
fun.then(res => { |
|
|
fun.then(res => { |
|
|
@ -130,6 +140,9 @@ function getData(type: 'mall' | 'shop') { |
|
|
for (let t = 0; t < res.data.length; t++) { |
|
|
for (let t = 0; t < res.data.length; t++) { |
|
|
actList.value.push({ id: res.data[t].id, ...res.data[t].content }) |
|
|
actList.value.push({ id: res.data[t].id, ...res.data[t].content }) |
|
|
} |
|
|
} |
|
|
|
|
|
if (!res.data.length) { |
|
|
|
|
|
showEmpty.value = true |
|
|
|
|
|
} |
|
|
showList.value = true |
|
|
showList.value = true |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
@ -181,4 +194,13 @@ getData('mall') |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tra { |
|
|
|
|
|
position: fixed; |
|
|
|
|
|
top: 268px; |
|
|
|
|
|
left: 56px; |
|
|
|
|
|
width: 1808px; |
|
|
|
|
|
height: 576px; |
|
|
|
|
|
border-radius: 16px; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|