diff --git a/.gitignore b/.gitignore index 44fbeba..63e1d4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ /node_modules/ -/unpackage/ \ No newline at end of file +/unpackage/ +/.idea/ +/.hbuilderx/ \ No newline at end of file diff --git a/pages-userInfo/contact/contact.vue b/pages-userInfo/contact/contact.vue index 507f695..1d99874 100644 --- a/pages-userInfo/contact/contact.vue +++ b/pages-userInfo/contact/contact.vue @@ -1,106 +1,60 @@ diff --git a/pages-userInfo/withdraw/withdraw.vue b/pages-userInfo/withdraw/withdraw.vue index fbcb5fc..3970962 100644 --- a/pages-userInfo/withdraw/withdraw.vue +++ b/pages-userInfo/withdraw/withdraw.vue @@ -5,6 +5,7 @@ :note="item.createTime+'||'+item.channel+'||'+item.status" :rightText="'¥'+item.amt" @click="targetToDetail(item.orderId)" /> + -----已经到底啦----- @@ -18,7 +19,8 @@ withdrawList: [], pageSize: 10, pageNum: 1, - userInfo: {} + userInfo: {}, + flag: false } }, created() { @@ -35,9 +37,12 @@ }, // 上划加载更多 onReachBottom() { - if (this.withdrawList.length > 9) { + if (this.withdrawList.length > this.pageSize*this.pageNum-1) { + this.flag = false; this.pageNum += 1 this.getWithdrawList(); + }else{ + this.flag = true; } }, methods: { @@ -71,7 +76,15 @@ } - diff --git a/pages/profit/profitInDetails.vue b/pages/profit/profitInDetails.vue index 202fc53..982334d 100644 --- a/pages/profit/profitInDetails.vue +++ b/pages/profit/profitInDetails.vue @@ -6,18 +6,20 @@ - + + -----已经到底啦----- - + + -----已经到底啦----- @@ -34,8 +36,13 @@ typeId: 0, activeColor: '#007aff', styleType: 'text', - inProfitList: [], - userInfo: {} + inProfitAdList: [], + inProfitInviteList: [], + userInfo: {}, + pageSize: 10, + pageNum: 1, + flagAd: false, + flagInvite: false } }, created() { @@ -49,16 +56,57 @@ this.queryFrontInProfitAmt() } }, + // 下拉刷新 + onPullDownRefresh() { + if(this.typeId === 0){ + this.pageNum = 1 + this.inProfitAdList = [] + this.queryFrontInProfitAmt() + uni.stopPullDownRefresh() + }else{ + this.pageNum = 1 + this.inProfitInviteList = [] + this.queryFrontInProfitAmt() + uni.stopPullDownRefresh() + } + }, + // 上划加载更多 + onReachBottom() { + if(this.typeId === 0){ + if (this.inProfitAdList.length > this.pageNum*this.pageSize-1 ) { + this.flagAd = false; + this.pageNum += 1 + this.queryFrontInProfitAmt(); + }else{ + this.flagAd = true; + } + }else{ + if (this.inProfitInviteList.length > this.pageNum*this.pageSize-1 ) { + this.flagInvite = false; + this.pageNum += 1 + this.queryFrontInProfitAmt(); + }else{ + this.flagInvite = true; + } + } + + }, methods: { // 查询指定艺术家已入账收益列表 async queryFrontInProfitAmt() { const res = await queryFrontInProfitAmt({ creatorId: this.userInfo.id, - type: this.typeId + type: this.typeId, + pageSize: this.pageSize, + pageNum: this.pageNum }) if (res.data.code === 200) { - this.inProfitList = res.data.data + if(this.typeId === 0){ + this.inProfitAdList.push(...res.data.rows) + }else{ + this.inProfitInviteList.push(...res.data.rows) + } } else { uni.showModal({ content: '已入账列表数据加载失败!', @@ -69,6 +117,8 @@ onClickItem(e) { let that = this + that.inProfitAdList = [] + that.inProfitInviteList = [] if (that.typeId !== e.currentIndex) { that.typeId = e.currentIndex uni.showLoading({ @@ -78,11 +128,19 @@ // 查询指定艺术家已入账收益列表 const param = { creatorId: that.userInfo.id, - type: that.typeId + type: that.typeId, + pageSize: that.pageSize, + pageNum: 1 } queryFrontInProfitAmt(param).then(res => { if (res.data.code === 200) { - that.inProfitList = res.data.data + if(that.typeId === 0){ + that.inProfitAdList.push(...res.data.rows) + }else{ + that.inProfitInviteList.push(...res.data.rows) + } + console.log('点击操作inProfitAdList',that.inProfitAdList) + console.log('点击操作inProfitInviteList',that.inProfitInviteList) } else { uni.showModal({ content: '已入账列表数据加载失败!', @@ -111,6 +169,13 @@ } - diff --git a/pages/profit/profitPreDetails.vue b/pages/profit/profitPreDetails.vue index f72859a..1e391e2 100644 --- a/pages/profit/profitPreDetails.vue +++ b/pages/profit/profitPreDetails.vue @@ -11,7 +11,7 @@ :note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" :rightText="item.downloadNum+'次'" /> - -----已经到底啦----- + -----已经到底啦----- @@ -19,7 +19,7 @@ :note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" :rightText="item.downloadNum+'次'" /> - -----已经到底啦----- + -----已经到底啦----- @@ -41,7 +41,8 @@ userInfo: {}, pageSize: 10, pageNum: 1, - flag: false + flagAd: false, + flagInvite: false } }, created() { @@ -57,25 +58,44 @@ }, // 下拉刷新 onPullDownRefresh() { - this.pageNum = 1 - this.preProfitList = [] - this.queryFrontPreProfit() - uni.stopPullDownRefresh() + if(this.typeId === 0){ + this.pageNum = 1 + this.preProfitAdList = [] + this.queryFrontPreProfit() + uni.stopPullDownRefresh() + }else{ + this.pageNum = 1 + this.preprofitInviteList = [] + this.queryFrontPreProfit() + uni.stopPullDownRefresh() + } }, // 上划加载更多 onReachBottom() { - console.log('this.preProfitList.length',this.preProfitList.length) - if (this.preProfitList.length > this.pageNum*this.pageSize-1 ) { - this.flag = false; - this.pageNum += 1 - this.queryFrontPreProfit(); + if(this.typeId === 0){ + if (this.preProfitAdList.length > this.pageNum*this.pageSize-1 ) { + this.flagAd = false; + this.pageNum += 1 + this.queryFrontPreProfit(); + }else{ + this.flagAd = true; + } }else{ - this.flag = true; + if (this.preprofitInviteList.length > this.pageNum*this.pageSize-1 ) { + this.flagInvite = false; + this.pageNum += 1 + this.queryFrontPreProfit(); + }else{ + this.flagInvite = true; + } } + }, methods: { onClickItem(e) { let that = this + that.preProfitAdList = [] + that.preprofitInviteList = [] if (that.typeId !== e.currentIndex) { that.typeId = e.currentIndex uni.showLoading({ @@ -91,15 +111,13 @@ } queryFrontPreProfit(param).then(res => { if (res.data.code === 200) { - if(this.typeId = 0){ - this.preProfitAdList.push(...res.data.rows) + if(that.typeId === 0){ + that.preProfitAdList.push(...res.data.rows) }else{ - this.preprofitInviteList.push(...res.data.rows) + that.preprofitInviteList.push(...res.data.rows) } - console.log('点击操作preProfitAdList',this.preProfitAdList) - console.log('点击操作preprofitInviteList',this.preprofitInviteList) - that.preProfitList = res.data.rows - this.flag = false; + console.log('点击操作preProfitAdList',that.preProfitAdList) + console.log('点击操作preprofitInviteList',that.preprofitInviteList) } else { uni.showModal({ content: '即将到账列表数据加载失败!', @@ -124,18 +142,12 @@ pageSize: this.pageSize, pageNum: this.pageNum }) - console.log('this.typeId1',this.typeId) if (res.data.code === 200) { - console.log('this.typeId2',this.typeId) if(this.typeId === 0){ - console.log('this.typeId3',this.typeId) this.preProfitAdList.push(...res.data.rows) }else{ - console.log('this.typeId4',this.typeId) this.preprofitInviteList.push(...res.data.rows) } - console.log('this.preProfitAdList',this.preProfitAdList) - console.log('this.preprofitInviteList',this.preprofitInviteList) } else { uni.showModal({ content: '即将到账列表数据加载失败!',