diff --git a/1234567 b/1234567 index f21c6a454..096f1af7a 100644 --- a/1234567 +++ b/1234567 @@ -1 +1 @@ -{"access_token":"GrEg56Sg5QRM7IXghWlaDzNd-7iaQsqX2acszXkSTFwOh_OxtN_UNIJsj9rlSZeSkZSofQwd0KvFGv_StzARHeLw81JllcI3a3VuXgZ_cjbQnM3m00g0HiLtTniQFsEIUVIdABAPQD","expires_in":7200,"got_token_at":1461314104} +{"access_token":"Tzi0x9dIp8qqn2CQ7kLnqIjyJvGweEImLmBcbCnev8VTHGAbXbNnihigWDkjJXuthZlGBkIpru5tSoGBSYz8EPktPmdL3CaH1SQXRLxK0FJwHg85fhxMnro_5YmrKO_jDPCaAIAHTG","expires_in":7200,"got_token_at":1461566075} \ No newline at end of file diff --git a/public/javascripts/wechat/app.js b/public/javascripts/wechat/app.js index 0a6b97e5b..e5444c384 100644 --- a/public/javascripts/wechat/app.js +++ b/public/javascripts/wechat/app.js @@ -190,7 +190,13 @@ app.controller('IssueController', function($scope, $http, $routeParams, auth, co }); }; - loadData($routeParams.id); + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); $scope.addIssueReply = function(data){ console.log(data.comment); @@ -221,7 +227,13 @@ app.controller('HomeworkController', function($scope, $http, $routeParams, auth, }); }; - loadData($routeParams.id); + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); $scope.addHomeworkReply = function(data){ console.log(data.comment); @@ -251,7 +263,13 @@ app.controller('CourseNoticeController', function($scope, $http, $routeParams, a }); }; - loadData($routeParams.id); + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); $scope.addNoticeReply = function(data){ console.log(data.comment); @@ -281,7 +299,13 @@ app.controller('DiscussionController', function($scope, $http, $routeParams, aut }); }; - loadData($routeParams.id); + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); $scope.addDiscussionReply = function(data){ console.log(data.comment); @@ -311,7 +335,13 @@ app.controller('JournalsController', function($scope, $http, $routeParams, auth, }); }; - loadData($routeParams.id); + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); $scope.addJournalReply = function(data){ console.log(data.comment); @@ -343,7 +373,13 @@ app.controller('BlogController', function($scope, $http, $routeParams, auth, com }); }; - loadData($routeParams.id); + auth.getOpenId().then( + function successCallback(response){ + loadData($routeParams.id); + }, function errorCallback(response) { + alert("获取openid出错:"+response); + } + ); $scope.addBlogReply = function(data){ console.log(data.comment); @@ -436,7 +472,7 @@ app.config(['$routeProvider',"$httpProvider",function ($routeProvider, $httpProv .otherwise({ redirectTo: '/activities' }); - $httpProvider.interceptors.push('timestampMarker'); + //$httpProvider.interceptors.push('timestampMarker'); }]); //loading