|
|
|
@ -11,7 +11,7 @@ |
|
|
|
:note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" |
|
|
|
:rightText="item.downloadNum+'次'" /> |
|
|
|
</uni-list> |
|
|
|
<view class="ivOver" v-if="flag">-----已经到底啦-----</view> |
|
|
|
<view class="ivOver" v-if="flagAd">-----已经到底啦-----</view> |
|
|
|
</view> |
|
|
|
<view v-if="typeId === 1"> |
|
|
|
<uni-list border-full v-for="(item,index) in preprofitInviteList" :key="index"> |
|
|
|
@ -19,7 +19,7 @@ |
|
|
|
:note="item.appType+'&'+item.platform+'&'+item.type" :thumb="item.url" thumb-size="lg" |
|
|
|
:rightText="item.downloadNum+'次'" /> |
|
|
|
</uni-list> |
|
|
|
<view class="ivOver" v-if="flag">-----已经到底啦-----</view> |
|
|
|
<view class="ivOver" v-if="flagInvite">-----已经到底啦-----</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -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: '即将到账列表数据加载失败!', |
|
|
|
|