diff --git a/pages-userInfo/extends/extends.vue b/pages-userInfo/extends/extends.vue
index f040fd0..6963b32 100644
--- a/pages-userInfo/extends/extends.vue
+++ b/pages-userInfo/extends/extends.vue
@@ -15,9 +15,12 @@
已邀请
-
-
- -----已经到底啦-----
+
+
+
+
+
+
@@ -34,7 +37,9 @@
pageSize: 10,
pageNum: 1,
userInfo: {},
- flag: false
+ flag: false,
+ loadStatus:'noMore', //加载样式:more - 加载前样式,loading - 加载中样式,noMore - 没有数据样式
+ isLoadMore:false, //是否加载中
}
},
created() {
@@ -65,14 +70,14 @@
uni.stopPullDownRefresh()
},
// 上划加载更多
- onReachBottom() {
- if (this.inviteLogList.length > this.pageSize*this.pageNum-1) {
- this.flag = false;
- this.pageNum += 1
- this.getInviteLog();
- }else{
- this.flag = true;
- }
+ onReachBottom() {//上拉触底函数
+ if(!this.isLoadMore) { //此处判断,上锁,防止重复请求
+ this.isLoadMore=true
+ if (this.loadStatus === "more") {
+ this.pageNum += 1 //每次上拉请求新的一页
+ this.getInviteLog();
+ }
+ }
},
onShareAppMessage(res) {
if (res.from === 'button') {// 来自页面内分享按钮
@@ -87,6 +92,7 @@
// 获取邀请记录
async getInviteLog() {
let that = this;
+ that.loadStatus = 'loading';
const res = await getInviteLog({
pageSize: that.pageSize,
pageNum: that.pageNum,
@@ -95,12 +101,22 @@
console.log('res', res)
if (res.data.code === 200) {
that.inviteLogList.push(...res.data.rows)
- console.log('inviteLogList', that.inviteLogList)
+ if(res.data.rows.length < that.pageSize){ //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ that.isLoadMore = true
+ that.loadStatus = 'noMore'
+ }else{
+ this.loadStatus = 'more';
+ that.isLoadMore = false
+ }
} else {
uni.showModal({
content: '邀请记录加载失败!',
showCancel: false
});
+ that.isLoadMore = false
+ if(that.page > 1){
+ that.page -= 1
+ }
}
},
}
diff --git a/pages-userInfo/withdraw/withdrawDetail.vue b/pages-userInfo/withdraw/withdrawDetail.vue
index ff48b7f..d1f9d8d 100644
--- a/pages-userInfo/withdraw/withdrawDetail.vue
+++ b/pages-userInfo/withdraw/withdrawDetail.vue
@@ -17,7 +17,7 @@
提现金额:
-
+
渠道:
diff --git a/pages-userInfo/withdraw/withdrawLog.vue b/pages-userInfo/withdraw/withdrawLog.vue
index fa9a99f..c037f8d 100644
--- a/pages-userInfo/withdraw/withdrawLog.vue
+++ b/pages-userInfo/withdraw/withdrawLog.vue
@@ -28,7 +28,10 @@
- -----已经到底啦-----
+
+
+
+
@@ -43,13 +46,14 @@
pageSize: 10,
pageNum: 1,
userInfo: {},
- flag: false
+ flag: false,
+ loadStatus:'noMore', //加载样式:more - 加载前样式,loading - 加载中样式,noMore - 没有数据样式
+ isLoadMore:false, //是否加载中
}
},
created() {
const userInfo = uni.getStorageSync('userInfo')
if (!userInfo) {
- console.log('havent userInfo')
uni.showModal({
content: '艺术家账户过期,请重新登录!',
showCancel: false,
@@ -62,7 +66,6 @@
});
} else {
this.userInfo = userInfo;
- console.log('have userInfo')
}
this.getWithdrawList();
},
@@ -74,37 +77,47 @@
uni.stopPullDownRefresh()
},
// 上划加载更多
- onReachBottom() {
- if (this.withdrawList.length > this.pageSize*this.pageNum-1) {
- this.flag = false;
- this.pageNum += 1
- this.getWithdrawList();
- }else{
- this.flag = true;
- }
+ onReachBottom() {//上拉触底函数
+ if(!this.isLoadMore) { //此处判断,上锁,防止重复请求
+ this.isLoadMore=true
+ if (this.loadStatus === "more") {
+ this.pageNum += 1 //每次上拉请求新的一页
+ this.getWithdrawList();
+ }
+ }
},
methods: {
// 查询提现记录列表
async getWithdrawList() {
let that = this;
+ that.loadStatus = 'loading';
const res = await getWithdrawList({
pageSize: that.pageSize,
pageNum: that.pageNum,
creatorId: that.userInfo.id
})
- console.log('res', res)
if (res.data.code === 200) {
that.withdrawList.push(...res.data.rows)
+ if(res.data.rows.length < that.pageSize){ //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ that.isLoadMore = true
+ that.loadStatus = 'noMore'
+ }else{
+ this.loadStatus = 'more';
+ that.isLoadMore = false
+ }
} else {
uni.showModal({
content: '提现记录列表数据加载失败!',
showCancel: false
});
+ that.isLoadMore = false
+ if(that.page > 1){
+ that.page -= 1
+ }
}
},
targetToDetail(orderId) {
- console.log('orderId', orderId)
if (orderId) {
uni.navigateTo({
url: 'withdrawDetail?orderId=' + orderId,
diff --git a/pages.json b/pages.json
index 07ef679..440f284 100644
--- a/pages.json
+++ b/pages.json
@@ -4,7 +4,7 @@
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "次元Hub",
- "enablePullDownRefresh": true,
+ "enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#141b29",
"navigationStyle": "custom"
}
@@ -13,7 +13,7 @@
"path": "pages/profit/profit",
"style": {
"navigationBarTitleText": "收益",
- "enablePullDownRefresh": true,
+ "enablePullDownRefresh": false,
"navigationStyle": "custom"
}
},
@@ -99,7 +99,7 @@
"path": "pages/userInfo/userInfo",
"style": {
"navigationBarTitleText": "",
- "enablePullDownRefresh": true,
+ "enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}
@@ -132,7 +132,7 @@
"path": "setting/setting",
"style": {
"navigationBarTitleText": "系统设置",
- "enablePullDownRefresh": true
+ "enablePullDownRefresh": false
}
}, {
"path": "notice/notice",
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 2322915..750dfdf 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -182,11 +182,11 @@
},
// 跳转banner详情页
linkTo(item) {
- if (item.id) {
+ /*if (item.id) {
uni.navigateTo({
url: '../index/banner'
});
- }
+ }*/
},
// 获取banner列表
diff --git a/pages/index/material/imgDetail.vue b/pages/index/material/imgDetail.vue
index 5c64511..e9cee03 100644
--- a/pages/index/material/imgDetail.vue
+++ b/pages/index/material/imgDetail.vue
@@ -1,7 +1,13 @@
-
+
+
置顶
@@ -99,7 +105,7 @@
title:'修改标签成功!',
duration: 1000,
success() {
- that.$refs.showRight.close();
+ that.$refs.showPopup.close();
that.signListSelected = [];
}
})
@@ -165,7 +171,7 @@
//修改标签事件
changeSign(){
- console.log('修改标签');
+ // console.log('修改标签');
// 打开窗口
this.$refs.showPopup.open();
},
@@ -183,7 +189,7 @@
duration: 1000,
success() {
setTimeout(() => {
- uni.redirectTo({
+ uni.reLaunch({
url: `/pages/index/material/material?categoryId=${that.typeId}&categoryIndex=${that.typeCurrent}&status=${that.status}`
});
}, 1000)
@@ -203,33 +209,6 @@
const res = await getImgDetails(id)
if (res.data.code === 200) {
this.detailMsg = res.data.data
- console.log('图片详情', this.detailMsg)
- //控制显示图片尺寸
- if(this.detailMsg.typeId === 1){
- this.imgWidth = 750 + 'rpx';
- this.imgHeight = 750 + 'rpx';
- this.marginTop = 250 + 'rpx';
- }else if(this.detailMsg.typeId === 2){
- this.imgWidth = 750 + 'rpx';
- this.imgHeight = 100 + '%';
- this.marginTop = 0 + 'rpx';
- }else if(this.detailMsg.typeId === 3){
- this.imgWidth = 750 + 'rpx';
- this.imgHeight = 100 + '%';
- this.marginTop = 0 + 'rpx';
- }else if(this.detailMsg.typeId === 4){
- this.marginTop = 300 + 'rpx';
- this.imgWidth = 750 + 'rpx';
- this.imgHeight = 600 + 'rpx';
- }else if(this.detailMsg.typeId === 5){
- this.imgWidth = 750 + 'rpx';
- this.imgHeight = 750 + 'rpx';
- this.marginTop = 250 + 'rpx';
- }else if(this.detailMsg.typeId === 6){
- this.imgWidth = 750 + 'rpx';
- this.imgHeight = 750 + 'rpx';
- this.marginTop = 250 + 'rpx';
- }
//控制显示/隐藏盒子
//待审核
if(this.detailMsg.status === "0"){
@@ -271,70 +250,87 @@
height: 100vh;
background: $uni-bg-base-color;
display: flex;
+ justify-content: center;
align-items: center;
z-index: 1;
}
- .main-img {
- }
+ .main-img {
+ }
+
+ .img-2x2 {
+ width: 670rpx;
+ height: 670rpx;
+ }
+
+ .img-1x1 {
+ width: 670rpx;
+ height: calc(670rpx - (670rpx / 4)) ;
+ }
+
+ .img-2x3 {
+ width: calc(100vw - 40rpx);
+ height: calc(100vh - 40rpx) ;
+ }
+
- .toolbar{
- height: 100rpx;
- width: 700rpx;
- z-index: 2;
- border-radius: 20rpx;
- background-color: $uni-primary;
- color: $uni-white;
- position: absolute;
- bottom: 68rpx;
- left: 25rpx;
- right: 25rpx;
- display: flex;
- justify-content: space-around;
- align-items: center;
-
-
-
-
- .border {
- width: 1rpx;
- height: 30rpx;
- background-color: $uni-white;
- position: relative;
- z-index: 2;
- }
-
- .toolbarLeft{
- display: flex;
- justify-content: center;
- flex-direction: column;
- align-items: center;
- width: 200rpx;
- position: relative;
- z-index: 2;
- }
-
- .toolbarMid{
- display: flex;
- justify-content: center;
- flex-direction: column;
- align-items: center;
- width: 200rpx;
- position: relative;
- z-index: 2;
- }
-
- .toolbarRight{
- display: flex;
- justify-content: center;
- flex-direction: column;
- align-items: center;
- width: 200rpx;
- position: relative;
- z-index: 2;
- }
- }
+ .toolbar{
+ height: 100rpx;
+ width: 700rpx;
+ z-index: 2;
+ border-radius: 20rpx;
+ background-color: $uni-primary;
+ color: $uni-white;
+ position: fixed;
+ bottom: 68rpx;
+ left: 25rpx;
+ right: 25rpx;
+ display: flex;
+ justify-content: space-around;
+ align-items: center;
+
+
+
+
+ .border {
+ width: 1rpx;
+ height: 30rpx;
+ background-color: $uni-white;
+ position: relative;
+ z-index: 2;
+ }
+
+ .toolbarLeft{
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ align-items: center;
+ width: 200rpx;
+ position: relative;
+ z-index: 2;
+ }
+
+ .toolbarMid{
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ align-items: center;
+ width: 200rpx;
+ position: relative;
+ z-index: 2;
+ }
+
+ .toolbarRight{
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ align-items: center;
+ width: 200rpx;
+ position: relative;
+ z-index: 2;
+ }
+ }
}
.popup-modal {
diff --git a/pages/index/material/material.vue b/pages/index/material/material.vue
index ace16fc..ea84716 100644
--- a/pages/index/material/material.vue
+++ b/pages/index/material/material.vue
@@ -24,10 +24,17 @@
-->
-
- -----已经到底啦-----
+
+
+
+
+
+
+
@@ -40,7 +47,6 @@
data() {
return {
statusCurrent: 0,
- activeColor: '#007aff',
styleType: 'text',
statusList: ['待审核','审核拒绝','已上架','已下架'],
typeList:[],
@@ -49,12 +55,14 @@
typeId: 1,
status: 0,
pageNum: 1,
- pageSize: 10,
+ pageSize: 18,
creatorImgList: [],
userInfo: {},
imgWidth: 0, // 图片宽
imgHeight: 0, // 图片高
- flag: false
+ flag: false,
+ loadStatus:'noMore', //加载样式:more - 加载前样式,loading - 加载中样式,noMore - 没有数据样式
+ isLoadMore:false, //是否加载中
}
},
onLoad(option) {
@@ -89,8 +97,7 @@
console.log('have userInfo')
}
this.queryListType();
- this.imgWidth = 750/3-20 + 'rpx'
- this.imgHeight = 750/3-20 + 'rpx'
+
},
// 下拉刷新
onPullDownRefresh(){
@@ -100,16 +107,16 @@
this.flag = false;
uni.stopPullDownRefresh();
},
- // 上划加载更多
- onReachBottom() {
- if (this.creatorImgList.length > this.pageSize*this.pageNum-1) {
- this.flag = false;
- this.pageNum += 1
- this.listTiktokImgIn()
- }else{
- this.flag = true;
- }
- },
+ // 上划加载更多
+ onReachBottom(e) {//上拉触底函数
+ if(!this.isLoadMore) { //此处判断,上锁,防止重复请求
+ this.isLoadMore=true
+ if (this.loadStatus === "more") {
+ this.pageNum += 1 //每次上拉请求新的一页
+ this.listTiktokImgIn();
+ }
+ }
+ },
methods: {
// 前往详情页
targetDetail(item) {
@@ -120,14 +127,13 @@
key: 'detailId',
data: item.id,
success() {
- console.log(111111)
uni.navigateTo({
url: `/pages/index/material/imgDetail?categoryId=${that.typeId}&categoryIndex=${that.typeCurrent}&status=${that.status}`,
success:function(){
- console.log('跳转成功!')
+ // console.log('跳转成功!')
},
fail:function(){
- console.log('跳转失败!')
+ // console.log('跳转失败!')
}
})
}
@@ -144,31 +150,15 @@
// that.typeCurrent = 0;
// that.typeId = that.typeIdList[0];
// console.log('status',that.status)
+ that.pageNum = 1;
+ that.loadStatus = 'loading';
+ that.isLoadMore = false;
uni.showLoading({
title: "加载中",
mask: true,
success() {
// 查询指定艺术家图片集合
- const param = {
- creatorId: that.userInfo.id,
- typeId: that.typeId,
- pageSize: that.pageSize,
- pageNum: that.pageNum,
- status: that.status
- };
- listTiktokImgIn(param).then(res => {
- console.log('that.typeId',that.typeId);
- console.log('that.status',that.status);
- if(res.data.code === 200){
- that.creatorImgList.push(...res.data.rows)
- //console.log('调用成功1!', that.creatorImgList);
- }else {
- uni.showModal({
- content: "艺术家图片列表数据加载失败!",
- showCancel: false,
- });
- }
- });
+ that.listTiktokImgIn();
},
complete() {
uni.hideLoading();
@@ -181,52 +171,16 @@
that.creatorImgList = [];
that.typeId = that.typeIdList[e2.currentIndex];
that.typeCurrent = e2.currentIndex;
+ that.pageNum = 1;
+ that.loadStatus = 'loading';
+ that.isLoadMore = false;
//console.log('typeId',that.typeId)
uni.showLoading({
title: "加载中",
mask: true,
success() {
// 查询指定艺术家图片集合
- const param = {
- creatorId: that.userInfo.id,
- typeId: that.typeId,
- pageSize: that.pageSize,
- pageNum: that.pageNum,
- status: that.status
- };
- listTiktokImgIn(param).then(res => {
- // console.log('that.typeId',that.typeId);
- // console.log('that.status',that.status);
- if(res.data.code === 200){
- that.creatorImgList.push(...res.data.rows)
- // console.log(that.creatorImgList)
- //console.log('调用成功2!', that.creatorImgList);
- if(that.typeId === 1){
- that.imgWidth = 750/3-20 + 'rpx'
- that.imgHeight = 750/3-20 + 'rpx'
- }else if(that.typeId === 2){
- that.imgWidth = 750/3-30 + 'rpx'
- that.imgHeight = 750/3+60 + 'rpx'
- }else if(that.typeId === 3){
- that.imgWidth = 750/3-30 + 'rpx'
- that.imgHeight = 750/3+60 + 'rpx'
- }else if(that.typeId === 4){
- that.imgWidth = 750/3+100 + 'rpx'
- that.imgHeight = 750/3 + 'rpx'
- }else if(that.typeId === 5){
- that.imgWidth = 750/3-20 + 'rpx'
- that.imgHeight = 750/3-20 + 'rpx'
- }else if(that.typeId === 6){
- that.imgWidth = 750/3-20 + 'rpx'
- that.imgHeight = 750/3-20 + 'rpx'
- }
- }else {
- uni.showModal({
- content: "艺术家图片列表数据加载失败!",
- showCancel: false,
- });
- }
- });
+ that.listTiktokImgIn();
},
complete() {
uni.hideLoading();
@@ -256,6 +210,7 @@
//查询指定艺术家图片集合
async listTiktokImgIn() {
let that = this;
+ that.loadStatus = 'loading';
const res = await listTiktokImgIn({
pageNum: that.pageNum,
pageSize: that.pageSize,
@@ -264,20 +219,32 @@
creatorId: that.userInfo.id
})
if (res.data.code === 200) {
+ uni.hideLoading();
that.creatorImgList.push(...res.data.rows)
- console.log('creatorImgList',that.creatorImgList);
+ // console.log('creatorImgList',that.creatorImgList);
+ if(res.data.rows.length < that.pageSize){ //判断接口返回数据量小于请求数据量,则表示此为最后一页
+ that.isLoadMore = true
+ that.loadStatus = 'noMore'
+ }else{
+ this.loadStatus = 'more';
+ that.isLoadMore = false
+ }
} else {
uni.showModal({
content: '艺术家图片列表加载失败!',
showCancel: false
});
+ that.isLoadMore = false
+ if(that.page > 1){
+ that.page -= 1
+ }
}
}
}
}
-