|
@@ -20,6 +20,7 @@
|
|
<view class="box_center">
|
|
<view class="box_center">
|
|
<view class="car_name">{{item.name}}</view>
|
|
<view class="car_name">{{item.name}}</view>
|
|
<view class="car_spec">{{item.spec}}</view>
|
|
<view class="car_spec">{{item.spec}}</view>
|
|
|
|
+ <view v-if="item.promo_title" class="promo_title">{{item.promo_title}}</view>
|
|
<view class="car_price">
|
|
<view class="car_price">
|
|
<text class="price">¥{{item.price}}</text>
|
|
<text class="price">¥{{item.price}}</text>
|
|
</view>
|
|
</view>
|
|
@@ -30,11 +31,36 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="car_item" v-for="(item,index) in promoRebateList" :key="index">
|
|
|
|
+ <view class="box_left">
|
|
|
|
+ <image class="car_image" :src="item.thumb" mode=""></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="box_center">
|
|
|
|
+ <view class="car_name"><text v-if="item.promo_rebate_id">【赠品】</text>{{item.name}}</view>
|
|
|
|
+ <view class="car_spec">{{item.spec}}</view>
|
|
|
|
+ <view class="car_price">
|
|
|
|
+ <text class="price">¥{{item.price}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="box_right">
|
|
|
|
+ <view class="buy_num_box">
|
|
|
|
+ <view class="buy_num">共{{item.buy_num}}件</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<view class="to_select_coupon" v-if="couponList.length" @click="popupCoupon()">
|
|
<view class="to_select_coupon" v-if="couponList.length" @click="popupCoupon()">
|
|
<text>优惠券</text>
|
|
<text>优惠券</text>
|
|
<view class="coupon_deduction">{{couponUsed}}</view>
|
|
<view class="coupon_deduction">{{couponUsed}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="to_select_coupon" v-if="reduction > 0">
|
|
|
|
+ <text>满减</text>
|
|
|
|
+ <view class="coupon_deduction">-{{reduction}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="to_select_coupon" v-if="discount > 0">
|
|
|
|
+ <text>商品折扣</text>
|
|
|
|
+ <view class="coupon_deduction">-{{discount}}</view>
|
|
|
|
+ </view>
|
|
<view class="bottom_box">
|
|
<view class="bottom_box">
|
|
<view class="price_box">
|
|
<view class="price_box">
|
|
合计:<text class="price_total">¥{{priceTotal}}</text>
|
|
合计:<text class="price_total">¥{{priceTotal}}</text>
|
|
@@ -106,12 +132,16 @@
|
|
cartList:[],
|
|
cartList:[],
|
|
// 优惠券列表
|
|
// 优惠券列表
|
|
couponList:[],
|
|
couponList:[],
|
|
|
|
+ //赠品列表
|
|
|
|
+ promoRebateList:[],
|
|
// 请求参数
|
|
// 请求参数
|
|
requestParam:{
|
|
requestParam:{
|
|
cart_ids:"",
|
|
cart_ids:"",
|
|
},
|
|
},
|
|
// 总价
|
|
// 总价
|
|
priceTotal:'0.00',
|
|
priceTotal:'0.00',
|
|
|
|
+ discount:'0.00',
|
|
|
|
+ reduction:'0.00',
|
|
// 优惠券使用
|
|
// 优惠券使用
|
|
couponUsed:"去使用 >",
|
|
couponUsed:"去使用 >",
|
|
// 扣减金额
|
|
// 扣减金额
|
|
@@ -149,7 +179,10 @@
|
|
this.$http.request('api/shop_cart/check_list',this.requestParam).then((re)=>{
|
|
this.$http.request('api/shop_cart/check_list',this.requestParam).then((re)=>{
|
|
if( re.code == 'success' ){
|
|
if( re.code == 'success' ){
|
|
// 赋值
|
|
// 赋值
|
|
- this.cartList = re.data;
|
|
|
|
|
|
+ this.cartList = re.data;
|
|
|
|
+ this.promoRebateList = re.promoRebateList;
|
|
|
|
+ this.discount = re.discount;
|
|
|
|
+ this.reduction = re.reduction;
|
|
// 结果
|
|
// 结果
|
|
this.$http.request('api/custom_coupon/get_checked',this.requestParam).then((re)=>{
|
|
this.$http.request('api/custom_coupon/get_checked',this.requestParam).then((re)=>{
|
|
if( re.code == 'success' ){
|
|
if( re.code == 'success' ){
|
|
@@ -494,10 +527,13 @@
|
|
width: 300rpx;
|
|
width: 300rpx;
|
|
margin-left: 25rpx;
|
|
margin-left: 25rpx;
|
|
.car_name{
|
|
.car_name{
|
|
- max-height: 80rpx;
|
|
|
|
- font-size: 30rpx;
|
|
|
|
- line-height: 50rpx;
|
|
|
|
- overflow: hidden;
|
|
|
|
|
|
+ max-height: 70rpx;
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ line-height: 40rpx;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ white-space: nowrap; /* 不换行 */
|
|
|
|
+ overflow: hidden; /* 隐藏超出的内容 */
|
|
|
|
+ text-overflow: ellipsis; /* 用省略号表示被隐藏的部分 */
|
|
}
|
|
}
|
|
.car_spec{
|
|
.car_spec{
|
|
color: #999999;
|
|
color: #999999;
|
|
@@ -506,6 +542,14 @@
|
|
max-height: 60rpx;
|
|
max-height: 60rpx;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
|
|
+ .promo_title{
|
|
|
|
+ max-height: 80rpx;
|
|
|
|
+ font-size: 20rpx;
|
|
|
|
+ line-height: 40rpx;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ padding: 0rpx 0rpx;
|
|
|
|
+ color: #dd524d;
|
|
|
|
+ }
|
|
.car_price{
|
|
.car_price{
|
|
font-size: 30rpx;
|
|
font-size: 30rpx;
|
|
line-height: 60rpx;
|
|
line-height: 60rpx;
|