|
@@ -12,7 +12,9 @@ Page({
|
|
|
bannerList: [],
|
|
bannerList: [],
|
|
|
isCertificate: 0,
|
|
isCertificate: 0,
|
|
|
lockWithdraw: false,
|
|
lockWithdraw: false,
|
|
|
- has_bank:false
|
|
|
|
|
|
|
+ has_bank:false,
|
|
|
|
|
+ min_cash:0,
|
|
|
|
|
+ max_cahs:0
|
|
|
},
|
|
},
|
|
|
onLoad: function (options) {
|
|
onLoad: function (options) {
|
|
|
this.getCashTotal()
|
|
this.getCashTotal()
|
|
@@ -40,6 +42,7 @@ Page({
|
|
|
onShow () {
|
|
onShow () {
|
|
|
this.getCashTotal()
|
|
this.getCashTotal()
|
|
|
this.checkCertified()
|
|
this.checkCertified()
|
|
|
|
|
+ this.getWithDrawlimit()
|
|
|
},
|
|
},
|
|
|
getCashTotal () {
|
|
getCashTotal () {
|
|
|
var that = this
|
|
var that = this
|
|
@@ -76,18 +79,30 @@ Page({
|
|
|
}
|
|
}
|
|
|
_request.$get(url, params, success)
|
|
_request.$get(url, params, success)
|
|
|
},
|
|
},
|
|
|
|
|
+ getWithDrawlimit () {
|
|
|
|
|
+ var that = this
|
|
|
|
|
+ var url = 'v1/user/takecash/limit'
|
|
|
|
|
+ var params = {}
|
|
|
|
|
+ var success = function (res) {
|
|
|
|
|
+ that.setData({
|
|
|
|
|
+ min_cash: res.data.min_limit_cash,
|
|
|
|
|
+ max_cash: res.data.max_limit_cash
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ _request.$get(url, params, success)
|
|
|
|
|
+ },
|
|
|
tipClick () {
|
|
tipClick () {
|
|
|
var that = this
|
|
var that = this
|
|
|
// if (!that.data.isCertificate) {
|
|
// if (!that.data.isCertificate) {
|
|
|
// }
|
|
// }
|
|
|
that.data.confirmDialog = !that.data.confirmDialog
|
|
that.data.confirmDialog = !that.data.confirmDialog
|
|
|
- if (that.data.cashTotal.available >= 50) {
|
|
|
|
|
|
|
+ if (that.data.cashTotal.available >= that.data.min_cash && that.data.cashTotal.available <= that.data.max_cash) {
|
|
|
that.setData({
|
|
that.setData({
|
|
|
confirmDialog: that.data.confirmDialog
|
|
confirmDialog: that.data.confirmDialog
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
wx.showToast({
|
|
wx.showToast({
|
|
|
- title: '提现金额需要大于50元哦~',
|
|
|
|
|
|
|
+ title: '单次提现金额范围,大于'+that.data.min_cash+'小于'+that.data.max_cash,
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
duration: 2000
|
|
|
})
|
|
})
|
|
@@ -105,13 +120,13 @@ Page({
|
|
|
|
|
|
|
|
// if(that.data.has_bank){
|
|
// if(that.data.has_bank){
|
|
|
that.data.confirmDialog = !that.data.confirmDialog
|
|
that.data.confirmDialog = !that.data.confirmDialog
|
|
|
- if (that.data.cashTotal.available >= 50) {
|
|
|
|
|
|
|
+ if (that.data.cashTotal.available >= that.data.min_cash && that.data.cashTotal.available <= that.data.max_cash) {
|
|
|
that.setData({
|
|
that.setData({
|
|
|
confirmDialog: that.data.confirmDialog
|
|
confirmDialog: that.data.confirmDialog
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
wx.showToast({
|
|
wx.showToast({
|
|
|
- title: '提现金额需要大于50元哦~',
|
|
|
|
|
|
|
+ title: '单次提现金额范围,大于'+that.data.min_cash+'小于'+that.data.max_cash,
|
|
|
icon: 'none',
|
|
icon: 'none',
|
|
|
duration: 2000
|
|
duration: 2000
|
|
|
})
|
|
})
|