Commit 49aba43c by zhangxw

购物车优化

1 parent 2eeac2f9
......@@ -50,7 +50,8 @@ Page({
},
choose(e) {
let {
index
index,
item
} = e.currentTarget.dataset
let {
goodsList
......@@ -59,6 +60,7 @@ Page({
this.hide(e)
return
}
if (item.flag) return
this.setData({
[`goodsList[${index}].active`]: !goodsList[index].active
})
......
......@@ -17,7 +17,7 @@
<view class="list">
<view class="item {{item.showDel?'touch-move-active':''}}" data-index="{{index}}" data-ind="{{ind}}"
bindtouchstart="start" bindtouchmove="move">
<view class="content" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}">
<view class="content" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{item}}">
<view class="icon" wx:if="{{!item.flag}}">
<icon type="{{item.active?'success':'circle'}}" color="{{item.active?'#FB8A32':'#B1B1B3'}}" size="20">
</icon>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!