uniapp实现提现校验功能
cashOut() { //点击提现
console.log('提现⾦额为:',)
var regExp = /^[1-9]\d*$/;
if (this.cashOutObj.accountNum == '') {
uni.showToast({
title: '请输⼊提现账号',
icon: 'none'
reactnative原生列表
});
return false;
}else if(this.cashOutObj.userName == ''){
uni.showToast({
title: '请输⼊提现⼈姓名',
icon: 'none'
});
return false;
} else if ( == '' || % 10 != 0 || ( > alMoney)) {    console.log('提现⾦额为:',)
uni.showToast({
title: '请输⼊正确的提现⾦额',
icon: 'none'
});
return false;
}else if(!st()){
uni.showToast({
title: '请输⼊正确的提现⾦额',
icon: 'none'
});
return false;
}else if(<='0'){
uni.showToast({
title: '请输⼊正确的提现⾦额',
icon: 'none'
});
return false;
} else {
uni.showLoading({
title: '正在提现',
mask: true,
});
let params = {
"functionName": "goldHandleService",
"methodName": "cashWithdrawal",
"originSource": {
"OS": "tiny",
"version": "AppVersion_V2.0"
},
"data": {
'userId': StorageSync('userId'),
...this.cashOutObj
}
}
this.$http(JSON.stringify(params)).then(res => {
if (Code === "ERRORCODE0000") {
console.log('提现', res)
this.$store.dispatch('getUserGold', res.ldInfo)
uni.hideLoading()
uni.showToast({
title: '提现成功',
complete() {
setTimeout(function() {
setTimeout(function() {          uni.navigateBack({
delta: 1
});
}, 1500);
}
});
}
})
}
}

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。