提交 04c47c27 authored 作者: huaxinzhu's avatar huaxinzhu

提现需要优化以及bug修复;官网接口对接1-2

上级 225a5683
......@@ -3,7 +3,7 @@ ENV = 'development'
# 正式环境
#VUE_APP_BASE_API = 'http://sjapi.jxhh.com'
#VUE_APP_BASE_SYS_API = 'http://sysapi.jxhh.com'
VUE_APP_BASE_SYS_API = 'http://sysapi.jxhh.com'
# 开发环境
#VUE_APP_BASE_API = 'http://192.168.111.34:8200'
VUE_APP_BASE_API = 'http://192.168.26.179:8200'
......
......@@ -171,10 +171,17 @@ export function addInvoiceData (data) {
}
// 获取验证码
// export function getCheckCodeData(data) {
// return request({
// url: '/system/withdrawlog/getCheckCode',
// method: 'post',
// data: data
// })
// }
export function getCheckCodeData(data) {
return request({
url: '/system/withdrawlog/getCheckCode',
method: 'post',
url: '/local/seller/sendMobile',
method: 'get',
data: data
})
}
......
// import request from '@/utils/request';
import request from '@/utils/request';
import axios from 'axios'
// 获取分类列表
//
// // 获取分类列表
// export function getDocList (docType) {
// return request({
// url: '/api/v1/document/externalTypeListALL?docType='+docType,
// url: '//sysapi.jxhh.com/api/v1/document/externalTypeListALL?docType='+docType,
// method: 'get'
// })
// }
//
// // 查询文档
// //
// // // 查询文档
// export function getDoc (query) {
// return request({
// url: '/api/v1/document/externalShow',
......
......@@ -20,7 +20,7 @@
<el-form-item label="提现至:" prop="bank_id">
<el-select v-model="assetForm.bank_id" placeholder="选择到账银行卡" style="width:420px;">
<el-option v-for="item in bankList" :key="item.id" :label="item.bank_name" :value="item.id"></el-option>
<el-option v-for="item in bankList" :key="item.id" :label="formatBankName(item.bank_name,item.bank_account_sn)" :value="item.id"></el-option>
</el-select>
<span class="withdraw-tip">
您还没有账户,<span class="spe-span-a" @click="goToAddBank">去添加</span>
......@@ -30,7 +30,8 @@
<el-form-item label="提现金额:">
<el-input v-model="withdrawalBalance" disabled placeholder="全部提现金额" style="width:420px;"/>
<span class="withdraw-tip">
提现金额为全部的可提现余额,手续费将从您的提现金额中扣除,以实际到账为准(开票以实际到账金额开具)
不允许手动输入,提现金额为全部的可提现余额,手续费将从您的提现金额中扣除,以实际到账为准(开票以实际到账金额开具)。
提现金额至少为100元才可以操作提现
</span>
<p class="withdraw-tip-spe">当前提现手续费为:{{ chargeCount }}</p>
</el-form-item>
......@@ -182,9 +183,12 @@
// 倒计时效果
this.getCode()
getCheckCodeData({seller_id: this.seller_id}).then(response => {
if (response.code == 0) {
this.msgSuccess(response.msg);
// 获取验证码接口
getCheckCodeData().then(res => {
if (res.code == 1) {
this.$message({type:'success',message: '验证码发送成功'});
}else {
this.$message({type:'error',message: res.message ? res.message : '发送失败'});
}
});
},
......@@ -233,6 +237,11 @@
/** 提交按钮 */
submitForm() {
if( Number(this.withdrawalBalance) < 100) {
this.$message({type: 'warning',message: '提现金额至少为100才可操作提现'});
return;
}
this.$refs["assetForm"].validate(valid => {
if (valid) {
applyWithdraw(this.assetForm).then(res => {
......@@ -247,6 +256,22 @@
}
});
},
/** 提现 银行卡名称 + ***后四位卡号 */
formatBankName(name,num) {
let newBnakName = '';
let newNum = '';
// 为了以防万一,先将num转为字符串
let numStr = num + '';
if(numStr && numStr.length > 4) {
newNum = '****' + numStr.substring(numStr.length-4)
}else {
newNum = numStr
}
newBnakName = name + ' (' + newNum + ')'
return newBnakName
}
} //methods结束
};
</script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论