完善小程序

This commit is contained in:
wwz
2025-03-18 18:29:34 +08:00
parent fc957feb72
commit 9da31e2faa
19 changed files with 594 additions and 352 deletions

View File

@@ -18,17 +18,20 @@
<up-image :src="item.coverImg" width="80" radius="10" height="80"></up-image>
</view>
<view class="info">
<view class="name"> {{ item.name }} </view>
<view class="name"> {{item.cartListinfo.is_temporary == 1?'临时菜' :item.name }}
</view>
<view class="select-sku-wrap" v-if="item.type == 'sku'">
<text v-for="i in item.skuList" :key="i.id">
{{item.cartListinfo.sku_id == i.id? i.name:"" }}
</text>
</view>
<view class="select-sku-wrap" v-if="item.type == 'package'">
<view>{{dataprocessing(item.cartListinfo).title}}</view>
<text v-for="i in dataprocessing(item.cartListinfo).goods" :key="i.id">
{{i.proName }}
</text>
<view v-for="(a,b) in dataprocessing(item.cartListinfo)" :key="b">
<!-- <view>{{a.title}}</view> -->
<text v-for="i in a.goods" :key="i.proId" style="margin-left: 4rpx;">
{{i.proName }}
</text>
</view>
</view>
<view class="price-wrap" style="padding-top: 0;">
<view class="price">
@@ -147,7 +150,14 @@
const dataprocessing = computed(() => {
return (item) => {
return JSON.parse(item.pro_group_info);
console.log(item.pro_group_info)
let res = null
try {
res = JSON.parse(item.pro_group_info)
} catch (error) {
//TODO handle the exception
}
return res
};
})
@@ -234,6 +244,8 @@
.shop-item-content {
display: flex;
justify-content: center;
align-items: center;
}
.shop-item-remark {