私有动态不显示的问题
This commit is contained in:
parent
281fcf315f
commit
930d95f8b5
2
1234567
2
1234567
|
@ -1 +1 @@
|
|||
{"access_token":"t3XVpwqZbAO6-uRz_ltKUiplgHcYVstA0p43ECTHEjt0-FvVLU7VXzD7n6Z76PYFWHf8hvNHZtLNAUT-FlTl98wWLIK_lh9mhzHxS_x1iXCc0mC38RjxFzZ_NSeERW7dJZCfADAOEH","expires_in":7200,"got_token_at":1460105603}
|
||||
{"access_token":"G4QG7VJgF8Vmm71kLgC1XgHvyeXK-ZZrikaG7sPBrKuw6vgbYzV2FPYuNq3wNp7e-hsyfDI--rTlVspQXZk5bRK_CsZl8wWvuiPazV9mznGpOBGE5zVR8WOtvlqhylpHIMBdABABFU","expires_in":7200,"got_token_at":1460179500}
|
|
@ -33,8 +33,8 @@ module Mobile
|
|||
shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id)
|
||||
page = params[:page] ? params[:page] : 0
|
||||
user_project_ids = (user.projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (user.courses.visible.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.visible.map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
user_project_ids = (user.projects.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (user.projects.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (user.courses.map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (user.courses.map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course')"
|
||||
project_types = "('Message','Issue','ProjectCreateInfo')"
|
||||
principal_types = "JournalsForMessage"
|
||||
|
|
|
@ -216,7 +216,7 @@
|
|||
</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(current_page+1);">更多</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
var app = angular.module('wechat', ['ngRoute','ngCookies']);
|
||||
var apiUrl = 'http://wechat.trustie.net/api/v1/';
|
||||
var debug = true; //调试标志,如果在本地请置为true
|
||||
var debug = false; //调试标志,如果在本地请置为true
|
||||
|
||||
if(debug===true){
|
||||
apiUrl = 'http://localhost:3000/api/v1/';
|
||||
|
@ -77,7 +77,15 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
|
|||
url: apiUrl+ "activities",
|
||||
data: {openid: auth.openid(), page: page}
|
||||
}).then(function successCallback(response) {
|
||||
$scope.activities = $scope.activities.concat(response.data.data);
|
||||
$scope.current_page = 0;
|
||||
console.log($scope.current_page);
|
||||
console.log(response.data.page);
|
||||
if($scope.current_page < response.data.page) {
|
||||
$scope.activities = $scope.activities.concat(response.data.data);
|
||||
} else {
|
||||
$scope.activities = response.data.data;
|
||||
}
|
||||
$scope.current_page = response.data.page
|
||||
$scope.all_count = response.data.all_count;
|
||||
$scope.count = response.data.count;
|
||||
console.log(response.data);
|
||||
|
@ -97,12 +105,10 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
|
|||
$scope.loadActData = loadActData;
|
||||
|
||||
$scope.addPraise = function(act){
|
||||
console.log(act);
|
||||
common.addCommonPraise(act);
|
||||
};
|
||||
|
||||
$scope.decreasePraise = function(act){
|
||||
console.log(act);
|
||||
common.decreaseCommonPraise(act);
|
||||
};
|
||||
|
||||
|
@ -110,7 +116,6 @@ app.controller('ActivityController',function($scope, $http, auth, rms, common){
|
|||
|
||||
app.factory('common', function($http, auth, $routeParams){
|
||||
var addCommonReply = function(id, type, data, cb){
|
||||
console.log(data.comment);
|
||||
|
||||
if(!data.comment || data.comment.length<=0){
|
||||
return;
|
||||
|
@ -197,12 +202,10 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth, co
|
|||
};
|
||||
|
||||
$scope.addPraise = function(act){
|
||||
console.log(act);
|
||||
common.addCommonPraise(act);
|
||||
};
|
||||
|
||||
$scope.decreasePraise = function(act){
|
||||
console.log(act);
|
||||
common.decreaseCommonPraise(act);
|
||||
};
|
||||
});
|
||||
|
@ -229,12 +232,10 @@ app.controller('HomeworkController', function($scope, $http, $routeParams, auth,
|
|||
};
|
||||
|
||||
$scope.addPraise = function(act){
|
||||
console.log(act);
|
||||
common.addCommonPraise(act);
|
||||
};
|
||||
|
||||
$scope.decreasePraise = function(act){
|
||||
console.log(act);
|
||||
common.decreaseCommonPraise(act);
|
||||
};
|
||||
});
|
||||
|
@ -261,12 +262,10 @@ app.controller('CourseNoticeController', function($scope, $http, $routeParams, a
|
|||
};
|
||||
|
||||
$scope.addPraise = function(act){
|
||||
console.log(act);
|
||||
common.addCommonPraise(act);
|
||||
};
|
||||
|
||||
$scope.decreasePraise = function(act){
|
||||
console.log(act);
|
||||
common.decreaseCommonPraise(act);
|
||||
};
|
||||
});
|
||||
|
@ -293,12 +292,10 @@ app.controller('DiscussionController', function($scope, $http, $routeParams, aut
|
|||
};
|
||||
|
||||
$scope.addPraise = function(act){
|
||||
console.log(act);
|
||||
common.addCommonPraise(act);
|
||||
};
|
||||
|
||||
$scope.decreasePraise = function(act){
|
||||
console.log(act);
|
||||
common.decreaseCommonPraise(act);
|
||||
};
|
||||
});
|
||||
|
@ -383,9 +380,6 @@ app.directive('textAutoHeight', function($timeout){
|
|||
var e = element.parent().children().eq(4);
|
||||
var height = e[0].scrollHeight;
|
||||
var offsetHeight = e[0].offsetHeight;
|
||||
console.log(height);
|
||||
console.log(offsetHeight);
|
||||
console.log(attr);
|
||||
if(height>90){
|
||||
element.css('display', 'block');
|
||||
element.on('click', function(){
|
||||
|
|
Loading…
Reference in New Issue