Commit 191f703e by 赵雅纹

Merge branch 'dev_7.1.0' into feature-zyw-sc

parents 552222e2 d52923ee
...@@ -22,7 +22,8 @@ Component({ ...@@ -22,7 +22,8 @@ Component({
*/ */
methods: { methods: {
selectCoupon() { selectCoupon() {
console.log('2222') console.log('2222')
// 当前优惠券价格
this.setData({ this.setData({
isSelect: !this.data.isSelect isSelect: !this.data.isSelect
}) })
......
...@@ -10,14 +10,14 @@ wxService.page({ ...@@ -10,14 +10,14 @@ wxService.page({
showSelectCoupon: false, showSelectCoupon: false,
skuIds: [], skuIds: [],
trolleySku2Buy: Array, trolleySku2Buy: Array,
currentOrderList: Array currentOrderList: Array,
isSelect: false
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -31,6 +31,11 @@ wxService.page({ ...@@ -31,6 +31,11 @@ wxService.page({
}) })
} }
}, },
handelChangeSelectVip() {
this.setData({
isSelect: !this.data.isSelect
})
},
// 计算优惠价 // 计算优惠价
calPreferentialPrice(trolleySku2Buy) { calPreferentialPrice(trolleySku2Buy) {
wx.showLoading({ wx.showLoading({
...@@ -60,7 +65,6 @@ wxService.page({ ...@@ -60,7 +65,6 @@ wxService.page({
const { result, data } = res.data const { result, data } = res.data
if (result == 0) { if (result == 0) {
delete data.appId delete data.appId
console.log('data', data)
wx.requestPayment(Object.assign({ wx.requestPayment(Object.assign({
success(res) { success(res) {
wx.hideLoading() wx.hideLoading()
......
...@@ -70,21 +70,24 @@ ...@@ -70,21 +70,24 @@
<!-- 商品合计 --> <!-- 商品合计 -->
<view class="pro-sum"> <view class="pro-sum">
<view class="plus-wrap"> <view class="vip-info">
<view class="plus-top-text"> <view class="vip-left">
<image src="/assets/imgs/7_1_0/plus-icon.png" /> <view class="left-top">
<text>现在勾选</text> <image class="top-image" src="/assets/imgs/7_1_0/plus-icon.png" />
</view> <text>现在勾选成为vip,立领200元礼包,文案文案 </text>
<view class="plus-bottom-text"> </view>
<text>vip可尊享N大权益</text> <view class="left-bottom">
<image src="/assets/imgs/7_1_0/explain.png" /> <text>vip可尊享N大权益</text>
</view> <image class="bottom-image" src="/assets/imgs/7_1_0/explain.png" />
<view class="select-desc {{isSelect ? 'select-tip' : 'unselect-tip'}}"> </view>
<!-- <image src="{{isSelect ? '/assets/imgs/7_1_0/selected.png' : '/assets/imgs/7_1_0/unselect.png'}}" class="{{isSelect ? 'select-tip' : 'unselect-tip'}}"></image> -->
<text>{{isSelect ? '已勾选,即享优惠' : '勾选开通'}}</text>
</view> </view>
<view class="select-type {{isSelect ? 'theme-color' : ''}}"> <view class="vip-right">
<image src="{{isSelect ? '/assets/imgs/7_1_0/tick-success.png' : '/assets/imgs/7_1_0/tick.png'}}" /> <view class="right-check-status" bindtap="handelChangeSelectVip">
<image class="check-status-img" src="{{isSelect ? '/assets/imgs/7_1_0/08_22/trade-success.png' : '/assets/imgs/7_1_0/08_22/trade-unsel.png'}}" />
</view>
<view class="right-check-tips {{isSelect? 'tip-check' : 'tip-un-check'}}">
<image class="select-check-open {{isSelect? 'tip-check' : 'tip-un-check'}}" src="{{isSelect ? '/assets/imgs/7_1_0/08_22/sel.png' : '/assets/imgs/7_1_0/08_22/un-sel.png'}}"/>
</view>
</view> </view>
</view> </view>
<view class="order-sum"> <view class="order-sum">
...@@ -93,7 +96,7 @@ ...@@ -93,7 +96,7 @@
<text class="price-label">商品合计</text> <text class="price-label">商品合计</text>
<text class="total-price">¥306</text> <text class="total-price">¥306</text>
</view> </view>
<view class="plus-price"> <view class="plus-price" wx:if="{{isSelect}}">
<view class="plus-info"> <view class="plus-info">
<text class="price-label">plus会员价</text> <text class="price-label">plus会员价</text>
<text class="member-price">-¥20</text> <text class="member-price">-¥20</text>
...@@ -110,7 +113,7 @@ ...@@ -110,7 +113,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="coupon"> <view class="coupon" wx:if="{{isSelect}}">
<view> <view>
<text class="price-label">VIP会员年费</text> <text class="price-label">VIP会员年费</text>
<text class="vip-desc"> (不可使用任何优惠或积分)</text> <text class="vip-desc"> (不可使用任何优惠或积分)</text>
......
...@@ -98,74 +98,6 @@ ...@@ -98,74 +98,6 @@
.pro-sum{ .pro-sum{
padding: 0 20rpx 90rpx; padding: 0 20rpx 90rpx;
} }
.plus-wrap{
background-color: rgba(192, 154, 116, 0.07);
margin-top: 21rpx;
padding: 21rpx 29rpx 15rpx 33rpx;
position: relative;
}
.plus-top-text image{
width: 36rpx;
height: 20rpx;
vertical-align: middle;
}
.plus-top-text text{
color: #333333;
font-size: 23rpx;
margin-left: 16rpx;
vertical-align: middle;
}
.plus-bottom-text{
margin-top: 7rpx;
}
.plus-bottom-text text{
font-size: 20rpx;
color: #c09a74;
vertical-align: middle;
}
.plus-bottom-text image{
width: 16rpx;
height: 16rpx;
vertical-align: middle;
margin-left: 7rpx;
}
.select-type{
width: 32rpx;
height: 32rpx;
background-color: #D8D8D8;
border-radius: 50%;
position: absolute;
top: 34rpx;
right: 29rpx;
}
.select-type image{
width: 18rpx;
height: 12rpx;
position: absolute;
top: 10rpx;
left: 7rpx;
}
/* .select-info{
position: absolute;
right: 0
} */
.select-desc{
}
.select-desc text{
font-size: 18rpx;
color: #ffffff;
position: absolute;
top: 6rpx;
}
.select-desc image{
position: absolute;
top: 0;
left: 0;
}
.select-desc .unselect-tip{
width: 112rpx;
height: 50rpx;
}
.order-price,.coupon{ .order-price,.coupon{
padding: 24rpx 20rpx; padding: 24rpx 20rpx;
...@@ -285,4 +217,62 @@ ...@@ -285,4 +217,62 @@
.vip-desc{ .vip-desc{
font-size: 22rpx; font-size: 22rpx;
color: #aaaaaa; color: #aaaaaa;
}
.vip-info{
margin: 21rpx 10rpx 0;
height: 103rpx;
background-color: rgba(192, 154, 116, .07);
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20rpx;
box-sizing: border-box;
position: relative;
}
.left-top {
height: 32rpx;
color: rgba(51, 51, 51, 1);
font-size: 23rpx;
text-align: left;
margin-bottom: 8rpx;
}
.left-bottom {
width: 193rpx;
height: 28rpx;
color: rgba(192, 154, 116, 1);
font-size: 20rpx;
text-align: left;
}
.left-top .top-image {
width: 23rpx;
height: 11rpx;
margin-right: 8rpx;
}
.left-bottom .bottom-image {
width: 17rpx;
height: 17rpx;
margin-left: 8rpx;
}
.right-check-status {
width: 32rpx;
height: 32rpx;
}
.right-check-status .check-status-img{
width: 32rpx;
height: 32rpx;
}
.right-check-tips {
position: absolute;
top: -18rpx;
}
.tip-check {
width: 155rpx;
height: 55rpx;
right: 4rpx;
}
.tip-un-check {
width: 100rpx;
height: 55rpx;
right: 0rpx;
} }
\ No newline at end of file
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