From f89fd0922dc0be83bd4b989aaf91030b2121dbbc Mon Sep 17 00:00:00 2001 From: Eratosici Date: Tue, 30 Nov 2021 17:23:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=95=86=E5=93=81=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=BC=82=E5=B8=B8=E6=97=B6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mall4uni/pages/prod/prod.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/mall4uni/pages/prod/prod.vue b/mall4uni/pages/prod/prod.vue index c92dbb6..19795f7 100644 --- a/mall4uni/pages/prod/prod.vue +++ b/mall4uni/pages/prod/prod.vue @@ -376,7 +376,7 @@ export default { }, /** - * 添加或者取消收藏商品 + * 添加或者取消收藏商品 */ addOrCannelCollection() { uni.showLoading(); @@ -405,6 +405,19 @@ export default { }, callBack: res => { + if (!res) { + uni.hideLoading() + uni.showModal({ + title: '提示', + content: '商品信息异常', + showCancel: false, + confirmText: '确定', + success(res) { + // 返回上一页 + uni.navigateBack() + } + }); + } //console.log(res); var imgStrs = res.imgs; var imgs = imgStrs.split(","); @@ -806,4 +819,4 @@ export default { \ No newline at end of file +