1.优化购物车删除 2.优化标签小票
This commit is contained in:
parent
dd6189b51b
commit
48280f92df
|
|
@ -18,7 +18,7 @@
|
|||
<!-- <span class="title">{{data.ticket_logo}}</span> -->
|
||||
</div>
|
||||
<div class="number_wrap">
|
||||
<div class="num" v-if="data.outNumber">{{data.outNumber}}</div>
|
||||
<!-- <div class="num" v-if="data.outNumber">{{data.outNumber}}</div> -->
|
||||
<div class="info" v-if="data.masterId">座位号:{{data.masterId}}</div>
|
||||
</div>
|
||||
<div class="shop_info">
|
||||
|
|
|
|||
|
|
@ -580,8 +580,16 @@ export const useGoods = defineStore("goods", {
|
|||
);
|
||||
},
|
||||
// 删除购物车回执操作
|
||||
successDeleteCartItem() {
|
||||
this.cartList.splice(this.cartActiveIndex, 1);
|
||||
successDeleteCartItem(data = null) {
|
||||
if (data && data.id) {
|
||||
let index = this.cartList.findIndex(
|
||||
(val) => val.product_id == data.product_id
|
||||
);
|
||||
this.cartList.splice(index, 1);
|
||||
} else {
|
||||
this.cartList.splice(this.cartActiveIndex, 1);
|
||||
}
|
||||
|
||||
this.selectCartItemHandle(
|
||||
this.cartActiveIndex == 0 ? 0 : this.cartActiveIndex - 1
|
||||
);
|
||||
|
|
|
|||
|
|
@ -113,7 +113,11 @@ export const useSocket = defineStore("socket", {
|
|||
break;
|
||||
case "del":
|
||||
// 删除购物车商品
|
||||
goodsStore.successDeleteCartItem();
|
||||
if (data.type && data.type == "bc") {
|
||||
goodsStore.successDeleteCartItem(data.data);
|
||||
} else {
|
||||
goodsStore.successDeleteCartItem();
|
||||
}
|
||||
break;
|
||||
case "cleanup":
|
||||
// 清空购物车
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
<!-- <span class="title">双屿Pisces</span> -->
|
||||
</div>
|
||||
<div class="number_wrap">
|
||||
<div class="num" v-if="printData.outNumber">{{ printData.outNumber }}</div>
|
||||
<!-- <div class="num" v-if="printData.outNumber">{{ printData.outNumber }}</div> -->
|
||||
<div class="info" v-if="printData.masterId">座位号:{{ printData.masterId }}</div>
|
||||
</div>
|
||||
<div class="shop_info">
|
||||
|
|
|
|||
Loading…
Reference in New Issue