feat 添加商品收藏的提示
This commit is contained in:
parent
ec7668a991
commit
7e20569886
@ -138,10 +138,26 @@ Page({
|
|||||||
|
|
||||||
if (title == "收藏") {
|
if (title == "收藏") {
|
||||||
if(this.data.details.isCollect){
|
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{
|
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)
|
this.getDetail(this.data.spuId)
|
||||||
// console.log(this.data.details.spuId, '点击收藏的id');
|
// console.log(this.data.details.spuId, '点击收藏的id');
|
||||||
|
Loading…
Reference in New Issue
Block a user