问题描述:
默认的优惠券在选择优惠券弹窗中未显示。
解决方法:
pages/goods/order_confirm/index.vue,找到这个文件,对照修改getCouponList方法。
getCouponList: function() {
let that = this;
let data = {
cartId: this.cartId,
'new': this.news,
shipping_type: that.$util.$h.Add(that.shippingType, 1),
store_id: (that.system_store && this.deliveryType !=1) ? that.system_store.id : 0
};
getCouponsOrderPrice(this.totalPrice, data).then(res => {
res.data.map(item=>{
this.$set(item,'ruleshow',false);
})
that.$set(that.coupon, 'list', res.data);
that.openType = 1;
const result = that.coupon.list.some((item) => item.id == that.couponId);
if (!result) {
that.couponId = 0;
that.couponTitle = '请选择';
}
});
},
修改完成需要重新打包,打包文档: https://doc.crmeb.com/pro/crmebprov3_1/15815