增加购物车编辑数量功能
This commit is contained in:
@@ -79,9 +79,9 @@
|
||||
<view class="u-flex u-m-t-20 u-flex-wrap u-row-between">
|
||||
<view class="u-m-b-30" v-for="(goodsItem, goodsIndex) in searchResult" :key="goodsIndex">
|
||||
<list-goods-item :img="{ width: '330rpx', height: '330rpx' }"
|
||||
:limitTimeDiscount="data.limitTimeDiscount" @chooseGuige="
|
||||
chooseGuige(goodsItem.goodsIndex, goodsItem.index)
|
||||
" @add="searchGoodsUpdate(goodsItem, goodsIndex, true)"
|
||||
:limitTimeDiscount="data.limitTimeDiscount"
|
||||
@chooseGuige="chooseGuige(goodsItem.goodsIndex, goodsItem.index)"
|
||||
@add="searchGoodsUpdate(goodsItem, goodsIndex, true)"
|
||||
@reduce="searchGoodsUpdate(goodsItem, goodsIndex, false)"
|
||||
@tapweigh="tapweigh(goodsItem.goodsIndex, goodsItem.index)"
|
||||
:index="goodsItem.goodsIndex" :data="goodsItem"></list-goods-item>
|
||||
@@ -96,6 +96,7 @@
|
||||
<view class="bottom w-full">
|
||||
<my-car :isCreateOrderToDetail="isCreateOrderToDetail" @updateNumber="carsNumberChange" :table="data.table"
|
||||
:data="cars" :orderInfo="data.orderInfo" :limitTimeDiscount="data.limitTimeDiscount"
|
||||
@changeNumber="goodsChangeNumber"
|
||||
@clear="cleaCart"></my-car>
|
||||
</view>
|
||||
<!-- 套餐选择规格 -->
|
||||
@@ -112,6 +113,9 @@
|
||||
<text>历史订单</text>
|
||||
<text class="num">{{ data.historyOrderNum }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 修改购物车数量 -->
|
||||
<popupChangeNumber v-model="popupChangeNumberData.show" :goods="popupChangeNumberData.data" @confirm="carsNumberChange"></popupChangeNumber>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
@@ -137,6 +141,13 @@
|
||||
import {
|
||||
stickCount
|
||||
} from '@/http/api/product/stick.js'
|
||||
import popupChangeNumber from './components/popup-change-number.vue'
|
||||
|
||||
const popupChangeNumberData=reactive({
|
||||
show:false,
|
||||
data:null
|
||||
})
|
||||
|
||||
import guigeModel from "./components/guige";
|
||||
import taocanModel from "./components/taocanModel.vue";
|
||||
import weighItem from "./components/weigh.vue";
|
||||
@@ -845,7 +856,17 @@
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function goodsChangeNumber(e){
|
||||
console.log(e);
|
||||
popupChangeNumberData.data=e;
|
||||
popupChangeNumberData.show=true
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* socket通知购物车商品数量修改处理
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user