Commit c7b01eee authored by Mac's avatar Mac

购物车处理 点击

parent 05af6a31
......@@ -27,7 +27,7 @@
<u-checkbox v-model="c.checked" shape="circle" :active-color="mc">{{ c.MallName }}</u-checkbox>
</u-checkbox-group>
</view>
<view class="cartList_item" v-for="(item, index) in c.GoodsList" :key="index" >
<view class="cartList_item" v-for="(item, index) in c.GoodsList" :key="index" @click="btnclick(item,index,i)" >
<view style="width: 40px;text-align: center;" v-if="(item.GoodsStatus == 1 && item.InventoryNum!=0 && IsEducation!=1) || (editType == true&& IsEducation!=1)">
<u-checkbox-group @change="clickcheckbox(item.checked, item.Price, index, i)">
<u-checkbox v-model="item.checked" shape="circle" :active-color="mc"></u-checkbox>
......@@ -51,14 +51,14 @@
v-if='IsEducation!=1'
mode="aspectFill"
style="width: 150rpx;height: 150rpx;margin-left: 30rpx;border-radius: 5px;"
@click="clickHandler(item.GoodsId)"
@click.native.stop="clickHandler(item.GoodsId)"
/>
<image
:src="item.CoverImage"
v-if='IsEducation==1'
mode="aspectFill"
style="width: 116px;height: 64px;margin-left: 30rpx;border-radius: 5px;box-shadow:0 4px 10px 1px #D2D2D2;"
@click="clickHandler2(item.GoodsId)"
@click.native.stop="clickHandler2(item.GoodsId)"
/>
<view class="item-r" :style="{'width':IsEducation!=1?'440rpx':item_r,'height':IsEducation!=1?'150rpx':'65px', }">
......@@ -307,6 +307,15 @@ export default {
);
},
btnclick(item,index,i){//点击最外层做的事
if((item.GoodsStatus == 1 && item.InventoryNum!=0 && this.IsEducation!=1) || (this.editType == true&& this.IsEducation!=1)){
this.list[i].GoodsList[index].checked= !this.list[i].GoodsList[index].checked
this.clickcheckbox(item.checked, item.Price, index, i)
}else if((item.GoodsStatus == 1 && this.IsEducation==1) || (this.editType == true && this.IsEducation==1)){
this.list[i].GoodsList[index].checked= !this.list[i].GoodsList[index].checked
this.clickcheckbox(item.checked, item.Price, index, i)
}
},
clickcheckbox(checked, price, index, i) {
// (item.checked, item.Price, index, i)
......
Markdown is supported
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