|
|
@ -42,7 +42,7 @@ |
|
|
|
<!-- 自提 --> |
|
|
|
<view v-if="info.is_user_post!=1"> |
|
|
|
<view class="pickself" > |
|
|
|
<navigator :url="`/subPackages/techan/selfPickUpPoint?pickupId=${info.pickupAddress.id}&goodsId=${info.sInfo.id}`"> |
|
|
|
<navigator :url="`/subPackages/techan/selfPickUpPoint?pickupId=${info.pickupAddress.id}&goodsId=${info.pInfo.id}`"> |
|
|
|
<view class="pickpoint"> |
|
|
|
<view class="flex-shrink-0">自提点</view> |
|
|
|
<view class="pickpointAddress"> |
|
|
@ -105,15 +105,15 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!-- 优惠券 --> |
|
|
|
<view @click="goOrderCoupon" class="tickets-box flex-between"> |
|
|
|
<view @click="goOrderCoupon" class="tickets-container flex-between" v-if="!isShoppingCart"> |
|
|
|
<view class="order-title">优惠券</view> |
|
|
|
<view class="coupon-btn" v-if="coupon==''"> |
|
|
|
<view class="select">选择优惠券</view> |
|
|
|
<uni-icons style="height: 42rpx;" color="#999999" type="right" size="18"></uni-icons> |
|
|
|
</view> |
|
|
|
<div class="coupon-price" v-else> |
|
|
|
<span v-if="coupon.percent == 0">-¥{{coupon.discounts/100}}</span> |
|
|
|
<span v-else>-{{coupon.percent}}%</span> |
|
|
|
<span v-if="coupon.activity.fold == 0">-¥{{coupon.activity.money/100}}</span> |
|
|
|
<span v-else>-{{coupon.activity.fold*10}}%</span> |
|
|
|
<span style="margin:0 31rpx 0 8rpx;color: #6C7A94;">></span> |
|
|
|
</div> |
|
|
|
</view> |
|
|
@ -203,16 +203,25 @@ export default { |
|
|
|
|
|
|
|
popShow: false, // 解决滚动穿透 |
|
|
|
|
|
|
|
addressTitle: '添加收货地址' |
|
|
|
addressTitle: '添加收货地址', |
|
|
|
|
|
|
|
isShoppingCart: false, |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad(options) { |
|
|
|
if (options.isShoppingCart) { |
|
|
|
this.isShoppingCart = options.isShoppingCart |
|
|
|
} |
|
|
|
this.$store.commit("choseCoupon", ""); |
|
|
|
this.handleOrderGoods() |
|
|
|
}, |
|
|
|
onShow() { |
|
|
|
if (!this.isShoppingCart) { |
|
|
|
this.coupon = this.$store.state.user.coupon |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 更新自提点 |
|
|
|
uni.$on("updateDataByConnect",this.getDataByConnect) |
|
|
@ -234,10 +243,11 @@ export default { |
|
|
|
uni.navigateBack(); |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// use_type 0邮寄 1自提 3邮寄或自提 |
|
|
|
// is_post 1邮寄 2自提 默认邮寄1 |
|
|
|
orderList.forEach(v=>{ |
|
|
|
v.is_post = v.sInfo.is_post || "1" // 产品自己的方式 |
|
|
|
v.is_user_post = v.sInfo.is_post==2?2:"1" // 用户自选方式 |
|
|
|
v.is_post = v.sInfo.use_type==0?1:v.sInfo.use_type==1?2:3 // 产品自己的方式 |
|
|
|
v.is_user_post = v.sInfo.use_type==1?2:1 // 用户自选方式 |
|
|
|
v.pickupAddress = {} // 自提信息 |
|
|
|
v.contacts = null // 收货地址 |
|
|
|
v.post = null // 运费信息 |
|
|
@ -298,9 +308,6 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
getPost() { |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
let tempList = [] |
|
|
|
this.orderList.forEach(v=>{ |
|
|
|
if( v.sInfo.contacts && v.is_user_post == 1) { |
|
|
@ -419,19 +426,18 @@ export default { |
|
|
|
} |
|
|
|
this.allprice = allPrice + postPrice |
|
|
|
if (this.coupon) { |
|
|
|
if (this.coupon.percent == 0) { |
|
|
|
if (this.coupon.discounts>allPrice) { |
|
|
|
price =postPrice |
|
|
|
if (this.coupon.activity.fold == 0) { |
|
|
|
if (this.coupon.activity.money>allPrice) { |
|
|
|
price =0 |
|
|
|
}else{ |
|
|
|
price = allPrice + postPrice - (this.coupon.discounts) |
|
|
|
price = allPrice - (this.coupon.activity.money) |
|
|
|
} |
|
|
|
|
|
|
|
} else{ |
|
|
|
// 有bug折扣券不加邮费 |
|
|
|
price = (allPrice + postPrice) - (allPrice * this.coupon.percent/100) |
|
|
|
price = allPrice - allPrice * (this.coupon.activity.fold*10/100) |
|
|
|
} |
|
|
|
} else { |
|
|
|
price = allPrice + postPrice |
|
|
|
price = allPrice |
|
|
|
} |
|
|
|
return price < 0 ? 0 : (price/100).toFixed(2) |
|
|
|
}, |
|
|
@ -1140,4 +1146,23 @@ view { |
|
|
|
padding-bottom: 12rpx; |
|
|
|
min-height: fit-content; |
|
|
|
} |
|
|
|
.tickets-container { |
|
|
|
width: 698rpx; |
|
|
|
background: #fff; |
|
|
|
height: 120rpx; |
|
|
|
margin: 22rpx auto 0; |
|
|
|
.order-title { |
|
|
|
margin: 31rpx 0 31rpx 30rpx; |
|
|
|
font-size: 31rpx; |
|
|
|
font-family: PingFang SC; |
|
|
|
font-weight: bold; |
|
|
|
color: #000000; |
|
|
|
} |
|
|
|
|
|
|
|
.coupon-price { |
|
|
|
color:#DD0000; |
|
|
|
font-size: 30rpx; |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |