[优惠券得使用规则加校验及优惠券规则为null处理为空]

This commit is contained in:
2021-10-18 11:20:14 +08:00
parent c2f108a77b
commit a5186e5d0b
2 changed files with 8 additions and 2 deletions

View File

@@ -236,7 +236,13 @@
days : this.timeNumber,
goodsable_ids : this.coupongoods
}
if(valuss.description === ''){
uni.showToast({
title:'请添加使用规则',
icon:'none'
})
return;
}
pushCoupons(valuss).then(res => {
uni.showModal({
title : '提示',

View File

@@ -83,7 +83,7 @@
getList() {
getCouponsInfoById(this.coupon_grant_id).then(res => {
this.info = res
this.contentArr = res.description.replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').split('<br/>')
this.contentArr =res.description? res.description.replace(/\r\n/g, '<br/>').replace(/\n/g, '<br/>').split('<br/>'):''
this.loaded = true
}).catch(err => {
this.$refs.uToast.show({