|
|
|
@ -1,5 +1,11 @@
|
|
|
|
|
app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams', 'alertService', 'config','auth','session',
|
|
|
|
|
function ($scope, $http, $location, $routeParams, alertService, config, auth,session) {
|
|
|
|
|
app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams', 'alertService', 'config','auth','session','wx',
|
|
|
|
|
function ($scope, $http, $location, $routeParams, alertService, config, auth,session, wx) {
|
|
|
|
|
|
|
|
|
|
// 登录页不用显示菜音
|
|
|
|
|
wx.ready(function(){
|
|
|
|
|
wx.hideOptionMenu();
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if(auth.get_bind().then(function(){
|
|
|
|
|
$location.path("/activities");
|
|
|
|
|
}));
|
|
|
|
@ -33,8 +39,7 @@ app.controller('LoginController', ['$scope', '$http', '$location', '$routeParams
|
|
|
|
|
vm.loginFailed = (response.data.status != 0);
|
|
|
|
|
if (!$scope.loginFailed) { //绑定成功
|
|
|
|
|
vm.alertService.showMessage('提示', response.data.message, function(){
|
|
|
|
|
// $location.path("/activities");
|
|
|
|
|
window.WeixinJSBridge.call('closeWindow');
|
|
|
|
|
wx.closeWindow();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
vm.alertService.showMessage('出错了', response.data.message);
|
|
|
|
|