diff --git a/pages/siyutong/activityDetail/index.wxml b/pages/siyutong/activityDetail/index.wxml
index c3304be..bdd29a7 100644
--- a/pages/siyutong/activityDetail/index.wxml
+++ b/pages/siyutong/activityDetail/index.wxml
@@ -6,7 +6,7 @@
活动内容
{{info.remark}}
-
+
diff --git a/pages/siyutong/index.js b/pages/siyutong/index.js
index 32470b3..6b74797 100644
--- a/pages/siyutong/index.js
+++ b/pages/siyutong/index.js
@@ -17,6 +17,11 @@ Page({
},
swiperCurrent: 0,
list: [],
+ pageNo: 1,
+ noData: false,
+ end: false,
+ load: true,
+ loading: false,
},
//生命周期函数--监听页面加载
@@ -49,13 +54,29 @@ Page({
//活动列表
getAppSytactivityList(){
+ this.setData({
+ load: false,
+ loading: true,
+ })
let params = {};
- params['page'] = 1;
- params['size'] = 100;
+ params['page'] = this.data.pageNo;
+ params['size'] = 10;
_.apiQuery.getAppSytactivityList(params).then(res => {
this.setData({
- list: this.getIconByGroup(res.data.list),
+ pageNo: this.data.pageNo + 1,
+ list: this.data.list.concat(res.data.list),
+ load: true,
+ loading: false,
})
+ if (res.data.total == 0) {
+ this.setData({
+ noData: true
+ })
+ } else if (this.data.list.length>10&&this.data.list.length == res.data.total) {
+ this.setData({
+ end: true
+ })
+ }
wx.stopPullDownRefresh()
});
},
@@ -88,23 +109,23 @@ Page({
},
//页面相关事件处理函数--监听用户下拉动作
- onPullDownRefresh: function () {
+ onPullDownRefresh(){
this.setData({
- swiperOptions: {
- indicatorDots: false,
- vertical: false,
- autoplay: false,
- interval: 4000,
- duration: 1000,
- items: 1,
- circular: false,
- current: 0
- },
- swiperCurrent: 0,
list: [],
+ pageNo: 1,
+ noData: false,
+ end: false,
+ load: true,
+ loading: false,
})
this.getAppSytactivityTabs()
this.getAppSytactivityList()
},
+ //页面上拉触底事件的处理函数
+ onReachBottom(){
+ if (this.data.noData || this.data.end||!this.data.load) return;
+ this.getAppSytactivityList()
+ },
+
})
\ No newline at end of file
diff --git a/pages/siyutong/index.wxml b/pages/siyutong/index.wxml
index 41338f2..5b6f547 100644
--- a/pages/siyutong/index.wxml
+++ b/pages/siyutong/index.wxml
@@ -2,43 +2,29 @@
-
+
+
+
-
-
-
-
-
-
- {{it.title}}
-
- {{it.type_name}}
-
-
-
-
-
-
-
-
-
-
-
+
+
+ {{item.title}}
+
+ {{item.type_name}}
+
+
-
+
+
+
\ No newline at end of file