|
@@ -27,9 +27,11 @@ Page({
|
|
|
total3: 0,
|
|
|
page4: 1,
|
|
|
total4: 0,
|
|
|
- page5:1, // 今日留言加载更多
|
|
|
+ page5:1,
|
|
|
total5:0,
|
|
|
- error:0
|
|
|
+ error:0,
|
|
|
+ page6:1,
|
|
|
+ total6:0,
|
|
|
},
|
|
|
onLoad() {
|
|
|
|
|
@@ -151,14 +153,26 @@ Page({
|
|
|
|
|
|
getData(){
|
|
|
//心得
|
|
|
- $api.getChampionlList().then(res => {
|
|
|
+ var championList = this.data.championList;
|
|
|
+ $api.getChampionlList({page: this.data.page6, page_size: 20}).then(res => {
|
|
|
+ res.data.data.list.forEach(item => {
|
|
|
+ championList.push(item)
|
|
|
+ })
|
|
|
this.setData({
|
|
|
- championList: res.data.data.list
|
|
|
+ championList: championList,
|
|
|
+ total6: res.data.data.total
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
+ next6: function () {
|
|
|
+ if (this.data.championList.length < this.data.total6) {
|
|
|
+ const page = this.data.page6 + 1
|
|
|
+ this.setData({
|
|
|
+ page6: page
|
|
|
+ })
|
|
|
+ this.getData()
|
|
|
+ }
|
|
|
+ },
|
|
|
//热门选手分页
|
|
|
next3: function () {
|
|
|
if (this.data.hotFollowList.length < this.data.total3) {
|
|
@@ -255,14 +269,13 @@ Page({
|
|
|
|
|
|
getExp(){
|
|
|
$api.getExperience({page:this.data.page5,page_size:20}).then(res=>{
|
|
|
- var data=res.data.data.list;
|
|
|
- data.forEach(item=>{
|
|
|
- item.today_income=parseInt(item.today_income)+"%"
|
|
|
- item.total_income=parseInt(item.total_income)+"%"
|
|
|
+ var hotFollowList = this.data.explist
|
|
|
+ res.data.data.list.forEach(item => {
|
|
|
+ hotFollowList.push(item)
|
|
|
})
|
|
|
this.setData({
|
|
|
- explist: data,
|
|
|
- total5: res.data.data.list.total
|
|
|
+ explist: hotFollowList,
|
|
|
+ total5: res.data.data.total
|
|
|
})
|
|
|
})
|
|
|
},
|