|
@@ -17,12 +17,12 @@ definePage({
|
|
|
const { show } = useGlobalToast()
|
|
const { show } = useGlobalToast()
|
|
|
|
|
|
|
|
const addressStore = useAddressStore()
|
|
const addressStore = useAddressStore()
|
|
|
-const { ScrollDown, statusBarHeight, MenuButtonHeight } = storeToRefs(useSysStore())
|
|
|
|
|
|
|
+const { statusBarHeight, MenuButtonHeight, opcity } = storeToRefs(useSysStore())
|
|
|
const { name } = storeToRefs(addressStore)
|
|
const { name } = storeToRefs(addressStore)
|
|
|
const { userInfo } = storeToRefs(useUserStore())
|
|
const { userInfo } = storeToRefs(useUserStore())
|
|
|
const { getTotalNum } = storeToRefs(useSmqjhCartStore())
|
|
const { getTotalNum } = storeToRefs(useSmqjhCartStore())
|
|
|
const { data: goodsList, isLastPage, page, reload, error, loading } = usePagination((pageNum, pageSize) =>
|
|
const { data: goodsList, isLastPage, page, reload, error, loading } = usePagination((pageNum, pageSize) =>
|
|
|
- Apis.xsb.getSearchProductList({ data: { pageNum, pageSize, salesNum: 'DESC', shopId: 1, channelId: userInfo.value.channelId || 1 } }), {
|
|
|
|
|
|
|
+ Apis.xsb.getSearchProductList({ data: { pageNum, pageSize, salesNum: 'DESC', shopId: 2, channelId: userInfo.value.channelId || 1 } }), {
|
|
|
data: resp => resp.data?.list,
|
|
data: resp => resp.data?.list,
|
|
|
initialData: [],
|
|
initialData: [],
|
|
|
initialPage: 1,
|
|
initialPage: 1,
|
|
@@ -54,15 +54,11 @@ const navList = ref([
|
|
|
])
|
|
])
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
addressStore.getLocation()
|
|
addressStore.getLocation()
|
|
|
- ScrollDown.value = false
|
|
|
|
|
|
|
+ opcity.value = 0
|
|
|
})
|
|
})
|
|
|
onPageScroll((e) => {
|
|
onPageScroll((e) => {
|
|
|
- if (e.scrollTop >= 80) {
|
|
|
|
|
- ScrollDown.value = true
|
|
|
|
|
- }
|
|
|
|
|
- else {
|
|
|
|
|
- ScrollDown.value = false
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ const calculatedOpacity = e.scrollTop / 100
|
|
|
|
|
+ opcity.value = Math.min(1, Math.max(0.1, calculatedOpacity))
|
|
|
})
|
|
})
|
|
|
function handleClick(name: string) {
|
|
function handleClick(name: string) {
|
|
|
if (!name) {
|
|
if (!name) {
|
|
@@ -76,20 +72,28 @@ onShareAppMessage(() => {
|
|
|
title: '市民请集合',
|
|
title: '市民请集合',
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+function handleGo() {
|
|
|
|
|
+ show({ msg: '敬请期待 !' })
|
|
|
|
|
+}
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
<view class="page-class box-border">
|
|
<view class="page-class box-border">
|
|
|
<wd-navbar
|
|
<wd-navbar
|
|
|
- title=""
|
|
|
|
|
- :custom-style="`background-color:${ScrollDown ? 'var(--them-color)' : 'transparent !important'}`"
|
|
|
|
|
- :bordered="false" :z-index="99" safe-area-inset-top fixed
|
|
|
|
|
|
|
+ title="" :custom-style="`background-color: rgba(158,214,5,${opcity});`" :bordered="false" :z-index="99"
|
|
|
|
|
+ safe-area-inset-top fixed
|
|
|
>
|
|
>
|
|
|
<template #left>
|
|
<template #left>
|
|
|
- <image class="h48rpx w202rpx" :src="`${StaticUrl}/logo.png`" />
|
|
|
|
|
|
|
+ <view class="relative z-10 h48rpx w-full w202rpx opacity-100">
|
|
|
|
|
+ <image class="absolute left-0 top-0 h48rpx w202rpx" :src="`${StaticUrl}/logo.png`" />
|
|
|
|
|
+ </view>
|
|
|
</template>
|
|
</template>
|
|
|
</wd-navbar>
|
|
</wd-navbar>
|
|
|
- <view class="header-linear h320rpx px24rpx" :style="{ paddingTop: `${(Number(statusBarHeight) || 44) + MenuButtonHeight + 12}px` }">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="header-linear h320rpx px24rpx"
|
|
|
|
|
+ :style="{ paddingTop: `${(Number(statusBarHeight) || 44) + MenuButtonHeight + 12}px` }"
|
|
|
|
|
+ >
|
|
|
<view class="box-border flex items-center">
|
|
<view class="box-border flex items-center">
|
|
|
<view class="flex items-center" @click="useAddressStore().getMapAddress()">
|
|
<view class="flex items-center" @click="useAddressStore().getMapAddress()">
|
|
|
<image :src="`${StaticUrl}/location-black.png`" class="h33.8rpx min-w28.97rpx w28.97rpx" />
|
|
<image :src="`${StaticUrl}/location-black.png`" class="h33.8rpx min-w28.97rpx w28.97rpx" />
|
|
@@ -120,7 +124,10 @@ onShareAppMessage(() => {
|
|
|
>
|
|
>
|
|
|
<view class="relative h120rpx w120rpx">
|
|
<view class="relative h120rpx w120rpx">
|
|
|
<image :src="item.icon" class="h120rpx w120rpx" />
|
|
<image :src="item.icon" class="h120rpx w120rpx" />
|
|
|
- <view v-if="item.title != '星闪豹'" class="linebg absolute left-0 top-0 h-full w-full flex items-center justify-center rounded-32rpx text-24rpx text-white font-semibold">
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ v-if="item.title != '星闪豹'"
|
|
|
|
|
+ class="linebg absolute left-0 top-0 h-full w-full flex items-center justify-center rounded-32rpx text-24rpx text-white font-semibold"
|
|
|
|
|
+ >
|
|
|
敬请期待
|
|
敬请期待
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -129,86 +136,25 @@ onShareAppMessage(() => {
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="mt20rpx">
|
|
|
|
|
- <view class="w-full flex items-center justify-between">
|
|
|
|
|
- <view class="flex-box-item box-border w344rpx rounded-16rpx p24rpx">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/118d1846025745a6be878c760b411dcf.png`" class="h32rpx w190rpx" />
|
|
|
|
|
- <view class="flex items-center justify-between">
|
|
|
|
|
- <view class="w136rpx">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/c74aa846a019446594d2546c013266dd.png`" class="h136rpx w136rpx" />
|
|
|
|
|
- <view class="flex items-center justify-between rounded-16rpx bg-[rgba(255,74,57,0.1)] pr8rpx">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/2a75591de19e4ea097558f70a64a26f0.png`" class="h32rpx w48rpx" />
|
|
|
|
|
- <view class="text-24rpx text-#FF4A39">
|
|
|
|
|
- ¥18.8
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="w136rpx">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/e00384631c964ba8a106de7c77129ea2.png`" class="h136rpx w136rpx" />
|
|
|
|
|
- <view class="flex items-center justify-between rounded-16rpx bg-[rgba(255,74,57,0.1)] pr8rpx">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/2a75591de19e4ea097558f70a64a26f0.png`" class="h32rpx w48rpx" />
|
|
|
|
|
- <view class="text-24rpx text-#FF4A39">
|
|
|
|
|
- ¥12.5
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="flex-box-item box-border w344rpx rounded-16rpx p24rpx">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/8b70aeb509d54409a04665304c8f5068.png`" class="h32rpx w110rpx" />
|
|
|
|
|
- <view class="flex items-center justify-between">
|
|
|
|
|
- <view class="w136rpx flex flex-col items-center">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/e1585c7e7da54d8498e379964cbe1b53.png`" class="h136rpx w136rpx" />
|
|
|
|
|
- <view class="baoyou mt8rpx w100rpx flex items-center justify-center text-24rpx text-white">
|
|
|
|
|
- ¥9.9
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="w136rpx flex flex-col items-center">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/e7c53e3fd6b744eaa0cf41a4fd64b430.png`" class="h136rpx w136rpx" />
|
|
|
|
|
- <view class="baoyou mt8rpx w100rpx flex items-center justify-center text-24rpx text-white">
|
|
|
|
|
- ¥9.9
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="mt20rpx w-full flex items-center justify-between" @click="handleGo">
|
|
|
|
|
+ <image :src="`${StaticUrl}/smqjh-fl.png`" class="h346rpx w344rpx flex-shrink-0" />
|
|
|
|
|
+ <view class="flex flex-1 flex-col items-end justify-center">
|
|
|
|
|
+ <image :src="`${StaticUrl}/smqjh-hot-vip.png`" class="h180rpx w344rpx" />
|
|
|
|
|
+ <image :src="`${StaticUrl}/smqjh-hot-vip.png`" class="mt14rpx h152rpx w344rpx" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="mt20rpx">
|
|
<view class="mt20rpx">
|
|
|
- <wd-skeleton theme="image" animation="gradient" :loading="loading" :row-col="[[{ height: '568rpx', width: '344rpx' }, { height: '568rpx', width: '344rpx' }], [{ height: '568rpx', width: '344rpx' }, { height: '568rpx', width: '344rpx' }]]">
|
|
|
|
|
|
|
+ <wd-skeleton
|
|
|
|
|
+ theme="image" animation="gradient" :loading="loading"
|
|
|
|
|
+ :row-col="[[{ height: '568rpx', width: '344rpx' }, { height: '568rpx', width: '344rpx' }], [{ height: '568rpx', width: '344rpx' }, { height: '568rpx', width: '344rpx' }]]"
|
|
|
|
|
+ >
|
|
|
<view class="flex items-center">
|
|
<view class="flex items-center">
|
|
|
<scroll-view scroll-y type="custom">
|
|
<scroll-view scroll-y type="custom">
|
|
|
<grid-view type="masonry" cross-axis-count="2" main-axis-gap="10" cross-axis-gap="10">
|
|
<grid-view type="masonry" cross-axis-count="2" main-axis-gap="10" cross-axis-gap="10">
|
|
|
- <view class="flex items-center justify-between">
|
|
|
|
|
- <view class="rounded-16rpx bg-white px12rpx py20rpx">
|
|
|
|
|
- <view class="flex items-center rounded-8rpx bg-#FFEEEC text-24rpx font-semibold">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/5e2df94dea5e4e4ca5cb1239321930f5.png`" class="h36rpx w36rpx" />
|
|
|
|
|
- <view class="px4rpx py2rpx text-#FF4A39">
|
|
|
|
|
- 直播低价
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="mt16rpx flex items-center justify-center">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/358c2f46c0ea4e00b98615712ccc142a.png`" class="h116rpx w116rpx" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="mt8rpx text-center text-24rpx text-#FF4A39 font-semibold">
|
|
|
|
|
- ¥35.9
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="rounded-16rpx bg-white px12rpx py20rpx">
|
|
|
|
|
- <view class="flex items-center rounded-8rpx bg-#FFEEEC text-24rpx font-semibold">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/5e2df94dea5e4e4ca5cb1239321930f5.png`" class="h36rpx w36rpx" />
|
|
|
|
|
- <view class="px4rpx py2rpx text-#FF4A39">
|
|
|
|
|
- 爆品好价
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="mt16rpx flex items-center justify-center">
|
|
|
|
|
- <image :src="`${VITE_OSS_BASE_URL}2025/11/00fc4d8ffba6453685c05ffae06e2d78.png`" class="h116rpx w116rpx" />
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="mt8rpx text-center text-24rpx text-#FF4A39 font-semibold">
|
|
|
|
|
- ¥25.6
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view v-for="item in goodsList" :key="item.id" class="relative overflow-hidden rounded-16rpx bg-white pb16rpx">
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ v-for="item in goodsList" :key="item.id"
|
|
|
|
|
+ class="relative overflow-hidden rounded-16rpx bg-white pb16rpx"
|
|
|
|
|
+ >
|
|
|
<view @click="router.push({ name: 'xsb-goods', params: { id: item.prodId } })">
|
|
<view @click="router.push({ name: 'xsb-goods', params: { id: item.prodId } })">
|
|
|
<view class="relative h344rpx">
|
|
<view class="relative h344rpx">
|
|
|
<image :src="item.pic" class="h344rpx w344rpx" />
|
|
<image :src="item.pic" class="h344rpx w344rpx" />
|
|
@@ -226,7 +172,7 @@ onShareAppMessage(() => {
|
|
|
<!-- <view class="rounded-8rpx bg-#FF4D3A px12rpx text-24rpx text-white">
|
|
<!-- <view class="rounded-8rpx bg-#FF4D3A px12rpx text-24rpx text-white">
|
|
|
补贴
|
|
补贴
|
|
|
</view> -->
|
|
</view> -->
|
|
|
- <view class="ml12rpx text-28rpx font-semibold">
|
|
|
|
|
|
|
+ <view class="line-clamp-2 text-28rpx font-semibold">
|
|
|
{{ item.prodName }}
|
|
{{ item.prodName }}
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -243,14 +189,18 @@ onShareAppMessage(() => {
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view v-if="!item.spuStock" class="absolute left-0 top-0 z-1 h-full w-full flex items-center justify-center bg-[rgba(255,255,255,0.6)]">
|
|
|
|
|
- <view class="h156rpx w156rpx flex items-center justify-center rounded-full bg-[rgba(0,0,0,.6)] text-28rpx text-white">
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ v-if="!item.spuStock"
|
|
|
|
|
+ class="absolute left-0 top-0 z-1 h-full w-full flex items-center justify-center bg-[rgba(255,255,255,0.6)]"
|
|
|
|
|
+ >
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="h156rpx w156rpx flex items-center justify-center rounded-full bg-[rgba(0,0,0,.6)] text-28rpx text-white"
|
|
|
|
|
+ >
|
|
|
商品已售罄
|
|
商品已售罄
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <!-- <view class="overflow-hidden rounded-16rpx bg-white pb16rpx">
|
|
|
|
|
|
|
+ <!-- <view class="overflow-hidden rounded-16rpx bg-white pb16rpx">
|
|
|
<view class="relative h344rpx">
|
|
<view class="relative h344rpx">
|
|
|
<image :src="`${VITE_OSS_BASE_URL}2025/11/8177f50dc5f040188dbd40149831273a.png`" class="h344rpx w344rpx" />
|
|
<image :src="`${VITE_OSS_BASE_URL}2025/11/8177f50dc5f040188dbd40149831273a.png`" class="h344rpx w344rpx" />
|
|
|
<view class="absolute bottom-0 left-0 flex items-center text-22rpx">
|
|
<view class="absolute bottom-0 left-0 flex items-center text-22rpx">
|
|
@@ -410,15 +360,25 @@ onShareAppMessage(() => {
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
-.flex-box-item {
|
|
|
|
|
- background: linear-gradient( 180deg, #EBFFB4 0%, #FFFFFF 46%, #FFFFFF 100%);
|
|
|
|
|
-}
|
|
|
|
|
|
|
+.page-class {
|
|
|
|
|
+ :deep() {
|
|
|
|
|
+ .wd-divider {
|
|
|
|
|
+ margin: 0 !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .flex-box-item {
|
|
|
|
|
+ background: linear-gradient(180deg, #EBFFB4 0%, #FFFFFF 46%, #FFFFFF 100%);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .baoyou {
|
|
|
|
|
+ background: url('https://zswl-shop.oss-cn-chengdu.aliyuncs.com/2025/11/771b8a09633448d8b62c0004a8928054.png') no-repeat;
|
|
|
|
|
+ background-size: contain;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .linebg {
|
|
|
|
|
+ background: rgba(0, 0, 0, .3);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
-.baoyou {
|
|
|
|
|
- background: url('https://zswl-shop.oss-cn-chengdu.aliyuncs.com/2025/11/771b8a09633448d8b62c0004a8928054.png') no-repeat;
|
|
|
|
|
- background-size: contain;
|
|
|
|
|
-}
|
|
|
|
|
-.linebg{
|
|
|
|
|
- background: rgba(0,0,0,.3);
|
|
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|