页面展示优化

This commit is contained in:
GaoHao
2025-01-09 11:38:37 +08:00
parent 31b37eb1db
commit c686a02931
7 changed files with 125 additions and 173 deletions

View File

@@ -1,5 +1,6 @@
<template>
<view class="container">
<!-- <view class="navs" style="width: 100%;height: 96rpx;"></view> -->
<view class="nav">
<up-icon name="arrow-left" color="#fff" size="20" @click="back"></up-icon>
<view class="navTitle">申请提现</view>
@@ -86,6 +87,7 @@
import { reactive, nextTick, ref } from 'vue';
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
import { selectUserById } from '@/api/user/user.js';
import { commonType } from '@/api/init.js';
import { linkTo } from '@/utils/app.js';
@@ -118,6 +120,7 @@
adRewardedVideo: true,
adRewardedVideoloadNum: 0,
isWithdraw: false,
userInfo: null,
})
const adRewardedVideo = ref(null);
onLoad(() => {
@@ -127,6 +130,7 @@
onShow(() => {
console.log(uni.getStorageSync('userInfo'))
getcashMoney()
getUserInfo();
})
onReady(() => {
nextTick(()=>{
@@ -146,6 +150,11 @@
data.list = []
data.getMoneyDetail();
})
function getUserInfo() {
selectUserById().then(res=>{
data.userInfo = res;
})
}
function back() {
uni.navigateBack()
}
@@ -154,7 +163,7 @@
*/
async function getCanCash() {
canCash().then(res => {
data.isWithdraw = res;
// data.isWithdraw = res;
})
}
@@ -178,7 +187,7 @@
}
data.adRewardedVideoloadNum++
setTimeout(() => {
adRewardedVideo.value.load();
// adRewardedVideo.value.load();
}, 1000); // 10
console.log("广告加载失败")
}
@@ -310,46 +319,33 @@
function getOut() {
if (uni.getStorageSync('userInfo').zhiFuBao && uni.getStorageSync('userInfo').zhiFuBaoName && uni.getStorageSync('userInfo').certNo) {
if (!/^\d+(\.\d{1,2})?$/.test(data.money)) {
uni.showToast({
icon: 'none',
title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
});
return;
}
if (uni.getStorageSync('userInfo').zhiFuBao && uni.getStorageSync('userInfo').zhiFuBaoName) {
uni.showToast({ icon: 'none', title: "请先绑定支付宝" });
setTimeout(()=>{
linkTo('/pages/me/withdraw/alipay')
},1500)
return;
}
if (uni.getStorageSync('userInfo').certName && uni.getStorageSync('userInfo').mobile && uni.getStorageSync('userInfo').certNo && uni.getStorageSync('userInfo').accountNo) {
uni.showToast({ icon: 'none', title: "请先实名认证" });
setTimeout(()=>{
linkTo('/pages/me/withdraw/realName')
},1500)
return;
}
if (that.zhifubao && that.zhifubaoName) {
uni.navigateTo({
url: "/me/invite/zhifubao"
})
return;
}
if (parseFloat(data.mayMoney).toFixed(2) >= parseFloat(data.money)) {
if (parseFloat(data.money).toFixed(2) >= parseFloat(data.cashMoney)) {
uni.showModal({
title: "提现申请提示",
content: '每日只可提现一次',
success: (e) => {
if (e.confirm) {
if (!/^\d+(\.\d{1,2})?$/.test(data.money)) {
uni.showToast({
icon: 'none',
title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
});
return;
}
if (!data.userInfo.accountNo) {
uni.showToast({ icon: 'none', title: "请先实名认证" });
setTimeout(()=>{
linkTo('/pages/me/withdraw/realName')
},1500)
return;
}
if (parseFloat(data.mayMoney).toFixed(2) >= parseFloat(data.money)) {
if (parseFloat(data.money).toFixed(2) >= parseFloat(data.cashMoney)) {
uni.showModal({
title: "提现申请提示",
content: '每日只可提现一次',
success: (e) => {
if (e.confirm) {
setTimeout(()=>{
uni.showModal({
title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + uni.getStorageSync('userInfo').zhiFuBaoName + '\n\n提现金额:' + data
.money + '元\n\n收款人账号' + uni.getStorageSync('userInfo').zhiFuBao + '',
content: '请仔细确认收款人信息\n\n收款人姓名:' + data.userInfo.certName + '\n\n提现金额:' + data
.money + '元\n\n收款人账号' + data.userInfo.accountNo + '',
success: (e) => {
if (e.confirm) {
@@ -358,25 +354,23 @@
}
}
});
}
},200)
}
});
} else {
uni.showToast({
icon: 'none',
title: "提现金额必须大于或等于" + data.cashMoney + "元才可提现"
});
}
}
});
} else {
uni.showToast({
icon: 'none',
title: "您的余额不足"
title: "提现金额必须大于或等于" + data.cashMoney + "元才可提现"
});
}
} else {
linkTo('/pages/me/withdraw/alipay')
uni.showToast({
icon: 'none',
title: "您的余额不足"
});
}
}
@@ -390,15 +384,15 @@
width: 100%;
.nav{
width: 100%;
height: 96rpx;
line-height: 96rpx;
position: absolute;
position: fixed;
background-color: #ff7581;
left: 0;
top: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
padding: 100rpx 30rpx 15rpx 30rpx;
.navTitle{
color: #fff;
font-size: 32rpx;
@@ -411,13 +405,13 @@
}
.content{
background-color: #ff7581;
height: 400rpx;
height: 500rpx;
border-bottom-right-radius: 40rpx;
border-bottom-left-radius: 40rpx;
.title{
font-size: 32rpx;
color: #FFFFFF;
padding-top: 140rpx;
padding-top: 230rpx;
}
.mayMoney{
font-size: 40rpx;