| | |
| | | <view class="shop_body_l_item_info_title gray3 f32">{{item.product_name}}</view> |
| | | <view class="d-b-c pb10"> |
| | | <view class="shop_body_l_item_info_price"> |
| | | <view class="f24 shop_red">¥<text |
| | | <view class="f24 shop_red" v-if="item.is_price_negotiable">价格面议</view> |
| | | <view class="f24 shop_red" v-else>¥<text |
| | | class="f32 fb">{{item.product_price}}</text></view> |
| | | </view> |
| | | <!-- 购物车操作组件 --> |
| | |
| | | <template v-else> |
| | | <view class="cart-btn-add" |
| | | v-if="!item.cart.total_num || item.cart.total_num <= 0" |
| | | @click.stop="addToCart(item,index)"> |
| | | @click.stop="handleCartItemAction(item,index)"> |
| | | <text class="icon iconfont icon-jia"></text> |
| | | </view> |
| | | <view class="cart-number-controller" v-else> |
| | |
| | | } |
| | | }, |
| | | |
| | | // 处理购物车操作 - 价格面议商品特殊处理 |
| | | handleCartItemAction(product, index) { |
| | | // 如果是价格面议商品,提示联系客服 |
| | | if (product.is_price_negotiable) { |
| | | uni.showModal({ |
| | | title: '温馨提示', |
| | | content: '该商品为价格面议商品,请联系客服咨询具体价格', |
| | | confirmText: '联系客服', |
| | | cancelText: '取消', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | // 跳转到商品详情页联系客服 |
| | | this.gotoList2(product.product_id); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | // 非价格面议商品,正常添加到购物车 |
| | | this.directlyAddToCart(product, index); |
| | | } |
| | | }, |
| | | |
| | | // 添加到购物车(单规格商品) |
| | | addToCart(product, index) { |
| | | this.directlyAddToCart(product, index); |