Browse Source

add api

tid1509
刘嘉炜 8 months ago
parent
commit
eb36a155a5
  1. 6
      src/pages/index/index.vue
  2. 75
      src/subpackage/wallet/components/bf_withdraw.vue
  3. 27
      src/subpackage/wallet/components/dy_withdraw_apply.vue
  4. 47
      src/subpackage/wallet/components/record_line.vue
  5. 8
      src/subpackage/wallet/components/wallet_modal.vue
  6. 33
      src/subpackage/wallet/components/wallet_modal_success.vue
  7. 46
      src/subpackage/wallet/pages/baofu_withdraw/index.vue
  8. 34
      src/subpackage/wallet/pages/baofu_withdraw/modules/baofu_item.vue
  9. 24
      src/subpackage/wallet/pages/douyin_withdraw/index.vue
  10. 40
      src/subpackage/wallet/pages/douyin_withdraw/record.vue
  11. 19
      src/subpackage/wallet/pages/index/index.vue
  12. 15
      src/subpackage/wallet/pages/index/modules/wallet_info.vue
  13. BIN
      src/subpackage/wallet/static/images/arrow_b2.png
  14. BIN
      src/subpackage/wallet/static/images/arrow_c33.png
  15. BIN
      src/subpackage/wallet/static/images/close.png
  16. BIN
      src/subpackage/wallet/static/images/dy_logo.png
  17. BIN
      src/subpackage/wallet/static/images/question_mark.png
  18. BIN
      src/subpackage/wallet/static/images/success_tip.png

6
src/pages/index/index.vue

@ -145,6 +145,12 @@
path: '/subpackage/blacklist/pages/abnormal_list/abnormal_list', path: '/subpackage/blacklist/pages/abnormal_list/abnormal_list',
serverKey: 1015 // 1015 serverKey: 1015 // 1015
}, },
{
id: 11,
name: '钱包',
path: '/subpackage/wallet/pages/index/index',
serverKey: 1015 // 1015
},
]; ];
const app = getApp(); const app = getApp();

75
src/subpackage/wallet/components/bf_withdraw.vue

