This commit is contained in:
GaoHao 2025-01-08 19:56:58 +08:00
commit 81d57343a2
11 changed files with 511 additions and 254 deletions

View File

@ -41,3 +41,13 @@ export const forgetPwd = (data) => {
})
}
/**
* 绑定
*/
export const bind = (data) => {
return http.request({
url: '/Login/registerCode',
method: 'POST',
params: data
})
}

View File

@ -141,15 +141,12 @@
"path": "pages/me/withdraw/index",
"style": {
"navigationBarTitleText": "申请提现",
"navigationBarTextStyle": "#fff",
"navigationBarBackgroundColor": "rgb(255, 117, 129)",
"titleNView": {
"buttons": [{
"text": "规则",
"fontSize": "30rpx",
"onclick": "onNavigationBarButtonTap"
}]
}
"navigationStyle": "custom"
}
}, {
"path": "pages/me/withdraw/realName",
"style": {
"navigationBarTitleText": "实名认证"
}
}, {
"path": "pages/me/withdraw/alipay",

View File

@ -1,27 +1,26 @@
<template>
<view class="containerView">
<view class="cu-form-group"
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<view class="cu-form-group" >
<view class="title">手机号</view>
<input type="number" :value="mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
<input type="number" :value="data.mobile" placeholder="请输入手机号" maxlength="11" data-key="mobile"
@input="inputChange" />
</view>
<view class="cu-form-group"
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<view class="cu-form-group" >
<text class="title">验证码</text>
<input type="number" :value="code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChange"
<input type="number" :value="data.code" placeholder="请输入验证码" maxlength="6" data-key="code" @input="inputChange"
@confirm="toLogin" />
<button class="send-msg" @click="sendMsg" :disabled="sendIng">{{ sendTime }}</button>
<button class="send-msg" @click="sendMsg" :disabled="data.sendIng">{{ data.sendTime }}</button>
</view>
<button class="confirm-btn" @click="toLogin" :disabled="loginIng">立即绑定</button>
<button class="confirm-btn" @click="toLogin">立即绑定</button>
</view>
</template>
<script>
<script setup>
import { reactive } from 'vue';
import { onLoad} from '@dcloudio/uni-app'
import {setSendMsg,forgetPwd} from '@/api/login/login.js';
import { setSendMsg, bind} from '@/api/login/login.js';
let data = reactive({
mobile: '',
code: '',
@ -30,8 +29,7 @@
sendTime: '获取验证码',
count: 60,
type: '',
})
})
onLoad((option) => {
if (option.type) {
data.type = option.type
@ -55,113 +53,116 @@
data.count = count - 1;
data.sendIng = true;
data.sendTime = count - 1 + '秒后重新获取';
setTimeout(data.countDown.bind(data), 1000);
setTimeout(countDown.bind(this), 1000);
}
}
function sendMsg() {
const {
mobile
} = data;
if (!mobile) {
data.$queue.showToast("请输入手机号");
async function sendMsg() {
const { mobile } = data;
if (!data.mobile) {
uni.showToast({ title: '请输入手机号', icon: 'none', })
} else if (mobile.length !== 11) {
data.$queue.showToast("请输入正确的手机号");
uni.showToast({ title: '请输入正确的手机号', icon: 'none', })
} else {
data.$queue.showLoading("正在发送验证码...");
http.request({
url: 'app/Login/sendMsg/' + mobile + '/gzg',
}).then(res => {
if (res.code === 0) {
data.sendIng = true;
uni.showToast({ title: '验证码发送成功请注意查收', icon: 'none', })
data.countDown();
} else {
uni.showModal({
showCancel: false,
title: '短信发送失败',
content: res.msg ? res.msg : '请一分钟后再获取验证码'
});
}
uni.hideLoading();
uni.showLoading({
title: '正在发送验证码...'
})
let res = await setSendMsg(data.mobile,'gzg')
uni.hideLoading();
console.log(res)
if (res.code == 0) {
data.sendIng = true;
uni.showToast({ title: '验证码发送成功请注意查收', icon: 'none', })
countDown();
} else {
uni.showModal({
showCancel: false,
title: '短信发送失败',
content: res.msg ? res.msg : '请一分钟后再获取验证码'
});
}
}
}
function toLogin() {
async function toLogin() {
const {
mobile,
code
} = data;
let userId = this.$queue.getData("userId");
if (!mobile) {
if (!data.mobile) {
uni.showToast({ title: '请输入手机号', icon: 'none', })
} else if (mobile.length !== 11) {
} else if (data.mobile.length !== 11) {
uni.showToast({ title: '请输入正确的手机号', icon: 'none', })
} else if (!code) {
} else if (!data.code) {
uni.showToast({ title: '请输入验证码', icon: 'none', })
} else {
uni.showLoading({ title: '正在绑定中...' })
let openId = this.$queue.getData('openId') ? this.$queue.getData('openId') : '';
let openidnickname = this.$queue.getData('openidnickname') ? this.$queue.getData('openidnickname') :
'';
let openidheadimgurl = this.$queue.getData('openidheadimgurl') ? this.$queue.getData(
'openidheadimgurl') : '';
let invitation = this.$queue.getData('inviterCode') ? this.$queue.getData('inviterCode') : '';
let userId = this.$queue.getData('userId') ? this.$queue.getData('userId') : '';
http.request({
url: `app/Login/registerCode`,
method: 'post',
data: {
let res = await bind({
phone: mobile,
wxId: openId,
userId: userId,
inviterCode: invitation,
avatar: openidheadimgurl,
userName: openidnickname,
// wxId: openId,
// userId: userId,
// inviterCode: invitation,
// avatar: openidheadimgurl,
// userName: openidnickname,
msg: code
}
}).then(res => {
if (res.code === 0) {
this.$queue.setData("token", res.token);
this.$queue.setData('userId', res.user.userId);
this.$queue.setData('userName', res.user.userName);
this.$queue.setData('phone', res.user.phone);
this.$queue.setData('avatar', res.user.avatar ? res.user.avatar :
'../../static/logo.png');
this.$queue.showToast('绑定成功');
uni.showToast({ title: '绑定成功', icon: 'none', })
setTimeout(function() {
uni.navigateBack()
}, 1000)
} else {
uni.showModal({
showCancel: false,
title: '绑定失败',
content: res.msg,
});
}
uni.hideLoading();
});
})
uni.hideLoading();
uni.setStorageSync('token', res.token)
uni.setStorageSync('userInfo', res.user)
uni.showToast({ title: '绑定成功', icon: 'none', })
setTimeout(function() {
uni.navigateBack()
}, 1000)
}
}
</script>
<style lang='scss'>
<style lang='scss' scoped>
page {
background: #ffffff;
}
.cu-form-group{
background-color: #ffffff;
padding: 1rpx 30rpx;
display: flex;
align-items: center;
min-height: 80rpx;
justify-content: space-between;
margin: 30rpx;
border: 2rpx solid whitesmoke;
margin-bottom: 40rpx;
border-radius: 60rpx
}
.title{
text-align: justify;
padding-right: 30rpx;
font-size: 30rpx;
position: relative;
height: 60rpx;
line-height: 60rpx;
flex-shrink: 0;
}
uni-input{
flex: 1;
font-size: 15px;
color: #555;
padding-right: 10px;
}
.send-msg {
border-radius: 30px;
color: white;
height: 30px;
font-size: 14px;
line-height: 30px;
background: #557EFD;
border-radius: 30px;
color: white;
height: 30px;
font-size: 14px;
line-height: 30px;
background: #ff7581;
}
.containerView {
@ -178,14 +179,14 @@
.confirm-btn {
width: 600upx;
height: 80upx;
line-height: 80upx;
border-radius: 60upx;
margin-top: 32upx;
background: #557EFD;
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70px;
background: #ff7581;
color: #ffffff;
font-size: 32upx;
font-size: 16px;
&:after {
border-radius: 60px;

View File

@ -74,7 +74,7 @@
title: '验证码发送成功请注意查收',
icon: 'none',
})
data.countDown();
countDown();
} else {
uni.showModal({
showCancel: false,
@ -98,7 +98,7 @@
data.count = count - 1;
data.sending = true;
data.sendTime = count - 1 + '秒后重新获取';
setTimeout(data.countDown.bind(data), 1000);
setTimeout(countDown.bind(this), 1000);
}
}

View File

@ -81,13 +81,11 @@
uni.showToast({
title: '请输入手机号',
icon: 'none',
duration: 1000
})
} else if (data.mobile.length !== 11) {
uni.showToast({
title: '请输入正确的手机号',
icon: 'none',
duration: 1000
})
} else {
uni.showLoading({
@ -103,7 +101,7 @@
icon: 'none',
duration: 1000
})
data.countDown();
countDown();
} else {
uni.showModal({
showCancel: false,
@ -130,7 +128,7 @@
data.count = count - 1;
data.sending = true;
data.sendTime = count - 1 + '秒后重新获取';
setTimeout(data.countDown.bind(data), 1000);
setTimeout(countDown.bind(this), 1000);
}
}

View File

@ -13,13 +13,13 @@
<view class="text-gray">{{item.content}}</view>
</view>
</view>
<emprty-card v-if="!data.msgList.length" />
</view>
</template>
<script setup>
import { reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app'
import { onLoad,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
import { selectMessageByUserId } from '@/api/me/message.js';
let data = reactive({
@ -42,26 +42,25 @@
state: 5
}
let res = await selectMessageByUserId(params)
console.log(res)
uni.hideLoading()
uni.stopPullDownRefresh();
if (data.page === 1) {
if (data.page == 1) {
data.msgList = res.list
uni.stopPullDownRefresh();
return
}
data.msgList = [...data.msgList, ...res.list]
}
// function onReachBottom () {
// data.page = data.page + 1;
// getMsg()
// }
// function onPullDownRefresh () {
// data.page = 1;
// // this.msgList = []
// getMsg()
// }
onReachBottom(() => {
data.page = data.page + 1;
getMsg()
})
onPullDownRefresh(() => {
data.page = 1;
data.msgList = []
getMsg()
})
</script>
<style lang="scss" scoped>

View File

@ -1,22 +1,17 @@
<template>
<view class="containerView">
<up-cell-group>
<up-cell title="收款人姓名">
<up-cell-group :border="false">
<up-cell title="收款人姓名">
<template #right-icon> <up-input border="none" v-model="data.zhiFuBaoName" placeholder="请输入支付宝收款人姓名"></up-input> </template>
</up-cell>
<up-cell title="支付宝账号">
<template #right-icon> <up-input border="none" v-model="data.zhiFuBao" placeholder="请输入要绑定的支付宝手机号"></up-input> </template>
</up-cell>
<up-cell title="身份证号码">
<template #right-icon> <up-input border="none" v-model="data.certNum" placeholder="请输入要绑定身份证号码"></up-input> </template>
</up-cell>
</up-cell-group>
<button :class="data.zhiFuBao&&data.zhiFuBaoName?'confirm-btn':'confirm-btn1'" @click="toLogin"
:disabled="logining">绑定账户</button>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的支付宝账户和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;;margin-bottom: 10rpx;">身份证姓名需与支付宝姓名一致</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;;margin-bottom: 10rpx;">身份证信息仅可使用一次</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx">否则将无法正常收款请须知</view>
<button class="confirm-btn" @click="toLogin"
:disabled="data.logining">绑定账户</button>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的支付宝账户和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款请须知</view>
</view>
</template>
@ -28,16 +23,14 @@
import { commonType } from '@/api/init.js';
let data = reactive({
zhiFuBao: '',
zhiFuBaoName: '',
certNum: '',
zhiFuBao: null,
zhiFuBaoName: null,
logining: false
})
onLoad(() => {
this.zhiFuBao = uni.getStorageSync('userInfo').zhiFuBao;
this.zhiFuBaoName = uni.getStorageSync('userInfo').zhiFuBaoName;
this.certNum = uni.getStorageSync('userInfo').certNo;
data.zhiFuBao = uni.getStorageSync('userInfo').zhiFuBao;
data.zhiFuBaoName = uni.getStorageSync('userInfo').zhiFuBaoName;
})
function inputChange(e) {
@ -46,9 +39,6 @@
}
async function toLogin() {
console.log(data.zhiFuBaoName)
console.log(data.zhiFuBao)
console.log(data.certNum)
if (!data.zhiFuBaoName) {
uni.showToast({
@ -60,31 +50,24 @@
title: '请设置收款人支付宝账号',
icon: 'none'
})
} else if (!data.certNum) {
uni.showToast({
title: '请设置收款人身份证账号',
icon: 'none'
})
} else {
data.logining = true
let res = await updateUser({
zhiFuBao: data.zhiFuBao,
certName: data.zhiFuBaoName,
certNum: data.certNum,
})
if( res) {
data.logining = false
let userInfo = uni.getStorageSync('userInfo')
userInfo.zhiFuBao = data.zhiFuBao
userInfo.zhiFuBaoName = data.zhiFuBaoName
userInfo.certNo = data.certNum
uni.setStorageSync('userInfo', userInfo)
uni.showToast({
title: '修改成功',
icon: 'none',
complete() {
setTimeout(function() {
// uni.navigateBack();
uni.navigateBack();
}, 1000)
}
})
@ -102,7 +85,7 @@
}
.containerView {
padding-top: 32upx;
padding:30rpx;
position: relative;
width: 100%;
height: 100%;
@ -122,7 +105,7 @@
font-size: 32rpx;
&:after {
border-radius: 60px;
border: none;
}
}
@ -137,9 +120,9 @@
background: #ff7581;
color: #ffffff;
font-size: 32rpx;
border: none;
&:after {
border-radius: 60px;
border: none;
}
}
</style>

View File

@ -1,48 +1,38 @@
<template>
<view class="cash">
<view class=""
style="background-color: #ff7581;height: 400upx;border-bottom-right-radius: 40upx;border-bottom-left-radius: 40upx;">
<view style="font-size: 32upx;color: #FFFFFF;padding-top: 100upx;">可提现总额</view>
<view style="font-size: 40upx;color: #FFFFFF;padding-top: 20upx;">¥ {{ data.mayMoney }}</view>
<view
style="width: 90%;height: max-content;margin-left: 40upx;background-color: #FFFFFF;box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;margin-top: 50upx;border-radius: 20upx;">
<view class="container">
<view class="nav">
<up-icon name="arrow-left" color="#fff" size="20" @click="back"></up-icon>
<view class="navTitle">申请提现</view>
<view class="ruleBtn" @click="data.ruleShow = true">规则</view>
</view>
<view class="content">
<view class="title">可提现总额</view>
<view class="mayMoney">¥ {{ data.mayMoney }}</view>
<view class="val" style="">
<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
style="display: flex;flex-direction: row;padding: 20upx;justify-content: space-between;align-items: center;">
<view class="input" style="">
<view style="display: flex;align-items: center;">
<view style="font-size: 40upx;color: #333333;">¥</view>
<input type="number" v-model="data.money" placeholder="请输入金额" @input="moneyInput"
style="font-size: 40upx;color: #333333;text-align: left;margin-left: 10upx;width: 80%;" />
<input type="number" v-model="data.money" placeholder="请输入金额" @input="moneyInput" style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
</view>
<view @click="setAllMoney" style="font-size: 30rpx;color: #333333;background: #ff7581;color: white;border-radius: 10rpx;padding: 7rpx 15rpx;flex-shrink: 0;">
<view class="allbtn" @click="setAllMoney">
全部
</view>
</view>
<view style="background: #E6E6E6;width: 100%;height: 1upx;"></view>
</view>
<view @click="goWithdraw" style="margin: 32upx;font-size: 18px;background: #ff7581;color: white;border-radius: 10px;height: 40px;line-height: 40px;">
{{!data.isWithdraw?'观看广告提现':'立即提现'}}
<view class="witBtn" @click="goWithdraw"> {{!data.isWithdraw?'观看广告提现':'立即提现'}} </view>
<view class="tab" style="">
<view @click="linkTo('/pages/me/withdraw/realName')">实名认证</view>
<view @click="linkTo('/pages/me/withdraw/alipay')">提现账号</view>
<view @click="linkTo('/pages/me/withdraw/moneyList?moneyType=1&viewType=2')">红包明细</view>
</view>
<view style="display: flex;width: 100%;justify-content: space-around;width: 100%;">
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="navTo('/pages/me/withdraw/alipay')">
提现账号
</view>
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="navTo('/pages/me/withdraw/moneyList?moneyType=1&viewType=2')">
红包明细
</view>
</view>
<view style="text-align: left" 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>
<view style="margin-bottom: 8upx;text-align: right;">
@ -78,7 +68,7 @@
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title-style="{fontWeight:'700'}" @confirm="data.ruleShow=false" confirm-color="rgb(255, 117, 129)">
<view class="u-p-30 u-text-left">
<scroll-view scroll-y="true" style="max-height: 50vh;" >
<rich-text class="color-666" :nodes="data.ruleInfo"></rich-text>
<rich-text style="text-align: justify;font-size: 14px;color: #333;" :nodes="data.ruleInfo"></rich-text>
</scroll-view>
</view>
@ -94,9 +84,10 @@
<script setup>
import { reactive, nextTick, ref } from 'vue';
import { onReady,onLoad,onShow } from '@dcloudio/uni-app'
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
import { commonType } from '@/api/init.js';
import { linkTo } from '@/utils/app.js';
let data = reactive({
ruleShow: true,
@ -104,7 +95,7 @@
用户在平台中对奖励提现的适用以下规则
<br/>
<br/>
1用户的收益达到最低提现金额要求后可以申请提现每日发起前10笔提现为自动到账超出则需第二个工作日后到账
1用户的收益达到最低提现金额要求后可以申请提现每日只可以提现一笔
<br/>
2用户需要通过支付宝提现需按照要求绑定支付宝账号并填写提现金额或其他提现所需信息请确保提供的信息准确无误以免提现失败
<br/>
@ -144,18 +135,20 @@
})
getCanCash()
})
// onReachBottom: function() {
// if (this.page * this.limit < this.totalCount) {
// this.page = this.page + 1;
// this.getMoneyDetail();
// }
// },
// onPullDownRefresh: function() {
// this.page = 1;
// // that.list = []
// this.getMoneyDetail();
// },
onReachBottom(() => {
if (data.page * data.limit < data.totalCount) {
data.page = data.page + 1;
data.getMoneyDetail();
}
})
onPullDownRefresh(() => {
data.page = 1;
data.list = []
data.getMoneyDetail();
})
function back() {
uni.navigateBack()
}
/**
* 获取看广告状态
*/
@ -252,6 +245,9 @@
if (res.list.length > 0) {
data.list = [...data.list, ...res.list];
}
setTimeout(() => {
uni.stopPullDownRefresh();
}, 500);
})
}
@ -305,7 +301,7 @@
icon: 'none'
})
setTimeout(function() {
navTo('/pages/me/withdraw/alipay')
linkTo('/pages/me/withdraw/alipay')
}, 1500)
}
@ -322,20 +318,50 @@
});
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: '请仔细确认收款人信息\n\n收款人姓名:' + uni.getStorageSync('userInfo').zhiFuBaoName + '\n\n提现金额:' + data
.money + '元\n\n收款人账号' + uni.getStorageSync('userInfo').zhiFuBao + '',
content: '每日只可提现一次',
success: (e) => {
if (e.confirm) {
getMoney();
getMoneyDetail();
uni.showModal({
title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + uni.getStorageSync('userInfo').zhiFuBaoName + '\n\n提现金额:' + data
.money + '元\n\n收款人账号' + uni.getStorageSync('userInfo').zhiFuBao + '',
success: (e) => {
if (e.confirm) {
getMoney();
getMoneyDetail();
}
}
});
}
}
});
} else {
uni.showToast({
@ -350,14 +376,117 @@
});
}
} else {
navTo('/pages/me/withdraw/alipay')
linkTo('/pages/me/withdraw/alipay')
}
}
</script>
<style lang="scss" scoped>
// @import '../../static/css/index.css';
.container {
text-align: center;
background: white;
position: absolute;
width: 100%;
.nav{
width: 100%;
height: 96rpx;
line-height: 96rpx;
position: absolute;
left: 0;
top: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
.navTitle{
color: #fff;
font-size: 32rpx;
font-weight: bold;
}
.ruleBtn{
font-size: 30rpx;
color: #fff;
}
}
.content{
background-color: #ff7581;
height: 400rpx;
border-bottom-right-radius: 40rpx;
border-bottom-left-radius: 40rpx;
.title{
font-size: 32rpx;
color: #FFFFFF;
padding-top: 140rpx;
}
.mayMoney{
font-size: 40rpx;
color: #FFFFFF;
padding-top: 20rpx;
}
.val{
width: 90%;
height: max-content
;margin-left: 40rpx;
background-color: #FFFFFF;
box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;
margin-top: 50rpx;
border-radius: 20rpx;
.input{
display: flex;
padding: 20rpx;
justify-content: space-between;
align-items: center;
}
.allbtn{
font-size: 28rpx;
color: #333333;
background: #ff7581;
color: white;
border-radius: 10rpx;
padding: 7rpx 15rpx;
flex-shrink: 0;
}
}
.witBtn{
margin: 32rpx;
font-size: 36rpx;
background: #ff7581;
color: white;
border-radius: 20rpx;
height: 80rpx;
line-height: 80rpx;
}
.tab{
width: 100%;
display: flex;
width: 100%;
justify-content: space-around;
>view{
font-size: 28rpx;
color: #666;
padding-bottom: 60rpx;
padding-top: 20rpx;
}
}
.moneyList{
text-align: left
}
}
.cash-top {
padding: 32upx 32upx 50upx 32upx;
/* border-bottom: 1px solid gainsboro; */
background: #5074FF;
}
.leiji {
font-size: 14px;
color: #ffffff;
margin-bottom: 10px;
}
}
.rule-btn {
font-size: 16px;
// padding: 2rpx 10rpx;
@ -378,26 +507,6 @@
margin-left: 50upx;
}
.cash {
text-align: center;
background: white;
height: 100%;
position: absolute;
width: 100%;
.cash-top {
padding: 32upx 32upx 50upx 32upx;
/* border-bottom: 1px solid gainsboro; */
background: #5074FF;
}
.leiji {
font-size: 14px;
color: #ffffff;
margin-bottom: 10px;
}
}
.moneyList {
.item {
background: white;

View File

@ -23,7 +23,7 @@
<script setup>
import { reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app'
import { onLoad,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
import { queryUserMoneyDetails } from '@/api/me/withdraw.js';
let data = reactive({
@ -59,19 +59,23 @@
if ( res.records.length > 0) {
data.list = [...data.list,...res.records];
}
setTimeout(() => {
uni.stopPullDownRefresh();
}, 500);
})
}
// onReachBottom: function() {
// if (this.page*this.limit < this.totalCount) {
// this.page = this.page + 1;
// this.getMoney();
// }
// }
// onPullDownRefresh: function() {
// this.page = 1;
// // that.list = []
// this.getMoney();
// }
onReachBottom(() => {
if (data.page*data.limit < data.totalCount) {
data.page = data.page + 1;
getMoney();
}
})
onPullDownRefresh(() => {
data.page = 1;
data.list = []
data.getMoney();
})
</script>
<style lang='scss' scoped>

View File

@ -0,0 +1,155 @@
<template>
<view class="containerView">
<up-cell-group label-width="80" :border="false">
<up-cell :label-style="{ width: '100rpx' }" title="姓名">
<template #right-icon> <up-input border="none" v-model="data.certName" placeholder="请输入姓名"></up-input> </template>
</up-cell>
<up-cell title="身份证号码">
<template #right-icon> <up-input border="none" v-model="data.certNum" placeholder="请输入身份证号码"></up-input> </template>
</up-cell>
<up-cell title="银行卡号码">
<template #right-icon> <up-input border="none" v-model="data.accountNo" placeholder="请输入银行卡号码"></up-input> </template>
</up-cell>
<up-cell title="手机号">
<template #right-icon> <up-input border="none" v-model="data.mobile" placeholder="请输入银行预留号码"></up-input> </template>
</up-cell>
</up-cell-group>
<button class="confirm-btn" @click="toLogin"
:disabled="data.logining">认证</button>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的银行卡号和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">手机号需是银行卡银行卡预留手机号</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">银行卡号需与收款人姓名一致</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">身份证信息仅可使用一次</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款请须知</view>
</view>
</template>
<script setup>
import { reactive, nextTick, ref } from 'vue';
import { onReady,onLoad,onShow } from '@dcloudio/uni-app'
import { updateUser } from '@/api/me/withdraw.js';
import { commonType } from '@/api/init.js';
let data = reactive({
certName: null,
mobile: null,
certNum: null,
accountNo: null,
logining: false
})
onLoad(() => {
data.certName = uni.getStorageSync('userInfo').certName;
data.mobile = uni.getStorageSync('userInfo').mobile;
data.certNum = uni.getStorageSync('userInfo').certNo;
data.accountNo = uni.getStorageSync('userInfo').accountNo;
})
function inputChange(e) {
const key = e.currentTarget.dataset.key;
data[key] = e.detail.value;
}
async function toLogin() {
if (!data.certName) {
uni.showToast({
title: '请设置收款人姓名',
icon: 'none'
})
} else if (!data.mobile) {
uni.showToast({
title: '请设置收款人支付宝账号',
icon: 'none'
})
} else if (!data.certNum) {
uni.showToast({
title: '请设置收款人支付宝账号',
icon: 'none'
})
} else if (!data.accountNo) {
uni.showToast({
title: '请设置收款人支付宝账号',
icon: 'none'
})
} else {
data.logining = true
let res = await updateUser({
certName: data.certName,
mobile: data.mobile,
certNum: data.certNum,
accountNo: data.accountNo.replace(/\s+/g, ''),
})
if( res) {
data.logining = false
let userInfo = uni.getStorageSync('userInfo')
userInfo.mobile = data.mobile
userInfo.mobile = data.mobile
userInfo.certNo = data.certNum
userInfo.accountNo = data.accountNo
uni.setStorageSync('userInfo', userInfo)
uni.showToast({
title: '修改成功',
icon: 'none',
complete() {
setTimeout(function() {
uni.navigateBack();
}, 1000)
}
})
}
}
}
</script>
<style lang='scss'>
page {
background: #FFFFFF;
}
.containerView {
padding:30rpx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.confirm-btn1 {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
/* background: whitesmoke; */
background: #ff7581;
color: #FFFFFF;
font-size: 32rpx;
&:after {
border: none;
}
}
.confirm-btn {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
background: #ff7581;
color: #ffffff;
font-size: 32rpx;
border: none;
&:after {
border: none;
}
}
</style>

View File

@ -5,10 +5,10 @@
<up-image src="/static/share/share-bg.png" alt="" width="100%" mode="widthFix"></up-image>
<view class="top-title">
<view>
<up-image src="/static/share/title.png" alt="" width="544rpx" mode="widthFix"></up-image>
<up-image src="/static/share/title.png" alt="" width="550rpx" height="92rpx" mode="widthFix"></up-image>
</view>
<view style="padding-right:70rpx;justify-content: flex-end">
<up-image src="/static/share/rule.png" alt="" width="400rpx" mode="widthFix"></up-image>
<up-image src="/static/share/rule.png" alt="" width="430rpx" height="92rpx" mode="widthFix"></up-image>
</view>
</view>
@ -101,7 +101,7 @@
<script setup>
import { reactive, nextTick, ref } from 'vue';
import { onReady,onLoad,onShow } from '@dcloudio/uni-app'
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
import { updateUser } from '@/api/me/withdraw.js';
import { selectInviteMoney, selectInviteByUserIdLists, selectBannerList } from '@/api/share/index.js';
import { commonType } from '@/api/init.js';
@ -329,14 +329,15 @@
});
}
// onReachBottom() {
// if(data.isEnd||data.loading){
// return
// }
// data.page+=1
// getInviter()
// }
onReachBottom(() => {
if(data.isEnd||data.loading){
return
}
data.page+=1
getInviter()
})
</script>