|
@@ -21,8 +21,9 @@ const { statusBarHeight, MenuButtonHeight, opcity, isOnlineAudit } = storeToRefs
|
|
|
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, refresh } = usePagination((pageNum, pageSize) =>
|
|
|
|
|
- Apis.xsb.getSearchProductList({ data: { pageNum, pageSize, salesNum: 'DESC', shopId: 2, channelId: userInfo.value.channelId || 1 } }), {
|
|
|
|
|
|
|
+const xsbStore = ref<typeof import('@/subPack-xsb/store-xsb/sys')>()
|
|
|
|
|
+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 } }), {
|
|
|
data: resp => resp.data?.list,
|
|
data: resp => resp.data?.list,
|
|
|
initialData: [],
|
|
initialData: [],
|
|
|
initialPage: 1,
|
|
initialPage: 1,
|
|
@@ -34,17 +35,26 @@ const { data: goodsList, isLastPage, page, reload, error, loading, refresh } = u
|
|
|
const state = computed(() => {
|
|
const state = computed(() => {
|
|
|
return error.value ? 'error' : !isLastPage.value ? 'loading' : 'finished'
|
|
return error.value ? 'error' : !isLastPage.value ? 'loading' : 'finished'
|
|
|
})
|
|
})
|
|
|
-onShow(() => {
|
|
|
|
|
|
|
+const loading = ref(true)
|
|
|
|
|
+
|
|
|
|
|
+onShow(async () => {
|
|
|
useSysStore().getAudit()
|
|
useSysStore().getAudit()
|
|
|
useSmqjhCartStore().getCartList('XSB')
|
|
useSmqjhCartStore().getCartList('XSB')
|
|
|
useTabbar().setTabbarItem('smqjh-cart', getTotalNum.value)
|
|
useTabbar().setTabbarItem('smqjh-cart', getTotalNum.value)
|
|
|
|
|
+ xsbStore.value = await AsyncImport('@/subPack-xsb/store-xsb/sys')
|
|
|
refresh()
|
|
refresh()
|
|
|
})
|
|
})
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ loading.value = false
|
|
|
|
|
+ }, 1000)
|
|
|
|
|
+})
|
|
|
onReachBottom(() => {
|
|
onReachBottom(() => {
|
|
|
if (!isLastPage.value) {
|
|
if (!isLastPage.value) {
|
|
|
page.value++
|
|
page.value++
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
const navList = computed(() => {
|
|
const navList = computed(() => {
|
|
|
const list = [
|
|
const list = [
|
|
|
{ icon: `${StaticUrl}/xsb.png`, title: '星闪豹', name: 'xsb-homeTabbar', show: true },
|
|
{ icon: `${StaticUrl}/xsb.png`, title: '星闪豹', name: 'xsb-homeTabbar', show: true },
|
|
@@ -124,27 +134,49 @@ function handleGo() {
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="px24rpx -mt260rpx">
|
|
<view class="px24rpx -mt260rpx">
|
|
|
- <view class="grid grid-cols-4 mt24rpx gap12rpx rounded-16rpx bg-white py24rpx">
|
|
|
|
|
- <template v-for="item in navList" :key="item.icon">
|
|
|
|
|
- <view
|
|
|
|
|
- v-if="item.show" class="flex flex-col items-center justify-center"
|
|
|
|
|
- @click="handleClick(String(item.name))"
|
|
|
|
|
- >
|
|
|
|
|
- <view class="relative h120rpx w120rpx">
|
|
|
|
|
- <image :src="item.icon" class="h120rpx w120rpx" />
|
|
|
|
|
|
|
+ <view class="mt24rpx rounded-16rpx bg-white py24rpx" :class="[loading ? 'px24rpx' : '']">
|
|
|
|
|
+ <wd-skeleton
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ theme="image" :row-col="[
|
|
|
|
|
+ [
|
|
|
|
|
+ { width: '120rpx', height: '120rpx' },
|
|
|
|
|
+ { width: '120rpx', height: '120rpx' },
|
|
|
|
|
+ { width: '120rpx', height: '120rpx' },
|
|
|
|
|
+ { width: '120rpx', height: '120rpx' },
|
|
|
|
|
+ ],
|
|
|
|
|
+ [
|
|
|
|
|
+ { width: '120rpx', height: '120rpx' },
|
|
|
|
|
+ { width: '120rpx', height: '120rpx' },
|
|
|
|
|
+ { width: '120rpx', height: '120rpx' },
|
|
|
|
|
+ { width: '120rpx', height: '120rpx' },
|
|
|
|
|
+ ],
|
|
|
|
|
+
|
|
|
|
|
+ ]"
|
|
|
|
|
+ >
|
|
|
|
|
+ <view class="grid grid-cols-4 gap12rpx">
|
|
|
|
|
+ <template v-for="item in navList" :key="item.icon">
|
|
|
<view
|
|
<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"
|
|
|
|
|
|
|
+ v-if="item.show" class="flex flex-col items-center justify-center"
|
|
|
|
|
+ @click="handleClick(String(item.name))"
|
|
|
>
|
|
>
|
|
|
- 敬请期待
|
|
|
|
|
|
|
+ <view class="relative 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>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="text-24rpx">
|
|
|
|
|
+ {{ item.title }}
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
- <view class="text-24rpx">
|
|
|
|
|
- {{ item.title }}
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </template>
|
|
|
</view>
|
|
</view>
|
|
|
- </template>
|
|
|
|
|
|
|
+ </wd-skeleton>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+
|
|
|
<view class="mt20rpx w-full flex items-center justify-between" @click="handleGo">
|
|
<view class="mt20rpx w-full flex items-center justify-between" @click="handleGo">
|
|
|
<image :src="`${StaticUrl}/smqjh-fl.png`" class="h346rpx w344rpx flex-shrink-0" />
|
|
<image :src="`${StaticUrl}/smqjh-fl.png`" class="h346rpx w344rpx flex-shrink-0" />
|
|
|
<view class="flex flex-1 flex-col items-end justify-center">
|
|
<view class="flex flex-1 flex-col items-end justify-center">
|