|
@@ -0,0 +1,280 @@
|
|
|
+<template>
|
|
|
+ <view class="box">
|
|
|
+ <view class="tixiancs">
|
|
|
+ <view class="tixiancsLeft">本月已提现2次</view>
|
|
|
+ <view class="tixiancsRight">提现明细</view>
|
|
|
+ </view>
|
|
|
+ <view class="header">
|
|
|
+ <view class="title">提现金额</view>
|
|
|
+ <view class="moneyView">
|
|
|
+ <text class="icon">¥</text>
|
|
|
+ <input type="digit" class="moneyInput" placeholder-style="color:#999999; font-size:30rpx"
|
|
|
+ placeholder="请输入提现金额" v-model="money" @input="inputValue" />
|
|
|
+ <view class="allBtn" @click="allBtn">全部提现</view>
|
|
|
+ </view>
|
|
|
+ <view class="zongMoney">可提现金额: <span style="color: #FF0000;">¥666</span> (冻结金额:20.00) </view>
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="tishi" style="padding: 20rpx 44rpx;">
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="sureBtn" @click="sure">申请提现</view>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ okMoney: '',
|
|
|
+ money: '',
|
|
|
+ name: '',
|
|
|
+ account: '',
|
|
|
+ detailData: {},
|
|
|
+ couContent: '', //提现规则
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ this.getDetailData()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getDetailData() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ })
|
|
|
+ let url = 'worldKeepCar/worldDistribution/queryDistributionIndexDetail',
|
|
|
+ params = {
|
|
|
+
|
|
|
+ }
|
|
|
+ this.$http(url, params, 'GET').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ var data = res.data
|
|
|
+
|
|
|
+
|
|
|
+ // 处理 undefined和null转为空白字符串
|
|
|
+
|
|
|
+ for (const key in data) {
|
|
|
+ data[key] = this.$praseStrEmpty(data[key])
|
|
|
+ }
|
|
|
+
|
|
|
+ this.detailData = data
|
|
|
+ this.okMoney = this.detailData.cantidatMoney
|
|
|
+ if (this.detailData.tSSetting.withdrawalRules) {
|
|
|
+ this.couContent = this.detailData.tSSetting.withdrawalRules.replace(/\<p/gi,
|
|
|
+ '<p style="display: inline-block"');
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ inputValue(event) {
|
|
|
+ if (event.detail.value < 0) {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.money = 0; // 解决
|
|
|
+ }, 0)
|
|
|
+ } else {
|
|
|
+ this.money = event.detail.value;
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ allBtn() {
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.money = this.okMoney; // 解决
|
|
|
+ }, 0)
|
|
|
+
|
|
|
+
|
|
|
+ console.log('money,allmoney', this.money, this.okMoney);
|
|
|
+ },
|
|
|
+ sure() {
|
|
|
+ if (this.money > this.okMoney) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '提现金额不能大于可提现金额',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.money <= 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '提现金额不能为空',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.name) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '姓名不能为空',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.account) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '支付宝账户不能为空',
|
|
|
+ icon: 'none',
|
|
|
+ duration: 3000,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.postData();
|
|
|
+ },
|
|
|
+ postData() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '提现中'
|
|
|
+ })
|
|
|
+ let url = 'worldKeepCar/worldDistribution/applyWithdrawal',
|
|
|
+ params = {
|
|
|
+ money: this.money,
|
|
|
+ aliName: this.name,
|
|
|
+ aliPhone: this.account,
|
|
|
+ }
|
|
|
+ this.$http(url, params, 'POST').then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ uni.showModal({
|
|
|
+ title: '提交成功',
|
|
|
+ content: '请耐心等待平台审核',
|
|
|
+ showCancel:false,
|
|
|
+ confirmText:'知道了',
|
|
|
+ success: function(res) {
|
|
|
+
|
|
|
+ uni.navigateBack({
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style>
|
|
|
+ .box {
|
|
|
+ min-height: 100vh;
|
|
|
+ background: #F4F5F7;
|
|
|
+ padding-top: 20rpx;
|
|
|
+ }
|
|
|
+.tixiancs{
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ font-size: 24rpx;
|
|
|
+ padding-left: 24rpx;
|
|
|
+ padding-right: 24rpx;
|
|
|
+ padding-bottom: 20rpx;
|
|
|
+}
|
|
|
+.tixiancsLeft{
|
|
|
+ color: #999999;
|
|
|
+}
|
|
|
+.tixiancsRight{
|
|
|
+ color: #1677FF;
|
|
|
+}
|
|
|
+ .header {
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ margin: 0 24rpx;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ padding: 30rpx 20rpx;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #3C3C3C;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .moneyView {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin: 15rpx 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .icon {
|
|
|
+ font-size: 50rpx;
|
|
|
+ color: #222222;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .moneyInput {
|
|
|
+ font-size: 70rpx;
|
|
|
+ color: #222222;
|
|
|
+ font-weight: bold;
|
|
|
+ /* flex-grow: 1; */
|
|
|
+ height: 98rpx;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .allBtn {
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #FF0000;
|
|
|
+ width: 200rpx;
|
|
|
+ height: 50rpx;
|
|
|
+ line-height: 50rpx;
|
|
|
+ margin-left: 10rpx;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ .zongMoney {
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #999999;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .line {
|
|
|
+
|
|
|
+ background-color: #EEEEEE;
|
|
|
+ height: 1rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .name {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ padding: 28rpx 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .leftTitle {
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #3C3C3C;
|
|
|
+ margin-right: 90rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .Input {
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #333333;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .tishi {
|
|
|
+ padding: 0 44rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #999999;
|
|
|
+ line-height: 1.5;
|
|
|
+ }
|
|
|
+
|
|
|
+ .sureBtn {
|
|
|
+ width: 690rpx;
|
|
|
+ margin: 20rpx 30rpx;
|
|
|
+ border-radius: 37rpx;
|
|
|
+ height: 74rpx;
|
|
|
+
|
|
|
+ background: linear-gradient(124deg, #FF8700 0%, #FF4F00 100%);
|
|
|
+ color: #FFFFFF;
|
|
|
+ font-size: 30rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 74rpx;
|
|
|
+ }
|
|
|
+</style>
|