This commit is contained in:
parent
b9280caf36
commit
9d19caa736
|
@ -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
|
||||
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue