Commit d97bb18c authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-wx]: 收藏删除不成功。

parent 2a2c3ee0
...@@ -60,7 +60,8 @@ Page({ ...@@ -60,7 +60,8 @@ Page({
openGoods(event) { openGoods(event) {
let that = this; let that = this;
let goodsId = this.data.collectList[event.currentTarget.dataset.index].valueId; let index = event.currentTarget.dataset.index;
let goodsId = this.data.collectList[index].valueId;
//触摸时间距离页面打开的毫秒数 //触摸时间距离页面打开的毫秒数
var touchTime = that.data.touchEnd - that.data.touchStart; var touchTime = that.data.touchEnd - that.data.touchStart;
...@@ -81,7 +82,10 @@ Page({ ...@@ -81,7 +82,10 @@ Page({
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}); });
that.getCollectList(); that.data.collectList.splice(index, 1)
that.setData({
collectList: that.data.collectList
});
} }
}); });
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment