|
@@ -1,4 +1,5 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
|
|
+import { calcNavSwiperHeight } from './calcNavSwiperHeight'
|
|
|
import { StaticUrl } from '@/config'
|
|
import { StaticUrl } from '@/config'
|
|
|
import router from '@/router'
|
|
import router from '@/router'
|
|
|
|
|
|
|
@@ -19,7 +20,7 @@ const { show } = useGlobalToast()
|
|
|
const addressStore = useAddressStore()
|
|
const addressStore = useAddressStore()
|
|
|
const { statusBarHeight, MenuButtonHeight, opcity, isOnlineAudit } = storeToRefs(useSysStore())
|
|
const { statusBarHeight, MenuButtonHeight, opcity, isOnlineAudit } = storeToRefs(useSysStore())
|
|
|
const { name } = storeToRefs(addressStore)
|
|
const { name } = storeToRefs(addressStore)
|
|
|
-const { userInfo } = storeToRefs(useUserStore())
|
|
|
|
|
|
|
+const { userInfo, userMemberInfo } = storeToRefs(useUserStore())
|
|
|
const xsbStore = ref<typeof import('@/subPack-xsb/store-xsb/sys')>()
|
|
const xsbStore = ref<typeof import('@/subPack-xsb/store-xsb/sys')>()
|
|
|
const { data: goodsList, isLastPage, page, reload, error, refresh } = usePagination((pageNum, pageSize) =>
|
|
const { data: goodsList, isLastPage, page, reload, error, refresh } = usePagination((pageNum, pageSize) =>
|
|
|
Apis.xsb.getSearchProductList({ data: { pageNum, pageSize, salesNum: 'DESC', shopId: xsbStore.value?.useSysXsbStore().SelectShopInfo.shopId || 2, channelId: userInfo.value.channelId || 1 } }), {
|
|
Apis.xsb.getSearchProductList({ data: { pageNum, pageSize, salesNum: 'DESC', shopId: xsbStore.value?.useSysXsbStore().SelectShopInfo.shopId || 2, channelId: userInfo.value.channelId || 1 } }), {
|
|
@@ -37,6 +38,7 @@ const currentIndex = ref(0)
|
|
|
const loading = ref(true)
|
|
const loading = ref(true)
|
|
|
onShow(async () => {
|
|
onShow(async () => {
|
|
|
useSysStore().getAudit()
|
|
useSysStore().getAudit()
|
|
|
|
|
+ useUserStore().getUserMemberInfo()
|
|
|
useSmqjhCartStore().getCartList('XSB')
|
|
useSmqjhCartStore().getCartList('XSB')
|
|
|
getSelectZhUser()
|
|
getSelectZhUser()
|
|
|
xsbStore.value = await AsyncImport('@/subPack-xsb/store-xsb/sys')
|
|
xsbStore.value = await AsyncImport('@/subPack-xsb/store-xsb/sys')
|
|
@@ -68,6 +70,14 @@ const navList = computed(() => {
|
|
|
]
|
|
]
|
|
|
return list
|
|
return list
|
|
|
})
|
|
})
|
|
|
|
|
+const itemsPerPage = 8
|
|
|
|
|
+const columnsCount = 4
|
|
|
|
|
+const visibleNavList = computed(() => navList.value.filter(i => i.show))
|
|
|
|
|
+const swiperHeight = computed(() => {
|
|
|
|
|
+ const total = visibleNavList.value.length
|
|
|
|
|
+ return calcNavSwiperHeight(total, currentIndex.value, { itemsPerPage, columns: columnsCount })
|
|
|
|
|
+})
|
|
|
|
|
+const swiperStyle = computed(() => ({ height: `${swiperHeight.value}rpx` }))
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
addressStore.getLocation()
|
|
addressStore.getLocation()
|
|
|
opcity.value = 0
|
|
opcity.value = 0
|
|
@@ -192,7 +202,8 @@ function handleJyBanner() {
|
|
|
|
|
|
|
|
]"
|
|
]"
|
|
|
>
|
|
>
|
|
|
- <swiper :duration="300" class="h340rpx" @change="handleChangeSwiper">
|
|
|
|
|
|
|
+ <!-- h340rpx -->
|
|
|
|
|
+ <swiper :duration="300" :style="swiperStyle" class="transition-height" @change="handleChangeSwiper">
|
|
|
<swiper-item
|
|
<swiper-item
|
|
|
v-for="pageIndex in Math.ceil(navList.filter(i => i.show).length / 8)" :key="pageIndex"
|
|
v-for="pageIndex in Math.ceil(navList.filter(i => i.show).length / 8)" :key="pageIndex"
|
|
|
>
|
|
>
|
|
@@ -272,7 +283,26 @@ function handleJyBanner() {
|
|
|
{{ item.prodName }}
|
|
{{ item.prodName }}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="mt-20rpx flex items-end text-[#FF4D3A]">
|
|
|
|
|
|
|
+ <view v-if="item.isMember" class="mt-20rpx flex items-center gap-16rpx">
|
|
|
|
|
+ <view class="flex items-end text-[#FF4D3A]">
|
|
|
|
|
+ <view class="text-24rpx">
|
|
|
|
|
+ ¥
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="text-36rpx line-height-[36rpx]">
|
|
|
|
|
+ {{ item.memberPrice }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="text-24rpx">
|
|
|
|
|
+ 元
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="rounded-8rpx bg-#FF4A39 px-8rpx py-4rpx text-22rpx text-#FFF">
|
|
|
|
|
+ 会员价
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="text-24rpx text-#AAA line-through">
|
|
|
|
|
+ ¥{{ item.channelProdPrice }}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view v-else class="mt-20rpx flex items-end text-[#FF4D3A]">
|
|
|
<view class="text-24rpx">
|
|
<view class="text-24rpx">
|
|
|
¥
|
|
¥
|
|
|
</view>
|
|
</view>
|
|
@@ -328,11 +358,11 @@ function handleJyBanner() {
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</wd-overlay>
|
|
</wd-overlay>
|
|
|
- <wd-overlay :show="showoverlay2" @click="showoverlay2 = false">
|
|
|
|
|
|
|
+ <wd-overlay :show="showoverlay2 && userMemberInfo.isFirstLogin" @click="showoverlay2 = false">
|
|
|
<view class="mt-280rpx flex items-center justify-center">
|
|
<view class="mt-280rpx flex items-center justify-center">
|
|
|
<view class="relative h-906rpx w-644rpx flex flex-col items-center justify-center text-center" :style="{ backgroundImage: `url(${StaticUrl}/vip-index-popup.png)`, backgroundSize: 'cover', backgroundPosition: 'center' }">
|
|
<view class="relative h-906rpx w-644rpx flex flex-col items-center justify-center text-center" :style="{ backgroundImage: `url(${StaticUrl}/vip-index-popup.png)`, backgroundSize: 'cover', backgroundPosition: 'center' }">
|
|
|
<view class="absolute top-120rpx w-406rpx border-[1rpx_solid_#FFFFFF] rounded-50rpx border-solid px-30rpx py-8rpx text-center text-24rpx text-#FFF">
|
|
<view class="absolute top-120rpx w-406rpx border-[1rpx_solid_#FFFFFF] rounded-50rpx border-solid px-30rpx py-8rpx text-center text-24rpx text-#FFF">
|
|
|
- 您的会员权益已生效有效期至2027-04-08 23:59:59
|
|
|
|
|
|
|
+ 您的会员权益已生效有效期至{{ userMemberInfo.expireTime }}
|
|
|
</view>
|
|
</view>
|
|
|
<image :src="`${StaticUrl}/vip-index-check.png`" class="absolute top-690rpx h-84rpx w-372rpx" @click="router.push({ name: 'smqjh-user-vip' })" />
|
|
<image :src="`${StaticUrl}/vip-index-check.png`" class="absolute top-690rpx h-84rpx w-372rpx" @click="router.push({ name: 'smqjh-user-vip' })" />
|
|
|
<image :src="`${StaticUrl}/vip-index-shopping.png`" class="absolute top-800rpx h-84rpx w-288rpx" @click="router.push({ name: 'xsb-homeTabbar' })" />
|
|
<image :src="`${StaticUrl}/vip-index-shopping.png`" class="absolute top-800rpx h-84rpx w-288rpx" @click="router.push({ name: 'xsb-homeTabbar' })" />
|
|
@@ -365,5 +395,9 @@ function handleJyBanner() {
|
|
|
background: rgba(0, 0, 0, .3);
|
|
background: rgba(0, 0, 0, .3);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .transition-height {
|
|
|
|
|
+ transition: height 0.3s ease;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|