正在显示
3 个修改的文件
包含
13 行增加
和
9 行删除
... | ... | @@ -17,7 +17,6 @@ Page({ |
17 | 17 | bank: '', |
18 | 18 | bank_card_no: '', |
19 | 19 | bank_province: '', |
20 | - refundInfo:{}, | |
21 | 20 | show_modal: false |
22 | 21 | }, |
23 | 22 | |
... | ... | @@ -29,6 +28,7 @@ Page({ |
29 | 28 | var userinfo = app.globalData.userInfo |
30 | 29 | console.log("userinfo", userinfo) |
31 | 30 | this.getRefundDetail() |
31 | + this.getbanklist() | |
32 | 32 | this.loadProvince() |
33 | 33 | this.setData({ |
34 | 34 | name: userinfo ? userinfo.name : "" |
... | ... | @@ -48,9 +48,8 @@ Page({ |
48 | 48 | success: function (res) { |
49 | 49 | console.log(res) |
50 | 50 | that.setData({ |
51 | - bankList: res.data.items, | |
51 | + bankList: res.data.banks, | |
52 | 52 | }) |
53 | - console.log("bankInfo", that.data.bankList) | |
54 | 53 | }, |
55 | 54 | fail(res) { |
56 | 55 | console.log(res) |
... | ... | @@ -78,7 +77,7 @@ Page({ |
78 | 77 | that.setData({ |
79 | 78 | bank: result.data.item.bank, |
80 | 79 | bank_card_no: result.data.item.bank_card_no, |
81 | - refundInfo: result.data.item | |
80 | + bank_province: result.data.item.bank_province | |
82 | 81 | }) |
83 | 82 | } |
84 | 83 | }, |
... | ... | @@ -93,7 +92,6 @@ Page({ |
93 | 92 | for (var i = 0; i < provincelist.length; i++) { |
94 | 93 | province_data.push(provincelist[i].name) |
95 | 94 | } |
96 | - console.log("provincedata", province_data) | |
97 | 95 | this.setData({ |
98 | 96 | province: province_data, |
99 | 97 | }) |
... | ... | @@ -213,6 +211,13 @@ Page({ |
213 | 211 | }) |
214 | 212 | }, |
215 | 213 | |
214 | + bindbankChange: function (e) { | |
215 | + console.log('picker,携带值为', e.detail.value) | |
216 | + this.setData({ | |
217 | + bank: this.data.bankList[e.detail.value] | |
218 | + }) | |
219 | + }, | |
220 | + | |
216 | 221 | formSubmit: function(e) { |
217 | 222 | var formdata = e.detail.value |
218 | 223 | console.log("formdata", formdata); |
... | ... | @@ -228,7 +233,7 @@ Page({ |
228 | 233 | this.showToast('银行卡号格式有误') |
229 | 234 | return |
230 | 235 | } |
231 | - if (formdata.bank.length < 1) { | |
236 | + if (this.data.bank.length < 1) { | |
232 | 237 | this.showToast("请输入银行名称") |
233 | 238 | return |
234 | 239 | } |
... | ... | @@ -237,7 +242,6 @@ Page({ |
237 | 242 | return |
238 | 243 | } |
239 | 244 | this.setData({ |
240 | - bank:formdata.bank, | |
241 | 245 | bank_card_no: formdata.bank_card_no, |
242 | 246 | show_modal: true |
243 | 247 | }) | ... | ... |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | <text class="text_gray7_34" style="line-height:104rpx">开户银行名称</text> |
17 | 17 | <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='bank' value="{{bank}}"></input> |
18 | 18 | </view> --> |
19 | - <picker style="height:104rpx;padding-left:30rpx;background-color:#fff" mode="selector" bindchange="bindRegionChange" range="{{bankList}}" > | |
19 | + <picker style="height:104rpx;padding-left:30rpx;background-color:#fff" mode="selector" bindchange="bindbankChange" range="{{bankList}}" > | |
20 | 20 | <text class="text_gray7_34">开户银行名称</text> |
21 | 21 | <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> |
22 | 22 | <view wx:if="{{bank.length>0}}" class="input_wrap rigion_choosed"> | ... | ... |
请
注册
或
登录
后发表评论