优化体现页面弹窗
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<up-navbar title="申请提现" :autoBack="true" bgColor="rgb(255, 117, 129)" leftIconColor="#FFF"
|
<up-navbar title="申请提现" :autoBack="true" bgColor="rgb(255, 117, 129)" leftIconColor="#FFF" :titleStyle="{ color: '#FFF' }">
|
||||||
:titleStyle="{color:'#FFF'}">
|
|
||||||
<template #right>
|
<template #right>
|
||||||
<view class="u-p-r-30 u-flex u-col-center" style="color: #fff;">
|
<view class="u-p-r-30 u-flex u-col-center" style="color: #fff">
|
||||||
<text class="rule-btn" @click="showRule">规则</text>
|
<text class="rule-btn" @click="showRule">规则</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -13,26 +12,25 @@
|
|||||||
<view class="title">可提现总额</view>
|
<view class="title">可提现总额</view>
|
||||||
<view class="mayMoney">¥ {{ data.mayMoney }}</view>
|
<view class="mayMoney">¥ {{ data.mayMoney }}</view>
|
||||||
<view class="val" style="">
|
<view class="val" style="">
|
||||||
<view style="display: flex;flex-direction: row;padding: 20upx;">
|
<view style="display: flex; flex-direction: row; padding: 20upx">
|
||||||
<view style="font-size: 32upx;color: #333333;">提现金额</view>
|
<view style="font-size: 32upx; color: #333333">提现金额</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="input" style="">
|
<view class="input" style="">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex; align-items: center">
|
||||||
<view style="font-size: 40upx;color: #333333;">¥</view>
|
<view style="font-size: 40upx; color: #333333">¥</view>
|
||||||
<input type="digit" v-model="data.money" placeholder="请输入金额" @input="moneyInput"
|
<input
|
||||||
style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
|
type="digit"
|
||||||
|
v-model="data.money"
|
||||||
|
placeholder="请输入金额"
|
||||||
|
@input="moneyInput"
|
||||||
|
style="font-size: 32rpx; color: #333333; text-align: left; margin-left: 10rpx; width: 80%"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="allbtn" @click="setAllMoney">
|
<view class="allbtn" @click="setAllMoney">全部</view>
|
||||||
全部
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="witBtn" @click="goWithdraw">{{ data.isWithdraw ? '立即提现' : '观看广告提现' }}</view>
|
<view class="witBtn" @click="goWithdraw">{{ data.isWithdraw ? '立即提现' : '观看广告提现' }}</view>
|
||||||
<view style="color: #666;" @click="WithdrawalAlipay">
|
<view style="color: #666" @click="WithdrawalAlipay">提现到支付宝</view>
|
||||||
提现到支付宝
|
|
||||||
</view>
|
|
||||||
<view class="tab" style="">
|
<view class="tab" style="">
|
||||||
<view @click="linkTo('/pages/me/withdraw/realName')">实名认证</view>
|
<view @click="linkTo('/pages/me/withdraw/realName')">实名认证</view>
|
||||||
<!-- <view @click="linkTo('/pages/me/withdraw/alipay')">提现账号</view> -->
|
<!-- <view @click="linkTo('/pages/me/withdraw/alipay')">提现账号</view> -->
|
||||||
@@ -42,60 +40,68 @@
|
|||||||
<view class="moneyList u-p-b-30">
|
<view class="moneyList u-p-b-30">
|
||||||
<view v-if="data.list.length" v-for="(item, index) in data.list" :key="index" class="item">
|
<view v-if="data.list.length" v-for="(item, index) in data.list" :key="index" class="item">
|
||||||
<view>
|
<view>
|
||||||
<view style="margin-bottom: 8upx;text-align: right;">
|
<view style="margin-bottom: 8upx; text-align: right">
|
||||||
<text style="margin-bottom: 8upx; color: green" v-if="item.state === 1">提现成功</text>
|
<text style="margin-bottom: 8upx; color: green" v-if="item.state === 1">提现成功</text>
|
||||||
<text style="margin-bottom: 8upx;color: green" v-if="item.state===0||item.state==3">
|
<text style="margin-bottom: 8upx; color: green" v-if="item.state === 0 || item.state == 3">提现中</text>
|
||||||
提现中</text>
|
<text style="margin-bottom: 8upx; color: #fd6416" v-if="item.state === -1 || item.state === 2">提现失败</text>
|
||||||
<text style="margin-bottom: 8upx;color: #FD6416" v-if="item.state===-1||item.state===2">
|
|
||||||
提现失败
|
|
||||||
</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view style="color: #999999;font-size: 28upx;">
|
<view style="color: #999999; font-size: 28upx">
|
||||||
<view style="margin-bottom: 8upx">收款人账号:{{ item.zhifubao }}</view>
|
<view style="margin-bottom: 8upx">收款人账号:{{ item.zhifubao }}</view>
|
||||||
<view style="margin-bottom: 8upx">收款人姓名:{{ item.zhifubaoName }}</view>
|
<view style="margin-bottom: 8upx">收款人姓名:{{ item.zhifubaoName }}</view>
|
||||||
<view style="margin-bottom: 8upx">发起时间:{{ item.createAt }}</view>
|
<view style="margin-bottom: 8upx">发起时间:{{ item.createAt }}</view>
|
||||||
<view style="margin-bottom: 8upx" v-if="item.state === 1">成功时间 {{ item.outAt }}</view>
|
<view style="margin-bottom: 8upx" v-if="item.state === 1">成功时间 {{ item.outAt }}</view>
|
||||||
<view style="margin-bottom: 8upx;color: #FD6416" v-if="item.state===-1||item.state===2">
|
<view style="margin-bottom: 8upx; color: #fd6416" v-if="item.state === -1 || item.state === 2">失败原因:{{ item.refund }}</view>
|
||||||
失败原因:{{ item.refund }}
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view style="margin-bottom: 8upx;text-align: right;">
|
<view style="margin-bottom: 8upx; text-align: right">
|
||||||
<!-- 提现金额: -->
|
<!-- 提现金额: -->
|
||||||
<text style="color: #FD6416;font-size: 32upx;font-weight: 600"> ¥{{ item.money }}</text>
|
<text style="color: #fd6416; font-size: 32upx; font-weight: 600">¥{{ item.money }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<emprty-card v-if="!data.list.length" />
|
<emprty-card v-if="!data.list.length" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<up-modal
|
||||||
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title="data.rule_title"
|
:show="data.ruleShow"
|
||||||
:title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)">
|
confirm-text="知道了"
|
||||||
|
title="规则说明"
|
||||||
|
:title="data.rule_title"
|
||||||
|
:title-style="{ fontWeight: '700' }"
|
||||||
|
@confirm="ruleConfirm"
|
||||||
|
confirm-color="rgb(255, 117, 129)"
|
||||||
|
>
|
||||||
<view class="u-p-30 u-text-left">
|
<view class="u-p-30 u-text-left">
|
||||||
<scroll-view scroll-y="true" style="max-height: 50vh;">
|
<scroll-view scroll-y="true" style="max-height: 50vh">
|
||||||
<rich-text style="text-align: justify;font-size: 18px;color: #666;"
|
<!-- #ifdef APP -->
|
||||||
:nodes="data.rule_content"></rich-text>
|
<rich-text style="text-align: justify; font-size: 18px; color: #666" :nodes="data.rule_content"></rich-text>
|
||||||
|
<!-- #endif -->
|
||||||
|
<!-- #ifdef H5 -->
|
||||||
|
<view v-html="data.rule_content"></view>
|
||||||
|
<!-- #endif -->
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</up-modal>
|
</up-modal>
|
||||||
|
<view style="width: 0; height: 0; overflow: hidden">
|
||||||
<view style="width: 0;height: 0;overflow: hidden;">
|
|
||||||
<!-- 激励视频广告 -->
|
<!-- 激励视频广告 -->
|
||||||
<ad-rewarded-video ref="adRewardedw" :adpid="data.adpid" :loadnext="true" :url-callback="data.urlCallback"
|
<ad-rewarded-video
|
||||||
@load="onadload" @close="onadclose" @error="onaderror">
|
ref="adRewardedw"
|
||||||
</ad-rewarded-video>
|
:adpid="data.adpid"
|
||||||
|
:loadnext="true"
|
||||||
|
:url-callback="data.urlCallback"
|
||||||
|
@load="onadload"
|
||||||
|
@close="onadclose"
|
||||||
|
@error="onaderror"
|
||||||
|
></ad-rewarded-video>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, nextTick, ref } from 'vue';
|
import { reactive, nextTick, ref } from 'vue';
|
||||||
import { onReady,onLoad,onShow,onLaunch,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
import { onReady, onLoad, onShow, onLaunch, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
|
||||||
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
|
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
|
||||||
import { selectUserById } from '@/api/user/user.js';
|
import { selectUserById } from '@/api/user/user.js';
|
||||||
import { announcement } from '@/api/index/index.js';
|
import { announcement } from '@/api/index/index.js';
|
||||||
@@ -104,8 +110,8 @@
|
|||||||
|
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
ruleShow: false,
|
ruleShow: false,
|
||||||
rule_title: "",
|
rule_title: '',
|
||||||
rule_content: "",
|
rule_content: '',
|
||||||
money: '',
|
money: '',
|
||||||
mayMoney: '0',
|
mayMoney: '0',
|
||||||
list: [],
|
list: [],
|
||||||
@@ -122,7 +128,7 @@
|
|||||||
userInfo: null,
|
userInfo: null,
|
||||||
ruleIndex: 0,
|
ruleIndex: 0,
|
||||||
ruleList: []
|
ruleList: []
|
||||||
})
|
});
|
||||||
|
|
||||||
const adRewardedw = ref(null);
|
const adRewardedw = ref(null);
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
@@ -130,47 +136,51 @@
|
|||||||
// data.adpid = 1531580352
|
// data.adpid = 1531580352
|
||||||
// }
|
// }
|
||||||
// if ( uni.getSystemInfoSync().platform == 'ios' ) {
|
// if ( uni.getSystemInfoSync().platform == 'ios' ) {
|
||||||
data.adpid = 1373604770
|
data.adpid = 1373604770;
|
||||||
// }
|
// }
|
||||||
getExtractFei();
|
getExtractFei();
|
||||||
getMoneyDetail();
|
getMoneyDetail();
|
||||||
getCanCash()
|
getCanCash();
|
||||||
announcement({
|
announcement({
|
||||||
type: 1
|
type: 1
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
data.ruleList = res
|
data.ruleList = res;
|
||||||
|
ruleInit();
|
||||||
ruleInit()
|
});
|
||||||
|
});
|
||||||
})
|
|
||||||
})
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getcashMoney()
|
getcashMoney();
|
||||||
getUserInfo();
|
getUserInfo();
|
||||||
})
|
});
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
data.adRewardedVideoloadNum = 0
|
data.adRewardedVideoloadNum = 0;
|
||||||
adRewardedw.value.load();
|
adRewardedw.value.load();
|
||||||
data.ruleShow = true
|
});
|
||||||
})
|
});
|
||||||
})
|
|
||||||
|
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
if (data.page * data.limit < data.totalCount) {
|
if (data.page * data.limit < data.totalCount) {
|
||||||
data.page = data.page + 1;
|
data.page = data.page + 1;
|
||||||
getMoneyDetail();
|
getMoneyDetail();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
onPullDownRefresh(() => {
|
onPullDownRefresh(() => {
|
||||||
data.page = 1;
|
data.page = 1;
|
||||||
data.list = []
|
data.list = [];
|
||||||
getMoneyDetail();
|
getMoneyDetail();
|
||||||
})
|
});
|
||||||
function ruleInit(){
|
async function ruleInit() {
|
||||||
data.rule_content = ""
|
data.rule_content = '';
|
||||||
data.rule_title = data.ruleList[data.ruleIndex].title
|
data.rule_title = data.ruleList[data.ruleIndex].title;
|
||||||
data.rule_content = data.ruleList[data.ruleIndex].content
|
data.rule_content = data.ruleList[data.ruleIndex].content;
|
||||||
|
|
||||||
|
console.log('data', data);
|
||||||
|
console.log('title', data.ruleList[data.ruleIndex].title);
|
||||||
|
console.log('content', data.ruleList[data.ruleIndex].content);
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
data.ruleShow = true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 规则弹窗打开
|
* 规则弹窗打开
|
||||||
@@ -178,35 +188,35 @@
|
|||||||
function showRule() {
|
function showRule() {
|
||||||
if (data.ruleList.length <= 0) {
|
if (data.ruleList.length <= 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "暂未配置规则",
|
title: '暂未配置规则',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ruleInit()
|
ruleInit();
|
||||||
data.ruleShow = true
|
data.ruleShow = true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 规则确认
|
* 规则确认
|
||||||
*/
|
*/
|
||||||
function ruleConfirm() {
|
function ruleConfirm() {
|
||||||
console.log(1)
|
console.log(1);
|
||||||
data.ruleShow = false
|
data.ruleShow = false;
|
||||||
data.ruleIndex++
|
data.ruleIndex++;
|
||||||
if (data.ruleIndex >= data.ruleList.length) {
|
if (data.ruleIndex >= data.ruleList.length) {
|
||||||
data.ruleIndex = 0
|
data.ruleIndex = 0;
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
setTimeout(res => {
|
setTimeout((res) => {
|
||||||
ruleInit()
|
ruleInit();
|
||||||
data.ruleShow = true
|
data.ruleShow = true;
|
||||||
}, 300)
|
}, 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUserInfo() {
|
function getUserInfo() {
|
||||||
selectUserById().then(res => {
|
selectUserById().then((res) => {
|
||||||
data.userInfo = res;
|
data.userInfo = res;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function WithdrawalAlipay() {
|
function WithdrawalAlipay() {
|
||||||
@@ -215,53 +225,52 @@
|
|||||||
withdraw({
|
withdraw({
|
||||||
amount: data.money,
|
amount: data.money,
|
||||||
isAlipay: 1
|
isAlipay: 1
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
data.money = ''
|
data.money = '';
|
||||||
uni.setStorageSync('adRewardedNum', 0)
|
uni.setStorageSync('adRewardedNum', 0);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
getcashMoney()
|
getcashMoney();
|
||||||
}, 1500)
|
}, 1500);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "请输入金额",
|
title: '请输入金额',
|
||||||
icon: 'none',
|
icon: 'none'
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "请绑定支付宝",
|
title: '请绑定支付宝',
|
||||||
icon: 'none',
|
icon: 'none'
|
||||||
})
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 未绑定信息
|
// 未绑定信息
|
||||||
linkTo('/pages/me/withdraw/alipay')
|
linkTo('/pages/me/withdraw/alipay');
|
||||||
}, 1500)
|
}, 1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function back() {
|
function back() {
|
||||||
uni.navigateBack()
|
uni.navigateBack();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取看广告状态
|
* 获取看广告状态
|
||||||
*/
|
*/
|
||||||
async function getCanCash() {
|
async function getCanCash() {
|
||||||
canCash().then(res => {
|
canCash().then((res) => {
|
||||||
data.isWithdraw = res;
|
data.isWithdraw = res;
|
||||||
console.log(res)
|
console.log(res);
|
||||||
if (uni.getStorageSync('adRewardedNum') >= 3) {
|
if (uni.getStorageSync('adRewardedNum') >= 3) {
|
||||||
data.isWithdraw = true;
|
data.isWithdraw = true;
|
||||||
// uni.setStorageSync('adRewardedNum',0)
|
// uni.setStorageSync('adRewardedNum',0)
|
||||||
} else {
|
} else {
|
||||||
uni.setStorageSync('adRewardedNum', ((uni.getStorageSync('adRewardedNum') || 0) + 1))
|
uni.setStorageSync('adRewardedNum', (uni.getStorageSync('adRewardedNum') || 0) + 1);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 广告数据加载成功回调
|
* 广告数据加载成功回调
|
||||||
@@ -269,7 +278,7 @@
|
|||||||
*/
|
*/
|
||||||
function onadload(e) {
|
function onadload(e) {
|
||||||
data.adRewardedShow = true;
|
data.adRewardedShow = true;
|
||||||
uni.setStorageSync('adRewardedNum', 0)
|
uni.setStorageSync('adRewardedNum', 0);
|
||||||
console.log('广告数据加载成功');
|
console.log('广告数据加载成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,13 +288,13 @@
|
|||||||
*/
|
*/
|
||||||
function onaderror(e) {
|
function onaderror(e) {
|
||||||
if (data.adRewardedVideoloadNum >= 3) {
|
if (data.adRewardedVideoloadNum >= 3) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
data.adRewardedVideoloadNum++
|
data.adRewardedVideoloadNum++;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
adRewardedw.value.load();
|
adRewardedw.value.load();
|
||||||
}, 1000); // 10
|
}, 1000); // 10
|
||||||
console.log("广告加载失败", e)
|
console.log('广告加载失败', e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -293,24 +302,24 @@
|
|||||||
* @param {Object} e
|
* @param {Object} e
|
||||||
*/
|
*/
|
||||||
async function onadclose(e) {
|
async function onadclose(e) {
|
||||||
const detail = e.detail
|
const detail = e.detail;
|
||||||
if (detail && detail.isEnded) {
|
if (detail && detail.isEnded) {
|
||||||
// 正常播放结束
|
// 正常播放结束
|
||||||
console.log(data.urlCallback.extra)
|
console.log(data.urlCallback.extra);
|
||||||
let res = await state({
|
let res = await state({
|
||||||
extraKey: data.urlCallback.extra
|
extraKey: data.urlCallback.extra
|
||||||
})
|
});
|
||||||
console.log(res)
|
console.log(res);
|
||||||
uni.setStorageSync('adRewardedNum', 0)
|
uni.setStorageSync('adRewardedNum', 0);
|
||||||
getCanCash()
|
getCanCash();
|
||||||
} else {
|
} else {
|
||||||
// 播放中途退出
|
// 播放中途退出
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onNavigationBarButtonTap() {
|
function onNavigationBarButtonTap() {
|
||||||
console.log(1)
|
console.log(1);
|
||||||
data.ruleShow = true
|
data.ruleShow = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -323,17 +332,16 @@
|
|||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '广告加载失败,请稍后重试'
|
title: '广告加载失败,请稍后重试'
|
||||||
});
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
data.urlCallback = {
|
data.urlCallback = {
|
||||||
userId: uni.getStorageSync('userInfo').userId,
|
userId: uni.getStorageSync('userInfo').userId,
|
||||||
extra: 'cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
|
extra: 'cash:' + uni.getStorageSync('userInfo').userId + '' + new Date().getTime()
|
||||||
}
|
};
|
||||||
adRewardedw.value.show();
|
adRewardedw.value.show();
|
||||||
} else {
|
} else {
|
||||||
getOut()
|
getOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function moneyInput(e) {
|
function moneyInput(e) {
|
||||||
@@ -344,7 +352,7 @@
|
|||||||
* 全部提现赋值
|
* 全部提现赋值
|
||||||
*/
|
*/
|
||||||
function setAllMoney() {
|
function setAllMoney() {
|
||||||
data.money = getMoneys(data.mayMoney)
|
data.money = getMoneys(data.mayMoney);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -354,24 +362,24 @@
|
|||||||
* 保留两位小数&不四舍五入
|
* 保留两位小数&不四舍五入
|
||||||
*/
|
*/
|
||||||
function getMoneys(money) {
|
function getMoneys(money) {
|
||||||
if (!money || isNaN(money)) return "0.00";
|
if (!money || isNaN(money)) return '0.00';
|
||||||
let num = parseFloat(money + '') + '';
|
let num = parseFloat(money + '') + '';
|
||||||
num = parseInt(money * 100 + '') / 100 + ''
|
num = parseInt(money * 100 + '') / 100 + '';
|
||||||
|
|
||||||
let reg = /(-?\d+)(\d{4})/;
|
let reg = /(-?\d+)(\d{4})/;
|
||||||
while (reg.test(num)) {
|
while (reg.test(num)) {
|
||||||
num = num.replace(reg, "$1,$2");
|
num = num.replace(reg, '$1,$2');
|
||||||
}
|
}
|
||||||
|
|
||||||
let idx = num.indexOf('.')
|
let idx = num.indexOf('.');
|
||||||
if (idx === -1) {
|
if (idx === -1) {
|
||||||
num = num + '.00'
|
num = num + '.00';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx > 0) {
|
if (idx > 0) {
|
||||||
let num_per = num.substring(0, idx) + '.'
|
let num_per = num.substring(0, idx) + '.';
|
||||||
let num_next = num.substring(idx + 1).padEnd(2, '0')
|
let num_next = num.substring(idx + 1).padEnd(2, '0');
|
||||||
num = num_per + num_next
|
num = num_per + num_next;
|
||||||
}
|
}
|
||||||
|
|
||||||
return num;
|
return num;
|
||||||
@@ -384,7 +392,7 @@
|
|||||||
selectPayDetails({
|
selectPayDetails({
|
||||||
page: data.page,
|
page: data.page,
|
||||||
limit: data.limit
|
limit: data.limit
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
data.totalCount = res.totalCount;
|
data.totalCount = res.totalCount;
|
||||||
if (res.list.length > 0) {
|
if (res.list.length > 0) {
|
||||||
data.list = [...data.list, ...res.list];
|
data.list = [...data.list, ...res.list];
|
||||||
@@ -392,14 +400,14 @@
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
}, 500);
|
}, 500);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取最低提现金额
|
* 获取最低提现金额
|
||||||
*/
|
*/
|
||||||
function getExtractFei() {
|
function getExtractFei() {
|
||||||
commonType(112).then(res => {
|
commonType(112).then((res) => {
|
||||||
if (res && res.value) {
|
if (res && res.value) {
|
||||||
data.cashMoney = res.value;
|
data.cashMoney = res.value;
|
||||||
}
|
}
|
||||||
@@ -410,9 +418,9 @@
|
|||||||
* 可提现金额
|
* 可提现金额
|
||||||
*/
|
*/
|
||||||
function getcashMoney() {
|
function getcashMoney() {
|
||||||
selectUserMoney().then(res => {
|
selectUserMoney().then((res) => {
|
||||||
data.mayMoney = getMoneys(res.amount) || 0
|
data.mayMoney = getMoneys(res.amount) || 0;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -431,34 +439,34 @@
|
|||||||
});
|
});
|
||||||
withdraw({
|
withdraw({
|
||||||
amount: data.money
|
amount: data.money
|
||||||
}).then(res => {
|
})
|
||||||
console.log(res)
|
.then((res) => {
|
||||||
data.money = ''
|
console.log(res);
|
||||||
uni.setStorageSync('adRewardedNum', 0)
|
data.money = '';
|
||||||
|
uni.setStorageSync('adRewardedNum', 0);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
getcashMoney()
|
getcashMoney();
|
||||||
}, 1500)
|
}, 1500);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
});
|
||||||
})
|
})
|
||||||
}).catch(res => {
|
.catch((res) => {
|
||||||
if (res.code == 9991) {
|
if (res.code == 9991) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
});
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
linkTo('/pages/me/withdraw/alipay')
|
linkTo('/pages/me/withdraw/alipay');
|
||||||
}, 1500)
|
}, 1500);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOut() {
|
function getOut() {
|
||||||
|
|
||||||
if (!/^\d+(\.\d{1,2})?$/.test(data.money)) {
|
if (!/^\d+(\.\d{1,2})?$/.test(data.money)) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -469,52 +477,55 @@
|
|||||||
if (!data.userInfo.accountNo) {
|
if (!data.userInfo.accountNo) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: "请先实名认证"
|
title: '请先实名认证'
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
linkTo('/pages/me/withdraw/realName')
|
linkTo('/pages/me/withdraw/realName');
|
||||||
}, 1500)
|
}, 1500);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parseFloat(data.mayMoney).toFixed(2) >= parseFloat(data.money)) {
|
if (parseFloat(data.mayMoney).toFixed(2) >= parseFloat(data.money)) {
|
||||||
if (parseFloat(data.money).toFixed(2) >= parseFloat(data.cashMoney)) {
|
if (parseFloat(data.money).toFixed(2) >= parseFloat(data.cashMoney)) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提现申请提示",
|
title: '提现申请提示',
|
||||||
content: '每日只可提现一次',
|
content: '每日只可提现一次',
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
if (e.confirm) {
|
if (e.confirm) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提现申请提示",
|
title: '提现申请提示',
|
||||||
content: '请仔细确认收款人信息\n\n收款人姓名:' + data.userInfo.certName +
|
content:
|
||||||
'\n\n提现金额:' + data
|
'请仔细确认收款人信息\n\n收款人姓名:' +
|
||||||
.money + '元\n\n收款人账号:' + data.userInfo.accountNo + '',
|
data.userInfo.certName +
|
||||||
|
'\n\n提现金额:' +
|
||||||
|
data.money +
|
||||||
|
'元\n\n收款人账号:' +
|
||||||
|
data.userInfo.accountNo +
|
||||||
|
'',
|
||||||
|
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
if (e.confirm) {
|
if (e.confirm) {
|
||||||
console.log(data.money)
|
console.log(data.money);
|
||||||
getMoney();
|
getMoney();
|
||||||
getMoneyDetail();
|
getMoneyDetail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 200)
|
}, 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: "提现金额必须大于或等于" + data.cashMoney + "元才可提现"
|
title: '提现金额必须大于或等于' + data.cashMoney + '元才可提现'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: "您的余额不足"
|
title: '您的余额不足'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -559,13 +570,13 @@
|
|||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #FFFFFF;
|
color: #ffffff;
|
||||||
padding-top: 230rpx;
|
padding-top: 230rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mayMoney {
|
.mayMoney {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
color: #FFFFFF;
|
color: #ffffff;
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -573,7 +584,7 @@
|
|||||||
width: 90%;
|
width: 90%;
|
||||||
height: max-content;
|
height: max-content;
|
||||||
margin-left: 40rpx;
|
margin-left: 40rpx;
|
||||||
background-color: #FFFFFF;
|
background-color: #ffffff;
|
||||||
box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;
|
box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;
|
||||||
margin-top: 50rpx;
|
margin-top: 50rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
@@ -621,14 +632,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.moneyList {
|
.moneyList {
|
||||||
text-align: left
|
text-align: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cash-top {
|
.cash-top {
|
||||||
padding: 32upx 32upx 50upx 32upx;
|
padding: 32upx 32upx 50upx 32upx;
|
||||||
/* border-bottom: 1px solid gainsboro; */
|
/* border-bottom: 1px solid gainsboro; */
|
||||||
background: #5074FF;
|
background: #5074ff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.leiji {
|
.leiji {
|
||||||
@@ -673,7 +684,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.centre {
|
.centre {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 200rpx 0;
|
padding: 200rpx 0;
|
||||||
|
|||||||
79
pnpm-lock.yaml
generated
Normal file
79
pnpm-lock.yaml
generated
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
lockfileVersion: '9.0'
|
||||||
|
|
||||||
|
settings:
|
||||||
|
autoInstallPeers: true
|
||||||
|
excludeLinksFromLockfile: false
|
||||||
|
|
||||||
|
importers:
|
||||||
|
|
||||||
|
.:
|
||||||
|
dependencies:
|
||||||
|
lodash:
|
||||||
|
specifier: ^4.17.21
|
||||||
|
version: 4.17.23
|
||||||
|
uview-plus:
|
||||||
|
specifier: ^3.3.62
|
||||||
|
version: 3.6.29
|
||||||
|
devDependencies:
|
||||||
|
pinia-plugin-unistorage:
|
||||||
|
specifier: ^0.1.2
|
||||||
|
version: 0.1.2
|
||||||
|
|
||||||
|
packages:
|
||||||
|
|
||||||
|
clipboard@2.0.11:
|
||||||
|
resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==}
|
||||||
|
|
||||||
|
dayjs@1.11.19:
|
||||||
|
resolution: {integrity: sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw==}
|
||||||
|
|
||||||
|
delegate@3.2.0:
|
||||||
|
resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==}
|
||||||
|
|
||||||
|
good-listener@1.2.2:
|
||||||
|
resolution: {integrity: sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==}
|
||||||
|
|
||||||
|
lodash@4.17.23:
|
||||||
|
resolution: {integrity: sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==}
|
||||||
|
|
||||||
|
pinia-plugin-unistorage@0.1.2:
|
||||||
|
resolution: {integrity: sha512-WXit2cGnm5rG6CDTcLSLehNWhyJS/Yq7WEeeXAapZbCnqoPJxlszqg7rT8S+OP47az0h5nlajGo+LuyMxUQ2uw==}
|
||||||
|
|
||||||
|
select@1.1.2:
|
||||||
|
resolution: {integrity: sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==}
|
||||||
|
|
||||||
|
tiny-emitter@2.1.0:
|
||||||
|
resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==}
|
||||||
|
|
||||||
|
uview-plus@3.6.29:
|
||||||
|
resolution: {integrity: sha512-zK522LR074rB4k3EARysmjsoOh+WjtFevIpvmV1wjVFqS3TT6brLZLd+gKa1ewxBsIgIPDTAabmnHWPsW9DWkQ==}
|
||||||
|
engines: {HBuilderX: ^3.1.0, uni-app: ^4.66, uni-app-x: ''}
|
||||||
|
|
||||||
|
snapshots:
|
||||||
|
|
||||||
|
clipboard@2.0.11:
|
||||||
|
dependencies:
|
||||||
|
good-listener: 1.2.2
|
||||||
|
select: 1.1.2
|
||||||
|
tiny-emitter: 2.1.0
|
||||||
|
|
||||||
|
dayjs@1.11.19: {}
|
||||||
|
|
||||||
|
delegate@3.2.0: {}
|
||||||
|
|
||||||
|
good-listener@1.2.2:
|
||||||
|
dependencies:
|
||||||
|
delegate: 3.2.0
|
||||||
|
|
||||||
|
lodash@4.17.23: {}
|
||||||
|
|
||||||
|
pinia-plugin-unistorage@0.1.2: {}
|
||||||
|
|
||||||
|
select@1.1.2: {}
|
||||||
|
|
||||||
|
tiny-emitter@2.1.0: {}
|
||||||
|
|
||||||
|
uview-plus@3.6.29:
|
||||||
|
dependencies:
|
||||||
|
clipboard: 2.0.11
|
||||||
|
dayjs: 1.11.19
|
||||||
Reference in New Issue
Block a user