This commit is contained in:
dzc committed 2024-11-15 11:49:22 +08:00
1 parent 64a74564bb
commit 3105fdb07b
8 files changed
+4957 -3861

No files matched your search

+4 -4
View File
@@ -52,7 +52,7 @@ const getShopCar = async () => {
const { data } = await foodApi.getShopCar(_pa)
console.log(data, "data");
state.carList = data
state.carList = data ?? []
state.totPrice = state.carList
.map(v => v.totalPrice)
.reduce((pre, next) => pre + next, 0);
@@ -262,7 +262,7 @@ const doFood = () => {
<view class="flex-row">
<scroll-view scroll-y :style="{ height: getHeight() }"
class="menu w-200rpx h-full p-l-12rpx p-b-20rpx bg-#f6f6f6">
<view class="menu_item flex-row-center" v-for="( v, i ) in state.classifyList " :key="v.id"
<view class="menu_item flex-row-center" v-for="( v, i ) in state.classifyList " :key="v.id"
:class="[{ 'menu_item_active': i == state.currentClassifyIndex }]" @tap="doClassify(i)">
<view class="menu_item_title show-line">
{{ v.name }}
@@ -270,7 +270,7 @@ const doFood = () => {
</view>
</scroll-view>
<scroll-view scroll-y :style="{ height: getHeight() }" class="flex-1 p-b-20rpx">
<view v-for="( cV, cI ) in state.shopList " :key="cI">
<view v-for="( cV, cI ) in state.shopList " :key="cI">
<view class="flex-row-center m-y-20rpx">
<view class="w-25rpx h-1px bg-#d2d2d2" />
<text class="p-x-15rpx second-text-28">
@@ -279,7 +279,7 @@ const doFood = () => {
<view class="w-25rpx h-1px bg-#d2d2d2" />
</view>
<view class="m-x-15rpx">
<product-row v-for="( pV, pI ) in cV.foodSPURespVOList " :key="pV.id"
<product-row v-for="( pV, pI ) in cV.foodSPURespVOList " :key="pV.id"
v-model="pV.productCount" :productId="pV.productId" :pic="pV.picUrl" :name="pV.name"
:price="pV.price" :marketPrice="pV.marketPrice" :salesCount="pV.salesCount"
:stock="pV.stock" @add="doAdd(pV)" @remove="remove(pV)" />