This commit is contained in:
guange 2016-06-17 18:48:27 +08:00
parent b9280caf36
commit 9d19caa736
3 changed files with 4 additions and 4 deletions

View File

@ -167,7 +167,7 @@ class WechatsController < ActionController::Base
raise "无法获取到微信openid" unless openid
render :json => {status:0, openid: openid}
rescue Exception=>e
render :json => {status: -1, msg: e.message}
render :json => {status: -1, message: e.message}
end
end

View File

@ -32,11 +32,11 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams
function(response) {
vm.loginFailed = (response.data.status != 0);
console.log(response.data);
vm.alertService.showMessage('出错了', response.data.msg);
vm.alertService.showMessage('出错了', response.data.message);
if (!$scope.loginFailed) { //绑定成功
} else {
vm.alertService.showMessage('出错了', response.data.msg);
vm.alertService.showMessage('出错了', response.data.message);
}
}
).catch(function(e){

View File

@ -49,7 +49,7 @@ app.factory('auth', ['$http','$routeParams', '$q', 'session', function($http,$ro
method: 'POST'
}).then(function successCallback(response) {
if(response.data.status != 0){
deferred.reject(response.data.msg);
deferred.reject(response.data.message);
} else{
_openid = response.data.openid;
session.save("openid", _openid);