|
@@ -66,27 +66,27 @@ Page({
|
|
onLoad: function() {
|
|
onLoad: function() {
|
|
var that = this;
|
|
var that = this;
|
|
// 获取关注的信息
|
|
// 获取关注的信息
|
|
- var data={
|
|
|
|
- userId:this.data.uerId,
|
|
|
|
- currPage:this.data.currentPage
|
|
|
|
- };
|
|
|
|
- var that = this;
|
|
|
|
- wx.showLoading({title: '加载中…'});
|
|
|
|
-
|
|
|
|
- wxRequest.followList(data).then((res)=>{
|
|
|
|
- console.log(res);
|
|
|
|
- wx.hideLoading()
|
|
|
|
- if(res.statusCode==200){
|
|
|
|
- that.setData({
|
|
|
|
- array:res.data.data.incInfos
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- wx.showToast({
|
|
|
|
- title: '125',
|
|
|
|
- icon: 'none'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // var data={
|
|
|
|
+ // userId:this.data.uerId,
|
|
|
|
+ // currPage:this.data.currentPage
|
|
|
|
+ // };
|
|
|
|
+ // var that = this;
|
|
|
|
+ // wx.showLoading({title: '加载中…'});
|
|
|
|
+ this.getFollow(this.data.uerId,this.data.currentPage);
|
|
|
|
+ // wxRequest.followList(data).then((res)=>{
|
|
|
|
+ // console.log(res);
|
|
|
|
+ // wx.hideLoading()
|
|
|
|
+ // if(res.statusCode==200){
|
|
|
|
+ // that.setData({
|
|
|
|
+ // array:res.data.data.incInfos
|
|
|
|
+ // })
|
|
|
|
+ // }else{
|
|
|
|
+ // wx.showToast({
|
|
|
|
+ // title: '125',
|
|
|
|
+ // icon: 'none'
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
// 获取系统信息
|
|
// 获取系统信息
|
|
wx.getSystemInfo({
|
|
wx.getSystemInfo({
|
|
success: function(res) {
|
|
success: function(res) {
|
|
@@ -110,12 +110,43 @@ Page({
|
|
}
|
|
}
|
|
that.setData({
|
|
that.setData({
|
|
currentPage: tempCurrentPage,
|
|
currentPage: tempCurrentPage,
|
|
|
|
+ userId:wx.getStorageSync('openid')
|
|
})
|
|
})
|
|
|
|
+ that.getFollow(that.data.userId,that.data.currentPage);
|
|
},
|
|
},
|
|
|
|
|
|
-
|
|
|
|
- getFollow:function(userId){
|
|
|
|
-
|
|
|
|
|
|
+ getFollow:function(userId,currentPage){
|
|
|
|
+ console.log(userId,currentPage);
|
|
|
|
+ let data = {
|
|
|
|
+ userId:userId,
|
|
|
|
+ currPage:currentPage
|
|
|
|
+ }
|
|
|
|
+ var pageIndex = this.data.currentPage;
|
|
|
|
+ if(pageIndex==1){
|
|
|
|
+ wx.showLoading({title: '加载中…'})
|
|
|
|
+ }
|
|
|
|
+ wxRequest.followList(data).then((res)=>{
|
|
|
|
+ console.log(res);
|
|
|
|
+ wx.hideLoading()
|
|
|
|
+ if(res.statusCode==200){
|
|
|
|
+ if(pageIndex==1){
|
|
|
|
+ this.setData({
|
|
|
|
+ array:res.data.data.incInfos,
|
|
|
|
+ totalpages:res.data.data.pages
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ var array=this.data.array.concat(res.data.data.incInfos)
|
|
|
|
+ this.setData({
|
|
|
|
+ array:array
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: '125',
|
|
|
|
+ icon: 'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
|
|
},
|
|
},
|
|
open: function (e) {
|
|
open: function (e) {
|