|
|
@@ -52,8 +52,10 @@ const navHeight = computed(() => {
|
|
|
})
|
|
|
const totalProduct = ref<Api.shoppingCartOrderConfirm>()
|
|
|
function handleTopNavChange(item: Api.xsbCategoriesChildren) {
|
|
|
- goodsLoading.value = 'loading'
|
|
|
topNavActive.value = item.code
|
|
|
+ if (!item.children)
|
|
|
+ return
|
|
|
+ goodsLoading.value = 'loading'
|
|
|
leftActive.value = item.children[0].code
|
|
|
show.value = false
|
|
|
topScrollView.value = null
|
|
|
@@ -206,8 +208,8 @@ async function handleSubCart(event: WechatMiniprogram.TouchEvent, item: Api.xsbC
|
|
|
|
|
|
onMounted(async () => {
|
|
|
if (!topNavActive.value || !leftActive.value) {
|
|
|
- topNavActive.value = props.categoryList[0].code || ''
|
|
|
- leftActive.value = props.categoryList[0].children[0].code || ''
|
|
|
+ topNavActive.value = props.categoryList && props.categoryList[0].code
|
|
|
+ leftActive.value = props.categoryList[0].children && props.categoryList[0].children[0].code
|
|
|
}
|
|
|
|
|
|
if (leftActive.value) {
|
|
|
@@ -385,10 +387,18 @@ function handlePay() {
|
|
|
v-for="item in classfiylist" :id="`id${item.code}`" :key="item.code"
|
|
|
class="mr24rpx flex flex-col items-center justify-center" @click="handleTopNavChange(item)"
|
|
|
>
|
|
|
- <image
|
|
|
- :src="item.icon"
|
|
|
- :class="[topNavActive == item.code ? 'overflow-hidden border-solid border-[var(--them-color)] border-2rpx rounded-26rpx h84rpx w-84rpx' : 'h72rpx w-72rpx']"
|
|
|
- />
|
|
|
+ <view class="relative">
|
|
|
+ <view class="box-border" :class="[topNavActive == item.code ? 'overflow-hidden border-solid border-[var(--them-color)] border-2rpx rounded-26rpx h84rpx w-84rpx' : 'h72rpx w-72rpx']">
|
|
|
+ <image
|
|
|
+ :src="item.icon"
|
|
|
+ class="h-full w-full"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ <view v-if="!item.children" class="absolute left-0 top-0 h-full w-full flex items-center justify-center rounded-26rpx bg-[rgba(0,0,0,0.6)] text-16rpx text-white">
|
|
|
+ 敬请期待
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view
|
|
|
class="mt16rpx text-22rpx"
|
|
|
:class="[topNavActive == item.code ? 'bg-[var(--them-color)] rounded-18rpx px-8rpx py2rpx text-white text-24rpx' : '']"
|
|
|
@@ -644,7 +654,7 @@ function handlePay() {
|
|
|
<template #footer>
|
|
|
<view class="box-border w-full flex items-center justify-between py20rpx">
|
|
|
<view class="w-48%">
|
|
|
- <wd-button hairline plain block @click="selectGoods = false">
|
|
|
+ <wd-button plain hairline block @click="selectGoods = false">
|
|
|
取消
|
|
|
</wd-button>
|
|
|
</view>
|