Commit 8f4f6cd7143a74f6faf178edd62e0d3ab0627bff
1 parent
0777421c
小程序提现的优化,提现到零钱的时候,如果会员没有绑定公众号会员就要提示
Showing
1 changed file
with
25 additions
and
4 deletions
packageD/pages/user/member/bring/bring.js
@@ -7,6 +7,8 @@ var t = getApp(), | @@ -7,6 +7,8 @@ var t = getApp(), | ||
7 | s = require("../../../../../utils/common.js"); | 7 | s = require("../../../../../utils/common.js"); |
8 | var regeneratorRuntime = require('../../../../../utils/runtime.js'); | 8 | var regeneratorRuntime = require('../../../../../utils/runtime.js'); |
9 | var oo = t.globalData.setting; | 9 | var oo = t.globalData.setting; |
10 | + | ||
11 | + | ||
10 | Page({ | 12 | Page({ |
11 | /** | 13 | /** |
12 | * 页面的初始数据 | 14 | * 页面的初始数据 |
@@ -25,7 +27,7 @@ Page({ | @@ -25,7 +27,7 @@ Page({ | ||
25 | cardInfo: '', | 27 | cardInfo: '', |
26 | user_infor: {}, //获取初始对象 | 28 | user_infor: {}, //获取初始对象 |
27 | needmon:0, | 29 | needmon:0, |
28 | - distribut_min:0 | 30 | + distribut_min:0, |
29 | }, | 31 | }, |
30 | // 银行卡失去焦点事件 | 32 | // 银行卡失去焦点事件 |
31 | blurInputEvent: function(e) { | 33 | blurInputEvent: function(e) { |
@@ -55,6 +57,16 @@ Page({ | @@ -55,6 +57,16 @@ Page({ | ||
55 | }, | 57 | }, |
56 | /*点击确定提现后表现的形式*/ | 58 | /*点击确定提现后表现的形式*/ |
57 | Gettime: function(e) { | 59 | Gettime: function(e) { |
60 | + var th=this; | ||
61 | + var user_info=getApp().globalData.userInfo; | ||
62 | + //提现是零钱的时候,同时是发红包的时候 | ||
63 | + if(this.data.current==2 && parseInt(this.data.tx_wx_type)==2){ | ||
64 | + if(!user_info.openid){ | ||
65 | + ut.m_toast("请前往公众号提现!!"); | ||
66 | + return false | ||
67 | + } | ||
68 | + } | ||
69 | + | ||
58 | var user_money = this.data.user_money; | 70 | var user_money = this.data.user_money; |
59 | var money = e.detail.value.moneys; //typeof判断数据类型 | 71 | var money = e.detail.value.moneys; //typeof判断数据类型 |
60 | var current = this.data.current; | 72 | var current = this.data.current; |
@@ -186,6 +198,13 @@ Page({ | @@ -186,6 +198,13 @@ Page({ | ||
186 | 198 | ||
187 | // 提现 | 199 | // 提现 |
188 | Cashwithdrawal: function(user_infor) { | 200 | Cashwithdrawal: function(user_infor) { |
201 | + | ||
202 | + | ||
203 | + if(this.data.tx_ing) return false; | ||
204 | + this.data.tx_ing=1; | ||
205 | + | ||
206 | + var th=this; | ||
207 | + | ||
189 | delete user_infor.rmon; | 208 | delete user_infor.rmon; |
190 | delete user_infor.isck; | 209 | delete user_infor.isck; |
191 | delete user_infor.needmon; | 210 | delete user_infor.needmon; |
@@ -204,6 +223,8 @@ Page({ | @@ -204,6 +223,8 @@ Page({ | ||
204 | 'content-type': 'application/json' | 223 | 'content-type': 'application/json' |
205 | }, // 设置请求的 header | 224 | }, // 设置请求的 header |
206 | success: function(res) { | 225 | success: function(res) { |
226 | + | ||
227 | + th.data.tx_ing=0; | ||
207 | if (res.data.code != -1) { | 228 | if (res.data.code != -1) { |
208 | wx.navigateTo({ | 229 | wx.navigateTo({ |
209 | url: 'msg/msg', | 230 | url: 'msg/msg', |
@@ -353,8 +374,9 @@ Page({ | @@ -353,8 +374,9 @@ Page({ | ||
353 | var json_d = JSON.parse(e.switch_list); | 374 | var json_d = JSON.parse(e.switch_list); |
354 | var is_closetxbank=json_d.is_closetxbank; | 375 | var is_closetxbank=json_d.is_closetxbank; |
355 | var is_tx_wx=json_d.is_tx_wx; | 376 | var is_tx_wx=json_d.is_tx_wx; |
377 | + var tx_wx_type=json_d.tx_wx_type; | ||
356 | var data={ | 378 | var data={ |
357 | - is_closetxbank:is_closetxbank,is_tx_wx:is_tx_wx | 379 | + is_closetxbank:is_closetxbank,is_tx_wx:is_tx_wx,tx_wx_type:tx_wx_type |
358 | }; | 380 | }; |
359 | if(is_closetxbank) data.current=2; | 381 | if(is_closetxbank) data.current=2; |
360 | th.setData(data); | 382 | th.setData(data); |
@@ -402,12 +424,11 @@ Page({ | @@ -402,12 +424,11 @@ Page({ | ||
402 | 424 | ||
403 | }, | 425 | }, |
404 | 426 | ||
405 | - | ||
406 | - | ||
407 | /** | 427 | /** |
408 | * 用户点击右上角分享 | 428 | * 用户点击右上角分享 |
409 | */ | 429 | */ |
410 | onShareAppMessage: function() { | 430 | onShareAppMessage: function() { |
411 | getApp().globalData.no_clear=1; | 431 | getApp().globalData.no_clear=1; |
412 | } | 432 | } |
433 | + | ||
413 | }) | 434 | }) |
414 | \ No newline at end of file | 435 | \ No newline at end of file |