Browse Source

Merge branch 'md1024'

master
刘嘉炜 7 days ago
parent
commit
d09c6487d6
  1. 2
      src/pages.json
  2. 56
      src/subpackage/wallet/pages/douyin_withdraw/apply.vue
  3. 81
      src/subpackage/wallet/pages/douyin_withdraw/index.vue
  4. 117
      src/subpackage/wallet/pages/douyin_withdraw/modules/platform_item.vue
  5. 6
      src/subpackage/wallet/pages/douyin_withdraw/record.vue
  6. 5
      src/subpackage/wallet/pages/index/index.vue
  7. 5
      src/subpackage/wallet/pages/index/modules/wallet_info.vue

2
src/pages.json

@ -761,7 +761,7 @@
{
"path": "pages/douyin_withdraw/index",
"style" : {
"navigationBarTitleText": "抖音提现"
"navigationBarTitleText": "平台提现"
}
},
{

56
src/subpackage/wallet/pages/douyin_withdraw/apply.vue

@ -34,6 +34,11 @@
<view class="dol-name">联系电话</view>
<input maxlength="11" type="number" class="dol-ipt" placeholder="请输入联系电话" v-model="info.mobile">
</view>
<!-- // 20241113 ID1001577- -->
<view class="dwa-opt-line" :key="i">
<view class="dol-name">*证件号码</view>
<input type="idcard" class="dol-ipt" placeholder="请输入身份证/营业执照统一信用代码" v-model="info.credentials_number">
</view>
</view>
@ -41,6 +46,7 @@
<view class="dt-tit">温馨提示</view>
<view class="dt-desc">1账户请预留一定的余额避免余额不足导致退款失败</view>
<view class="dt-desc">2提现申请成功提交后预计在3~7个工作日内进行处理</view>
<view class="dt-desc">3提现需要扣除1元/次手续费</view>
</view>
<view class="dwa-btn">
<wm-button green @click="confirmExtract">确认提现</wm-button>
@ -82,14 +88,25 @@ export default {
account: '',
bank_name: '',
bank_address: '',
mobile: ''
}
mobile: '',
// 20241113 ID1001577-
credentials_number: '' //
},
// md241024 241113
source: '', // 01
}
},
async onLoad(options){
let _bid = options.brand_id || '';
this.brand_id = _bid;
await this.getDouyinWalletBalance(_bid);
// md241024 241113
let { source } = options;
if(![ 0, 1 ].includes(+source))return showNone('缺少参数 source');
this.source = +source;
await this.getDouyinWalletBalance(_bid, +source);
if(this.isEmptyInfo())this.getStorageAndSet();
},
methods: {
@ -144,8 +161,10 @@ export default {
},
//
dyConfirmExtract(e){
let { brand_id, source } = this;
this.douyinWalletExtract({
brand_id: this.brand_id,
brand_id,
source,
...e,
})
},
@ -154,7 +173,7 @@ export default {
return _infoValues.every(item=>item === '');
},
infoCheck(){
let { amount, account_name_of_bank, account, bank_name, bank_address, mobile } = this.info;
let { amount, account_name_of_bank, account, bank_name, bank_address, mobile, credentials_number } = this.info;
let _amount = +(amount ?? 0);
if(_amount <= 0){
showNone('提现金额不正确');
@ -180,13 +199,19 @@ export default {
showNone('支行名称不能为空');
return false
}
if(credentials_number === ''){
showNone('证件号码不能为空');
return false
}
return true
},
/**
* http://api.ouxuan.net:61080/project/11/interface/api/2195
* @param {String} brand_id 品牌id
* */
getDouyinWalletBalance(brand_id){
getDouyinWalletBalance(brand_id, source){
showLoad();
return servers.get({
url: WALLET_API.withdrawalOfDouyinOrg_totalAmount,
@ -196,8 +221,11 @@ export default {
failMsg: '获取钱包余额失败'
})
.then(res=>{
hideLoad();
let _balance = +res.total_amount ?? 0;
let _balance = 0;
if(source === 0)_balance = +res.total_amount_of_douyin ?? 0;
if(source === 1)_balance = +res.total_amount_of_wechat ?? 0;
return this.balance = _balance * 0.01;
})
.catch(hideLoad)
@ -212,6 +240,11 @@ export default {
* @param {String} bank_address //
* @param {String} mobile 手机号
* @param {Number} status // 01
* md241024 241113新增
* @param {Number} source // 01
* // 20241113 ID1001577-
* @param {String} credentials_number //
*
* */
douyinWalletExtract({
brand_id,
@ -221,7 +254,9 @@ export default {
bank_name,
bank_address,
mobile,
status = 0
status = 0,
credentials_number,
source,
}){
showLoad();
servers.post({
@ -235,6 +270,8 @@ export default {
bank_address,
mobile,
status,
credentials_number,
source,
},
failMsg: '申请提现失败'
})
@ -242,7 +279,7 @@ export default {
hideLoad();
this.$refs.walletModalSuccess.alert();
setTimeout(_=>{
this.getDouyinWalletBalance(brand_id);
this.getDouyinWalletBalance(brand_id, source);
}, 1200);
})
.catch(hideLoad)
@ -250,7 +287,6 @@ export default {
}
}
</script>
<style lang="scss">
page{
background: #fff;

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

@ -1,11 +1,21 @@
<template>
<view class="douyin-withdraw">
<image class="dw-icon" mode="aspect" src="/subpackage/wallet/static/images/dy_logo.png"></image>
<view class="dw-tip">可提现资金</view>
<view class="dw-price">
<text class="dp-unit">¥</text>{{ balance.toFixed(2)||"0.00" }}
</view>
<view class="dw-btn" @click="applyBtn">申请提现</view>
<view class="dw-space"></view>
<platform-item
title="微信平台可提现资金"
:balance="formatMoney(balanceInfo.total_amount_of_wechat)"
type="wx"
@click:extract="applyBtn(1)"
></platform-item>
<view class="dw-space"></view>
<platform-item
title="抖音平台可提现资金"
:balance="formatMoney(balanceInfo.total_amount_of_douyin)"
type="dy"
@click:extract="applyBtn(0)"
></platform-item>
<view class="dw-space"></view>
<view class="dw-link">
<text class="dl-txt" @click="toDetailBtn">提现明细</text>
<image class="dl-icon" mode="aspect" src="/subpackage/wallet/static/images/arrow_b2.png"></image>
@ -17,11 +27,22 @@
import { WALLET_API } from '../../js/api';
import servers from '../../js/server';
import { routeTo, showLoad, hideLoad } from '@/utils/util';
import platformItem from "./modules/platform_item.vue";
export default {
components: {
'platform-item': platformItem,
},
data(){
return {
brand_id: '',
balance: 0,
balanceInfo: {
/**
* total_amount
* total_amount_of_douyin
* total_amount_of_wechat
*/
},
}
},
onLoad(options){
@ -36,8 +57,9 @@ export default {
routeTo(`/subpackage/wallet/pages/douyin_withdraw/record?brand_id=${this.brand_id}`, 'nT');
},
//
applyBtn(){
routeTo(`/subpackage/wallet/pages/douyin_withdraw/apply?brand_id=${this.brand_id}`, 'nT');
// md241024 241113 01
applyBtn(source){
routeTo(`/subpackage/wallet/pages/douyin_withdraw/apply?brand_id=${this.brand_id}&source=${source}`, 'nT');
},
/**
* http://api.ouxuan.net:61080/project/11/interface/api/2195
@ -54,11 +76,13 @@ export default {
})
.then(res=>{
hideLoad();
let _balance = +res.total_amount ?? 0;
this.balance = _balance * 0.01;
this.balanceInfo = res || {};
})
.catch(hideLoad)
},
formatMoney(money){
return ((money ?? 0) *0.01).toFixed(2);
}
}
}
@ -66,40 +90,11 @@ export default {
<style lang="scss">
.douyin-withdraw{
padding-top: 88upx;
.dw-icon{
margin: 0 auto;
display: block;
width: 96upx;
height: 96upx;
background: #000;
border-radius: 24upx;
}
.dw-tip{
margin-top: 62upx;
text-align: center;
@include flcw(28upx, 40upx, #000000);
}
.dw-price{
padding: 0 20upx;
margin-top: 20upx;
text-align: center;
@include flcw(84upx, 96upx, #000000, 700);
@include tHide(1);
.dp-unit{
font-size: 64upx;
}
}
.dw-btn{
margin: 154upx auto 0;
width: 300upx;
border-radius: 10upx;
text-align: center;
background: #FF873D;
@include flcw(32upx, 112upx, #fff);
padding: 0 32upx;
.dw-space{
height: 32upx;
}
.dw-link{
margin-top: 88upx;
@include flcw(28upx, 40upx, #9A9A9D);
@include ctf(center);
.dl-icon{

117
src/subpackage/wallet/pages/douyin_withdraw/modules/platform_item.vue

@ -0,0 +1,117 @@
<template>
<view class="baofu-item">
<view class="bi-bar" :class="{ 'bb-dy': type === 'dy' }">
<view class="bb-name-bar">
<view class="bnb-left">
<view class="bl-txt">{{ title }}</view>
</view>
</view>
</view>
<view class="bi-info">
<view class="bi-balance">
<view class="bb-money">
{{ balance || 0 }}
</view>
<view class="bb-btn" @click="$emit('click:extract')">提现</view>
</view>
<view class="bi-tip">
<view class="bt-txt" @click="showModalTip">可提现资金()</view>
<image class="bt-icon" mode="aspect" src="/subpackage/wallet/static/images/question_mark.png" @click="showModalTip(0)"></image>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
title: {
default: ''
},
balance: {
default: '0'
},
type: {// dy: , wx:
type: String,
default: 'dy',
}
},
methods:{
showModalTip(){
let { type } = this;
let _str = '';
if(type === 'dy')_str = '抖音端与欧轩合作的平台小程序订单的结算金额';
if(type === 'wx')_str = '微信端与欧轩合作的平台小程序订单的结算金额';
uni.showModal({
title: '提示',
content: _str,
showCancel: false
})
},
}
}
</script>
<style lang="scss">
.baofu-item{
border-radius: 30upx;
overflow: hidden;
background: #fff;
.bi-tip{
@include ctf;
.bt-txt{
@include flcw(24upx, 34upx, #9C9C9F);
}
.bt-icon{
margin-left: 6upx;
width: 28upx;
height: 28upx;
}
}
.bi-bar{
padding: 26upx 32upx 18upx;
padding-left: 32upx;
padding-right: 32upx;
background: $mColor;
&.bb-dy{
background: #585f69;
}
.bb-name-bar{
@include ctf(space-between);
.bnb-left{
flex-grow: 1;
@include ctf;
.bl-txt{
@include flcw(28upx, 44upx, #fff, 500);
@include tHide;
}
}
}
}
.bi-info{
padding: 40upx 32upx;
.bi-balance{
@include ctf(space-between);
.bb-money{
@include flcw(84upx, 96upx, #000000, 700);
@include tHide;
}
.bb-btn{
flex-shrink: 0;
margin-left: 10upx;
width: 160upx;
text-align: center;
border-radius: 10upx;
background: #FF873D;
@include flcw(28upx, 72upx, #FFFFFF, 500);
}
}
}
.bi-status-mes{
padding: 40upx 32upx;
@include flcw(24upx, 34upx, #000000);
}
}
</style>

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

@ -12,10 +12,12 @@
name="提现金额"
:tag="getTagTxt(e.status)"
>{{ formatAmount(e.amount || 0) }}</record-line>
<record-line name="提现金额来源">{{ getSourceTxt(e.source) }}</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.credentials_number || '-' }}</record-line>
<record-line name="处理时间">{{ e.updated_at || '-' }}</record-line>
<record-line name="备注">{{ e.remark || '-' }}</record-line>
</view>
@ -65,6 +67,10 @@ export default {
});
},
methods: {
getSourceTxt(source = ''){
return source === 0 ? '抖音平台' :
source === 1 ? '微信平台' : '-';
},
formatAmount(num = 0){
let _num = Number(num) || 0;
return _num * 0.01;

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

@ -10,9 +10,10 @@
<view class="wt-tit">温馨提示</view>
<view class="wt-content">
<text class="wc-txt">
如需要分账账户可以自己单独提现请访问 {{ oxAddress }}
1如需要宝付分账账户可以自己单独提现请访问 {{ oxAddress }}
<text class="wt-copy" @click="copyBtn">复制</text>
\r\n账户为宝付的商户号密码为申请时预留的手机号码
\r\n 账户为宝付的商户号密码为申请时预留的手机号码
\r\n 2平台提现为平台版抖音小程序平台版微信小程序的分账结算金额提现
</text>
</view>
</view>

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

@ -26,8 +26,9 @@
<text class="wi-txt">宝付提现</text>
</view>
<view class="wb-item" @click="$emit('click:douyin')">
<image class="wi-icon" mode="aspect" src="@/subpackage/wallet/static/images/dy_logo.png"></image>
<text class="wi-txt">抖音提现</text>
<!-- 241024 抖音提现文案改为平台提现原有的抖音logo去掉 -->
<!-- <image class="wi-icon" mode="aspect" src="@/subpackage/wallet/static/images/dy_logo.png"></image> -->
<text class="wi-txt">平台提现</text>
</view>
</view>
</view>

Loading…
Cancel
Save