問題描述:
收銀臺在購買次卡商品后購買單規(guī)格商品加購不了。
解決方法:
src/pages/cashier/index.vue,找到這個(gè)文件,修改attrTap()方法。
attrTap(item) {
this.disabled = false;
if (this.userInfo && this.userInfo.uid >= 0) {
this.productId = item.product_id;
this.storeInfo = {};
if (!item.stock) return this.$Message.error('暫無庫存');
if (this.activityFrom.type === '5') {
this.seckillId = item.id;
this.isCart = 0; //判斷切換屬性或是加入購物車:0加入購物車;1切換屬性
this.$refs.skillAttrs.modals = true;
this.cashierGetAttr(item.id);
} else if (item.spec_type) {
// 多規(guī)格
this.isCart = 0; //判斷切換屬性或是加入購物車:0加入購物車;1切換屬性
this.$refs.attrs.modals = true;
this.goodsInfo(item.product_id || item.id);
} else {
// 0為單規(guī)格屬性
if (item.product_type === 4) {
// 次卡商品
this.isCart = 0;
this.$refs.skillAttrs.modals = true;
this.goodsInfo(item.product_id || item.id);
} else {
this.joinCart(0);
}
}
} else {
this.$Message.error('請?zhí)砑踊蜻x擇用戶');
}
},
修改完成后需要重新打包,打包文檔: https://doc.crmeb.com/pro/crmebprov3_1/15819