Skip to content

Commit

Permalink
修改充值送样式
Browse files Browse the repository at this point in the history
修改充值送样式
  • Loading branch information
junwen.deng committed Feb 27, 2019
1 parent 8daeb0a commit d4c2f5e
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 16 deletions.
3 changes: 3 additions & 0 deletions pages/recharge/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Page({
rechargeAmount: function (e) {
var confine = e.currentTarget.dataset.confine;
var amount = confine;
this.setData({
amount: amount
});
wxpay.wxpay(app, amount, 0, "/pages/cashier/cashier");
},

Expand Down
15 changes: 11 additions & 4 deletions pages/recharge/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<view class="row-wrap">
<view class="label">充值金额</view>
<view class="label-right">
<input name="amount" class="input" type="text" placeholder="至少充值 {{recharge_amount_min}} 元"/>
<input name="amount" class="input" type="text" value="{{amount}}" placeholder="至少充值 {{recharge_amount_min}} 元"/>
</view>
</view>
</view>
Expand All @@ -20,14 +20,21 @@
</radio-group>
</view>
</view>


<block wx:if='{{rechargeSendRules}}'>
<view class="charge-rule-wrap">
<block wx:for='{{rechargeSendRules}}' wx:for-item="item">
<button class='font charge-detail' bindtap="rechargeAmount" data-confine="{{item.confine}}" data-send="{{item.send}}">
<text>充{{item.confine}}送{{item.send}}</text>
</button>

<!-- <button class='font charge-detail' bindtap="rechargeAmount" data-confine="{{item.confine}}" data-send="{{item.send}}">
<text>充{{item.confine}}送{{item.send}}</text>
</button> -->
<view class="btn charge-detail" bindtap="rechargeAmount" data-confine="{{item.confine}}" data-send="{{item.send}}">
<text>充{{item.confine}}</text>
<text>送{{item.send}}</text>
</view>
</block>

</view>
</block>

Expand Down
41 changes: 29 additions & 12 deletions pages/recharge/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -90,25 +90,42 @@ picker {
width:740rpx;
}


.charge-rule-wrap{
background: white;
margin-top:10rpx;
padding:10rpx
margin-top:20rpx;
padding:10rpx;
padding-left:20rpx;
display: flex;
flex-direction:row;
flex-wrap:wrap;
}
.btn{
box-sizing: border-box;
text-align: center;
border-radius: 6rpx;
margin-left: 20rpx;
}
.charge-detail{
width: 160rpx;
height: 80rpx;
color: rgba(46, 189, 2, 0.925);
/* padding-left: 6rpx; */
width:220rpx;
height:100rpx;
color:rgba(99, 190, 133, 1);
background-color:white;
border:2rpx solid rgba(46, 189, 2, 0.925);

display: table-cell;
line-height: 30rpx;
border:3rpx solid rgba(99, 190, 133, 1);
display:table-cell;
line-height:30rpx;
font-weight:300;
font-size:30rpx;
margin:10rpx;
align-items:flex-start;
}
.charge-detail text{
vertical-align:middle;
font-size: 28rpx;
vertical-align:middle;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
margin-top:12rpx;
}
.button-hover{
background-color:grey;
Expand Down

0 comments on commit d4c2f5e

Please sign in to comment.