|
|
|
// pages/me/follow.js
|
|
|
|
import util from '../../utils/util';
|
|
|
|
import App from '../../utils/api';
|
|
|
|
const {regeneratorRuntime} = global
|
|
|
|
const createRecycleContext = require('miniprogram-recycle-view')
|
|
|
|
Page({
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -16,6 +16,21 @@ Page({ |
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
options:null,
|
|
|
|
ctx:null,
|
|
|
|
onReady: function() {
|
|
|
|
this.ctx = createRecycleContext({
|
|
|
|
id: 'recycleId',
|
|
|
|
dataKey: 'sellers',
|
|
|
|
page: this,
|
|
|
|
itemSize: { // 这个参数也可以直接传下面定义的this.itemSizeFunc函数
|
|
|
|
width: 337,
|
|
|
|
height: 150
|
|
|
|
}
|
|
|
|
})
|
|
|
|
// ctx.append(newList)
|
|
|
|
// ctx.update(beginIndex, list)
|
|
|
|
// ctx.destroy()
|
|
|
|
},
|
|
|
|
onLoad: function (options) {
|
|
|
|
//latitude=34.215637&longitude=108.891264&scale=16&height=397
|
|
|
|
this.options=options
|
|
...
|
...
|
@@ -39,12 +54,6 @@ Page({ |
|
|
|
sellers:sellers
|
|
|
|
})
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
*/
|
|
|
|
onReady: function () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面显示
|
|
...
|
...
|
@@ -84,7 +93,12 @@ Page({ |
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
*/
|
|
|
|
onReachBottom: function (e) {
|
|
|
|
console.log(e)
|
|
|
|
// console.log(e)
|
|
|
|
// if(this.hasMore){
|
|
|
|
// this.GetCollectionSellerList();
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
scrollToLower(){
|
|
|
|
if(this.hasMore){
|
|
|
|
this.GetCollectionSellerList();
|
|
|
|
}
|
|
...
|
...
|
@@ -124,9 +138,10 @@ Page({ |
|
|
|
}
|
|
|
|
seller.hasFollow=true
|
|
|
|
})
|
|
|
|
this.ctx.append(sellers)
|
|
|
|
sellers=[...this.data.sellers,...sellers]
|
|
|
|
this.setData({
|
|
|
|
sellers:sellers,
|
|
|
|
//sellers:sellers,
|
|
|
|
hasMore:this.hasMore,
|
|
|
|
})
|
|
|
|
this.sellers=sellers
|
...
|
...
|
|