diff --git a/pages/goods/details/index.js b/pages/goods/details/index.js index 003105e..6ba95e2 100644 --- a/pages/goods/details/index.js +++ b/pages/goods/details/index.js @@ -138,10 +138,26 @@ Page({ if (title == "收藏") { if(this.data.details.isCollect){ - CancelGoodsCollection({goodsGuid: this.data.details.spuId}) + CancelGoodsCollection({goodsGuid: this.data.details.spuId}).then(() => { + Toast({ + context: this, + selector: '#t-toast', + message: '收藏取消', + icon: '', + duration: 1000, + }); + }) } else{ - addOrUpdateGoodsCollection({goodsGuid: this.data.details.spuId}) + addOrUpdateGoodsCollection({goodsGuid: this.data.details.spuId}).then(() => { + Toast({ + context: this, + selector: '#t-toast', + message: '收藏成功', + icon: '', + duration: 1000, + }); + }) } this.getDetail(this.data.spuId) // console.log(this.data.details.spuId, '点击收藏的id');