下拉刷新更新
This commit is contained in:
parent
c8dbc0f550
commit
7cbadc5638
|
|
@ -41,3 +41,13 @@ export const forgetPwd = (data) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定
|
||||||
|
*/
|
||||||
|
export const bind = (data) => {
|
||||||
|
return http.request({
|
||||||
|
url: '/Login/registerCode',
|
||||||
|
method: 'POST',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -1,27 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="containerView">
|
<view class="containerView">
|
||||||
<view class="cu-form-group"
|
<view class="cu-form-group" >
|
||||||
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
|
|
||||||
<view class="title">手机号</view>
|
<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" />
|
@input="inputChange" />
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-form-group"
|
<view class="cu-form-group" >
|
||||||
style="margin: 30upx;border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
|
|
||||||
<text class="title">验证码</text>
|
<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" />
|
@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>
|
</view>
|
||||||
|
|
||||||
<button class="confirm-btn" @click="toLogin" :disabled="loginIng">立即绑定</button>
|
<button class="confirm-btn" @click="toLogin">立即绑定</button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { onLoad} from '@dcloudio/uni-app'
|
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({
|
let data = reactive({
|
||||||
mobile: '',
|
mobile: '',
|
||||||
code: '',
|
code: '',
|
||||||
|
|
@ -31,7 +30,6 @@
|
||||||
count: 60,
|
count: 60,
|
||||||
type: '',
|
type: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
if (option.type) {
|
if (option.type) {
|
||||||
data.type = option.type
|
data.type = option.type
|
||||||
|
|
@ -55,113 +53,116 @@
|
||||||
data.count = count - 1;
|
data.count = count - 1;
|
||||||
data.sendIng = true;
|
data.sendIng = true;
|
||||||
data.sendTime = count - 1 + '秒后重新获取';
|
data.sendTime = count - 1 + '秒后重新获取';
|
||||||
setTimeout(data.countDown.bind(data), 1000);
|
setTimeout(countDown.bind(this), 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendMsg() {
|
async function sendMsg() {
|
||||||
const {
|
const { mobile } = data;
|
||||||
mobile
|
if (!data.mobile) {
|
||||||
} = data;
|
uni.showToast({ title: '请输入手机号', icon: 'none', })
|
||||||
if (!mobile) {
|
|
||||||
data.$queue.showToast("请输入手机号");
|
|
||||||
} else if (mobile.length !== 11) {
|
} else if (mobile.length !== 11) {
|
||||||
data.$queue.showToast("请输入正确的手机号");
|
uni.showToast({ title: '请输入正确的手机号', icon: 'none', })
|
||||||
} else {
|
} else {
|
||||||
data.$queue.showLoading("正在发送验证码...");
|
uni.showLoading({
|
||||||
http.request({
|
title: '正在发送验证码...'
|
||||||
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();
|
|
||||||
})
|
})
|
||||||
|
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 {
|
const {
|
||||||
mobile,
|
mobile,
|
||||||
code
|
code
|
||||||
} = data;
|
} = data;
|
||||||
let userId = this.$queue.getData("userId");
|
if (!data.mobile) {
|
||||||
if (!mobile) {
|
|
||||||
uni.showToast({ title: '请输入手机号', icon: 'none', })
|
uni.showToast({ title: '请输入手机号', icon: 'none', })
|
||||||
} else if (mobile.length !== 11) {
|
} else if (data.mobile.length !== 11) {
|
||||||
uni.showToast({ title: '请输入正确的手机号', icon: 'none', })
|
uni.showToast({ title: '请输入正确的手机号', icon: 'none', })
|
||||||
} else if (!code) {
|
} else if (!data.code) {
|
||||||
uni.showToast({ title: '请输入验证码', icon: 'none', })
|
uni.showToast({ title: '请输入验证码', icon: 'none', })
|
||||||
} else {
|
} else {
|
||||||
uni.showLoading({ title: '正在绑定中...' })
|
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({
|
let res = await bind({
|
||||||
url: `app/Login/registerCode`,
|
|
||||||
method: 'post',
|
|
||||||
data: {
|
|
||||||
phone: mobile,
|
phone: mobile,
|
||||||
wxId: openId,
|
// wxId: openId,
|
||||||
userId: userId,
|
// userId: userId,
|
||||||
inviterCode: invitation,
|
// inviterCode: invitation,
|
||||||
avatar: openidheadimgurl,
|
// avatar: openidheadimgurl,
|
||||||
userName: openidnickname,
|
// userName: openidnickname,
|
||||||
msg: code
|
msg: code
|
||||||
}
|
})
|
||||||
}).then(res => {
|
uni.hideLoading();
|
||||||
if (res.code === 0) {
|
|
||||||
this.$queue.setData("token", res.token);
|
uni.setStorageSync('token', res.token)
|
||||||
this.$queue.setData('userId', res.user.userId);
|
uni.setStorageSync('userInfo', res.user)
|
||||||
this.$queue.setData('userName', res.user.userName);
|
uni.showToast({ title: '绑定成功', icon: 'none', })
|
||||||
this.$queue.setData('phone', res.user.phone);
|
setTimeout(function() {
|
||||||
this.$queue.setData('avatar', res.user.avatar ? res.user.avatar :
|
uni.navigateBack()
|
||||||
'../../static/logo.png');
|
}, 1000)
|
||||||
this.$queue.showToast('绑定成功');
|
|
||||||
uni.showToast({ title: '绑定成功', icon: 'none', })
|
|
||||||
setTimeout(function() {
|
|
||||||
uni.navigateBack()
|
|
||||||
}, 1000)
|
|
||||||
} else {
|
|
||||||
uni.showModal({
|
|
||||||
showCancel: false,
|
|
||||||
title: '绑定失败',
|
|
||||||
content: res.msg,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
uni.hideLoading();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss'>
|
<style lang='scss' scoped>
|
||||||
page {
|
page {
|
||||||
background: #ffffff;
|
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 {
|
.send-msg {
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
color: white;
|
color: white;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
background: #557EFD;
|
background: #ff7581;
|
||||||
}
|
}
|
||||||
|
|
||||||
.containerView {
|
.containerView {
|
||||||
|
|
@ -178,14 +179,14 @@
|
||||||
|
|
||||||
|
|
||||||
.confirm-btn {
|
.confirm-btn {
|
||||||
width: 600upx;
|
width: 300px;
|
||||||
height: 80upx;
|
height: 42px;
|
||||||
line-height: 80upx;
|
line-height: 42px;
|
||||||
border-radius: 60upx;
|
border-radius: 30px;
|
||||||
margin-top: 32upx;
|
margin-top: 70px;
|
||||||
background: #557EFD;
|
background: #ff7581;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 32upx;
|
font-size: 16px;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
border-radius: 60px;
|
border-radius: 60px;
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@
|
||||||
title: '验证码发送成功请注意查收',
|
title: '验证码发送成功请注意查收',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
data.countDown();
|
countDown();
|
||||||
} else {
|
} else {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
|
|
@ -98,7 +98,7 @@
|
||||||
data.count = count - 1;
|
data.count = count - 1;
|
||||||
data.sending = true;
|
data.sending = true;
|
||||||
data.sendTime = count - 1 + '秒后重新获取';
|
data.sendTime = count - 1 + '秒后重新获取';
|
||||||
setTimeout(data.countDown.bind(data), 1000);
|
setTimeout(countDown.bind(this), 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,13 +81,11 @@
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入手机号',
|
title: '请输入手机号',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
|
||||||
})
|
})
|
||||||
} else if (data.mobile.length !== 11) {
|
} else if (data.mobile.length !== 11) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请输入正确的手机号',
|
title: '请输入正确的手机号',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
|
|
@ -103,7 +101,7 @@
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000
|
||||||
})
|
})
|
||||||
data.countDown();
|
countDown();
|
||||||
} else {
|
} else {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
|
|
@ -130,7 +128,7 @@
|
||||||
data.count = count - 1;
|
data.count = count - 1;
|
||||||
data.sending = true;
|
data.sending = true;
|
||||||
data.sendTime = count - 1 + '秒后重新获取';
|
data.sendTime = count - 1 + '秒后重新获取';
|
||||||
setTimeout(data.countDown.bind(data), 1000);
|
setTimeout(countDown.bind(this), 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,13 @@
|
||||||
<view class="text-gray">{{item.content}}</view>
|
<view class="text-gray">{{item.content}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<emprty-card v-if="!data.msgList.length" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
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';
|
import { selectMessageByUserId } from '@/api/me/message.js';
|
||||||
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
|
|
@ -42,26 +42,25 @@
|
||||||
state: 5
|
state: 5
|
||||||
}
|
}
|
||||||
let res = await selectMessageByUserId(params)
|
let res = await selectMessageByUserId(params)
|
||||||
console.log(res)
|
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
if (data.page === 1) {
|
if (data.page == 1) {
|
||||||
data.msgList = res.list
|
data.msgList = res.list
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data.msgList = [...data.msgList, ...res.list]
|
data.msgList = [...data.msgList, ...res.list]
|
||||||
|
|
||||||
}
|
}
|
||||||
// function onReachBottom () {
|
onReachBottom(() => {
|
||||||
// data.page = data.page + 1;
|
data.page = data.page + 1;
|
||||||
// getMsg()
|
getMsg()
|
||||||
// }
|
})
|
||||||
// function onPullDownRefresh () {
|
onPullDownRefresh(() => {
|
||||||
// data.page = 1;
|
data.page = 1;
|
||||||
// // this.msgList = []
|
data.msgList = []
|
||||||
// getMsg()
|
getMsg()
|
||||||
// }
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,6 @@
|
||||||
<up-cell title="支付宝账号">
|
<up-cell title="支付宝账号">
|
||||||
<template #right-icon> <up-input border="none" v-model="data.zhiFuBao" placeholder="请输入要绑定的支付宝手机号"></up-input> </template>
|
<template #right-icon> <up-input border="none" v-model="data.zhiFuBao" placeholder="请输入要绑定的支付宝手机号"></up-input> </template>
|
||||||
</up-cell>
|
</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>
|
</up-cell-group>
|
||||||
<button :class="data.zhiFuBao&&data.zhiFuBaoName?'confirm-btn':'confirm-btn1'" @click="toLogin"
|
<button :class="data.zhiFuBao&&data.zhiFuBaoName?'confirm-btn':'confirm-btn1'" @click="toLogin"
|
||||||
:disabled="logining">绑定账户</button>
|
:disabled="logining">绑定账户</button>
|
||||||
|
|
@ -30,14 +27,12 @@
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
zhiFuBao: '',
|
zhiFuBao: '',
|
||||||
zhiFuBaoName: '',
|
zhiFuBaoName: '',
|
||||||
certNum: '',
|
|
||||||
logining: false
|
logining: false
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
this.zhiFuBao = uni.getStorageSync('userInfo').zhiFuBao;
|
this.zhiFuBao = uni.getStorageSync('userInfo').zhiFuBao;
|
||||||
this.zhiFuBaoName = uni.getStorageSync('userInfo').zhiFuBaoName;
|
this.zhiFuBaoName = uni.getStorageSync('userInfo').zhiFuBaoName;
|
||||||
this.certNum = uni.getStorageSync('userInfo').certNo;
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function inputChange(e) {
|
function inputChange(e) {
|
||||||
|
|
@ -46,9 +41,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
async function toLogin() {
|
async function toLogin() {
|
||||||
console.log(data.zhiFuBaoName)
|
|
||||||
console.log(data.zhiFuBao)
|
|
||||||
console.log(data.certNum)
|
|
||||||
|
|
||||||
if (!data.zhiFuBaoName) {
|
if (!data.zhiFuBaoName) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -60,24 +52,17 @@
|
||||||
title: '请设置收款人支付宝账号',
|
title: '请设置收款人支付宝账号',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
} else if (!data.certNum) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请设置收款人身份证账号',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
data.logining = true
|
data.logining = true
|
||||||
let res = await updateUser({
|
let res = await updateUser({
|
||||||
zhiFuBao: data.zhiFuBao,
|
zhiFuBao: data.zhiFuBao,
|
||||||
certName: data.zhiFuBaoName,
|
certName: data.zhiFuBaoName,
|
||||||
certNum: data.certNum,
|
|
||||||
})
|
})
|
||||||
if( res) {
|
if( res) {
|
||||||
data.logining = false
|
data.logining = false
|
||||||
let userInfo = uni.getStorageSync('userInfo')
|
let userInfo = uni.getStorageSync('userInfo')
|
||||||
userInfo.zhiFuBao = data.zhiFuBao
|
userInfo.zhiFuBao = data.zhiFuBao
|
||||||
userInfo.zhiFuBaoName = data.zhiFuBaoName
|
userInfo.zhiFuBaoName = data.zhiFuBaoName
|
||||||
userInfo.certNo = data.certNum
|
|
||||||
uni.setStorageSync('userInfo', userInfo)
|
uni.setStorageSync('userInfo', userInfo)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '修改成功',
|
title: '修改成功',
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, nextTick, ref } from 'vue';
|
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 { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
|
||||||
import { commonType } from '@/api/init.js';
|
import { commonType } from '@/api/init.js';
|
||||||
|
|
||||||
|
|
@ -144,18 +144,18 @@
|
||||||
})
|
})
|
||||||
getCanCash()
|
getCanCash()
|
||||||
})
|
})
|
||||||
|
onReachBottom(() => {
|
||||||
|
if (data.page * data.limit < data.totalCount) {
|
||||||
|
data.page = data.page + 1;
|
||||||
|
data.getMoneyDetail();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
data.page = 1;
|
||||||
|
data.list = []
|
||||||
|
data.getMoneyDetail();
|
||||||
|
})
|
||||||
|
|
||||||
// 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();
|
|
||||||
// },
|
|
||||||
/**
|
/**
|
||||||
* 获取看广告状态
|
* 获取看广告状态
|
||||||
*/
|
*/
|
||||||
|
|
@ -252,6 +252,9 @@
|
||||||
if (res.list.length > 0) {
|
if (res.list.length > 0) {
|
||||||
data.list = [...data.list, ...res.list];
|
data.list = [...data.list, ...res.list];
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive } from 'vue';
|
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';
|
import { queryUserMoneyDetails } from '@/api/me/withdraw.js';
|
||||||
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
|
|
@ -59,19 +59,23 @@
|
||||||
if ( res.records.length > 0) {
|
if ( res.records.length > 0) {
|
||||||
data.list = [...data.list,...res.records];
|
data.list = [...data.list,...res.records];
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.stopPullDownRefresh();
|
||||||
|
}, 500);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// onReachBottom: function() {
|
onReachBottom(() => {
|
||||||
// if (this.page*this.limit < this.totalCount) {
|
if (data.page*data.limit < data.totalCount) {
|
||||||
// this.page = this.page + 1;
|
data.page = data.page + 1;
|
||||||
// this.getMoney();
|
getMoney();
|
||||||
// }
|
}
|
||||||
// }
|
})
|
||||||
// onPullDownRefresh: function() {
|
onPullDownRefresh(() => {
|
||||||
// this.page = 1;
|
data.page = 1;
|
||||||
// // that.list = []
|
data.list = []
|
||||||
// this.getMoney();
|
data.getMoney();
|
||||||
// }
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
<up-image src="/static/share/share-bg.png" alt="" width="100%" mode="widthFix"></up-image>
|
<up-image src="/static/share/share-bg.png" alt="" width="100%" mode="widthFix"></up-image>
|
||||||
<view class="top-title">
|
<view class="top-title">
|
||||||
<view>
|
<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>
|
||||||
<view style="padding-right:70rpx;justify-content: flex-end">
|
<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>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
@ -101,7 +101,7 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, nextTick, ref } from 'vue';
|
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 { updateUser } from '@/api/me/withdraw.js';
|
||||||
import { selectInviteMoney, selectInviteByUserIdLists, selectBannerList } from '@/api/share/index.js';
|
import { selectInviteMoney, selectInviteByUserIdLists, selectBannerList } from '@/api/share/index.js';
|
||||||
import { commonType } from '@/api/init.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>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue