Browse Source

代理主页、代理提现、代理提现历史

master
yangrz 2 years ago
parent
commit
ae5dd1d893
  1. 15
      agentApp/common/api.js
  2. 491
      agentApp/pages/cash/cash.vue
  3. 93
      agentApp/pages/history/history.vue
  4. 339
      agentApp/pages/index/index.vue

15
agentApp/common/api.js

@ -43,19 +43,12 @@ const userConfig = function() {
}
export const userGetMerchantInfo = (params) => http.post(baseUrl + '/api/user/getMerchantInfo', params, userConfig())
export const userCreateOrder = (params) => http.post(baseUrl + '/api/user/createOrder', params, userConfig())
export const userAccountInfo = () => http.post(baseUrl + '/api/user/accountInfo', {}, userConfig())
export const userQueueRebateList = (params) => http.post(baseUrl + '/api/user/queueRebateList', params, userConfig())
export const userOrderList = (params) => http.post(baseUrl + '/api/user/orderList', params, userConfig())
export const userFillAlipayAccount = (params) => http.post(baseUrl + '/api/user/fillAlipayAccount', params, userConfig())
export const userWithdraw = (params) => http.post(baseUrl + '/api/user/withdraw', params, userConfig())
export const userWithdrawList = (params) => http.post(baseUrl + '/api/user/withdrawList', params, userConfig())
@ -69,6 +62,10 @@ const agentConfig = function() {
}
export const agentSmsLogin = (params) => http.post(baseUrl + '/api/agent/smsLogin', params)
export const agentAccountInfo = (params) => http.post(baseUrl + '/api/agent/accountInfo', params, agentConfig())
export const agentFillAlipayAccount = (params) => http.post(baseUrl + '/api/agent/fillAlipayAccount', params, agentConfig())
export const agentWithdraw = (params) => http.post(baseUrl + '/api/agent/withdraw', params, agentConfig())
export const agentWithdrawList = (params) => http.post(baseUrl + '/api/agent/withdrawList', params, agentConfig())
// 带上商户token
@ -81,14 +78,10 @@ const merchantConfig = function() {
}
export const merchantSmsLogin = (params) => http.post(baseUrl + '/api/merchant/smsLogin', params)
export const merchantAccountInfo = (params) => http.post(baseUrl + '/api/merchant/accountInfo', params, merchantConfig())
export const merchantOrderList = (params) => http.post(baseUrl + '/api/merchant/orderList', params, merchantConfig())
export const merchantOrderRefund = (params) => http.post(baseUrl + '/api/merchant/orderRefund', params, merchantConfig())
export const publicSysConfig = (params) => http.post(baseUrl + '/api/public/sysConfig', params)
export const publicSendSms = (params) => http.post(baseUrl + '/api/public/sendSms', params)

491
agentApp/pages/cash/cash.vue

