|
@@ -2741,7 +2741,7 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
|
2741
|
2741
|
} else {
|
2742
|
2742
|
reashdata();
|
2743
|
2743
|
}
|
2744
|
|
- $rootScope.end = function () {
|
|
2744
|
+ $rootScope.end = function (callback) {
|
2745
|
2745
|
api_text.logout($rootScope.takes, $rootScope.user.id).then(function (data) {
|
2746
|
2746
|
if (data.errno == 0) {
|
2747
|
2747
|
localStorage.removeItem('hk_phone');
|
|
@@ -2749,6 +2749,7 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
|
2749
|
2749
|
if (data.errno == 0) {
|
2750
|
2750
|
$rootScope.statuscall = 0;
|
2751
|
2751
|
$scope.login = false;
|
|
2752
|
+ callback();
|
2752
|
2753
|
// SweetAlert.swal({
|
2753
|
2754
|
// title: "登出成功",
|
2754
|
2755
|
// text: "呼叫中心登出成功!",
|
|
@@ -3210,10 +3211,28 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
|
3210
|
3211
|
// console.log(' userid='+JSON.stringify( userid));
|
3211
|
3212
|
//单点登录
|
3212
|
3213
|
if (localStorage.getItem('isSSo') === '1') {
|
3213
|
|
- $scope.runNumber = [];
|
3214
|
|
- sessionStorage.clear();
|
3215
|
|
- localStorage.clear();
|
3216
|
|
- location.href = 'http://' + location.hostname + '/pc_logout.jsp'
|
|
3214
|
+ console.log($rootScope.isHk,'hk');
|
|
3215
|
+ console.log($rootScope.isZncd,'zncd');
|
|
3216
|
+ if($rootScope.isHk){
|
|
3217
|
+ if ($rootScope.isFuwutai && $scope.login){
|
|
3218
|
+ $rootScope.end(function(){
|
|
3219
|
+ $scope.runNumber = [];
|
|
3220
|
+ sessionStorage.clear();
|
|
3221
|
+ localStorage.clear();
|
|
3222
|
+ location.href = 'http://' + location.hostname + '/pc_logout.jsp';
|
|
3223
|
+ })
|
|
3224
|
+ }else{
|
|
3225
|
+ $scope.runNumber = [];
|
|
3226
|
+ sessionStorage.clear();
|
|
3227
|
+ localStorage.clear();
|
|
3228
|
+ location.href = 'http://' + location.hostname + '/pc_logout.jsp';
|
|
3229
|
+ }
|
|
3230
|
+ }else{
|
|
3231
|
+ $scope.runNumber = [];
|
|
3232
|
+ sessionStorage.clear();
|
|
3233
|
+ localStorage.clear();
|
|
3234
|
+ location.href = 'http://' + location.hostname + '/pc_logout.jsp';
|
|
3235
|
+ }
|
3217
|
3236
|
} else {
|
3218
|
3237
|
$auth.signOut()
|
3219
|
3238
|
.then(function (resp) {
|
|
@@ -3232,8 +3251,16 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
|
3232
|
3251
|
message: '呼叫中心断开连接'
|
3233
|
3252
|
});
|
3234
|
3253
|
}
|
|
3254
|
+ $state.go("login.signin");
|
|
3255
|
+ }else if($rootScope.isHk){
|
|
3256
|
+ if ($rootScope.isFuwutai && $scope.login) {
|
|
3257
|
+ $rootScope.end(function(){
|
|
3258
|
+ $state.go("login.signin");
|
|
3259
|
+ })
|
|
3260
|
+ }else{
|
|
3261
|
+ $state.go("login.signin");
|
|
3262
|
+ }
|
3235
|
3263
|
}
|
3236
|
|
- $state.go("login.signin");
|
3237
|
3264
|
})
|
3238
|
3265
|
.catch(function (resp) { });
|
3239
|
3266
|
}
|