|
|
@@ -91,6 +91,10 @@ function handleChange({ value }: { value: string }) {
|
|
|
leftActive.value = value
|
|
|
getProductList()
|
|
|
}
|
|
|
+function handleLeftChange(item: Api.xsbCategories) {
|
|
|
+ goodsLoading.value = 'loading'
|
|
|
+ handleChange({ value: item.code })
|
|
|
+}
|
|
|
async function getProductList() {
|
|
|
const res = await Apis.xsb.getCategoryProductList({
|
|
|
data: {
|
|
|
@@ -437,7 +441,7 @@ function handlePay() {
|
|
|
</view>
|
|
|
<view class="wraper">
|
|
|
<scroll-view class="w200rpx" :scroll-into-view-offset="-150" enable-passive scroll-with-animation scroll-y :scroll-into-view="`id${leftActive}`">
|
|
|
- <view v-for="item in categories" :id="`id${item.code}`" :key="item.code" :class="[item.code == leftActive ? 'bg-white' : '']" class="relative h100rpx flex items-center justify-center whitespace-nowrap text-28rpx" @click="handleChange({ value: item.code })">
|
|
|
+ <view v-for="item in categories" :id="`id${item.code}`" :key="item.code" :class="[item.code == leftActive ? 'bg-white' : '']" class="relative h100rpx flex items-center justify-center whitespace-nowrap text-28rpx" @click="handleLeftChange(item)">
|
|
|
{{ item.name }}
|
|
|
<view v-if="item.code == leftActive" class="absolute left-0 top-20rpx h60rpx w8rpx rounded-4rpx bg-[var(--them-color)]" />
|
|
|
</view>
|