@ -10,7 +10,7 @@
</view>
<view class="au-num">
458.00
{{accountInfo.wallet_balance}}
</view>
</view>
<view class="age-font">
@ -20,20 +20,20 @@
<img src="../../static/page/line-style.png" style="width: 200rpx;height: 2rpx;" alt="" srcset="" />
</view>
<view class="age-wait">
体现500.00
提现{{accountInfo.withdraw_total}}
</view>
<view class="age-linemore">
<img src="../../static/page/divider-style.png" style="width: 690rpx;height: 2rpx;" alt="" srcset="" />
</view>
<div class="age-mnum">
<view class="mtext">
待入账1000
待入账{{accountInfo.waiting_amount}}
</view>
<view class="mline">
</view>
<view class="mtext">
提现中458
提现中{{accountInfo.withdrawing_amount}}
</view>
</div>
</view>
@ -44,179 +44,408 @@
支付宝账户
</view>
</view>
<view class="agp-detail">
<view class="agp-make" @click="makecash">
<view class="agp-detail" v-if="!accountInfo.alipay_account">
<view class="agp-make" @click="showInputForm(1)">
去开通
</view>
</view>
</view>
<template v-if="isInputForm">
<view class="apt-main u-border-top u-border-bottom" v-if="isInputForm">
<view class="apm-cell">
<view class="am-title">
支付宝账号
</view>
<view class="am-value" style="width:70%;">
<u--input placeholder="绑定的手机号或邮箱" border="surround" v-model="inputAlipayAccount"></u--input>
</view>
</view>
<view class="apm-cell">
<view class="am-title">
支付宝姓名
</view>
<view class="am-value" style="width:70%;">
<u--input placeholder="账号真实姓名" border="surround" v-model="inputAlipayName"></u--input>
</view>
</view>
</view>
<view class="apt-btn">
<view class="savebtn" @click="saveAlipayAccount">
保存
</view>
</view>
</template>
<template v-if="accountInfo.alipay_account && !isInputForm">
<view class="apt-main u-border-top u-border-bottom">
<view class="apm-cell">
<view class="am-title">
提现账户
</view>
<view class="am-value">
<view class="mphone">
{{accountInfo.alipay_account}}
</view>
<view class="mlink" @click="showInputForm(2)">
修改
</view>
</view>
</view>
<view class="apm-cell">
<view class="am-title">
可提现金额
</view>
<view class="am-value">
<view class="mnum">
{{accountInfo.wallet_balance}}
</view>
</view>
</view>
</view>
<view class="apt-btn">
<view class="cashbtn" @click="showWithdrawForm">
提现
</view>
</view>
</template>
</view>
</view>
<u-modal title="确认提现金额" :show="isWithdrawForm" :showCancelButton="true" @confirm="confirmWithdraw"
@cancel="isWithdrawForm=false">
<view class="withdraw-form">
<u--input prefixIcon="¥" placeholder="提现金额" border="surround" v-model="inputAmount"></u--input>
<view class="fee-desc">
扣手续费{{calcFee}}实际到账{{calcReceiveAmount}}
</view>
<view class="tips">
<view class="tips-item" v-for="(line,index) in sysConfig.withdraw_tips.split('\n')" :key="index">{{line}}
</view>
</view>
</view>
</u-modal>
</view>
</template>
<script>
export default {
data() {
return {
import {
agentAccountInfo,
agentFillAlipayAccount,
agentWithdraw,
publicSysConfig
} from '../../common/api.js'
}
},
methods: {
makecash() {
uni.navigateTo({
url: '/pages/cashdetail/cashdetail'
});
export default {
data() {
return {
accountInfo: {},
isInputForm: false,
inputAlipayAccount: '',
inputAlipayName: '',
isWithdrawForm: false,
inputAmount: '',
sysConfig: {}
}
},
computed: {
calcFee() {
if (!this.inputAmount || isNaN(this.inputAmount)) {
return '--';
}
if (!this.sysConfig.withdraw_fee_rate) {
return '--';
}
let fee = (this.inputAmount * this.sysConfig.withdraw_fee_rate / 100).toFixed(2);
return fee;
},
calcReceiveAmount() {
if (!this.inputAmount || isNaN(this.inputAmount)) {
return '--';
}
if (!this.sysConfig.withdraw_fee_rate) {
return '--';
}
let fee = this.calcFee;
let receiveAmount = (this.inputAmount - parseFloat(fee)).toFixed(2);
return receiveAmount;
}
},
cashManager() {
uni.navigateTo({
url: '/pages/history/history'
});
onLoad() {
this.getAccountInfo();
this.getSysConfig();
},
methods: {
getAccountInfo() {
agentAccountInfo().then(data => this.accountInfo = data)
},
saveAlipayAccount() {
agentFillAlipayAccount({
alipay_account: this.inputAlipayAccount,
alipay_name: this.inputAlipayName,
}).then(() => {
this.getAccountInfo()
this.isInputForm = false
})
},
showInputForm(flag) {
this.isInputForm = true
if (flag == 2) {
this.inputAlipayAccount = this.accountInfo.alipay_account
this.inputAlipayName = this.accountInfo.alipay_name
}
// uni.navigateTo({
// url: '/pages/account-opened/account-opened'
// });
},
showWithdrawForm() {
this.isWithdrawForm = true
this.inputAmount = this.accountInfo.wallet_balance
},
confirmWithdraw() {
agentWithdraw({
amount: this.inputAmount
}).then(() => {
this.getAccountInfo()
this.isWithdrawForm = false
})
},
cashManager() {
uni.navigateTo({
url: '/pages/history/history'
});
},
getSysConfig() {
publicSysConfig().then(data => this.sysConfig = data)
},
}
}
}
</script>
<style lang="scss">
.uni-page-body {
background:#f7f7f7;
background: #f7f7f7;
}
.agent-content {
position: relative;
width: 100%;
height: 1400rpx;
background: url(../../static/page/withdrawal-management-bg.png) no-repeat top center;
background-size: 100% 414rpx;
box-sizing: border-box;
.ag-sign {
position: absolute;
right: 0;
top: 0;
width: 150rpx;
height: 60rpx;
line-height: 60rpx;
padding-left: 40rpx;
border-top-left-radius: 30rpx;
border-bottom-left-radius: 30rpx;
color: #fff;
font-size: 12px;
background: #FCC565;
box-sizing: border-box;
cursor: pointer;
}
.agent-top {
text-align: center;
padding-top: 40rpx;
.ag-num {
display: flex;
justify-content: center;
padding-top: 20rpx;
color: #fff;
.au-font {
margin-top: 40rpx;
font-size: 14px;
margin-right: 10rpx;
line-height: 1.5;
}
.agent-content {
position: relative;
width: 100%;
height: 1400rpx;
.au-num {
font-size: 30px;
font-weight: bold;
}
}
background: url(../../static/page/withdrawal-management-bg.png) no-repeat top center;
background-size: 100% 414rpx;
box-sizing: border-box;
.age-font {
margin-top: 10rpx;
font-size: 16px;
line-height: 1.5;
.ag-sign {
position: absolute;
right: 0;
top: 0;
width: 150rpx;
height: 60rpx;
line-height: 60rpx;
padding-left: 40rpx;
border-top-left-radius: 30rpx;
border-bottom-left-radius: 30rpx;
color: #fff;
font-size: 12px;
background: #FCC565;
box-sizing: border-box;
cursor: pointer;
}
.age-line {
margin: 20rpx auto 0;
width: 200rpx;
height: 2rpx;
.agent-top {
text-align: center;
padding-top: 40rpx;
.ag-num {
display: flex;
justify-content: center;
padding-top: 20rpx;
color: #fff;
.au-font {
margin-top: 40rpx;
font-size: 14px;
margin-right: 10rpx;
line-height: 1.5;
}
img {
display: block;
margin: 0 auto;
.au-num {
font-size: 30px;
font-weight: bold;
}
}
}
.age-wait {
margin-top: 20rpx;
color: #fff;
font-size: 14px;
}
.age-font {
margin-top: 10rpx;
font-size: 16px;
line-height: 1.5;
color: #fff;
}
.age-linemore {}
.age-line {
margin: 20rpx auto 0;
width: 200rpx;
height: 2rpx;
.age-mnum {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
img {
display: block;
margin: 0 auto;
}
}
.mtext {
.age-wait {
margin-top: 20rpx;
color: #fff;
font-size: 14px;
margin: 0 20rpx;
line-height: 1.5;
}
.mline {
height: 28rpx;
width: 2rpx;
background: #5da8ff;
.age-linemore {}
.age-mnum {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20rpx;
.mtext {
color: #fff;
font-size: 14px;
margin: 0 20rpx;
line-height: 1.5;
}
.mline {
height: 28rpx;
width: 2rpx;
background: #5da8ff;
}
}
}
}
.ag-paylist {
padding-left: 30rpx;
padding-right: 30rpx;
margin-top: 36rpx;
background: #fff;
.ag-paylist {
padding-left: 30rpx;
padding-right: 30rpx;
margin-top: 36rpx;
background: #fff;
.agp-item {
display: flex;
justify-content: space-between;
height: 100rpx;
.agp-item {
display: flex;
justify-content: space-between;
height: 100rpx;
.agp-title {
.agp-title {
.zhifubao {
padding-left: 55rpx;
height: 100rpx;
line-height: 100rpx;
color: #454545;
font-size: 14px;
font-weight: bold;
background: url(../../static/page/payment-icon.png) no-repeat left center;
background-size: 40rpx 40rpx;
.zhifubao {
padding-left: 55rpx;
height: 100rpx;
line-height: 100rpx;
color: #454545;
font-size: 14px;
font-weight: bold;
background: url(../../static/page/payment-icon.png) no-repeat left center;
background-size: 40rpx 40rpx;
}
}
}
.agp-detail {
.agp-detail {
.agp-make {
padding-right: 30rpx;
height: 100rpx;
line-height: 100rpx;
color: #999;
.agp-make {
padding-right: 30rpx;
height: 100rpx;
line-height: 100rpx;
color: #999;
font-size: 12px;
background: url(../../static/page/open-icon.png) no-repeat right center;
background-size: 14rpx 24rpx;
cursor: pointer;
}
}
}
}
.apt-main {
padding: 10rpx 0;
.apm-cell {
display: flex;
justify-content: space-between;
.am-title {
height: 70rpx;
line-height: 70rpx;
color: 454545;
font-size: 12px;
background: url(../../static/page/open-icon.png) no-repeat right center;
background-size: 14rpx 24rpx;
cursor: pointer;
}
.am-value {
display: flex;
justify-content: flex-end;
height: 70rpx;
line-height: 70rpx;
.mphone {
margin-right: 20rpx;
font-size: 12px;
color: #454545;
}
.mlink {
font-size: 12px;
color: #32A2FC;
}
.mnum {
font-size: 14px;
color: 454545;
font-weight: bold;
}
}
}
}
.u-border-bottom,
.u-border-top {
border-color: #eee !important;
}
.apt-btn {
display: flex;
justify-content: flex-end;
padding: 30rpx 0;
.cashbtn {
width: 110rpx;
height: 48rpx;
text-align: center;
line-height: 48rpx;
color: #fff;
font-size: 12px;
background: #1783FF;
border-radius: 100rpx;
}
.savebtn {
width: 110rpx;
height: 48rpx;
text-align: center;
line-height: 48rpx;
color: #fff;
font-size: 12px;
background: #00aaff;
border-radius: 100rpx;
}
}
}
.withdraw-form {
font-size: 28rpx;
.tips {
margin-top: 20rpx;
.tips-item {
margin-top: 6rpx;
}
}
}
}
</style>
</style>

93
agentApp/pages/history/history.vue

@ -2,82 +2,73 @@
<view class="app-container">
<u-gap height="10rpx" bgColor="#F7F7F7"></u-gap>
<view class="his-content">
<view class="his-item u-border-bottom">
<view class="his-item u-border-bottom" v-if="!withdrawList.length">暂无数据</view>
<view class="his-item u-border-bottom" v-for="(item,index) in withdrawList" :key="item.id">
<view class="hit-left">
<view class="his-name">
流水号: 139812983213
流水号: {{item.out_biz_no}}
</view>
<view class="his-state">
提现成功
<view class="his-state" v-if="item.status==0">
审核状态审核中
</view>
<view class="his-time">
2023-11-28 15:45:39
<view class="his-state" v-if="item.status==1">
审核状态<text style="color:green">提现成功</text>
</view>
</view>
<view class="hit-right">
-458.00
</view>
</view>
<view class="his-item u-border-bottom">
<view class="hit-left">
<view class="his-name">
流水号: 139812983213
<view class="his-state" v-if="item.status==2">
审核状态<text style="color:red">审核不通过原因{{item.review_remark}})</text>
</view>
<view class="his-state">
提现成功
提现金额{{item.amount}}
</view>
<view class="his-time">
2023-11-28 15:45:39
<view class="his-state">
扣手续费{{item.fee}}
</view>
</view>
<view class="hit-right">
-458.00
</view>
</view>
<view class="his-item u-border-bottom">
<view class="hit-left">
<view class="his-name">
流水号: 139812983213
<view class="his-state">
实际到账{{item.receive_amount}}
</view>
<view class="his-state">
提现成功
提现账户{{item.alipay_account}}
</view>
<view class="his-time">
2023-11-28 15:45:39
</view>
</view>
<view class="hit-right">
-458.00
</view>
</view>
<view class="his-item u-border-bottom">
<view class="hit-left">
<view class="his-name">
流水号: 139812983213
</view>
<view class="his-state">
提现成功
申请时间{{item.created_at}}
</view>
<view class="his-time">
2023-11-28 15:45:39
审核时间{{item.reviewed_at}}
</view>
</view>
<view class="hit-right">
-458.00
</view>
<!-- <view class="hit-right">
<view class="amount">提现金额{{item.amount}}</view>
<view class="fee">手续费{{item.fee}}</view>
<view class="receive-amount">实到账{{item.receive_amount}}</view>
</view> -->
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
import {
agentWithdrawList
} from '../../common/api.js'
};
export default {
data() {
return {
withdrawList: [],
};
},
onLoad() {
this.getWithdrawList()
},
methods: {
getWithdrawList() {
agentWithdrawList({
page: 1,
page_size: 15,
}).then(data => this.withdrawList = data.list)
}
}
}
}
</script>
<style lang="scss">

339
agentApp/pages/index/index.vue

@ -10,7 +10,7 @@
</view>
<view class="au-num">
458.00
{{accountInfo.wallet_balance}}
</view>
</view>
<view class="age-font">
@ -20,7 +20,7 @@
<img src="../../static/index/line-style.png" style="width: 200rpx;height: 2rpx;" alt="" srcset="" />
</view>
<view class="age-wait">
待入账200.00
待入账{{accountInfo.waiting_amount}}
</view>
<view class="divider-style"></view>
<view class="information-id-content">
@ -30,11 +30,11 @@
代理ID
</view>
<view class="id-value">
56231fd
{{accountInfo.id}}
</view>
</view>
</view>
</view>
<view class="agent-main">
<view class="agm-title">
@ -141,198 +141,209 @@
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {
},
methods: {
cashManager() {
uni.navigateTo({
url: '/pages/cash/cash'
});
import {
agentAccountInfo
} from '../../common/api.js'
export default {
data() {
return {
accountInfo: {},
}
},
onLoad() {
this.getAccountInfo();
},
methods: {
getAccountInfo() {
agentAccountInfo().then(data => this.accountInfo = data)
},
cashManager() {
uni.navigateTo({
url: '/pages/cash/cash'
});
}
}
}
}
</script>
<style lang="scss">
.agent-content {
position: relative;
width: 100%;
height: 1400rpx;
padding-left: 30rpx;
padding-right: 30rpx;
background: url(../../static/index/principal-sheet-bg.png) no-repeat top center;
background-size: 100% 100%;
box-sizing: border-box;
.ag-sign {
position: absolute;
right: 0;
top: 0;
width: 150rpx;
height: 60rpx;
line-height: 60rpx;
padding-left: 40rpx;
border-top-left-radius: 30rpx;
border-bottom-left-radius: 30rpx;
color: #fff;
font-size: 12px;
background: #FCC565;
.agent-content {
position: relative;
width: 100%;
height: 1400rpx;
padding-left: 30rpx;
padding-right: 30rpx;
background: url(../../static/index/principal-sheet-bg.png) no-repeat top center;
background-size: 100% 100%;
box-sizing: border-box;
cursor: pointer;
}
.agent-top {
text-align: center;
.ag-num {
display: flex;
justify-content: center;
padding-top: 20rpx;
.ag-sign {
position: absolute;
right: 0;
top: 0;
width: 150rpx;
height: 60rpx;
line-height: 60rpx;
padding-left: 40rpx;
border-top-left-radius: 30rpx;
border-bottom-left-radius: 30rpx;
color: #fff;
font-size: 12px;
background: #FCC565;
box-sizing: border-box;
cursor: pointer;
}
.au-font {
margin-top: 45rpx;
font-size: 14px;
margin-right: 10rpx;
line-height: 28rpx;
.agent-top {
text-align: center;
.ag-num {
display: flex;
justify-content: center;
padding-top: 20rpx;
color: #fff;
.au-font {
margin-top: 45rpx;
font-size: 14px;
margin-right: 10rpx;
line-height: 28rpx;
}
.au-num {
font-size: 30px;
font-weight: bold;
}
}
.au-num {
font-size: 30px;
.age-font {
margin-top: 10rpx;
font-size: 16px;
line-height: 1.5;
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #fff;
font-weight: bold;
}
}
.age-font {
margin-top: 10rpx;
font-size: 16px;
line-height: 1.5;
font-family: PingFangSC-Regular, sans-serif;
font-size: 30rpx;
color: #fff;
font-weight: bold;
}
.age-line {
margin: 20rpx auto 0;
width: 200rpx;
height: 2rpx;
.age-line {
margin: 20rpx auto 0;
width: 200rpx;
height: 2rpx;
img {
display: block;
margin: 0 auto;
img {
display: block;
margin: 0 auto;
}
}
}
.age-wait {
margin-top: 20rpx;
font-family: PingFangSC-Regular, sans-serif;
color: #fff;
font-size: 30rpx;
font-weight: bold;
}
}
.agent-main {
margin-top: 30rpx;
padding-top: 30rpx;
padding-bottom: 30rpx;
background: #fff;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
.agm-title {
padding-left: 30rpx;
margin-left: 30rpx;
color: #454545;
font-weight: normal;
font-size: 30rpx;
line-height: 1.5;
background: url(../../static/index/title-style.png) no-repeat left center;
background-size: 15rpx 19rpx;
.age-wait {
margin-top: 20rpx;
font-family: PingFangSC-Regular, sans-serif;
color: #fff;
font-size: 30rpx;
font-weight: bold;
}
}
.agm-sitem {
.agent-main {
margin-top: 30rpx;
padding-top: 30rpx;
padding-bottom: 30rpx;
background: #fff;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
.ags-cell {
display: flex;
justify-content: space-between;
height: 90rpx;
line-height: 90rpx;
.agm-title {
padding-left: 30rpx;
margin-left: 30rpx;
margin-right: 30rpx;
color: #454545;
font-weight: normal;
font-size: 30rpx;
line-height: 1.5;
background: url(../../static/index/title-style.png) no-repeat left center;
background-size: 15rpx 19rpx;
}
.agc-title {
height: 90rpx;
line-height: 90rpx;
font-size: 12px;
color: #454545;
}
.agm-sitem {
.agc-detail {
.ags-cell {
display: flex;
justify-content: space-between;
height: 90rpx;
line-height: 90rpx;
font-size: 12px;
color: #666;
.price {
color: #F52F3E;
margin-left: 30rpx;
margin-right: 30rpx;
.agc-title {
height: 90rpx;
line-height: 90rpx;
font-size: 12px;
color: #454545;
}
.agc-detail {
height: 90rpx;
line-height: 90rpx;
font-size: 12px;
color: #666;
.price {
color: #F52F3E;
}
}
}
.u-border-bottom {
border-color: #eee !important
}
}
.u-border-bottom {
border-color: #eee !important
.loadmore {
width: 172rpx;
margin: 30rpx auto;
padding-right: 20rpx;
color: #1783FF;
font-size: 14px;
background: url(../../static/index/down.png) no-repeat right center;
background-size: 17rpx 20rpx;
cursor: pointer;
}
}
}
.divider-style {
width: 720rpx;
height: 1rpx;
background: #9ECBFF;
margin: 20rpx 0;
}
.information-id-content {
display: flex;
justify-content: center;
align-items: center;
}
}
.content-id-item {
display: flex;
justify-content: center;
align-items: center;
}
.loadmore {
width: 172rpx;
margin: 30rpx auto;
padding-right: 20rpx;
color: #1783FF;
font-size: 14px;
background: url(../../static/index/down.png) no-repeat right center;
background-size: 17rpx 20rpx;
cursor: pointer;
}
.id-text {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #fff;
}
.id-value {
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #fff;
}
}
.divider-style{
width: 720rpx;
height: 1rpx;
background: #9ECBFF;
margin: 20rpx 0;
}
.information-id-content{
display: flex;
justify-content: center;
align-items: center;
}
.content-id-item{
display: flex;
justify-content: center;
align-items: center;
}
.id-text{
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #fff;
}
.id-value{
font-family: PingFangSC-Regular, sans-serif;
font-size: 24rpx;
color: #fff;
}
</style>
</style>
Loading…
Cancel
Save