Increase payment support and update parameters
- Improved payment system with WeChat and AliPay support - Increased minimum recharge amount to `1` - Added maximum of `9` characters for the recharge amount - Added minimum withdraw amount setting - Added real name field for AliPay - Added third-party login field for AliPay - Added maxlength of `9` characters for the withdraw amount - Added a span tag to append '元' to the recharge amount - Added a new function `with [buyer/src/pages/home/userCenter/MoneyManagement.vue] - Raise the minimum recharge amount to `1` - Allow for a maximum of `9` characters for the recharge amount - Added support for WeChat and AliPay - Added a minimum withdraw amount setting - Added a real name field for AliPay - Added a third-party login field for AliPay - Added maxlength of `9` characters for the withdraw amount - Added a span tag to append '元' to the recharge amount - Fixed typo [buyer/src/api/pay.js] - Add a new function `withdrawalSettingVO` for payment result inquiry - Change the parameters for `payCallback` functionmaster
parent
72fb11d3d3
commit
8599708af3
|
@ -46,3 +46,17 @@ export function payCallback (params) {
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付结果查询
|
||||||
|
* @param orderType 交易类型,可用值:TRADE,ORDER,RECHARGE
|
||||||
|
* @param sn 订单编号
|
||||||
|
*/
|
||||||
|
export function withdrawalSettingVO (params) {
|
||||||
|
return request({
|
||||||
|
url: `/buyer/wallet/wallet/withdrawalSettingVO`,
|
||||||
|
needToken: true,
|
||||||
|
method: Method.GET,
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<card _Title="资金管理" />
|
<card _Title="资金管理"/>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="mb_20 account-price">
|
<div class="mb_20 account-price">
|
||||||
<span class="subTips">账户余额:</span>
|
<span class="subTips">账户余额:</span>
|
||||||
<span class="global_color mr_10" style="font-size:26px">¥{{ memberDeposit | unitPrice }}</span>
|
<span class="global_color mr_10" style="font-size:26px">¥{{ memberDeposit | unitPrice }}</span>
|
||||||
<span class="subTips">冻结金额:</span>
|
<span class="subTips">冻结金额:</span>
|
||||||
<span class="">¥{{ frozenDeposit | unitPrice}}</span>
|
<span class="">¥{{ frozenDeposit | unitPrice }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="account-btns">
|
<div class="account-btns">
|
||||||
<Button type="primary" @click="recharge">在线充值</Button>
|
<Button type="primary" @click="recharge">在线充值</Button>
|
||||||
|
@ -22,19 +22,19 @@
|
||||||
<div>
|
<div>
|
||||||
<Form
|
<Form
|
||||||
ref="formData"
|
ref="formData"
|
||||||
:model="formData"
|
|
||||||
label-position="left"
|
|
||||||
:label-width="100"
|
:label-width="100"
|
||||||
|
:model="formData"
|
||||||
:rules="formValidate"
|
:rules="formValidate"
|
||||||
|
label-position="left"
|
||||||
>
|
>
|
||||||
<FormItem label="充值金额" prop="price">
|
<FormItem label="充值金额" prop="price">
|
||||||
<Input v-model="formData.price" size="large" number maxlength="9"
|
<Input v-model="formData.price" maxlength="9" number size="large"
|
||||||
><span slot="append">元</span></Input>
|
><span slot="append">元</span></Input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<Button type="success" size="large" @click="rechargePrice">充值</Button>
|
<Button size="large" type="success" @click="rechargePrice">充值</Button>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
<!-- 提现申请 -->
|
<!-- 提现申请 -->
|
||||||
|
@ -46,23 +46,45 @@
|
||||||
<div>
|
<div>
|
||||||
<Form
|
<Form
|
||||||
ref="withdrawApplyFormData"
|
ref="withdrawApplyFormData"
|
||||||
|
:label-width="120"
|
||||||
:model="withdrawApplyFormData"
|
:model="withdrawApplyFormData"
|
||||||
label-position="left"
|
|
||||||
:label-width="100"
|
|
||||||
:rules="withdrawApplyFormValidate"
|
:rules="withdrawApplyFormValidate"
|
||||||
>
|
>
|
||||||
|
<FormItem label="提现类型" prop="type">
|
||||||
|
<Select v-model="withdrawApplyFormData.type" disabled>
|
||||||
|
<Option value="ALI">支付宝</Option>
|
||||||
|
<Option value="WECHAT">微信</Option>
|
||||||
|
</Select>
|
||||||
|
</FormItem>
|
||||||
<FormItem label="提现金额" prop="price">
|
<FormItem label="提现金额" prop="price">
|
||||||
<Input
|
<Input
|
||||||
v-model="withdrawApplyFormData.price"
|
v-model="withdrawApplyFormData.price"
|
||||||
size="large"
|
|
||||||
number
|
|
||||||
maxlength="9"
|
maxlength="9"
|
||||||
|
number
|
||||||
|
size="large"
|
||||||
><span slot="append">元</span></Input>
|
><span slot="append">元</span></Input>
|
||||||
|
<span style="color: red">最低提现金额 {{ withdrawApplyFormData.minPrice }}元</span>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem v-if="withdrawApplyFormData.type === 'ALI'" label="真实姓名" prop="realName">
|
||||||
|
<Input
|
||||||
|
v-model="withdrawApplyFormData.realName"
|
||||||
|
maxlength="9"
|
||||||
|
number
|
||||||
|
size="large"
|
||||||
|
></Input>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem v-if="withdrawApplyFormData.type === 'ALI'" label="第三方登录账号" prop="connectNumber">
|
||||||
|
<Input
|
||||||
|
v-model="withdrawApplyFormData.connectNumber"
|
||||||
|
maxlength="9"
|
||||||
|
number
|
||||||
|
size="large"
|
||||||
|
></Input>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" style="text-align: center">
|
<div slot="footer" style="text-align: center">
|
||||||
<Button type="success" size="large" @click="withdrawal">提现</Button>
|
<Button size="large" type="success" @click="withdrawal">提现</Button>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
<!-- 余额日志 -->
|
<!-- 余额日志 -->
|
||||||
|
@ -73,15 +95,15 @@
|
||||||
<div class="page-size">
|
<div class="page-size">
|
||||||
<Page
|
<Page
|
||||||
:current="walletForm.pageNumber"
|
:current="walletForm.pageNumber"
|
||||||
:total="logColumnsData.total"
|
|
||||||
:page-size="walletForm.pageSize"
|
:page-size="walletForm.pageSize"
|
||||||
|
:page-size-opts="[10, 20, 50]"
|
||||||
|
:total="logColumnsData.total"
|
||||||
|
show-sizer
|
||||||
|
show-total
|
||||||
|
size="small"
|
||||||
|
transfer
|
||||||
@on-change="changePage"
|
@on-change="changePage"
|
||||||
@on-page-size-change="changePageSize"
|
@on-page-size-change="changePageSize"
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-sizer
|
|
||||||
transfer
|
|
||||||
></Page>
|
></Page>
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
@ -95,15 +117,15 @@
|
||||||
<div class="page-size">
|
<div class="page-size">
|
||||||
<Page
|
<Page
|
||||||
:current="rechargeForm.pageNumber"
|
:current="rechargeForm.pageNumber"
|
||||||
:total="rechargeListData.total"
|
|
||||||
:page-size="rechargeForm.pageSize"
|
:page-size="rechargeForm.pageSize"
|
||||||
|
:page-size-opts="[10, 20, 50]"
|
||||||
|
:total="rechargeListData.total"
|
||||||
|
show-sizer
|
||||||
|
show-total
|
||||||
|
size="small"
|
||||||
|
transfer
|
||||||
@on-change="rechargeChangePage"
|
@on-change="rechargeChangePage"
|
||||||
@on-page-size-change="rechargeChangePageSize"
|
@on-page-size-change="rechargeChangePageSize"
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-sizer
|
|
||||||
transfer
|
|
||||||
></Page>
|
></Page>
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
@ -117,15 +139,15 @@
|
||||||
<div class="page-size">
|
<div class="page-size">
|
||||||
<Page
|
<Page
|
||||||
:current="withdrawApplyForm.pageNumber"
|
:current="withdrawApplyForm.pageNumber"
|
||||||
:total="withdrawApplyColumnsListData.total"
|
|
||||||
:page-size="withdrawApplyForm.pageSize"
|
:page-size="withdrawApplyForm.pageSize"
|
||||||
|
:page-size-opts="[10, 20, 50]"
|
||||||
|
:total="withdrawApplyColumnsListData.total"
|
||||||
|
show-sizer
|
||||||
|
show-total
|
||||||
|
size="small"
|
||||||
|
transfer
|
||||||
@on-change="withdrawChangePage"
|
@on-change="withdrawChangePage"
|
||||||
@on-page-size-change="withdrawChangePageSize"
|
@on-page-size-change="withdrawChangePageSize"
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-sizer
|
|
||||||
transfer
|
|
||||||
></Page>
|
></Page>
|
||||||
</div>
|
</div>
|
||||||
</TabPane>
|
</TabPane>
|
||||||
|
@ -134,17 +156,12 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {getDepositLog, getMembersWallet, getRecharge, getWithdrawApply, recharge, withdrawalApply} from '@/api/member';
|
||||||
getMembersWallet,
|
import {withdrawalSettingVO} from "@/api/pay";
|
||||||
getDepositLog,
|
|
||||||
getRecharge,
|
|
||||||
getWithdrawApply,
|
|
||||||
recharge,
|
|
||||||
withdrawalApply
|
|
||||||
} from '@/api/member';
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MoneyManagement',
|
name: 'MoneyManagement',
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
frozenDeposit: 0, // 冻结余额
|
frozenDeposit: 0, // 冻结余额
|
||||||
memberDeposit: 0, // 余额
|
memberDeposit: 0, // 余额
|
||||||
|
@ -157,7 +174,11 @@ export default {
|
||||||
},
|
},
|
||||||
// 提现金额
|
// 提现金额
|
||||||
withdrawApplyFormData: {
|
withdrawApplyFormData: {
|
||||||
price: 1
|
price: 1,
|
||||||
|
minPrice: 1,
|
||||||
|
type: '',
|
||||||
|
realName: '',
|
||||||
|
connectNumber: '',
|
||||||
},
|
},
|
||||||
// 余额日志
|
// 余额日志
|
||||||
walletForm: {
|
walletForm: {
|
||||||
|
@ -180,17 +201,23 @@ export default {
|
||||||
// 提现申请校验
|
// 提现申请校验
|
||||||
withdrawApplyFormValidate: {
|
withdrawApplyFormValidate: {
|
||||||
price: [
|
price: [
|
||||||
{ required: true, message: '请输入大于0小于9999的合法提现金额' },
|
{required: true, message: '请输入大于0小于9999的合法提现金额'},
|
||||||
{
|
{
|
||||||
pattern: /^[1-9]\d{0,3}(\.\d{1,2})?$/,
|
pattern: /^[1-9]\d{0,3}(\.\d{1,2})?$/,
|
||||||
message: '请输入大于0小于9999的合法提现金额',
|
message: '请输入大于0小于9999的合法提现金额',
|
||||||
trigger: 'change'
|
trigger: 'change'
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
realName: [
|
||||||
|
{required: true, message: '请输入真实姓名'},
|
||||||
|
],
|
||||||
|
connectNumber: [
|
||||||
|
{required: true, message: '请输入第三方登录账号'},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
formValidate: {
|
formValidate: {
|
||||||
price: [
|
price: [
|
||||||
{ required: true, message: '请输入大于等于1小于9999的合法充值金额' },
|
{required: true, message: '请输入大于等于1小于9999的合法充值金额'},
|
||||||
{
|
{
|
||||||
pattern: /^[1-9]\d{0,3}(\.\d{1,2})?$/,
|
pattern: /^[1-9]\d{0,3}(\.\d{1,2})?$/,
|
||||||
message: '请输入大于等于1小于9999的合法充值金额',
|
message: '请输入大于等于1小于9999的合法充值金额',
|
||||||
|
@ -362,12 +389,12 @@ export default {
|
||||||
withdrawApplyColumnsListData: {} // 提现记录
|
withdrawApplyColumnsListData: {} // 提现记录
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
init () {
|
init() {
|
||||||
getMembersWallet().then((res) => {
|
getMembersWallet().then((res) => {
|
||||||
this.frozenDeposit = res.result.memberFrozenWallet;
|
this.frozenDeposit = res.result.memberFrozenWallet;
|
||||||
this.memberDeposit = res.result.memberWallet;
|
this.memberDeposit = res.result.memberWallet;
|
||||||
|
@ -378,7 +405,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
tabPaneChange (v) {
|
tabPaneChange(v) {
|
||||||
// 如果查询充值记录
|
// 如果查询充值记录
|
||||||
if (v === 'recharge') {
|
if (v === 'recharge') {
|
||||||
this.getRechargeData();
|
this.getRechargeData();
|
||||||
|
@ -393,7 +420,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 充值记录
|
// 充值记录
|
||||||
getRechargeData () {
|
getRechargeData() {
|
||||||
getRecharge(this.rechargeForm).then((res) => {
|
getRecharge(this.rechargeForm).then((res) => {
|
||||||
if (res.message === 'success') {
|
if (res.message === 'success') {
|
||||||
this.rechargeListData = res.result;
|
this.rechargeListData = res.result;
|
||||||
|
@ -401,7 +428,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 提现记录
|
// 提现记录
|
||||||
getWithdrawApplyData () {
|
getWithdrawApplyData() {
|
||||||
getWithdrawApply(this.withdrawApplyForm).then((res) => {
|
getWithdrawApply(this.withdrawApplyForm).then((res) => {
|
||||||
if (res.message === 'success') {
|
if (res.message === 'success') {
|
||||||
this.withdrawApplyColumnsListData = res.result;
|
this.withdrawApplyColumnsListData = res.result;
|
||||||
|
@ -409,49 +436,49 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 余额日志
|
// 余额日志
|
||||||
changePage (v) {
|
changePage(v) {
|
||||||
this.walletForm.pageNumber = v;
|
this.walletForm.pageNumber = v;
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
changePageSize (v) {
|
changePageSize(v) {
|
||||||
this.walletForm.pageNumber = 1;
|
this.walletForm.pageNumber = 1;
|
||||||
this.walletForm.pageSize = v;
|
this.walletForm.pageSize = v;
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
// 充值记录
|
// 充值记录
|
||||||
rechargeChangePage (v) {
|
rechargeChangePage(v) {
|
||||||
this.rechargeForm.pageNumber = v;
|
this.rechargeForm.pageNumber = v;
|
||||||
this.getRechargeData();
|
this.getRechargeData();
|
||||||
},
|
},
|
||||||
rechargeChangePageSize (v) {
|
rechargeChangePageSize(v) {
|
||||||
this.rechargeForm.pageNumber = 1;
|
this.rechargeForm.pageNumber = 1;
|
||||||
this.rechargeForm.pageSize = v;
|
this.rechargeForm.pageSize = v;
|
||||||
this.getRechargeData();
|
this.getRechargeData();
|
||||||
},
|
},
|
||||||
// 提现记录
|
// 提现记录
|
||||||
withdrawChangePage (v) {
|
withdrawChangePage(v) {
|
||||||
this.withdrawApplyForm.pageNumber = v;
|
this.withdrawApplyForm.pageNumber = v;
|
||||||
this.getWithdrawApplyData();
|
this.getWithdrawApplyData();
|
||||||
},
|
},
|
||||||
withdrawChangePageSize (v) {
|
withdrawChangePageSize(v) {
|
||||||
this.withdrawApplyForm.pageNumber = 1;
|
this.withdrawApplyForm.pageNumber = 1;
|
||||||
this.withdrawApplyForm.pageSize = v;
|
this.withdrawApplyForm.pageSize = v;
|
||||||
this.getWithdrawApplyData();
|
this.getWithdrawApplyData();
|
||||||
},
|
},
|
||||||
// 弹出在线充值框
|
// 弹出在线充值框
|
||||||
recharge () {
|
recharge() {
|
||||||
this.formData.price = 1;
|
this.formData.price = 1;
|
||||||
this.modal = true;
|
this.modal = true;
|
||||||
},
|
},
|
||||||
// 在线充值
|
// 在线充值
|
||||||
rechargePrice () {
|
rechargePrice() {
|
||||||
this.$refs['formData'].validate((valid) => {
|
this.$refs['formData'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
recharge(this.formData).then((res) => {
|
recharge(this.formData).then((res) => {
|
||||||
if (res.message === 'success') {
|
if (res.message === 'success') {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/payment',
|
path: '/payment',
|
||||||
query: { orderType: 'RECHARGE', sn: res.result.rechargeSn }
|
query: {orderType: 'RECHARGE', sn: res.result.rechargeSn}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -459,12 +486,23 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 申请提现弹出框
|
// 申请提现弹出框
|
||||||
withdrawalApply () {
|
withdrawalApply() {
|
||||||
this.withdrawApplyFormData.price = 1;
|
|
||||||
this.withdrawApplyModal = true;
|
this.withdrawApplyModal = true;
|
||||||
|
this.withdrawApplyFormData.minPrice = 1;
|
||||||
|
this.withdrawApplyFormData.price = 1;
|
||||||
|
this.withdrawApplyFormData.type = '';
|
||||||
|
this.withdrawApplyFormData.realName = '';
|
||||||
|
this.withdrawApplyFormData.connectNumber = '';
|
||||||
|
withdrawalSettingVO().then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.withdrawApplyFormData.minPrice = res.result.minPrice;
|
||||||
|
this.withdrawApplyFormData.type = res.result.type;
|
||||||
|
this.withdrawApplyFormData.price = 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 提现
|
// 提现
|
||||||
withdrawal () {
|
withdrawal() {
|
||||||
this.$refs['withdrawApplyFormData'].validate((valid) => {
|
this.$refs['withdrawApplyFormData'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
withdrawalApply(this.withdrawApplyFormData).then((res) => {
|
withdrawalApply(this.withdrawApplyFormData).then((res) => {
|
||||||
|
@ -482,25 +520,30 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style lang="scss" scoped>
|
||||||
.box {
|
.box {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-size {
|
.page-size {
|
||||||
margin: 15px 0px;
|
margin: 15px 0px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.account-price {
|
.account-price {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subTips {
|
.subTips {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.account-btns {
|
.account-btns {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ivu-btn {
|
.ivu-btn {
|
||||||
margin: 0 4px;
|
margin: 0 4px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue