分销提现:基本接入 50%

pull/36/MERGE
YunaiV 2024-01-05 22:02:59 +08:00
parent ab48b4d640
commit bc6ac22ce2
5 changed files with 578 additions and 647 deletions

View File

@ -106,7 +106,7 @@
</template> </template>
<script setup> <script setup>
import { ref, reactive, unref, watchPostEffect, watch } from 'vue'; import { ref, reactive, unref, watch } from 'vue';
import sheep from '@/sheep'; import sheep from '@/sheep';
import { realName, bankName, bankCode, alipayAccount } from '@/sheep/validate/form'; import { realName, bankName, bankCode, alipayAccount } from '@/sheep/validate/form';

View File

@ -1,176 +1,159 @@
<template> <template>
<su-popup :show="show" class="ss-checkout-counter-wrap" @close="hideModal"> <su-popup :show="show" class="ss-checkout-counter-wrap" @close="hideModal">
<view class="ss-modal-box bg-white ss-flex-col"> <view class="ss-modal-box bg-white ss-flex-col">
<view class="modal-header ss-flex-col ss-col-left"> <view class="modal-header ss-flex-col ss-col-left">
<text class="modal-title ss-m-b-20">选择提现方式</text> <text class="modal-title ss-m-b-20">选择提现方式</text>
</view> </view>
<view class="modal-content ss-flex-1 ss-p-b-100"> <view class="modal-content ss-flex-1 ss-p-b-100">
<radio-group @change="onChange"> <radio-group @change="onChange">
<label class="container-list ss-p-l-34 ss-p-r-24 ss-flex ss-col-center ss-row-center" <label
v-for="(item, index) in typeList" :key="index"> class="container-list ss-p-l-34 ss-p-r-24 ss-flex ss-col-center ss-row-center"
<view class="container-icon ss-flex ss-m-r-20"> v-for="(item, index) in typeList"
<image :src="sheep.$url.static(item.icon)" /> :key="index"
</view> >
<view class="ss-flex-1">{{ item.title }}</view> <view class="container-icon ss-flex ss-m-r-20">
<image :src="sheep.$url.static(item.icon)" />
<radio :value="item.value" color="var(--ui-BG-Main)" </view>
:checked="item.value === state.currentValue" /> <view class="ss-flex-1">{{ item.title }}</view>
<!-- :disabled="!methods.includes(item.value)" --> <radio
</label> :value="item.value"
</radio-group> color="var(--ui-BG-Main)"
</view> :checked="item.value === state.currentValue"
<view class="modal-footer ss-flex ss-row-center ss-col-center"> :disabled="!methods.includes(parseInt(item.value))"
<button class="ss-reset-button save-btn" @tap="onConfirm"></button> />
</view> </label>
</view> </radio-group>
</su-popup> </view>
<view class="modal-footer ss-flex ss-row-center ss-col-center">
<button class="ss-reset-button save-btn" @tap="onConfirm"></button>
</view>
</view>
</su-popup>
</template> </template>
<script setup> <script setup>
import { import { reactive } from 'vue';
reactive, import sheep from '@/sheep';
onBeforeMount,
nextTick,
ref
} from 'vue';
import sheep from '@/sheep';
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
type: Object, type: Object,
default () {}, default() {},
}, },
show: { show: {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
methods: { methods: { //
type: Array, type: Array,
default: [], default: [],
}, },
}); });
const emits = defineEmits(['update:modelValue', 'change', 'close']); const emits = defineEmits(['update:modelValue', 'change', 'close']);
const state = reactive({ const state = reactive({
currentValue: '0', currentValue: '',
}); });
const typeList = reactive([{
// icon: '/static/img/shop/pay/wechat.png',
title: '工商银行',
value: '0',
},
{
// icon: '/static/img/shop/pay/alipay.png',
title: '建设银行',
value: '1',
},
{
// icon: '/static/img/shop/pay/bank.png',
title: '农业',
value: '2',
},
])
const getWalletAccountInfo = async () => {
return new Promise(async (resolve, reject) => {
let res = await sheep.$api.user.account.info({
type: state.currentValue,
});
if (res.error === 0) {
if (!props.methods.includes(res.data.type)) {
return;
}
state.currentValue = res.data.type;
emits('update:modelValue', {
type: res.data.type,
account_header: res.data.account_header,
account_name: res.data.account_name,
account_no: res.data.account_no,
});
} else {
emits('update:modelValue', {
type: state.currentValue,
});
}
resolve();
});
};
function onChange(e) { const typeList = [
state.currentValue = e.detail.value; {
} // icon: '/static/img/shop/pay/wechat.png', // TODO icon
title: '钱包余额',
value: '1',
},
{
icon: '/static/img/shop/pay/wechat.png',
title: '微信零钱',
value: '2',
},
{
icon: '/static/img/shop/pay/alipay.png',
title: '支付宝账户',
value: '3',
},
{
icon: '/static/img/shop/pay/bank.png',
title: '银行卡转账',
value: '4',
},
];
const onConfirm = async () => { function onChange(e) {
if (state.currentValue === '') { state.currentValue = e.detail.value;
sheep.$helper.toast('请选择提现方式'); }
return;
}
await getWalletAccountInfo();
emits('close');
};
const hideModal = () => { const onConfirm = async () => {
emits('close'); if (state.currentValue === '') {
}; sheep.$helper.toast('请选择提现方式');
return;
}
//
emits('update:modelValue', {
type: state.currentValue
});
//
emits('close');
};
onBeforeMount(async () => { const hideModal = () => {
await getWalletAccountInfo(); emits('close');
}); };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.ss-modal-box { .ss-modal-box {
border-radius: 30rpx 30rpx 0 0; border-radius: 30rpx 30rpx 0 0;
max-height: 1000rpx; max-height: 1000rpx;
.modal-header { .modal-header {
position: relative; position: relative;
padding: 60rpx 40rpx 40rpx; padding: 60rpx 40rpx 40rpx;
.modal-title { .modal-title {
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
.close-icon { .close-icon {
position: absolute; position: absolute;
top: 10rpx; top: 10rpx;
right: 20rpx; right: 20rpx;
font-size: 46rpx; font-size: 46rpx;
opacity: 0.2; opacity: 0.2;
} }
} }
.modal-content { .modal-content {
overflow-y: auto; overflow-y: auto;
.container-list { .container-list {
height: 96rpx; height: 96rpx;
border-bottom: 2rpx solid rgba(#dfdfdf, 0.5); border-bottom: 2rpx solid rgba(#dfdfdf, 0.5);
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
.container-icon { .container-icon {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
} }
} }
} }
.modal-footer { .modal-footer {
height: 120rpx; height: 120rpx;
.save-btn { .save-btn {
width: 710rpx; width: 710rpx;
height: 80rpx; height: 80rpx;
border-radius: 40rpx; border-radius: 40rpx;
background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient)); background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
color: $white; color: $white;
} }
} }
} }
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
</style> </style>

View File

@ -1,425 +1,423 @@
<template> <template>
<s-layout title="申请提现" class="withdraw-wrap" navbar="inner"> <s-layout title="申请提现" class="withdraw-wrap" navbar="inner">
<!-- <view class="page-bg"></view> --> <view class="page-bg"></view>
<!-- <view class="wallet-num-box ss-flex ss-col-center ss-row-between" :style="[ <view
class="wallet-num-box ss-flex ss-col-center ss-row-between"
:style="[
{ {
marginTop: '-' + Number(statusBarHeight + 88) + 'rpx', marginTop: '-' + Number(statusBarHeight + 88) + 'rpx',
paddingTop: Number(statusBarHeight + 108) + 'rpx', paddingTop: Number(statusBarHeight + 108) + 'rpx',
}, },
]"> ]"
<view class=""> >
<view class="num-title">可提现金额</view> <view class="">
<view class="wallet-num">{{ userInfo.commission }}</view> <view class="num-title">可提现金额</view>
</view> <view class="wallet-num">{{ fen2yuan(state.brokerageInfo.brokeragePrice) }}</view>
<button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/pay/withdraw-log')"></button> </view>
</view> --> <button class="ss-reset-button log-btn" @tap="sheep.$router.go('/pages/pay/withdraw-log')">
<!-- 提现输入卡片--> 提现记录
<view class="draw-card"> </button>
<view class="card-title">提现金额</view> </view>
<view class="input-box ss-flex ss-col-center border-bottom"> <!-- 提现输入卡片-->
<view class="unit"></view> <view class="draw-card">
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.amount" type="number" <view class="bank-box ss-flex ss-col-center ss-row-between ss-m-b-30">
placeholder="请输入提现金额" /> <view class="name">提现至</view>
</view> <view class="bank-list ss-flex ss-col-center" @tap="onAccountSelect(true)">
<view class="card-title" v-show='txfag==1'>持卡人</view> <view v-if="!state.accountInfo.type" class="empty-text"></view>
<view class="input-box ss-flex ss-col-center border-bottom" v-show='txfag==1'> <view v-if="state.accountInfo.type === '1'" class="empty-text"></view>
<view class="unit"></view> <view v-if="state.accountInfo.type === '2'" class="empty-text"></view>
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.name" <view v-if="state.accountInfo.type === '3'" class="empty-text"></view>
placeholder="请输入持卡人姓名" /> <view v-if="state.accountInfo.type === '4'" class="empty-text"></view>
</view> <text class="cicon-forward" />
<view class="card-title" v-show='txfag==1'>卡号</view> </view>
<view class="input-box ss-flex ss-col-center border-bottom" v-show='txfag==1'> </view>
<view class="unit"></view> <!-- 提现金额 -->
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.accountNo" <view class="card-title">提现金额</view>
placeholder="请输卡号" /> <view class="input-box ss-flex ss-col-center border-bottom">
</view> <view class="unit"></view>
<view class="card-title">收款码</view> <uni-easyinput
<view class="input-box ss-flex ss-col-center border-bottom"> :inputBorder="false"
<view class="unit"></view> class="ss-flex-1 ss-p-l-10"
<uni-easyinput :inputBorder="false" class="ss-flex-1 ss-p-l-10" v-model="state.accountQrCodeUrl" v-model="state.accountInfo.price"
placeholder="请输收款码地址" /> type="number"
</view> placeholder="请输入提现金额"
/>
</view>
<!-- 提现账号 -->
<view class="card-title" v-show="['2', '3', '4'].includes(state.accountInfo.type)">
提现账号
</view>
<view
class="input-box ss-flex ss-col-center border-bottom"
v-show="['2', '3', '4'].includes(state.accountInfo.type)"
>
<view class="unit" />
<uni-easyinput
:inputBorder="false"
class="ss-flex-1 ss-p-l-10"
v-model="state.accountInfo.accountNo"
placeholder="请输入提现账号"
/>
</view>
<!-- TODO 芋艿 -->
<view class="card-title" v-show="['2', '3'].includes(state.accountInfo.type)"></view>
<view
class="input-box ss-flex ss-col-center border-bottom"
v-show="['2', '3'].includes(state.accountInfo.type)"
>
<view class="unit" />
<uni-easyinput
:inputBorder="false"
class="ss-flex-1 ss-p-l-10"
v-model="state.accountInfo.accountQrCodeUrl"
placeholder="请输收款码地址"
/>
</view>
<!-- 持卡人姓名 -->
<view class="card-title" v-show="state.accountInfo.type === '4'"></view>
<view
class="input-box ss-flex ss-col-center border-bottom"
v-show="state.accountInfo.type === '4'"
>
<view class="unit" />
<uni-easyinput
:inputBorder="false"
class="ss-flex-1 ss-p-l-10"
v-model="state.accountInfo.name"
placeholder="请输入持卡人姓名"
/>
</view>
<!-- 提现银行 -->
<view class="card-title" v-show="state.accountInfo.type === '4'"></view>
<view
class="input-box ss-flex ss-col-center border-bottom"
v-show="state.accountInfo.type === '4'"
>
<view class="unit" />
<uni-easyinput
:inputBorder="false"
class="ss-flex-1 ss-p-l-10"
v-model="state.accountInfo.bankName"
placeholder="请输入提现银行"
/>
</view>
<!-- 开户地址 -->
<view class="card-title" v-show="state.accountInfo.type === '4'"></view>
<view
class="input-box ss-flex ss-col-center border-bottom"
v-show="state.accountInfo.type === '4'"
>
<view class="unit" />
<uni-easyinput
:inputBorder="false"
class="ss-flex-1 ss-p-l-10"
v-model="state.accountInfo.bankAddress"
placeholder="请输入开户地址"
/>
</view>
<button class="ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main" @tap="onConfirm">
确认提现
</button>
</view>
<view class="bank-box ss-flex ss-col-center ss-row-between ss-m-b-30" style='display:block'> <!-- 提现说明 -->
<view class="name">选择提现方式</view> <view class="draw-notice">
<!-- <view class="bank-list ss-flex ss-col-center" style="margin-left:auto" > <view class="title ss-m-b-30">提现说明</view>
<view class="empty-text">请选择提现方式</view> <view class="draw-list"> 最低提现金额 {{ fen2yuan(state.minPrice) }} </view>
<text class="cicon-forward"></text> <view class="draw-list">
</view> --> 冻结佣金<text>{{ fen2yuan(state.brokerageInfo.frozenPrice) }}</text>
<uni-section title="单选" type="line"> 每笔佣金的冻结期为 {{ state.frozenDays }} 到期后可提现
<view class="uni-px-5 uni-pb-5" style='font-size:28rpx'> </view>
<uni-data-checkbox v-model="txfag" :localdata="txList"></uni-data-checkbox> </view>
</view>
</uni-section>
</view>
<view class="bank-box ss-flex ss-col-center ss-row-between ss-m-b-30" v-show='txfag==1'>
<view class="name">选择银行</view>
<view class="bank-list ss-flex ss-col-center" @tap="onAccountSelect(true)">
<view v-if="!state.accountInfo.type" class="empty-text"></view>
<view v-if="state.accountInfo.type === '0'" class="empty-text"></view>
<view v-if="state.accountInfo.type === '1'" class="empty-text"></view>
<view v-if="state.accountInfo.type === '2'" class="empty-text"></view>
<text class="cicon-forward"></text>
</view>
</view>
<view class="bind-box ss-flex ss-col-center ss-row-between" v-if="state.accountInfo.type">
<view class="placeholder-text" v-if="state.accountInfo.account_name">
{{ state.accountInfo.account_header }}|{{ state.accountInfo.account_name }}
</view>
</view>
<button class="ss-reset-button save-btn ui-BG-Main-Gradient ui-Shadow-Main" @tap="onConfirm">
确认提现
</button>
</view>
<!-- 提现说明 --> <!-- 选择提现账户 -->
<view class="draw-notice"> <account-type-select
<view class="title ss-m-b-30">提现说明</view> :show="state.accountSelect"
<!-- <view class="draw-list" v-for="(rule, index) in state.rulesList" :key="index"> @close="onAccountSelect(false)"
{{ index + 1 }}.{{ rule }} round="10"
</view>--> v-model="state.accountInfo"
<view class="draw-list"> :methods="state.withdrawTypes"
当前可提现金额<text>{{state.userGet.brokeragePrice}}</text> />
</view> </s-layout>
<view class="draw-list">
冻结佣金<text>{{state.userGet.frozenPrice}}</text>
</view>
<view class="draw-list">
说明每笔佣金冻结期为0天到期后可提现
</view>
</view>
<!-- 选择提现账户 -->
<account-type-select :show="state.accountSelect" @close="onAccountSelect(false)" round="10"
v-model="state.accountInfo" :methods="state.rules.methods" />
<!-- 编辑账户信息 -->
<account-info-modal v-if="state.accountInfo.type" v-model="state.accountInfo" :show="state.accountEdit"
@close="onAccountEdit(false)" round="10" />
</s-layout>
</template> </template>
<script setup> <script setup>
import { import { computed, reactive, onBeforeMount, ref } from 'vue';
computed, import sheep from '@/sheep';
reactive, import accountTypeSelect from './components/account-type-select.vue';
onBeforeMount,ref import { fen2yuan } from '@/sheep/hooks/useGoods';
} from 'vue'; import TradeConfigApi from '@/sheep/api/trade/config';
import sheep from '@/sheep'; import BrokerageApi from '@/sheep/api/trade/brokerage';
import accountTypeSelect from './components/account-type-select.vue';
import accountInfoModal from './components/account-info-modal.vue';
import {
onPageScroll
} from '@dcloudio/uni-app';
const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
onPageScroll(() => {});
const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
function filterRules(rules) { const headerBg = sheep.$url.css('/static/img/shop/user/withdraw_bg.png');
let list = []; const statusBarHeight = sheep.$platform.device.statusBarHeight * 2;
let str1 = '';
if (rules.min_amount > 0) {
str1 += `最少 ${rules.min_amount}元; `;
}
if (rules.max_amount > 0) {
str1 += `最多 ${rules.max_amount}元;`;
}
if (str1 !== '') {
list.push('单次提现金额 ' + str1);
}
if (rules.max_num > 0) { const userStore = sheep.$store('user');
list.push(`${rules.num_unit === 'day' ? '天' : '月'}最多可提现 ${rules.max_num} 次;`); const userInfo = computed(() => userStore.userInfo);
} const state = reactive({
accountInfo: {
//
type: undefined,
accountNo: undefined,
accountQrCodeUrl: undefined,
name: undefined,
bankName: undefined,
bankAddress: undefined,
},
if (rules.charge_rate_format > 0) { accountSelect: false,
list.push(`每次收取提现手续费 ${rules.charge_rate_format}%;`);
}
list.push(
`提现申请后将${rules.auto_arrival ? '自动' : '审核后'}到账, 到账结果请查收对应渠道服务通知;`,
);
list.push('如有疑问请及时联系客服.');
return list; brokerageInfo: {}, //
}
let txfag=ref(1)
const txList=[{text:'银行卡提现',value:1},{text:'微信提现',value:2},{text:'支付宝提现',value:3}]
function tixian(v){
console.log(v)
}
const userStore = sheep.$store('user');
const userInfo = computed(() => userStore.userInfo);
const state = reactive({
userGet: {},
accountNo: '',
name: '',
amount: '',
type: '',
accountInfo: {},
accountSelect: false,
accountEdit: false,
rules: {
min_amount: 0,
max_amount: 0,
max_num: 0,
num_unit: 0,
charge_rate_format: 0,
charge_rate: 0,
methods: [],
},
rulesList: [],
accountQrCodeUrl:''
});
const onAccountEdit = (e) => { frozenDays: 0, //
state.accountEdit = e; minPrice: 0, //
}; withdrawTypes: [], //
});
const onAccountSelect = (e) => { //
state.accountSelect = e; const onAccountSelect = (e) => {
}; state.accountSelect = e;
};
const onConfirm = async () => { //
let payload = { const onConfirm = async () => {
accountNo: state.accountNo, //
name: state.name, debugger;
bankName: state.accountInfo.type, if (
type: txfag.value, !state.accountInfo.price ||
price: state.amount * 100, state.accountInfo.price > state.brokerageInfo.price ||
accountQrCodeUrl:state.accountQrCodeUrl state.accountInfo.price <= 0
}; ) {
console.log(payload); sheep.$helper.toast('请输入正确的提现金额');
// return; return;
// if (payload.money > userInfo.commission || payload.money <= 0) { }
// sheep.$helper.toast(''); if (!state.accountInfo.type) {
// return; sheep.$helper.toast('请选择提现方式');
// } return;
}
//
let { code } = await BrokerageApi.createBrokerageWithdraw({
...state.accountInfo,
price: state.accountInfo.price * 100,
});
if (code !== 0) {
return;
}
//
uni.showModal({
title: '操作成功',
content: '您的提现申请已成功提交',
cancelText: '继续提现',
confirmText: '查看记录',
success: (res) => {
if (res.confirm) {
sheep.$router.go('/pages/pay/withdraw-log')
return;
}
getBrokerageUser();
state.accountInfo = {};
}
});
};
// if (!payload.type) { //
// sheep.$helper.toast(''); async function getWithdrawRules() {
// return; let { code, data } = await TradeConfigApi.getTradeConfig();
// } if (code !== 0) {
return;
}
if (data) {
state.minPrice = data.brokerageWithdrawMinPrice || 0;
state.frozenDays = data.brokerageFrozenDays || 0;
state.withdrawTypes = data.brokerageWithdrawTypes;
}
}
// if (!payload.account_name || !payload.account_header || !payload.account_no) { //
// sheep.$helper.toast(''); async function getBrokerageUser() {
// return; const { data, code } = await BrokerageApi.getBrokerageUser();
// } if (code === 0) {
state.brokerageInfo = data;
}
}
// if (sheep.$platform.name === 'H5' && payload.type === 'wechat') { onBeforeMount(() => {
// sheep.$helper.toast('使'); getWithdrawRules();
// return; getBrokerageUser()
// } })
let {
code,
msg,
data
} = await sheep.$api.pay.withdraw.apply(payload);
if (code === -1) {
sheep.$platform.useProvider('wechat').bind();
}
if (code === 0) {
userStore.getInfo();
uni.showModal({
title: '操作成功',
content: '您的提现申请已成功提交',
cancelText: '继续提现',
confirmText: '查看记录',
success: function(res) {
res.confirm && sheep.$router.go('/pages/pay/withdraw-log');
},
});
}
};
async function getWithdrawRules() {
let {
error,
data
} = await sheep.$api.pay.withdraw.rules();
if (error === 0) {
state.rules = data;
state.rulesList = filterRules(state.rules);
}
}
onBeforeMount(async () => {
getWithdrawRules();
let res = await sheep.$api.pay.withdraw.userGet();
state.userGet = res.data
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep() { :deep() {
.uni-input-input { .uni-input-input {
font-family: OPPOSANS !important; font-family: OPPOSANS !important;
} }
} }
.wallet-num-box { .wallet-num-box {
padding: 0 40rpx 80rpx; padding: 0 40rpx 80rpx;
background: var(--ui-BG-Main) v-bind(headerBg) center/750rpx 100% no-repeat; background: var(--ui-BG-Main) v-bind(headerBg) center/750rpx 100% no-repeat;
border-radius: 0 0 5% 5%; border-radius: 0 0 5% 5%;
.num-title { .num-title {
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
color: $white; color: $white;
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.wallet-num { .wallet-num {
font-size: 60rpx; font-size: 60rpx;
font-weight: 500; font-weight: 500;
color: $white; color: $white;
font-family: OPPOSANS; font-family: OPPOSANS;
} }
.log-btn { .log-btn {
width: 170rpx; width: 170rpx;
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
border: 1rpx solid $white; border: 1rpx solid $white;
border-radius: 30rpx; border-radius: 30rpx;
padding: 0; padding: 0;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
color: $white; color: $white;
} }
} }
// //
.draw-card { .draw-card {
background-color: $white; background-color: $white;
border-radius: 20rpx; border-radius: 20rpx;
width: 690rpx; width: 690rpx;
min-height: 560rpx; min-height: 560rpx;
margin: -60rpx 30rpx 30rpx 30rpx; margin: -60rpx 30rpx 30rpx 30rpx;
padding: 30rpx; padding: 30rpx;
position: relative; position: relative;
z-index: 3; z-index: 3;
box-sizing: border-box; box-sizing: border-box;
.card-title { .card-title {
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.bank-box { .bank-box {
.name { .name {
font-size: 28rpx; font-size: 28rpx;
font-weight: 500; font-weight: 500;
} }
.bank-list { .bank-list {
.empty-text { .empty-text {
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: $dark-9; color: $dark-9;
} }
.cicon-forward { .cicon-forward {
color: $dark-9; color: $dark-9;
} }
} }
.input-box { .input-box {
width: 624rpx; width: 624rpx;
height: 100rpx; height: 100rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
.unit { .unit {
font-size: 48rpx; font-size: 48rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
} }
.uni-easyinput__placeholder-class { .uni-easyinput__placeholder-class {
font-size: 30rpx; font-size: 30rpx;
height: 36rpx; height: 36rpx;
} }
:deep(.uni-easyinput__content-input) { :deep(.uni-easyinput__content-input) {
font-size: 48rpx; font-size: 48rpx;
} }
} }
.save-btn { .save-btn {
width: 616rpx; width: 616rpx;
height: 86rpx; height: 86rpx;
line-height: 86rpx; line-height: 86rpx;
border-radius: 40rpx; border-radius: 40rpx;
margin-top: 80rpx; margin-top: 80rpx;
} }
} }
.bind-box { .bind-box {
.placeholder-text { .placeholder-text {
font-size: 26rpx; font-size: 26rpx;
color: $dark-9; color: $dark-9;
} }
.add-btn { .add-btn {
width: 100rpx; width: 100rpx;
height: 50rpx; height: 50rpx;
border-radius: 25rpx; border-radius: 25rpx;
line-height: 50rpx; line-height: 50rpx;
font-size: 22rpx; font-size: 22rpx;
color: var(--ui-BG-Main); color: var(--ui-BG-Main);
background-color: var(--ui-BG-Main-light); background-color: var(--ui-BG-Main-light);
} }
} }
.input-box { .input-box {
width: 624rpx; width: 624rpx;
height: 100rpx; height: 100rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
.unit { .unit {
font-size: 48rpx; font-size: 48rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
} }
.uni-easyinput__placeholder-class { .uni-easyinput__placeholder-class {
font-size: 30rpx; font-size: 30rpx;
} }
:deep(.uni-easyinput__content-input) { :deep(.uni-easyinput__content-input) {
font-size: 48rpx; font-size: 48rpx;
} }
} }
.save-btn { .save-btn {
width: 616rpx; width: 616rpx;
height: 86rpx; height: 86rpx;
line-height: 86rpx; line-height: 86rpx;
border-radius: 40rpx; border-radius: 40rpx;
margin-top: 80rpx; margin-top: 80rpx;
} }
} }
// //
.draw-notice { .draw-notice {
width: 684rpx; width: 684rpx;
background: #ffffff; background: #ffffff;
border: 2rpx solid #fffaee; border: 2rpx solid #fffaee;
border-radius: 20rpx; border-radius: 20rpx;
margin: 20rpx 32rpx 0 32rpx; margin: 20rpx 32rpx 0 32rpx;
padding: 30rpx; padding: 30rpx;
box-sizing: border-box; box-sizing: border-box;
.title { .title {
font-weight: 500; font-weight: 500;
color: #333333; color: #333333;
font-size: 30rpx; font-size: 30rpx;
} }
.draw-list { .draw-list {
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
line-height: 46rpx; line-height: 46rpx;
} }
} }
</style> </style>

View File

@ -1,44 +0,0 @@
import request from '@/sheep/request';
export default {
// 发起提现
withdraw: {
list: (params) =>
request({
url: 'withdraw',
method: 'GET',
params,
custom: {
auth: true,
},
}),
rules: () =>
request({
url: 'withdraw/rules',
method: 'GET',
custom: {
auth: true,
},
}),
apply: (data) =>
request({
url: '/app-api/trade/brokerage-withdraw/create',
method: 'POST',
data,
custom: {
loadingMsg: '申请中',
// auth: true,
},
}),
userGet: (params) =>
request({
url: '/app-api/trade/brokerage-user/get',
method: 'GET',
params,
// custom: {
// loadingMsg: '申请中',
// auth: true,
// },
}),
},
};

View File

@ -154,20 +154,18 @@
}, },
value(newVal) { value(newVal) {
this.dataList = this.getDataList(newVal) this.dataList = this.getDataList(newVal)
// TODO @
// fix by mehaotian is_reset uni-forms // fix by mehaotian is_reset uni-forms
// if(!this.is_reset){ if(!this.is_reset){
// this.is_reset = false this.is_reset = false
// this.formItem && this.formItem.setValue(newVal) this.formItem && this.formItem.setValue(newVal)
// } }
}, },
modelValue(newVal) { modelValue(newVal) {
this.dataList = this.getDataList(newVal); this.dataList = this.getDataList(newVal);
// TODO @ if(!this.is_reset){
// if(!this.is_reset){ this.is_reset = false
// this.is_reset = false this.formItem && this.formItem.setValue(newVal)
// this.formItem && this.formItem.setValue(newVal) }
// }
} }
}, },
data() { data() {
@ -195,22 +193,22 @@
} }
}, },
created() { created() {
// this.form = this.getForm('uniForms') this.form = this.getForm('uniForms')
// this.formItem = this.getForm('uniFormsItem') this.formItem = this.getForm('uniFormsItem')
// this.formItem && this.formItem.setValue(this.value) // this.formItem && this.formItem.setValue(this.value)
// if (this.formItem) { if (this.formItem) {
// this.isTop = 6 this.isTop = 6
// if (this.formItem.name) { if (this.formItem.name) {
// // name,formData // name,formData
// if(!this.is_reset){ if(!this.is_reset){
// this.is_reset = false this.is_reset = false
// this.formItem.setValue(this.dataValue) this.formItem.setValue(this.dataValue)
// } }
// this.rename = this.formItem.name this.rename = this.formItem.name
// this.form.inputChildrens.push(this) this.form.inputChildrens.push(this)
// } }
// } }
if (this.localdata && this.localdata.length !== 0) { if (this.localdata && this.localdata.length !== 0) {
this.isLocal = true this.isLocal = true
@ -275,7 +273,7 @@
} }
} }
} }
// this.formItem && this.formItem.setValue(detail.value) this.formItem && this.formItem.setValue(detail.value)
// TODO vue2 // TODO vue2
this.$emit('input', detail.value); this.$emit('input', detail.value);
// // TOTO vue3 // // TOTO vue3
@ -377,7 +375,7 @@
selectedArr.push(item[this.map.value]) selectedArr.push(item[this.map.value])
} }
}) })
return this.dataValue.length > 0 ? this.dataValue : selectedArr return this.dataValue && this.dataValue.length > 0 ? this.dataValue : selectedArr
}, },
/** /**
@ -386,13 +384,11 @@
setStyleBackgroud(item) { setStyleBackgroud(item) {
let styles = {} let styles = {}
let selectedColor = this.selectedColor?this.selectedColor:'#2979ff' let selectedColor = this.selectedColor?this.selectedColor:'#2979ff'
if (this.selectedColor) { if (this.mode !== 'list') {
if (this.mode !== 'list') { styles['border-color'] = item.selected?selectedColor:'#DCDFE6'
styles['border-color'] = item.selected?selectedColor:'#DCDFE6' }
} if (this.mode === 'tag') {
if (this.mode === 'tag') { styles['background-color'] = item.selected? selectedColor:'#f5f5f5'
styles['background-color'] = item.selected? selectedColor:'#f5f5f5'
}
} }
let classles = '' let classles = ''
for (let i in styles) { for (let i in styles) {
@ -403,16 +399,15 @@
setStyleIcon(item) { setStyleIcon(item) {
let styles = {} let styles = {}
let classles = '' let classles = ''
if (this.selectedColor) { let selectedColor = this.selectedColor?this.selectedColor:'#2979ff'
let selectedColor = this.selectedColor?this.selectedColor:'#2979ff' styles['background-color'] = item.selected?selectedColor:'#fff'
styles['background-color'] = item.selected?selectedColor:'#fff' styles['border-color'] = item.selected?selectedColor:'#DCDFE6'
styles['border-color'] = item.selected?selectedColor:'#DCDFE6'
if(!item.selected && item.disabled){ if(!item.selected && item.disabled){
styles['background-color'] = '#F2F6FC' styles['background-color'] = '#F2F6FC'
styles['border-color'] = item.selected?selectedColor:'#DCDFE6' styles['border-color'] = item.selected?selectedColor:'#DCDFE6'
}
} }
for (let i in styles) { for (let i in styles) {
classles += `${i}:${styles[i]};` classles += `${i}:${styles[i]};`
} }
@ -421,17 +416,16 @@
setStyleIconText(item) { setStyleIconText(item) {
let styles = {} let styles = {}
let classles = '' let classles = ''
if (this.selectedColor) { let selectedColor = this.selectedColor?this.selectedColor:'#2979ff'
let selectedColor = this.selectedColor?this.selectedColor:'#2979ff' if (this.mode === 'tag') {
if (this.mode === 'tag') { styles.color = item.selected?(this.selectedTextColor?this.selectedTextColor:'#fff'):'#666'
styles.color = item.selected?(this.selectedTextColor?this.selectedTextColor:'#fff'):'#666' } else {
} else { styles.color = item.selected?(this.selectedTextColor?this.selectedTextColor:selectedColor):'#666'
styles.color = item.selected?(this.selectedTextColor?this.selectedTextColor:selectedColor):'#666'
}
if(!item.selected && item.disabled){
styles.color = '#999'
}
} }
if(!item.selected && item.disabled){
styles.color = '#999'
}
for (let i in styles) { for (let i in styles) {
classles += `${i}:${styles[i]};` classles += `${i}:${styles[i]};`
} }
@ -454,7 +448,7 @@
</script> </script>
<style lang="scss"> <style lang="scss">
$uni-primary: #2979ff !default; $checked-color: #2979ff;
$border-color: #DCDFE6; $border-color: #DCDFE6;
$disable:0.4; $disable:0.4;
@ -620,8 +614,8 @@
// //
&.is-checked { &.is-checked {
.checkbox__inner { .checkbox__inner {
border-color: $uni-primary; border-color: $checked-color;
background-color: $uni-primary; background-color: $checked-color;
.checkbox__inner-icon { .checkbox__inner-icon {
opacity: 1; opacity: 1;
@ -629,14 +623,14 @@
} }
} }
.radio__inner { .radio__inner {
border-color: $uni-primary; border-color: $checked-color;
.radio__inner-icon { .radio__inner-icon {
opacity: 1; opacity: 1;
background-color: $uni-primary; background-color: $checked-color;
} }
} }
.checklist-text { .checklist-text {
color: $uni-primary; color: $checked-color;
} }
// //
&.is-disable { &.is-disable {
@ -689,10 +683,10 @@
} }
&.is-checked { &.is-checked {
border-color: $uni-primary; border-color: $checked-color;
.checkbox__inner { .checkbox__inner {
border-color: $uni-primary; border-color: $checked-color;
background-color: $uni-primary; background-color: $checked-color;
.checkbox__inner-icon { .checkbox__inner-icon {
opacity: 1; opacity: 1;
transform: rotate(45deg); transform: rotate(45deg);
@ -700,16 +694,16 @@
} }
.radio__inner { .radio__inner {
border-color: $uni-primary; border-color: $checked-color;
.radio__inner-icon { .radio__inner-icon {
opacity: 1; opacity: 1;
background-color: $uni-primary; background-color: $checked-color;
} }
} }
.checklist-text { .checklist-text {
color: $uni-primary; color: $checked-color;
} }
// //
@ -741,8 +735,8 @@
} }
&.is-checked { &.is-checked {
background-color: $uni-primary; background-color: $checked-color;
border-color: $uni-primary; border-color: $checked-color;
.checklist-text { .checklist-text {
color: #fff; color: #fff;
@ -781,8 +775,8 @@
&.is-checked { &.is-checked {
.checkbox__inner { .checkbox__inner {
border-color: $uni-primary; border-color: $checked-color;
background-color: $uni-primary; background-color: $checked-color;
.checkbox__inner-icon { .checkbox__inner-icon {
opacity: 1; opacity: 1;
@ -795,13 +789,13 @@
} }
} }
.checklist-text { .checklist-text {
color: $uni-primary; color: $checked-color;
} }
.checklist-content { .checklist-content {
.checkobx__list { .checkobx__list {
opacity: 1; opacity: 1;
border-color: $uni-primary; border-color: $checked-color;
} }
} }