fixed bug adout shop
This commit is contained in:
@@ -37,10 +37,17 @@
|
||||
<view class="title"><text>选择商品</text></view>
|
||||
<!-- 商品列表 -->
|
||||
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll">
|
||||
<view class="listes_shoping" v-for="(item, index) in list" :key="index" @click="checkboxChange(item.goods_id)">
|
||||
<view class="listes_shoping" v-for="(item, index) in list" :key="index">
|
||||
<view>
|
||||
<u-checkbox-group>
|
||||
<u-checkbox shape="circle" active-color="#FF780F" v-model="item.checked" :disabled="true" ></u-checkbox>
|
||||
<u-checkbox
|
||||
shape="circle"
|
||||
size="40"
|
||||
active-color="#FF780F"
|
||||
v-model="item.checked"
|
||||
:name="index"
|
||||
@change="checkboxChange"
|
||||
></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</view>
|
||||
<view><image :src="item.goods_image" mode="widthFix"></image></view>
|
||||
@@ -275,15 +282,14 @@ export default {
|
||||
},
|
||||
// 选中某个复选框时,由checkbox时触发
|
||||
checkboxChange(e) {
|
||||
for(let num in this.list){
|
||||
if(id==this.list[num].goods_id){
|
||||
if(this.list[num].checked==true){
|
||||
this.delarr(id);
|
||||
}else{
|
||||
this.pushes(id);
|
||||
}
|
||||
this.list[num].checked = !this.list[num].checked
|
||||
}
|
||||
let that = this;
|
||||
let num =Number(e.name)
|
||||
if (e.value == true) {
|
||||
that.delarr(that.list[num].goods_id);
|
||||
that.list[num].checked=true
|
||||
} else {
|
||||
that.pushes(that.list[num].goods_id);
|
||||
that.list[num].checked=false
|
||||
}
|
||||
},
|
||||
// 删除直播商品
|
||||
|
||||
Reference in New Issue
Block a user