邀请好友列表增加触底加载
This commit is contained in:
@@ -99,7 +99,7 @@
|
|||||||
<view class="margin u-m-t-40 u-m-b-32 padding bg-white radius-16">
|
<view class="margin u-m-t-40 u-m-b-32 padding bg-white radius-16">
|
||||||
<view class="u-font-32 color-333 font-bold u-text-center">已邀请列表</view>
|
<view class="u-font-32 color-333 font-bold u-text-center">已邀请列表</view>
|
||||||
<view v-if="inviterList.length" class="u-m-t-20">
|
<view v-if="inviterList.length" class="u-m-t-20">
|
||||||
<view class="flex justify-between" style="line-height: 80rpx;" v-for="(item, index) in inviterList"
|
<view class="flex justify-between u-m-b-20" style="line-height: 80rpx;" v-for="(item, index) in inviterList"
|
||||||
:key='index'>
|
:key='index'>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<!-- <u-image :src="item.avatar == null?avatar:item.avatar" width="40px" mode="widthFix"></u-image> -->
|
<!-- <u-image :src="item.avatar == null?avatar:item.avatar" width="40px" mode="widthFix"></u-image> -->
|
||||||
@@ -115,7 +115,9 @@
|
|||||||
<!-- <view class="u-p-t-30 u-p-b-30 empty" v-if="hasAjax&&!inviterList.length">
|
<!-- <view class="u-p-t-30 u-p-b-30 empty" v-if="hasAjax&&!inviterList.length">
|
||||||
<my-empty ></my-empty>
|
<my-empty ></my-empty>
|
||||||
</view> -->
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<view class="u-p-b-32">
|
||||||
|
<u-loadmore v-if="hasAjax" :status="comStatus" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="padding" style="position: relative;height: 250rpx;">
|
<!-- <view class="padding" style="position: relative;height: 250rpx;">
|
||||||
@@ -172,6 +174,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loading:false,
|
||||||
earning: {
|
earning: {
|
||||||
inviteMoney: 0,
|
inviteMoney: 0,
|
||||||
inviteGoldMoney: 0,
|
inviteGoldMoney: 0,
|
||||||
@@ -200,6 +203,7 @@
|
|||||||
},
|
},
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
|
isEnd:false,
|
||||||
inviterName: '', //邀请码
|
inviterName: '', //邀请码
|
||||||
cumulativeRevenue: '', //累计收益
|
cumulativeRevenue: '', //累计收益
|
||||||
inviterNumber: '', //邀请人数
|
inviterNumber: '', //邀请人数
|
||||||
@@ -214,9 +218,21 @@
|
|||||||
h5SaveImg: '',
|
h5SaveImg: '',
|
||||||
modalName: '',
|
modalName: '',
|
||||||
haibaoImgH5: '',
|
haibaoImgH5: '',
|
||||||
|
inviteSignCount:0,
|
||||||
qdCode: '', //渠道码
|
qdCode: '', //渠道码
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
comStatus(){
|
||||||
|
if(this.isEnd){
|
||||||
|
return 'nomore'
|
||||||
|
}
|
||||||
|
if(this.loading){
|
||||||
|
return 'loading'
|
||||||
|
}
|
||||||
|
return 'loadmore'
|
||||||
|
}
|
||||||
|
},
|
||||||
onShareAppMessage(res) {
|
onShareAppMessage(res) {
|
||||||
return {
|
return {
|
||||||
path: '/pages/index/index?invitation=' + this.invitationCode + '&qdCode=' + this
|
path: '/pages/index/index?invitation=' + this.invitationCode + '&qdCode=' + this
|
||||||
@@ -262,6 +278,13 @@
|
|||||||
this.getTouTiao()
|
this.getTouTiao()
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if(this.isEnd||this.loading){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.page+=1
|
||||||
|
this.getInviter()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toGold(){
|
toGold(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -436,14 +459,18 @@
|
|||||||
this.erweimapath = path;
|
this.erweimapath = path;
|
||||||
},
|
},
|
||||||
getInviter() {
|
getInviter() {
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
limit: this.limit
|
limit: this.limit
|
||||||
}
|
}
|
||||||
|
this.loading=true;
|
||||||
this.$u.api.inviter(data).then(res => {
|
this.$u.api.inviter(data).then(res => {
|
||||||
|
this.loading=false;
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.inviterList = res.data.list
|
this.inviterList =this.inviterList.concat(res.data.list)
|
||||||
this.hasAjax = true;
|
this.hasAjax = true;
|
||||||
|
this.isEnd=this.page>=res.data.totalPage?true:false;
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
|
|||||||
Reference in New Issue
Block a user