无更多动态时不显示更多
This commit is contained in:
parent
bb71d1c322
commit
1503686ddb
|
@ -219,7 +219,9 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div ng-if="(count + page * 10) < all_count">
|
||||||
<div id="more_activities" class="more-events mt10" ng-click="loadActData(page+1);">更多</div>
|
<div id="more_activities" class="more-events mt10" ng-click="loadActData(page+1);">更多</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
|
||||||
|
|
||||||
console.log("ActivityController load");
|
console.log("ActivityController load");
|
||||||
$scope.activities = rms.get("activities") || [];
|
$scope.activities = rms.get("activities") || [];
|
||||||
$scope.page = 1;
|
$scope.page = 0;
|
||||||
|
|
||||||
var loadActData = function(page){
|
var loadActData = function(page){
|
||||||
$scope.page = page;
|
$scope.page = page;
|
||||||
|
@ -78,6 +78,8 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
|
||||||
data: {openid: auth.openid(), page: page}
|
data: {openid: auth.openid(), page: page}
|
||||||
}).then(function successCallback(response) {
|
}).then(function successCallback(response) {
|
||||||
$scope.activities = $scope.activities.concat(response.data.data);
|
$scope.activities = $scope.activities.concat(response.data.data);
|
||||||
|
$scope.all_count = response.data.all_count;
|
||||||
|
$scope.count = response.data.count;
|
||||||
rms.save('activities', $scope.activities);
|
rms.save('activities', $scope.activities);
|
||||||
}, function errorCallback(response) {
|
}, function errorCallback(response) {
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue