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` function
master
misworga831 2023-03-08 21:58:29 +08:00
parent 72fb11d3d3
commit 8599708af3
2 changed files with 119 additions and 62 deletions

View File

@ -46,3 +46,17 @@ export function payCallback (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
});
}

View File

@ -22,19 +22,19 @@
<div>
<Form
ref="formData"
:model="formData"
label-position="left"
:label-width="100"
:model="formData"
:rules="formValidate"
label-position="left"
>
<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>
</FormItem>
</Form>
</div>
<div slot="footer" style="text-align: center">
<Button type="success" size="large" @click="rechargePrice"></Button>
<Button size="large" type="success" @click="rechargePrice"></Button>
</div>
</Modal>
<!-- 提现申请 -->
@ -46,23 +46,45 @@
<div>
<Form
ref="withdrawApplyFormData"
:label-width="120"
:model="withdrawApplyFormData"
label-position="left"
:label-width="100"
: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">
<Input
v-model="withdrawApplyFormData.price"
size="large"
number
maxlength="9"
number
size="large"
><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>
</Form>
</div>
<div slot="footer" style="text-align: center">
<Button type="success" size="large" @click="withdrawal"></Button>
<Button size="large" type="success" @click="withdrawal"></Button>
</div>
</Modal>
<!-- 余额日志 -->
@ -73,15 +95,15 @@
<div class="page-size">
<Page
:current="walletForm.pageNumber"
:total="logColumnsData.total"
:page-size="walletForm.pageSize"
:page-size-opts="[10, 20, 50]"
:total="logColumnsData.total"
show-sizer
show-total
size="small"
transfer
@on-change="changePage"
@on-page-size-change="changePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-sizer
transfer
></Page>
</div>
</TabPane>
@ -95,15 +117,15 @@
<div class="page-size">
<Page
:current="rechargeForm.pageNumber"
:total="rechargeListData.total"
:page-size="rechargeForm.pageSize"
:page-size-opts="[10, 20, 50]"
:total="rechargeListData.total"
show-sizer
show-total
size="small"
transfer
@on-change="rechargeChangePage"
@on-page-size-change="rechargeChangePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-sizer
transfer
></Page>
</div>
</TabPane>
@ -117,15 +139,15 @@
<div class="page-size">
<Page
:current="withdrawApplyForm.pageNumber"
:total="withdrawApplyColumnsListData.total"
:page-size="withdrawApplyForm.pageSize"
:page-size-opts="[10, 20, 50]"
:total="withdrawApplyColumnsListData.total"
show-sizer
show-total
size="small"
transfer
@on-change="withdrawChangePage"
@on-page-size-change="withdrawChangePageSize"
:page-size-opts="[10, 20, 50]"
size="small"
show-total
show-sizer
transfer
></Page>
</div>
</TabPane>
@ -134,14 +156,9 @@
</template>
<script>
import {
getMembersWallet,
getDepositLog,
getRecharge,
getWithdrawApply,
recharge,
withdrawalApply
} from '@/api/member';
import {getDepositLog, getMembersWallet, getRecharge, getWithdrawApply, recharge, withdrawalApply} from '@/api/member';
import {withdrawalSettingVO} from "@/api/pay";
export default {
name: 'MoneyManagement',
data() {
@ -157,7 +174,11 @@ export default {
},
//
withdrawApplyFormData: {
price: 1
price: 1,
minPrice: 1,
type: '',
realName: '',
connectNumber: '',
},
//
walletForm: {
@ -186,7 +207,13 @@ export default {
message: '请输入大于0小于9999的合法提现金额',
trigger: 'change'
}
]
],
realName: [
{required: true, message: '请输入真实姓名'},
],
connectNumber: [
{required: true, message: '请输入第三方登录账号'},
],
},
formValidate: {
price: [
@ -460,8 +487,19 @@ export default {
},
//
withdrawalApply() {
this.withdrawApplyFormData.price = 1;
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() {
@ -482,25 +520,30 @@ export default {
};
</script>
<style scoped lang="scss">
<style lang="scss" scoped>
.box {
margin: 20px 0;
}
.page-size {
margin: 15px 0px;
display: flex;
justify-content: flex-end;
align-items: center;
}
.account-price {
font-weight: bold;
}
.subTips {
margin-left: 10px;
}
.account-btns {
margin: 10px 0;
}
.ivu-btn {
margin: 0 4px;
}