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

This commit is contained in:
Junling Bu
2018-05-18 22:20:37 +08:00
parent 2a2c3ee0f3
commit d97bb18cdc

View File

@@ -60,7 +60,8 @@ Page({
openGoods(event) {
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;
@@ -81,7 +82,10 @@ Page({
icon: 'success',
duration: 2000
});
that.getCollectList();
that.data.collectList.splice(index, 1)
that.setData({
collectList: that.data.collectList
});
}
});
}