|
|
@@ -2,7 +2,7 @@ var _request = require('../../utils/request.js')
|
|
|
Page({
|
|
|
data: {
|
|
|
projects_page: 1,
|
|
|
- projects_per_page: 6,
|
|
|
+ projects_per_page: 8,
|
|
|
projects_more: true,
|
|
|
projects_change: false,
|
|
|
projects: [],
|
|
|
@@ -29,7 +29,7 @@ Page({
|
|
|
projects_page: 1,
|
|
|
projects_change: true
|
|
|
})
|
|
|
- this.getLive()
|
|
|
+ this.getLive('refresh')
|
|
|
wx.stopPullDownRefresh()
|
|
|
},
|
|
|
onReachBottom: function () {
|
|
|
@@ -41,7 +41,7 @@ Page({
|
|
|
this.getLive()
|
|
|
}
|
|
|
},
|
|
|
- getLive: function () {
|
|
|
+ getLive: function (type) {
|
|
|
var that = this
|
|
|
var url = 'v1/live_broad/list'
|
|
|
var params = {
|
|
|
@@ -50,10 +50,17 @@ Page({
|
|
|
}
|
|
|
var success = function (res) {
|
|
|
console.log('res',res);
|
|
|
- var result = that.data.projects.concat(res.data.list || [])
|
|
|
- that.setData({
|
|
|
- projects:result
|
|
|
- })
|
|
|
+ if(type != 'refresh'){
|
|
|
+ var result = that.data.projects.concat(res.data.list || [])
|
|
|
+ that.setData({
|
|
|
+ projects:result
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ that.setData({
|
|
|
+ projects:res.data.list
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
var listMore = res.data.list_count > that.data.projects.length
|
|
|
that.setData({
|