|
@@ -44,8 +44,9 @@
|
|
|
<view class='money font-color' :class='is_switch?"":"on"'> <text
|
|
|
class='num'>¥{{ fen2yuan(item.price) }}</text>
|
|
|
<view class="carnum num-dis row-left" v-if="item.selected_goods_num>0">
|
|
|
+ <!-- :class="item.selected_goods_num <= 1 ? 'on' : ''" -->
|
|
|
<view class="item reduce"
|
|
|
- :class="item.selected_goods_num <= 1 ? 'on' : ''"
|
|
|
+
|
|
|
@click.stop="CartNumDes(item.id)">
|
|
|
-
|
|
|
</view>
|
|
@@ -53,14 +54,12 @@
|
|
|
<input style="color: #000;background-color: #EAEAEA;" type="number" v-model="item.selected_goods_num"
|
|
|
@input="updateCart" />
|
|
|
</view>
|
|
|
- <view v-if="iSplus" class="item plus"
|
|
|
+ <!-- <view v-if="iSplus" class="item plus"
|
|
|
:class="attr.productSelect.cart_num >= attr.productSelect.stock ? 'on' : ''"
|
|
|
@click.stop="CartNumAdd(item.id)">
|
|
|
+
|
|
|
- </view>
|
|
|
- <view v-else class='item plus' :class='(attr.productSelect.cart_num >= attr.productSelect.stock)
|
|
|
- || (attr.productSelect.cart_num >= attr.productSelect.limitCount)
|
|
|
- ? "on":""' @click.stop='CartNumAdd(item.id)'>+</view>
|
|
|
+ </view> -->
|
|
|
+ <view class='item plus' @click.stop='CartNumAdd(item.id)'>+</view>
|
|
|
</view>
|
|
|
<view class="circle" v-else @click.stop="addGoods(item.skus[0].id,index)">+
|
|
|
</view>
|
|
@@ -95,7 +94,7 @@
|
|
|
<!-- 购物车列表 -->
|
|
|
<!-- :style="{display: showCar ? 'flex' : 'none'}" -->
|
|
|
<view class="cart-box" v-if="goodsRightList.length>0">
|
|
|
- <orderAddcart ref='orderAddcart' @showMask='isShowMask' @cartList="handleCartList"></orderAddcart>
|
|
|
+ <orderAddcart ref='orderAddcart' @showMask='isShowMask' @hideMask='hideMask' @cartList="handleCartList"></orderAddcart>
|
|
|
</view>
|
|
|
<view class="zz" @click="hideShoppingCar" v-if="showMask"></view>
|
|
|
</view>
|
|
@@ -183,7 +182,7 @@
|
|
|
// }
|
|
|
},
|
|
|
handleCartList(data){
|
|
|
- console.log(data,'datadtaa',this.goodsRightList)
|
|
|
+ console.log(data,'222222222222222222222222222222',this.goodsRightList)
|
|
|
this.cartList=data
|
|
|
this.goodsRightList.forEach(goodsItem => {
|
|
|
data.forEach(item => {
|
|
@@ -212,7 +211,6 @@
|
|
|
pageNo: this.page,
|
|
|
pageSize: this.limit
|
|
|
}).then(res => {
|
|
|
- console.log(res, 77788999)
|
|
|
this.goodsRightList = res.data.list.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
@@ -288,11 +286,11 @@
|
|
|
skuId: id,
|
|
|
}).then(res => {
|
|
|
console.log('我进拉了', index, this.goodsRightList, )
|
|
|
- console.log(this.goodsRightList[index].selected_goods_num, 888)
|
|
|
+ // console.log(this.goodsRightList[index].selected_goods_num, 888)
|
|
|
// this.$set(this.goodsRightList[index],'selected_goods_num')
|
|
|
// this.goodsRightList[index].selected_goods_num++
|
|
|
this.$set(this.goodsRightList[index], 'selected_goods_num', this.goodsRightList[index].selected_goods_num + 1);
|
|
|
- console.log(this.goodsRightList[index].selected_goods_num,'我是购物车的数量')
|
|
|
+ // console.log(this.goodsRightList[index].selected_goods_num,'我是购物车的数量')
|
|
|
// // 关闭 attr 组件
|
|
|
// this.attr.cartAttr = false;
|
|
|
// 提示成功
|
|
@@ -331,9 +329,12 @@
|
|
|
hideShoppingCar(){
|
|
|
// this.footHeight = '0';
|
|
|
this.$refs.orderAddcart.showCartList = false;
|
|
|
- // this.$refs.orderAddcart.footerswitch = true
|
|
|
this.showMask=false
|
|
|
},
|
|
|
+ hideMask(){
|
|
|
+ this.$refs.orderAddcart.showCartList = false;
|
|
|
+ this.showMask=false
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|