fix[litemall-wx]: 收藏删除不成功。
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user