@ -6,7 +6,7 @@
可提现资金 可提现资金
<text class="bt-price">{{ accountInfo.availableBal || 0 }}</text> <text class="bt-price">{{ accountInfo.availableBal || 0 }}</text>
</view> </view>
<input type="digit" class="bw-ipt" v-model="extractNum">
<input type="digit" class="bw-ipt" v-model="extractNum" placeholder="请输入金额">
<view class="dwa-tip"> <view class="dwa-tip">
<view class="dt-tit">温馨提示</view> <view class="dt-tit">温馨提示</view>
@ -36,35 +36,67 @@ export default {
return { return {
isShow: false, isShow: false,
accountInfo: {}, accountInfo: {},
extractNum: 0,
companyInfo: {}
extractNum: '',
companyInfo: {
/**
* name, -> 公司名称
* account -> 账户账号
* type -> 1(个人)/ 2(企业)
* index -> 当前账户索引
*/
}
} }
}, },
methods: { methods: {
confirmExtract: debounce(async function(){ confirmExtract: debounce(async function(){
let { companyInfo, accountInfo, extractNum } = this; let { companyInfo, accountInfo, extractNum } = this;
if(!this.checkExtractNum({ availableBal: accountInfo?.availableBal, extractNum }))return;
try{ try{
showLoad(); showLoad();
let _accountInfo = await this.setPriceInfo({
let _operateInfo = await this.setPriceInfo({
contractNo: companyInfo?.account ?? '', contractNo: companyInfo?.account ?? '',
dealAmount: extractNum dealAmount: extractNum
}) })
hideLoad(); hideLoad();
if(_accountInfo?.errorCode === 'SUCCESS')this.isShow = true;
// showNone(_operateInfo?.transRemark || '');
this.hide();
this.$emit('click:extract', companyInfo.index);
}catch(err){ }catch(err){
hideLoad(); hideLoad();
showNone(err?.message || err?.data?.errorMsg || '提现失败!');
console.warn('alert catch error: ', err);
let _errMsg = err?.message || err?.data?.transRemark || err?.data?.errorMsg || '提现失败!';
showNone(_errMsg);
console.warn('confirmExtract catch error: ', err);
} }
}, 300, true), }, 300, true),
/** /**
* @param {String} availableBal 可提现金额
* @param {String} extractNum 提现金额
* @returns {Boolean}
*/
checkExtractNum({ availableBal, extractNum }){
let _num = +extractNum || 0;
if(!extractNum){
showNone('请输入提现金额!');
return false;
}
if(_num <= 0){
showNone('提现金额必须大于0!');
return false;
}
if(_num > +availableBal){
showNone('提现金额不能大于可提现金额!');
return false;
}
return true;
},
/**
* @param {String} account 宝付V2账户 * @param {String} account 宝付V2账户
* @param {String} type '1'->个人 / '2'->企业 * @param {String} type '1'->个人 / '2'->企业
* @param {String} name 公司名 * @param {String} name 公司名
*/ */
async alert({ account, type, name }){
async alert({ account, type, name, index }){
if(!account)return showNone('账户号不存在!'); if(!account)return showNone('账户号不存在!');
this.companyInfo = { account, type, name };
this.companyInfo = { account, type, name, index };
try{ try{
showLoad(); showLoad();
let _accountInfo = await this.getPriceInfo({ let _accountInfo = await this.getPriceInfo({
@ -72,10 +104,11 @@ export default {
contractNo: account contractNo: account
}) })
hideLoad(); hideLoad();
if(_accountInfo?.errorCode === 'SUCCESS')this.isShow = true;
this.isShow = true;
}catch(err){ }catch(err){
hideLoad(); hideLoad();
showNone(err?.message || err?.data?.errorMsg || '获取账户信息失败!');
let _errMsg = err?.message || err?.data?.errorMsg || '获取账户信息失败!';
showNone(_errMsg);
console.warn('alert catch error: ', err); console.warn('alert catch error: ', err);
} }
}, },
@ -88,6 +121,13 @@ export default {
service: 'T-1001-013-06', service: 'T-1001-013-06',
query: { accType, contractNo } query: { accType, contractNo }
}) })
.then(res=>{
if(res?.data?.errorCode === 'SUCCESS'){
return this.accountInfo = res?.data || {};
}else{
return Promise.reject(res)
}
})
}, },
// //
setPriceInfo({ contractNo, dealAmount }){ setPriceInfo({ contractNo, dealAmount }){
@ -100,6 +140,13 @@ export default {
dealAmount: dealAmount dealAmount: dealAmount
} }
}) })
.then(res=>{
if(res?.data.state === 1){
return res?.data || {};
}else{
return Promise.reject(res)
}
})
}, },
/** /**
* @param {String} service 查询 -> T-1001-013-06 / 提现 -> T-1001-013-14 * @param {String} service 查询 -> T-1001-013-06 / 提现 -> T-1001-013-14
@ -124,10 +171,10 @@ export default {
}) })
.then(res=>{ .then(res=>{
let _data = res?.data; let _data = res?.data;
if(_data.code === 0&&_data.data.errorCode === 'SUCCESS'){
return this.accountInfo = _data.data;
if(_data.code === 0&&_data.data.retCode === 1){
return _data || {};
}else{ }else{
return Promise.reject(_data)
return Promise.reject(_data || {})
} }
}) })
} }

27
src/subpackage/wallet/components/dy_withdraw_apply.vue

@ -23,7 +23,7 @@
<picker class="dol-picker" :range="banks" @change="bankNameChange"> <picker class="dol-picker" :range="banks" @change="bankNameChange">
<view class="dp-frame"> <view class="dp-frame">
<input type="text" disabled class="df-ipt" placeholder="请选择" v-model="info.bank_name"> <input type="text" disabled class="df-ipt" placeholder="请选择" v-model="info.bank_name">
<image class="df-icon"></image>
<image class="df-icon" mode="aspect" src="/subpackage/wallet/static/images/arrow_c33.png"></image>
</view> </view>
</picker> </picker>
</view> </view>
@ -87,17 +87,9 @@ export default {
this.info.bank_name = this.banks[value]; this.info.bank_name = this.banks[value];
}, },
alert(){ alert(){
this.getStorageAndSet();
// if(this.isEmptyInfo){
// showModal({
// content: '',
// showCancel: true,
// success: res=>{
// if(res.confirm)this.getStorageAndSet();
// }
// })
// }
this.show = true
// this.getStorageAndSet();
this.show = true;
if(this.isEmptyInfo())this.getStorageAndSet();
}, },
hide(){ hide(){
this.show = false this.show = false
@ -106,7 +98,15 @@ export default {
uni.getStorage({ uni.getStorage({
key: 'dyRecentWithdrawApplyInfo', key: 'dyRecentWithdrawApplyInfo',
success: res=>{ success: res=>{
this.info = res.data;
showModal({
content: '是否自动填充上次提现信息?',
showCancel: true,
success: mRes=>{
if(mRes.confirm){
this.info = res.data;
}
}
})
} }
}) })
}, },
@ -222,7 +222,6 @@ export default {
flex-shrink: 0; flex-shrink: 0;
width: 20upx; width: 20upx;
height: 20upx; height: 20upx;
background: skyblue;
} }
} }
} }

47
src/subpackage/wallet/components/record_line.vue

@ -0,0 +1,47 @@
<template>
<veiw class="record-line">
<veiw class="rl-name">{{ name }}</veiw>
<view class="rl-value"><slot></slot></view>
<view class="rl-tag" v-if="tag">{{ tag }}</view>
</veiw>
</template>
<script>
export default {
props: {
name: {
type: String,
default: ''
},
tag: {
type: String,
default: ''
}
}
}
</script>
<style lang="scss">
.record-line{
display: flex;
justify-content: space-between;
align-items: baseline;
.rl-name{
flex-shrink: 0;
flex-grow: 0;
@include flcw(28upx, 56upx, #9A9A9D);
}
.rl-value{
flex-grow: 1;
@include flcw(28upx, 56upx, #1A1A1A);
@include tHide(2);
}
.rl-tag{
flex-shrink: 0;
flex-grow: 0;
margin-left: 10upx;
@include flcw(28upx, 56upx, #1A1A1A);
}
}
</style>

8
src/subpackage/wallet/components/wallet_modal.vue

@ -1,7 +1,12 @@
<template> <template>
<view class="wallet-mask" v-show="show"> <view class="wallet-mask" v-show="show">
<view class="wm-content"> <view class="wm-content">
<image class="wc-close" @click="$emit('click:close')"></image>
<image
class="wc-close"
@click="$emit('click:close')"
mode="aspect"
src="/subpackage/wallet/static/images/close.png"
></image>
<view class="wc-title">{{ title }}</view> <view class="wc-title">{{ title }}</view>
<slot></slot> <slot></slot>
</view> </view>
@ -47,7 +52,6 @@ export default {
top: 30upx; top: 30upx;
width: 34upx; width: 34upx;
height: 34upx; height: 34upx;
background: #000;
} }
.wc-title{ .wc-title{
text-align: center; text-align: center;

33
src/subpackage/wallet/components/wallet_modal_success.vue

@ -1,10 +1,12 @@
<template> <template>
<wallet-modal>
<wallet-modal :show="isShow" @click:close="hide" :title="title">
<view class="wallet-modal-success"> <view class="wallet-modal-success">
<image class="wms-icon"></image>
<view class="wms-des">充值成功</view>
<image class="wms-icon" mode="aspect" src="/subpackage/wallet/static/images/success_tip.png"></image>
<view class="wms-des"><slot name="tip">成功</slot></view>
<view class="wallet-modal-button"> <view class="wallet-modal-button">
<wallet-modal-button>提现记录</wallet-modal-button>
<wallet-modal-button @click="btnClick">
<slot name="btn">{{ btnName }}</slot>
</wallet-modal-button>
</view> </view>
</view> </view>
</wallet-modal> </wallet-modal>
@ -17,6 +19,28 @@ export default {
components: { components: {
'wallet-modal': walletModal, 'wallet-modal': walletModal,
'wallet-modal-button': wmButton 'wallet-modal-button': wmButton
},
props: {
title: {
default: '提示'
}
},
data(){
return {
isShow: false
}
},
methods: {
hide(){
this.isShow = false;
},
alert(){
this.isShow = true;
},
btnClick(){
this.hide();
this.$emit('click:button');
}
} }
} }
</script> </script>
@ -29,7 +53,6 @@ export default {
display: block; display: block;
width: 100upx; width: 100upx;
height: 100upx; height: 100upx;
background: skyblue;
} }
.wms-des{ .wms-des{
padding: 0 60upx; padding: 0 60upx;

46
src/subpackage/wallet/pages/baofu_withdraw/index.vue

@ -7,23 +7,38 @@
:tag="getBaoFuV2AccountTypeForChinese(e.baofu_v2_config)" :tag="getBaoFuV2AccountTypeForChinese(e.baofu_v2_config)"
:personal="getBaoFuV2AccountTypeForChinese(e.baofu_v2_config) === '个人'" :personal="getBaoFuV2AccountTypeForChinese(e.baofu_v2_config) === '个人'"
@click:extract='extractBtn(i)' @click:extract='extractBtn(i)'
:ref="'baofuItem'"
></baofu-item> ></baofu-item>
</view> </view>
<bf-withdraw ref="bfWithdraw"></bf-withdraw>
<bf-withdraw ref="bfWithdraw" @click:extract="modalExtractBtn"></bf-withdraw>
<wallet-modal-success
title="提现成功"
ref="walletModalSuccess"
>
<template v-slot:tip>提现一般当天到账具体以银行到账时间为准</template>
<template v-slot:btn>确定</template>
</wallet-modal-success>
</view> </view>
</template> </template>
<script> <script>
import baofuItem from './modules/baofu_item.vue'; import baofuItem from './modules/baofu_item.vue';
import bfWithdraw from '../../components/bf_withdraw.vue'; import bfWithdraw from '../../components/bf_withdraw.vue';
import wallet_modal_success from '../../components/wallet_modal_success.vue';
import { WALLET_API } from '../../js/api'; import { WALLET_API } from '../../js/api';
import servers from '../../js/server'; import servers from '../../js/server';
import { routeTo } from '@/utils/util'
import { routeTo, showLoad, hideLoad } from '@/utils/util';
import { mapState} from 'vuex';
export default { export default {
computed: {
...mapState([ 'brandInfo' ])
},
components: { components: {
'baofu-item': baofuItem, 'baofu-item': baofuItem,
'bf-withdraw': bfWithdraw
'bf-withdraw': bfWithdraw,
'wallet-modal-success': wallet_modal_success
}, },
data(){ data(){
return { return {
@ -33,9 +48,16 @@ export default {
onLoad(options){ onLoad(options){
this.brand_id = options.brand_id ?? ''; this.brand_id = options.brand_id ?? '';
// this.getWalletBalance(options.brand_id); // this.getWalletBalance(options.brand_id);
this.getPayAssureConfigs();
console.log('brandInfo', this.brandInfo);
this.getPayAssureConfigs({
appid: this.brandInfo?.brand?.mini_wechat_appid ?? 'wxc141a743225e7885'
});
}, },
methods: { methods: {
modalExtractBtn(index){
this.$refs.walletModalSuccess.alert();
this.$refs?.baofuItem?.[index]?.refreshItem(false);
},
extractBtn(i){ extractBtn(i){
let { accountLs } = this; let { accountLs } = this;
let _curItem = accountLs[i]; let _curItem = accountLs[i];
@ -44,18 +66,28 @@ export default {
name: _curItem.label_name, name: _curItem.label_name,
account: _curItem.baofu_v2_contract_no, account: _curItem.baofu_v2_contract_no,
type: _type, type: _type,
index: i
}); });
}, },
getPayAssureConfigs(){
/**
* http://api.ouxuan.net:61080/project/11/interface/api/9979
* 查看可选择的支付账户列表
* @param {String} pay_way 暂时只有 WeChat
* @param {String} appid 品牌小程序appid
*
* */
getPayAssureConfigs({ pay_way = 'WeChat', appid }){
showLoad();
servers.get({ servers.get({
url: WALLET_API.getPayAssureConfigs, url: WALLET_API.getPayAssureConfigs,
failMsg: '获取账户列表失败', failMsg: '获取账户列表失败',
data: { data: {
pay_way: 'WeChat',
appid: 'wxc141a743225e7885'
pay_way,
appid
} }
}) })
.then(res=>{ .then(res=>{
hideLoad();
let _ls = res ?? []; let _ls = res ?? [];
this.accountLs = this.filterBaoFuV2Accounts(_ls); this.accountLs = this.filterBaoFuV2Accounts(_ls);
}) })

34
src/subpackage/wallet/pages/baofu_withdraw/modules/baofu_item.vue

@ -6,10 +6,10 @@
<view class="bl-txt">{{ name }}</view> <view class="bl-txt">{{ name }}</view>
<view class="bl-tag" >{{ tag }}</view> <view class="bl-tag" >{{ tag }}</view>
</view> </view>
<view class="bnb-right">
<!-- <view class="bnb-right">
<view class="br-txt">提现记录</view> <view class="br-txt">提现记录</view>
<image class="wb-icon"></image>
</view>
<image class="wb-icon" mode="aspect" src="/subpackage/wallet/static/images/arrow_b2.png"></image>
</view> -->
</view> </view>
<view class="bb-account-num">账户号{{ account }}</view> <view class="bb-account-num">账户号{{ account }}</view>
</view> </view>
@ -23,21 +23,21 @@
</view> </view>
<view class="bi-tip"> <view class="bi-tip">
<view class="bt-txt">可提现资金()</view> <view class="bt-txt">可提现资金()</view>
<image class="bt-icon"></image>
<image class="bt-icon" mode="aspect" src="/subpackage/wallet/static/images/question_mark.png"></image>
</view> </view>
<view class="bi-mony-info"> <view class="bi-mony-info">
<view class="bmi-item"> <view class="bmi-item">
<view class="bi-num">{{ accountInfo.currBal || 0 }}</view> <view class="bi-num">{{ accountInfo.currBal || 0 }}</view>
<view class="bi-tip"> <view class="bi-tip">
<view class="bt-txt">总资产()</view> <view class="bt-txt">总资产()</view>
<image class="bt-icon"></image>
<image class="bt-icon" mode="aspect" src="/subpackage/wallet/static/images/question_mark.png"></image>
</view> </view>
</view> </view>
<view class="bmi-item"> <view class="bmi-item">
<view class="bi-num">{{ accountInfo.pendingBal || 0 }}</view> <view class="bi-num">{{ accountInfo.pendingBal || 0 }}</view>
<view class="bi-tip"> <view class="bi-tip">
<view class="bt-txt">在途资金()</view> <view class="bt-txt">在途资金()</view>
<image class="bt-icon"></image>
<image class="bt-icon" mode="aspect" src="/subpackage/wallet/static/images/question_mark.png"></image>
</view> </view>
</view> </view>
</view> </view>
@ -76,12 +76,16 @@ export default {
} }
}, },
created(){ created(){
this.getBaofuV2PriceInfo({
type: this.tag,
contractNo: this.account
});
this.refreshItem(true);
}, },
methods:{ methods:{
refreshItem(loadStatus){
this.getBaofuV2PriceInfo({
type: this.tag,
contractNo: this.account,
loadStatus
});
},
loadAgain(){ loadAgain(){
let { statusMsg } = this; let { statusMsg } = this;
if(statusMsg === failStatusMsg){ if(statusMsg === failStatusMsg){
@ -91,8 +95,8 @@ export default {
}); });
} }
}, },
getBaofuV2PriceInfo({ type, contractNo }){
this.statusMsg = '加载中...';
getBaofuV2PriceInfo({ type, contractNo, loadStatus = true }){
if(loadStatus)this.statusMsg = '加载中...';
servers.post({ servers.post({
url: WALLET_API.baofuV2Gateway, url: WALLET_API.baofuV2Gateway,
data: { data: {
@ -109,7 +113,7 @@ export default {
.then(res=>{ .then(res=>{
let _data = res?.data; let _data = res?.data;
if(_data.code === 0&&_data.data.errorCode === 'SUCCESS'){ if(_data.code === 0&&_data.data.errorCode === 'SUCCESS'){
this.statusMsg = 'success';
if(loadStatus)this.statusMsg = 'success';
this.accountInfo = _data.data; this.accountInfo = _data.data;
}else{ }else{
console.warn('getBaofuV2PriceInfo error: ', res); console.warn('getBaofuV2PriceInfo error: ', res);
@ -118,7 +122,7 @@ export default {
}) })
.catch(err=>{ .catch(err=>{
console.log('getBaofuV2PriceInfo catch error: ', err); console.log('getBaofuV2PriceInfo catch error: ', err);
this.statusMsg = failStatusMsg;
if(loadStatus)this.statusMsg = failStatusMsg;
}) })
} }
} }
@ -139,7 +143,6 @@ export default {
margin-left: 6upx; margin-left: 6upx;
width: 28upx; width: 28upx;
height: 28upx; height: 28upx;
background: skyblue;
} }
} }
.bi-bar{ .bi-bar{
@ -186,7 +189,6 @@ export default {
flex-shrink: 0; flex-shrink: 0;
width: 20upx; width: 20upx;
height: 20upx; height: 20upx;
background: skyblue;
} }
} }
} }

24
src/subpackage/wallet/pages/douyin_withdraw/index.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="douyin-withdraw"> <view class="douyin-withdraw">
<image class="dw-icon"></image>
<image class="dw-icon" mode="aspect" src="/subpackage/wallet/static/images/dy_logo.png"></image>
<view class="dw-tip">可提现资金</view> <view class="dw-tip">可提现资金</view>
<view class="dw-price"> <view class="dw-price">
<text class="dp-unit">¥</text>{{ balance }} <text class="dp-unit">¥</text>{{ balance }}
@ -8,7 +8,7 @@
<view class="dw-btn" @click="applyBtn">申请提现</view> <view class="dw-btn" @click="applyBtn">申请提现</view>
<view class="dw-link"> <view class="dw-link">
<text class="dl-txt" @click="toDetailBtn">提现明细</text> <text class="dl-txt" @click="toDetailBtn">提现明细</text>
<image class="dl-icon"></image>
<image class="dl-icon" mode="aspect" src="/subpackage/wallet/static/images/arrow_b2.png"></image>
</view> </view>
<dy-withdraw-apply <dy-withdraw-apply
@ -16,17 +16,28 @@
:balance="balance" :balance="balance"
@click:confirm="dyConfirmExtract" @click:confirm="dyConfirmExtract"
></dy-withdraw-apply> ></dy-withdraw-apply>
<wallet-modal-success
title="申请成功"
ref="walletModalSuccess"
@click:button="toDetailBtn"
>
<template v-slot:tip>平台已收到您的提现请求预计在3~7个工作日内进行处理请耐心等待</template>
<template v-slot:btn>提现记录</template>
</wallet-modal-success>
</view> </view>
</template> </template>
<script> <script>
import dyWithdrawApply from '../../components/dy_withdraw_apply.vue'; import dyWithdrawApply from '../../components/dy_withdraw_apply.vue';
import wallet_modal_success from '../../components/wallet_modal_success.vue';
import { WALLET_API } from '../../js/api'; import { WALLET_API } from '../../js/api';
import servers from '../../js/server'; import servers from '../../js/server';
import { routeTo, showLoad, hideLoad, showNone } from '@/utils/util'; import { routeTo, showLoad, hideLoad, showNone } from '@/utils/util';
export default { export default {
components: { components: {
'dy-withdraw-apply': dyWithdrawApply
'dy-withdraw-apply': dyWithdrawApply,
'wallet-modal-success': wallet_modal_success
}, },
data(){ data(){
return { return {
@ -111,7 +122,7 @@ export default {
}) })
.then(res=>{ .then(res=>{
hideLoad(); hideLoad();
showNone('申请提现成功');
this.$refs.walletModalSuccess.alert();
setTimeout(_=>{ setTimeout(_=>{
this.getDouyinWalletBalance(brand_id); this.getDouyinWalletBalance(brand_id);
}, 1200); }, 1200);
@ -131,7 +142,8 @@ export default {
display: block; display: block;
width: 96upx; width: 96upx;
height: 96upx; height: 96upx;
background: skyblue;
background: #000;
border-radius: 24upx;
} }
.dw-tip{ .dw-tip{
margin-top: 62upx; margin-top: 62upx;
@ -165,7 +177,7 @@ export default {
margin-left: 6upx; margin-left: 6upx;
width: 28upx; width: 28upx;
height: 28upx; height: 28upx;
background: skyblue;
} }
} }
} }

40
src/subpackage/wallet/pages/douyin_withdraw/record.vue

@ -1,8 +1,14 @@
<template> <template>
<view class="withdraw-record"> <view class="withdraw-record">
<view class="wr-list"> <view class="wr-list">
<view class="record-item" v-for="i in 10" :key="i">
<record-item></record-item>
<view class="record-item" v-for="(e, i) in orderList" :key="i">
<record-line name="提现金额">{{ e.amount || 0 }}</record-line>
<record-line name="提现单号">{{ e.number || '-' }}</record-line>
<record-line name="申请时间">{{ e.request_time || '-' }}</record-line>
<record-line name="收款人名称">{{ e.account_name_of_bank || '-' }}</record-line>
<record-line name="收款人账号">{{ e.account || '-' }}</record-line>
<record-line name="处理时间">{{ e.updated_at || '-' }}</record-line>
<record-line name="备注">{{ e.remark || '-' }}</record-line>
</view> </view>
</view> </view>
</view> </view>
@ -10,15 +16,31 @@
<script> <script>
import recordItem from '../../components/record_item.vue'; import recordItem from '../../components/record_item.vue';
import recordLine from '../../components/record_line.vue';
import { WALLET_API } from '../../js/api'; import { WALLET_API } from '../../js/api';
import servers from '../../js/server'; import servers from '../../js/server';
import { routeTo, showLoad, hideLoad, showNone } from '@/utils/util'; import { routeTo, showLoad, hideLoad, showNone } from '@/utils/util';
export default { export default {
components: { components: {
'record-item': recordItem
'record-item': recordItem,
'record-line': recordLine
},
data(){
return {
orderList: [],
loadPage: 1,
}
}, },
onLoad(options){ onLoad(options){
this.getDouyinWalletWithdrawRecord(options);
let _bid = options.brand_id ?? '';
this.brand_id = _bid;
this.getDouyinWalletWithdrawRecord({ brand_id: _bid });
},
onReachBottom(){
this.getDouyinWalletWithdrawRecord({
brand_id: this.brand_id,
page: this.loadPage + 1
});
}, },
methods: { methods: {
/** /**
@ -40,7 +62,12 @@ export default {
failMsg: '加载提现记录失败' failMsg: '加载提现记录失败'
}) })
.then(res=>{ .then(res=>{
console.log(res);
hideLoad();
let _ls = res?.list || [];
if(page === 1)return this.orderList = _ls;
if(!_ls.length)return showNone('没有更多了!');
this.orderList = [...this.orderList, ..._ls];
this.loadPage = page;
}) })
.catch(hideLoad) .catch(hideLoad)
}, },
@ -55,6 +82,9 @@ export default {
.wr-list{ .wr-list{
padding: 24upx 24upx 0; padding: 24upx 24upx 0;
.record-item{ .record-item{
padding: 26upx 20upx;
border-radius: 10upx;
background: #fff;
&+ .record-item{ &+ .record-item{
margin-top: 24upx; margin-top: 24upx;
} }

19
src/subpackage/wallet/pages/index/index.vue

@ -9,8 +9,8 @@
<view class="wt-tit">温馨提示</view> <view class="wt-tit">温馨提示</view>
<view class="wt-content"> <view class="wt-content">
<text class="wc-txt"> <text class="wc-txt">
如需要分账账户可以自己单独提现请访问 https://sps.ouxuanzhineng.cn
<text class="wt-copy">复制</text>
如需要分账账户可以自己单独提现请访问 {{ oxAddress }}
<text class="wt-copy" @click="copyBtn">复制</text>
\r\n账户为宝付的商户号密码为申请时预留的手机号码 \r\n账户为宝付的商户号密码为申请时预留的手机号码
</text> </text>
</view> </view>
@ -26,7 +26,7 @@ import walletModalSuccess from '../../components/wallet_modal_success.vue'
import topUp from '../../components/top_up.vue'; import topUp from '../../components/top_up.vue';
import { WALLET_API } from '../../js/api'; import { WALLET_API } from '../../js/api';
import servers from '../../js/server'; import servers from '../../js/server';
import { routeTo } from '@/utils/util'
import { routeTo, showLoad, hideLoad } from '@/utils/util';
export default { export default {
components: { components: {
'wallet-info': walletInfo, 'wallet-info': walletInfo,
@ -35,6 +35,7 @@ export default {
}, },
data(){ data(){
return { return {
oxAddress: 'https://sps.ouxuanzhineng.cn',
brand_id: '', brand_id: '',
balance: 0, balance: 0,
} }
@ -44,7 +45,13 @@ export default {
this.getWalletBalance(options.brand_id); this.getWalletBalance(options.brand_id);
}, },
methods: { methods: {
copyBtn(){
uni.setClipboardData({
data: this.oxAddress,
})
},
getWalletBalance(brand_id){ getWalletBalance(brand_id){
showLoad();
servers.get({ servers.get({
url: WALLET_API.walletBalance, url: WALLET_API.walletBalance,
data: { data: {
@ -53,8 +60,12 @@ export default {
failMsg: '获取钱包余额失败' failMsg: '获取钱包余额失败'
}) })
.then(res=>{ .then(res=>{
hideLoad();
this.balance = +res.balance ?? 0; this.balance = +res.balance ?? 0;
console.log(res);
})
.catch(err=>{
hideLoad();
console.log(err);
}) })
}, },
dyBtnClick(){ dyBtnClick(){

15
src/subpackage/wallet/pages/index/modules/wallet_info.vue

@ -2,15 +2,15 @@
<view class="wallet-info"> <view class="wallet-info">
<view class="wi-bar"> <view class="wi-bar">
<view class="wb-txt">钱包查账可登录后台查阅</view> <view class="wb-txt">钱包查账可登录后台查阅</view>
<image class="wb-icon"></image>
<image class="wb-icon" mode="aspect" src="/subpackage/wallet/static/images/arrow_b2.png"></image>
</view> </view>
<view class="wi-account"> <view class="wi-account">
<veiw class="wa-top"> <veiw class="wa-top">
<view class="wt-name">欧轩内部钱包账户</view> <view class="wt-name">欧轩内部钱包账户</view>
<view class="wt-record">
<!-- <view class="wt-record">
<text>充值记录</text> <text>充值记录</text>
<image class="wr-icon"></image>
</view>
<image class="wr-icon" mode="aspect" src="/subpackage/wallet/static/images/arrow_b2.png"></image>
</view> -->
</veiw> </veiw>
<view class="wa-tip">(用于购买服务使用)</view> <view class="wa-tip">(用于购买服务使用)</view>
<view class="wa-balance"> <view class="wa-balance">
@ -18,7 +18,7 @@
<text class="wm-unit">¥</text> <text class="wm-unit">¥</text>
{{ balance }} {{ balance }}
</view> </view>
<view class="wb-btn">充值</view>
<!-- <view class="wb-btn">充值</view> -->
</view> </view>
</view> </view>
<view class="wi-btns"> <view class="wi-btns">
@ -26,7 +26,7 @@
<text class="wi-txt">宝付提现</text> <text class="wi-txt">宝付提现</text>
</view> </view>
<view class="wb-item" @click="$emit('click:douyin')"> <view class="wb-item" @click="$emit('click:douyin')">
<image class="wi-icon"></image>
<image class="wi-icon" mode="aspect" src="/subpackage/wallet/static/images/dy_logo.png"></image>
<text class="wi-txt">抖音提现</text> <text class="wi-txt">抖音提现</text>
</view> </view>
</view> </view>
@ -64,7 +64,6 @@ export default {
.wb-icon{ .wb-icon{
width: 20upx; width: 20upx;
height: 20upx; height: 20upx;
background: skyblue;
} }
} }
.wi-account{ .wi-account{
@ -82,7 +81,6 @@ export default {
margin-left: 4upx; margin-left: 4upx;
width: 20upx; width: 20upx;
height: 20upx; height: 20upx;
background: skyblue;
} }
} }
} }
@ -128,7 +126,6 @@ export default {
margin-right: 4upx; margin-right: 4upx;
width: 44upx; width: 44upx;
height: 44upx; height: 44upx;
background: skyblue;
} }
.wi-txt{ .wi-txt{
@include flcw(32upx, 44upx, #FFFFFF, 500); @include flcw(32upx, 44upx, #FFFFFF, 500);

BIN
src/subpackage/wallet/static/images/arrow_b2.png

After

Width: 40  |  Height: 40  |  Size: 251 B

BIN
src/subpackage/wallet/static/images/arrow_c33.png

After

Width: 24  |  Height: 24  |  Size: 599 B

BIN
src/subpackage/wallet/static/images/close.png

After

Width: 34  |  Height: 34  |  Size: 233 B

BIN
src/subpackage/wallet/static/images/dy_logo.png

After

Width: 44  |  Height: 44  |  Size: 914 B

BIN
src/subpackage/wallet/static/images/question_mark.png

After

Width: 56  |  Height: 56  |  Size: 1023 B

BIN
src/subpackage/wallet/static/images/success_tip.png

After

Width: 100  |  Height: 102  |  Size: 974 B

Loading…
Cancel
Save