Commit 256b128d by 谢中龙

订单,导购等相关优化

parent b261f317
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
justify-content: center; justify-content: center;
/* box-shadow: 0px -4px 10px 0px rgba(232, 232, 232, 0.95); */ /* box-shadow: 0px -4px 10px 0px rgba(232, 232, 232, 0.95); */
padding-top: 20rpx; padding-top: 20rpx;
/* border-top: solid 2rpx #dddddd; */
} }
.pdt { .pdt {
padding-top: 50rpx; padding-top: 50rpx;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
border-radius: 50%; border-radius: 50%;
color: #fff; color: #fff;
font-size: 24rpx; font-size: 24rpx;
background-color: rgba(0, 0, 0, 0.2); background-color: rgba(0, 0, 0, 0.4);
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1); box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
z-index: 99; z-index: 99;
} }
......
...@@ -81,8 +81,11 @@ wxService.page({ ...@@ -81,8 +81,11 @@ wxService.page({
defalutCoupon: 0, defalutCoupon: 0,
couponId: '', couponId: '',
couponSettingId: '', couponSettingId: '',
defalutCouponId: '' defalutCouponId: '',
}) currentCoupon : 0,
},() => {
this.setPayPrice();
});
return return
} }
const { faceAmount, type, id, couponDiscount,sid } = e.detail const { faceAmount, type, id, couponDiscount,sid } = e.detail
...@@ -110,11 +113,11 @@ wxService.page({ ...@@ -110,11 +113,11 @@ wxService.page({
// couponId: id, // couponId: id,
haveCoupon: true, haveCoupon: true,
currentCoupon: `${couponDiscount} 元` currentCoupon: `${couponDiscount} 元`
}) });
} }
// 实付款 // 实付款
this.setPayPrice() this.setPayPrice();
}, },
setPayPrice() { setPayPrice() {
const { currentCoupon, orderInitPrice, isSelect, plusMemberPrice, defalutCoupon } = this.data const { currentCoupon, orderInitPrice, isSelect, plusMemberPrice, defalutCoupon } = this.data
...@@ -390,8 +393,7 @@ wxService.page({ ...@@ -390,8 +393,7 @@ wxService.page({
sum += skuList[index].price * skuList[index].count; sum += skuList[index].price * skuList[index].count;
}); });
this.data.totalGoodsPrice = sum; this.data.totalGoodsPrice = sum;
// 初始化商品价格 // 初始化商品价格
const { isSelect } = this.data const { isSelect } = this.data
...@@ -404,21 +406,26 @@ wxService.page({ ...@@ -404,21 +406,26 @@ wxService.page({
noSelectPrice: sum noSelectPrice: sum
}) })
} }
//获取优惠券信息
let defalutCoupon = data && data.couponDiscountPreviews.length &&
data.couponDiscountPreviews[0].couponSettingDTO.type == 1 ?
data && data.couponDiscountPreviews.length &&
data.couponDiscountPreviews[0].couponSettingDTO.faceAmount / 100 : data &&
data.couponDiscountPreviews.length && data.couponDiscountPreviews[0] &&
data.couponDiscountPreviews[0].couponDiscount;
let defalutCouponId = data && data.couponDiscountPreviews.length &&
data.couponDiscountPreviews[0] && data.couponDiscountPreviews[0].couponDTOS[0] &&
data.couponDiscountPreviews[0].couponDTOS[0].id || '';
let couponSettingId = data && data.couponDiscountPreviews.length &&
data.couponDiscountPreviews[0] && data.couponDiscountPreviews[0].couponDTOS[0] &&
data.couponDiscountPreviews[0].couponDTOS[0].couponSettingId || '';
data.couponDiscountPreviews = data.couponDiscountPreviews ? data.couponDiscountPreviews :[];
// id / couponSettingId // id / couponSettingId
this.setData({ this.setData({
currentOrderList: data, currentOrderList: data,
defalutCoupon: data && data.couponDiscountPreviews.length && defalutCoupon: defalutCoupon,
data.couponDiscountPreviews[0].couponSettingDTO.type == 1 ? defalutCouponId: defalutCouponId,
data && data.couponDiscountPreviews.length && couponSettingId: couponSettingId,
data.couponDiscountPreviews[0].couponSettingDTO.faceAmount / 100 : data &&
data.couponDiscountPreviews.length && data.couponDiscountPreviews[0] &&
data.couponDiscountPreviews[0].couponDiscount,
defalutCouponId: data && data.couponDiscountPreviews.length &&
data.couponDiscountPreviews[0] && data.couponDiscountPreviews[0].couponDTOS[0] &&
data.couponDiscountPreviews[0].couponDTOS[0].id || '',
couponSettingId: data && data.couponDiscountPreviews.length &&
data.couponDiscountPreviews[0] && data.couponDiscountPreviews[0].couponDTOS[0] &&
data.couponDiscountPreviews[0].couponDTOS[0].couponSettingId || '',
orderInitPrice: data.amount, orderInitPrice: data.amount,
totalGoodsPrice: this.data.totalGoodsPrice totalGoodsPrice: this.data.totalGoodsPrice
}, () => { }, () => {
......
...@@ -127,16 +127,17 @@ ...@@ -127,16 +127,17 @@
</view> </view>
</view> </view>
<view class="coupon"> <view class="coupon">
<view> <!-- class='coupon-items' -->
<view bindtap="selectCoupon">
<text class="price-label">优惠券</text> <text class="price-label">优惠券</text>
<view class="select-coupon" bindtap="selectCoupon"> <view class="select-coupon" >
<text class="{{defalutCoupon ? 'coupon-price' : 'no-coupon'}}"> {{defalutCoupon ? (currentCoupon ? '-' + currentCoupon : '-' + defalutCoupon): '无可用优惠券'}}</text> <text class="{{defalutCoupon ? 'coupon-price' : 'no-coupon'}}">{{defalutCoupon ? (currentCoupon ? '-' + currentCoupon : '-' + defalutCoupon): (currentOrderList.couponDiscountPreviews.length == 0 ? '无可使用优惠券' : '选择优惠券')}}</text>
<image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right.png" /> <image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right.png" />
</view> </view>
</view> </view>
</view> </view>
<view class="coupon"> <view class="coupon">
<view> <view>
<text class="price-label">运费</text> <text class="price-label">运费</text>
<view class="select-coupon" bindtap="selectCoupon"> <view class="select-coupon" bindtap="selectCoupon">
......
...@@ -144,7 +144,22 @@ ...@@ -144,7 +144,22 @@
} }
.select-coupon{ .select-coupon{
float: right; float: right;
display: flex;
justify-content: flex-end;
align-items: center;
}
.coupon-items{
display: flex;
justify-content: space-between;
align-items: center;
}
.select-coupon text{
display: flex;
align-items: center;
} }
.coupon-price{ .coupon-price{
color: #cb3c3c; color: #cb3c3c;
font-size: 22rpx; font-size: 22rpx;
......
...@@ -40,7 +40,9 @@ ...@@ -40,7 +40,9 @@
<view wx:if="{{currentHasUserInfo}}"> <view wx:if="{{currentHasUserInfo}}">
<block wx:if="{{contentPermission}}"> <block wx:if="{{contentPermission}}">
<navigator open-type="navigate" url="/subPackage/page/pages/grassCommunity/grassCommunity"> <navigator open-type="navigate" url="/subPackage/page/pages/grassCommunity/grassCommunity">
<view class="add">+</view> <view class="add">
<image src='/assets/imgs/icon_plus.png' mode='aspectFit'></image>
</view>
</navigator> </navigator>
</block> </block>
</view> </view>
......
...@@ -58,16 +58,22 @@ scroll-view{ ...@@ -58,16 +58,22 @@ scroll-view{
height: 82rpx; height: 82rpx;
background-color: rgba(203, 60, 60, 1); background-color: rgba(203, 60, 60, 1);
border-radius: 50%; border-radius: 50%;
line-height:82rpx;
text-align: center;
font-size: 60rpx; font-size: 60rpx;
color: #ffffff; color: #ffffff;
position: fixed; position: fixed;
right: 25rpx; right: 25rpx;
bottom: 357rpx; bottom: 320rpx;
/* bottom: 35rpx; */ /* bottom: 35rpx; */
z-index: 99; z-index: 99;
display: flex;
align-items: center;
justify-content: center;
}
.add image{
width: 40rpx;
height: 40rpx;
border-radius: 50%;
} }
......
...@@ -303,7 +303,7 @@ wxService.page({ ...@@ -303,7 +303,7 @@ wxService.page({
} }
else if (tabbar.length != 0){ else if (tabbar.length != 0){
this.setData({ this.setData({
paddingBottom: '140rpx' paddingBottom: '130rpx'
}) })
} }
else{ else{
......
...@@ -11,11 +11,11 @@ page{ ...@@ -11,11 +11,11 @@ page{
} }
/* .cell--bubble{ /* .cell--bubble{
width:40px !important; width:82rpx !important;
height:40px !important; height:82rpx !important;
border-radius:24px; border-radius:50%;
text-align:center; text-align:center;
line-height:40px !important; line-height:82rpx !important;
display:inline-block; display:inline-block;
background-color: rgba(0, 0, 0, 0.5) !important; background-color: rgba(0, 0, 0, 0.5) !important;
} }
......
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