From a5186e5d0ba83f2aad94c545d994046b91d410e3 Mon Sep 17 00:00:00 2001 From: zhangdongxue Date: Mon, 18 Oct 2021 11:20:14 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BC=98=E6=83=A0=E5=88=B8=E5=BE=97=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E8=A7=84=E5=88=99=E5=8A=A0=E6=A0=A1=E9=AA=8C=E5=8F=8A?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E8=A7=84=E5=88=99=E4=B8=BAnull?= =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=BA=E7=A9=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/coupons/add.vue | 8 +++++++- pages/property/coupon/detail.vue | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pages/coupons/add.vue b/pages/coupons/add.vue index b952ad1..980bb19 100644 --- a/pages/coupons/add.vue +++ b/pages/coupons/add.vue @@ -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 : '提示', diff --git a/pages/property/coupon/detail.vue b/pages/property/coupon/detail.vue index 57e87d1..38665c5 100644 --- a/pages/property/coupon/detail.vue +++ b/pages/property/coupon/detail.vue @@ -83,7 +83,7 @@ getList() { getCouponsInfoById(this.coupon_grant_id).then(res => { this.info = res - this.contentArr = res.description.replace(/\r\n/g, '
').replace(/\n/g, '
').split('
') + this.contentArr =res.description? res.description.replace(/\r\n/g, '
').replace(/\n/g, '
').split('
'):'' this.loaded = true }).catch(err => { this.$refs.uToast.show({