2021-06-28 18:04:17 +08:00
|
|
|
<template>
|
|
|
|
<view>
|
|
|
|
<view class="-list">
|
2023-03-08 22:01:02 +08:00
|
|
|
<view class="title">提现类型</view>
|
2021-06-28 18:04:17 +08:00
|
|
|
<view class="content">
|
|
|
|
<view class="price">
|
2023-03-08 22:01:02 +08:00
|
|
|
<u-input disabled :value="type === 'ALI' ? '支付宝' : '微信'" placeholder="" />
|
2021-06-28 18:04:17 +08:00
|
|
|
</view>
|
2023-03-08 22:01:02 +08:00
|
|
|
</view>
|
2021-06-28 18:04:17 +08:00
|
|
|
</view>
|
2023-03-08 22:01:02 +08:00
|
|
|
<view class="-list">
|
|
|
|
<view class="title">提现金额</view>
|
|
|
|
<view class="content">
|
|
|
|
<view class="price">
|
|
|
|
<span> ¥</span>
|
|
|
|
<u-input v-model="price" placeholder="" type="number" />
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="all">
|
|
|
|
<view @click="handleAll" :style="{ color: $mainColor }">全部</view>
|
|
|
|
<view style="font-size: 24rpx; color: #999">可提现金额<span>{{ walletNum | unitPrice }}</span>元</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<view class="tips">
|
|
|
|
最低提现金额为 {{ minPrice }} 元
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="-list" v-if="type === 'ALI'">
|
|
|
|
<view class="title">真实姓名</view>
|
|
|
|
<view class="content">
|
|
|
|
<view class="price">
|
|
|
|
<u-input v-model="realName" placeholder="" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="-list" v-if="type === 'ALI'">
|
|
|
|
<view class="title">第三方登录账号</view>
|
|
|
|
<view class="content">
|
|
|
|
<view class="price">
|
|
|
|
<u-input v-model="connectNumber" placeholder="" />
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
2021-06-28 18:04:17 +08:00
|
|
|
|
|
|
|
<view class="submit" @click="cashd">提现</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
<script>
|
2023-03-08 22:01:02 +08:00
|
|
|
import { getUserWallet, withdrawalApply, withdrawalSettingVO } from "@/api/members";
|
2021-06-28 18:04:17 +08:00
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
price: 0,
|
|
|
|
walletNum: 0,
|
2023-03-08 22:01:02 +08:00
|
|
|
minPrice: 0,
|
|
|
|
type: '',
|
|
|
|
connectNumber: '',
|
|
|
|
realName: ''
|
2021-06-28 18:04:17 +08:00
|
|
|
};
|
|
|
|
},
|
|
|
|
async mounted() {
|
|
|
|
let result = await getUserWallet(); //预存款
|
2023-03-08 22:01:02 +08:00
|
|
|
let res = await withdrawalSettingVO();
|
2021-06-28 18:04:17 +08:00
|
|
|
this.walletNum = result.data.result.memberWallet;
|
2023-03-08 22:01:02 +08:00
|
|
|
this.minPrice = res.data.result.minPrice;
|
|
|
|
this.type = res.data.result.type;
|
2021-06-28 18:04:17 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
cashd() {
|
|
|
|
this.price = this.price + "";
|
|
|
|
|
|
|
|
if (this.$u.test.amount(parseInt(this.price))) {
|
2023-03-08 22:01:02 +08:00
|
|
|
let params = { price: this.price };
|
|
|
|
if (this.type === 'ALI') {
|
|
|
|
if (!this.connectNumber || !this.realName) {
|
|
|
|
uni.showToast({
|
|
|
|
title: "请输入真实姓名和第三方登录账号",
|
|
|
|
duration: 2000,
|
|
|
|
icon: "none",
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
params.connectNumber = this.connectNumber;
|
|
|
|
params.realName = this.realName;
|
|
|
|
}
|
|
|
|
withdrawalApply(params).then((res) => {
|
2021-06-28 18:04:17 +08:00
|
|
|
if (res.data.success) {
|
|
|
|
uni.showToast({
|
|
|
|
title: "提现成功!",
|
|
|
|
duration: 2000,
|
|
|
|
icon: "none",
|
|
|
|
});
|
|
|
|
setTimeout(() => {
|
|
|
|
uni.navigateBack({
|
|
|
|
delta: 1,
|
|
|
|
});
|
|
|
|
}, 1000);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
title: "请输入正确金额",
|
|
|
|
duration: 2000,
|
|
|
|
icon: "none",
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
handleAll() {
|
|
|
|
this.price = this.walletNum;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import "./style.scss";
|
2021-08-19 16:20:21 +08:00
|
|
|
.tips {
|
|
|
|
font-size: 24rpx;
|
|
|
|
color: #999;
|
|
|
|
}
|
2021-06-28 18:04:17 +08:00
|
|
|
</style>
|