diff --git a/src/utils/httpRequest.js b/src/utils/httpRequest.js index a3243fc..f63ade0 100644 --- a/src/utils/httpRequest.js +++ b/src/utils/httpRequest.js @@ -182,12 +182,12 @@ http.interceptors.response.use( Object.prototype.toString.call(response.data) === "[object Object]" ) { // Message.closeAll(); - if (!response.config.hidemsg) { - Message({ - message: response.data.msg || response.data.message, - type: "success" - }); - } + // if (!response.config.hidemsg) { + // Message({ + // message: response.data.msg || response.data.message, + // type: "success" + // }); + // } } } return Promise.resolve(response); diff --git a/src/views/modules/marketing/level/index.vue b/src/views/modules/marketing/level/index.vue index 8e43dbc..5ecc683 100644 --- a/src/views/modules/marketing/level/index.vue +++ b/src/views/modules/marketing/level/index.vue @@ -98,8 +98,18 @@ export default { }, methods: { initData() { - // 默认选择所有摊铺 - this.formInline.shopIds = this.storeList.map(store => store.shopId); + // 如果storeList有数据,默认选择所有摊铺 + if (this.storeList && this.storeList.length > 0) { + this.formInline.shopIds = this.storeList.map(store => store.shopId); + } + // 如果storeList没有数据但shopId有数据,则设置为shopId(支持只有一家店铺的情况) + else if (this.shopId) { + this.formInline.shopIds = [this.shopId]; + } + // 否则设置为空数组 + else { + this.formInline.shopIds = []; + } this.getList(); }, diff --git a/src/views/modules/marketing/user/popup/view-details.vue b/src/views/modules/marketing/user/popup/view-details.vue index c940456..28db094 100644 --- a/src/views/modules/marketing/user/popup/view-details.vue +++ b/src/views/modules/marketing/user/popup/view-details.vue @@ -228,13 +228,21 @@ width="100" align="center" > + - + @@ -580,6 +588,17 @@ export default { default: return "未知"; } + }, + // 获取优惠券类型中文文本 + getCouponTypeText(couponType) { + switch (couponType) { + case "MONEY": + return "满减券"; + case "DISCOUNT": + return "折扣券"; + default: + return couponType || "未知"; + } } }, computed: {