Commit 256b128d by 谢中龙

订单,导购等相关优化

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