正在显示
6 个修改的文件
包含
182 行增加
和
1 行删除
@@ -40,6 +40,7 @@ | @@ -40,6 +40,7 @@ | ||
40 | "pages/main/rewardpoint/cashout/cashout", | 40 | "pages/main/rewardpoint/cashout/cashout", |
41 | "pages/main/rewardpoint/exchange/exchange", | 41 | "pages/main/rewardpoint/exchange/exchange", |
42 | "pages/main/rewardpoint/bindcard/bindcard", | 42 | "pages/main/rewardpoint/bindcard/bindcard", |
43 | + "pages/main/rewardpoint/setpaypwd/setpaypwd", | ||
43 | 44 | ||
44 | "pages/login/login", | 45 | "pages/login/login", |
45 | "pages/main/advancepayment/adPayDetails/adPayDetails", | 46 | "pages/main/advancepayment/adPayDetails/adPayDetails", |
@@ -7,7 +7,8 @@ Page({ | @@ -7,7 +7,8 @@ Page({ | ||
7 | data: { | 7 | data: { |
8 | taxpercent:25,//暂时固定为25% | 8 | taxpercent:25,//暂时固定为25% |
9 | showModal:false, | 9 | showModal:false, |
10 | - hasBind:false, | 10 | + hasBind:true, |
11 | + hasPayPwd:false, | ||
11 | rightNum:false, | 12 | rightNum:false, |
12 | cashNum:6989.88, | 13 | cashNum:6989.88, |
13 | inputNum:"", | 14 | inputNum:"", |
@@ -94,6 +95,12 @@ Page({ | @@ -94,6 +95,12 @@ Page({ | ||
94 | * 提现 | 95 | * 提现 |
95 | */ | 96 | */ |
96 | cashOut:function(){ | 97 | cashOut:function(){ |
98 | + if(!this.data.hasPayPwd){ | ||
99 | + wx.navigateTo({ | ||
100 | + url: '../setpaypwd/setpaypwd', | ||
101 | + }) | ||
102 | + return | ||
103 | + } | ||
97 | var inputnum = this.data.inputNum | 104 | var inputnum = this.data.inputNum |
98 | if(this.data.rightNum){ | 105 | if(this.data.rightNum){ |
99 | this.setData({ | 106 | this.setData({ |
1 | +// pages/main/rewardpoint/setpaypwd/setpaypwd.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * Page initial data | ||
6 | + */ | ||
7 | + data: { | ||
8 | + verifyCode: "", | ||
9 | + verifyCodeTime: "获取验证码", | ||
10 | + buttonDisable: false | ||
11 | + }, | ||
12 | + | ||
13 | + /** | ||
14 | + * Lifecycle function--Called when page load | ||
15 | + */ | ||
16 | + onLoad: function (options) { | ||
17 | + | ||
18 | + }, | ||
19 | + | ||
20 | + /** | ||
21 | + * Lifecycle function--Called when page is initially rendered | ||
22 | + */ | ||
23 | + onReady: function () { | ||
24 | + | ||
25 | + }, | ||
26 | + | ||
27 | + /** | ||
28 | + * Lifecycle function--Called when page show | ||
29 | + */ | ||
30 | + onShow: function () { | ||
31 | + | ||
32 | + }, | ||
33 | + | ||
34 | + // 获取验证码 | ||
35 | + getVerifyCode:function(){ | ||
36 | + var timelength = 60 | ||
37 | + | ||
38 | + var intervalId = setInterval(function () { | ||
39 | + timelength = timelength - 1; | ||
40 | + that.setData({ | ||
41 | + verifyCodeTime: timelength + 's后重发', | ||
42 | + buttonDisable: true | ||
43 | + }) | ||
44 | + if (timelength == 0) { | ||
45 | + clearInterval(intervalId); | ||
46 | + that.setData({ | ||
47 | + verifyCodeTime: '获取验证码', | ||
48 | + buttonDisable: false | ||
49 | + }) | ||
50 | + } | ||
51 | + }, 1000); | ||
52 | + that.requestCode(); | ||
53 | + }, | ||
54 | + | ||
55 | + requestCode:function(){ | ||
56 | + var that = this; | ||
57 | + var Authorization = app.globalData.Authorization; | ||
58 | + wx.request({ | ||
59 | + url: baseUrl + 'sms/v1/sms_codes', | ||
60 | + method: "POST", | ||
61 | + data: { | ||
62 | + // "mobile": mobile, | ||
63 | + // "type": "bindmobile", | ||
64 | + // "scope": "global_access:end_user" | ||
65 | + }, | ||
66 | + header: { | ||
67 | + 'content-type': 'application/json', // 默认值 | ||
68 | + "Authorization": Authorization | ||
69 | + }, | ||
70 | + success: function (res) { | ||
71 | + console.log(res.data) | ||
72 | + }, | ||
73 | + fail(res) { | ||
74 | + console.log(res.data) | ||
75 | + } | ||
76 | + }) | ||
77 | + }, | ||
78 | + | ||
79 | + /** | ||
80 | + * Lifecycle function--Called when page hide | ||
81 | + */ | ||
82 | + onHide: function () { | ||
83 | + | ||
84 | + }, | ||
85 | + | ||
86 | + /** | ||
87 | + * Lifecycle function--Called when page unload | ||
88 | + */ | ||
89 | + onUnload: function () { | ||
90 | + | ||
91 | + }, | ||
92 | + | ||
93 | + /** | ||
94 | + * Page event handler function--Called when user drop down | ||
95 | + */ | ||
96 | + onPullDownRefresh: function () { | ||
97 | + | ||
98 | + }, | ||
99 | + | ||
100 | + /** | ||
101 | + * Called when page reach bottom | ||
102 | + */ | ||
103 | + onReachBottom: function () { | ||
104 | + | ||
105 | + }, | ||
106 | + | ||
107 | + /** | ||
108 | + * Called when user click on the top right corner to share | ||
109 | + */ | ||
110 | + onShareAppMessage: function () { | ||
111 | + | ||
112 | + } | ||
113 | +}) |
1 | +<view> | ||
2 | + | ||
3 | + <view style="margin:0 30rpx;background:#FFF"> | ||
4 | + <input class="input_wrap" placeholder-class="placeholder_input_wrap" placeholder="请设置提现密码"></input> | ||
5 | + <view style='background:#eee;height:1rpx;'></view> | ||
6 | + | ||
7 | + <input class="input_wrap" placeholder-class="placeholder_input_wrap" placeholder="请再次输入提现密码"></input> | ||
8 | + <view style='background:#eee;height:1rpx;'></view> | ||
9 | + <view style="display:flex;align-items: center;"> | ||
10 | + <input class="input_wrap" style="width:492rpx" placeholder-class="placeholder_input_wrap" maxlength="8" type="number" placeholder="请输入验证码"></input> | ||
11 | + <button class="btn_blue_radius" style="height:64rpx;float:right;font-size:28rpx;text-align:center" bindtap='getVerifyCode' disabled="{{buttonDisable}}"> | ||
12 | + {{verifyCodeTime}}</button> | ||
13 | + <view style='background:#eee;height:1rpx;'></view> | ||
14 | + </view> | ||
15 | + </view> | ||
16 | + <view class="view_bottom"> | ||
17 | + <button class="btn_blue_radius" style="margin:20rpx" bindtap='confirm'> 确定</button> | ||
18 | + <button class="btn_white_radius" style="margin:20rpx" bindtap='cancel'> 取消</button> | ||
19 | + </view> | ||
20 | +</view> |
1 | +/* pages/main/rewardpoint/setpaypwd/setpaypwd.wxss */ | ||
2 | +.placeholder_input_wrap{ | ||
3 | + color:#ccc; | ||
4 | + font-size:32rpx; | ||
5 | + height: 100rpx; | ||
6 | +} | ||
7 | + | ||
8 | +.input_wrap{ | ||
9 | + height: 100rpx; | ||
10 | + color:#333; | ||
11 | + font-size:34rpx; | ||
12 | +} | ||
13 | + | ||
14 | +.btn_blue_radius { | ||
15 | + background: #357aeb; | ||
16 | + border-radius: 5px; | ||
17 | + flex: 1; | ||
18 | + color: #fff; | ||
19 | +} | ||
20 | + | ||
21 | +.btn_white_radius { | ||
22 | + flex: 1; | ||
23 | + height: 42px; | ||
24 | + background: #fff; | ||
25 | + border-radius: 5px; | ||
26 | + color: #666; | ||
27 | +border: 1px solid #EEEEEE; | ||
28 | +} | ||
29 | + | ||
30 | +.view_bottom { | ||
31 | + background: #fff; | ||
32 | + width: 100%; | ||
33 | + position: fixed; | ||
34 | + bottom: 0; | ||
35 | + display: flex; | ||
36 | + flex-direction: row; | ||
37 | +} |
请
注册
或
登录
后发表评论