|
@@ -78,12 +78,19 @@ Page({
|
|
|
templates
|
|
|
});
|
|
|
if (myIndex == 0) {
|
|
|
+
|
|
|
groupInit(this);
|
|
|
}
|
|
|
if (myIndex == 1) {
|
|
|
+ this.setData({
|
|
|
+ recommendPageNo: 1
|
|
|
+ })
|
|
|
hotInit(this);
|
|
|
}
|
|
|
if (myIndex == 2) {
|
|
|
+ this.setData({
|
|
|
+ followPageNo: 1
|
|
|
+ })
|
|
|
followInit(this);
|
|
|
}
|
|
|
if (myIndex == 3) {
|
|
@@ -97,24 +104,6 @@ Page({
|
|
|
// });
|
|
|
}
|
|
|
},
|
|
|
- aa: function () {
|
|
|
- let a = new Promise((resolve, reject) => {
|
|
|
- resolve(console.log('aa'))
|
|
|
- });
|
|
|
- return a;
|
|
|
- },
|
|
|
- bb: function () {
|
|
|
- let b = new Promise((resolve, reject) => {
|
|
|
- resolve(console.log('bb'))
|
|
|
- });
|
|
|
- return b
|
|
|
- },
|
|
|
- cc: function () {
|
|
|
- let c = new Promise((resolve, reject) => {
|
|
|
- console.log('cc')
|
|
|
- });
|
|
|
- return c
|
|
|
- },
|
|
|
onLoad: function (options) {
|
|
|
console.log(options)
|
|
|
this.uid = wx.getStorageSync('uid');
|
|
@@ -173,10 +162,10 @@ Page({
|
|
|
},
|
|
|
// 触底加载
|
|
|
onReachBottom: function () {
|
|
|
- console.log(this.data.recommendPageNo)
|
|
|
- console.log('bottom')
|
|
|
+
|
|
|
// 当前在推荐页面 加载推荐
|
|
|
if (this.data.myIndex === 1) {
|
|
|
+ console.log(this.data.recommendPageNo)
|
|
|
this.setData({
|
|
|
recommendPageNo: this.data.recommendPageNo + 1
|
|
|
})
|