Merge branch 'weixin_guange' of https://git.trustie.net/jacknudt/trustieforge into weixin_guange

This commit is contained in:
Tim 2016-08-22 14:30:00 +08:00
commit 4f3f6358fc
17 changed files with 25 additions and 20 deletions

View File

@ -420,7 +420,10 @@ class WechatsController < ActionController::Base
logger.info params
unless (user_binded?(open_id) || params[:state] == "invite_code" || params[:state] == "project_invite_code" || params[:state] == "blog_comment" || params[:state] == "course_notice" || params[:state] == "project_discussion" || params[:state] == "course_discussion" || params[:state] == "homework" || params[:state] == "issues" || params[:state] == "journal_for_message")
@path = '/login'
if !(session["login"] != nil && session["login"] == false)
@path = '/login'
end
session["login"] = nil
else
if params[:state] == 'myclass'
@course_id = params[:id];
@ -430,12 +433,14 @@ class WechatsController < ActionController::Base
session[:wechat_openid] = open_id
if params[:code]
#不跳转至绑定界面的标志
session["login"] = false
if params[:userid]
render "/wechat/user_activities##{@path}?id=#{params[:id]}&userid=#{params[:userid]}" and return
redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}&userid=#{params[:userid]}" and return
elsif params[:id]
render "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
else
render "/wechat/user_activities##{@path}" and return
redirect_to "/wechat/user_activities##{@path}" and return
end
# redirect_to "/wechat/user_activities##{@path}?id=#{params[:id]}" and return
end

View File

@ -3,7 +3,7 @@ app.controller('ActivityController',
['$anchorScroll', '$location','$scope', '$http', '$timeout', 'auth', 'rms', 'common','alertService',
function($anchorScroll, $location,$scope, $http, $timeout, auth, rms, common, alertService){
common.checkLogin();
// common.checkLogin();
$scope.replaceUrl = function(url){

View File

@ -1,5 +1,5 @@
app.controller('ClassController', ['$scope', 'config','$http', 'auth','$location','$routeParams','alertService','rms','common', function($scope, config, $http, auth, $location, $routeParams,alertService,rms,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;
var courseid = $routeParams.id;

View File

@ -5,7 +5,7 @@
app.controller('ClassListController', ['$scope', 'config', 'auth', '$http', '$location', 'alertService','rms','common',
function ($scope, config, auth, $http, $location, alertService,rms,common) {
common.checkLogin();
// common.checkLogin();
var vm = $scope;
vm.syllabuses = rms.get('syllabuses') || [];

View File

@ -1,7 +1,7 @@
app.controller('EditClassController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms','common', function($scope, $http, auth, config, alertService, $location,$routeParams, rms,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;

View File

@ -1,7 +1,7 @@
app.controller('EditClassMemberController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms','common', function($scope, $http, auth, config, alertService, $location,$routeParams, rms,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;

View File

@ -1,7 +1,7 @@
app.controller('EditProjectMemberController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms','common', function($scope, $http, auth, config, alertService, $location,$routeParams, rms,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;

View File

@ -1,7 +1,7 @@
app.controller('JoinClassController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms','wx','common', function($scope, $http, auth, config, alertService, $location,$routeParams, rms,wx,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;

View File

@ -1,7 +1,7 @@
app.controller('JoinProjectController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms','wx','common', function($scope, $http, auth, config, alertService, $location,$routeParams, rms,wx,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;

View File

@ -1,5 +1,5 @@
app.controller('MyResourceController', ['$scope', '$http', 'auth', 'config', '$location', 'rms','common', function($scope, $http, auth, config, $location,rms,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;
// vm.menus = ['课件', '作业', '测验'];

View File

@ -1,7 +1,7 @@
app.controller('NewClassController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','rms','common', function($scope, $http, auth, config, alertService, $location,rms,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;

View File

@ -1,7 +1,7 @@
app.controller('NewProjectController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','rms','common', function($scope, $http, auth, config, alertService, $location,rms,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;

View File

@ -1,5 +1,5 @@
app.controller('ProjectController', ['$scope', 'config','$http','$timeout', 'auth','$location','$routeParams','alertService','rms','common', function($scope, config, $http,$timeout, auth, $location, $routeParams,alertService,rms,common){
common.checkLogin();
// common.checkLogin();
$scope.replaceUrl = function(url){
return url;

View File

@ -5,7 +5,7 @@
app.controller('ProjectListController', ['$scope', 'config', 'auth', '$http', '$location', 'alertService','rms','common',
function ($scope, config, auth, $http, $location, alertService,rms,common) {
common.checkLogin();
// common.checkLogin();
var vm = $scope;
// vm.projects = rms.get('projects') || [];

View File

@ -1,7 +1,7 @@
app.controller('ReviewClassMemberController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms','common', function($scope, $http, auth, config, alertService, $location,$routeParams, rms,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;

View File

@ -1,7 +1,7 @@
app.controller('ReviewProjectMemberController', ['$scope', '$http', 'auth', 'config', 'alertService','$location','$routeParams','rms','common', function($scope, $http, auth, config, alertService, $location,$routeParams, rms,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;

View File

@ -1,5 +1,5 @@
app.controller('SendClassListController', ['$scope', '$http','$routeParams', 'config','auth','alertService', 'rms','common', function($scope, $http, $routeParams, config, auth, alertService,rms,common){
common.checkLogin();
// common.checkLogin();
var vm = $scope;
var send_id = $routeParams.id;