|
@@ -10,6 +10,9 @@
|
|
|
</route>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
+// 必须导入需要用到的页面生命周期(即使在当前页面上没有直接使用到)
|
|
|
+// eslint-disable-next-line unused-imports/no-unused-imports
|
|
|
+import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
|
|
import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
|
|
|
|
|
|
defineOptions({
|
|
@@ -114,31 +117,22 @@ function queryList(pageNo, pageSize) {
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <z-paging
|
|
|
- ref="paging"
|
|
|
- refresher-only
|
|
|
- use-page-scroll
|
|
|
- @query="queryList"
|
|
|
- >
|
|
|
+ <z-paging ref="paging" refresher-only use-page-scroll @query="queryList">
|
|
|
<template #top>
|
|
|
<view
|
|
|
class="flex items-center justify-between bg-white pb-40rpx pl-42rpx pr-34rpx pt-26rpx"
|
|
|
:style="{ paddingTop: `${safeAreaInsets?.top + 13}px` }"
|
|
|
>
|
|
|
- <image
|
|
|
- src="/static/header-logo.png"
|
|
|
- class="h-54rpx w-250rpx"
|
|
|
- />
|
|
|
+ <image src="/static/header-logo.png" class="h-54rpx w-250rpx" />
|
|
|
<view class="flex items-center">
|
|
|
- <wd-icon custom-class="mr-20rpx" name="search1" size="38rpx" />
|
|
|
+ <wd-icon custom-class="mr-20rpx" name="search1" size="38rpx" @click="toSearch" />
|
|
|
<wd-icon name="notification" size="38rpx" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
<wd-swiper
|
|
|
v-model:current="current"
|
|
|
- :list="swiperList"
|
|
|
- autoplay
|
|
|
+ :list="swiperList" autoplay
|
|
|
:indicator="{ type: 'fraction' }"
|
|
|
indicator-position="bottom-right"
|
|
|
@click="handleClick"
|
|
@@ -148,48 +142,33 @@ function queryList(pageNo, pageSize) {
|
|
|
<view class="flex items-end justify-between pb-22rpx pt-24rpx">
|
|
|
<view class="flex items-center justify-between">
|
|
|
<view class="flex flex-col items-center">
|
|
|
- <image
|
|
|
- src="/static/index/home-vip.png"
|
|
|
- class="h-100rpx w-100rpx"
|
|
|
- />
|
|
|
+ <image src="/static/index/home-vip.png" class="h-100rpx w-100rpx" />
|
|
|
<view class="mt-14rpx text-center text-22rpx text-#898989 font-bold">
|
|
|
{{ $t('home.vip') }}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex flex-col items-center">
|
|
|
- <image
|
|
|
- src="/static/index/home-vip.png"
|
|
|
- class="h-100rpx w-100rpx"
|
|
|
- />
|
|
|
+ <image src="/static/index/home-vip.png" class="h-100rpx w-100rpx" />
|
|
|
<view class="mt-14rpx text-center text-22rpx text-#898989 font-bold">
|
|
|
{{ $t('home.vip') }}
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex flex-col items-center">
|
|
|
- <image
|
|
|
- src="/static/index/home-vip.png"
|
|
|
- class="h-112rpx w-112rpx"
|
|
|
- />
|
|
|
+ <image src="/static/index/home-vip.png" class="h-112rpx w-112rpx" />
|
|
|
<view class="mt-14rpx text-center text-22rpx text-#898989 font-bold">
|
|
|
{{ $t('home.vip') }}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex items-center justify-between">
|
|
|
<view class="flex flex-col items-center">
|
|
|
- <image
|
|
|
- src="/static/index/home-vip.png"
|
|
|
- class="h-100rpx w-100rpx"
|
|
|
- />
|
|
|
+ <image src="/static/index/home-vip.png" class="h-100rpx w-100rpx" />
|
|
|
<view class="mt-14rpx text-center text-22rpx text-#898989 font-bold">
|
|
|
{{ $t('home.vip') }}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="flex flex-col items-center">
|
|
|
- <image
|
|
|
- src="/static/index/home-vip.png"
|
|
|
- class="h-100rpx w-100rpx"
|
|
|
- />
|
|
|
+ <image src="/static/index/home-vip.png" class="h-100rpx w-100rpx" />
|
|
|
<view class="mt-14rpx text-center text-22rpx text-#898989 font-bold">
|
|
|
{{ $t('home.vip') }}
|
|
|
</view>
|
|
@@ -202,11 +181,7 @@ function queryList(pageNo, pageSize) {
|
|
|
</view>
|
|
|
<scroll-view scroll-x>
|
|
|
<view class="flex items-center gap-22rpx pb-24rpx">
|
|
|
- <product
|
|
|
- v-for="(item, index) in newProducts"
|
|
|
- :key="index"
|
|
|
- :item="item"
|
|
|
- />
|
|
|
+ <product v-for="(item, index) in newProducts" :key="index" :item="item" />
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
@@ -217,12 +192,7 @@ function queryList(pageNo, pageSize) {
|
|
|
</block>
|
|
|
</wd-tabs>
|
|
|
<view class="flex flex-wrap gap-22rpx">
|
|
|
- <product
|
|
|
- v-for="(item, index) in newProducts"
|
|
|
- :key="index"
|
|
|
- :height="340"
|
|
|
- :item="item"
|
|
|
- />
|
|
|
+ <product v-for="(item, index) in newProducts" :key="index" :height="340" :item="item" />
|
|
|
<view />
|
|
|
</view>
|
|
|
</view>
|