master
yixian 8 years ago
parent a80d35fb93
commit 0681a81bb4

@ -13,8 +13,11 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
$httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache';
$httpProvider.defaults.headers.get['Pragma'] = 'no-cache';
}]);
app.controller('managerIndexCtrl', ['$scope', '$rootScope', '$http', '$log', '$timeout', '$interval', '$uibModal','$filter', 'myLoginLogView', 'commonDialog',
function ($scope, $rootScope, $http, $log, $timeout, $interval, $uibModal,$filter, myLoginLogView, commonDialog) {
app.controller('managerIndexCtrl', ['$scope', '$rootScope', '$http', '$log', '$timeout', '$interval', '$uibModal', '$filter', 'myLoginLogView', 'commonDialog',
function ($scope, $rootScope, $http, $log, $timeout, $interval, $uibModal, $filter, myLoginLogView, commonDialog) {
$http.get('/sysconfig/base').then(function (resp) {
$rootScope.sysParams = resp.data;
});
var stompClient = null;
$scope.loadCurrentUser = function () {
$http.get('/global/userstatus/current_manager').then(function (resp) {
@ -31,9 +34,9 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
// $scope.loadPartnerApplyNotice();
// }
if ($rootScope.currentUser.wx_openid == null) {
if($filter('withRole')('100')){
if ($filter('withRole')('100')) {
$scope.managerBindWechat('static');
}else {
} else {
$scope.managerBindWechat(true);
}
@ -103,7 +106,7 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
$scope.hideSideBar = !$scope.hideSideBar;
};
$scope.showQrCode = function (data,backdrop) {
$scope.showQrCode = function (data, backdrop) {
return $uibModal.open({
template: '<div style="width: 100%;padding: 10px;">请使用微信扫描<br><div style="width:100%" qrcode="url"></div><p class="text-center"><img class="img-circle img-bordered" style="width: 45px" ng-show="{{wx_headimg}}" ng-src="{{wx_headimg}}">{{wx_nickname}}</p></div>',
controller: ['$scope', 'data', function ($scope, data) {
@ -117,8 +120,8 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
return data;
}
},
keyboard:false,
backdrop:backdrop
keyboard: false,
backdrop: backdrop
})
};
@ -166,10 +169,10 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
$scope.managerBindWechat = function (backdrop) {
$http.post('/system/manager_wechat_binds').then(function (resp) {
$scope.checkCode = resp.data.bind_id;
if(resp.data.wx_nickname){
if (resp.data.wx_nickname) {
backdrop = true;
}
$scope.checkModal = $scope.showQrCode(resp.data,backdrop);
$scope.checkModal = $scope.showQrCode(resp.data, backdrop);
// $scope.showQrCode(resp.data.url);
})
}

Loading…
Cancel
Save