|
@@ -48,8 +48,8 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
|
48
|
48
|
$rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
|
49
|
49
|
console.log(event, toState, toParams, fromState, fromParams)
|
50
|
50
|
// 修改密码验证
|
51
|
|
- // if(toState.name != 'login.signin'){
|
52
|
|
- // $rootScope.changepassword();
|
|
51
|
+ // if((fromState.name != 'login.signin' || toState.name != 'login.signin') && localStorage.getItem('isSSo') === '0' && localStorage.getItem('isOverTime') === '1'){
|
|
52
|
+ // $rootScope.changepassword(true);
|
53
|
53
|
// }
|
54
|
54
|
if ((toState.name == 'app.incident.chart' || toState.name == 'app.incident.editor') &&
|
55
|
55
|
fromState.name) {
|
|
@@ -2214,8 +2214,9 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
|
2214
|
2214
|
});
|
2215
|
2215
|
|
2216
|
2216
|
}
|
2217
|
|
- $rootScope.changepassword = function () {
|
|
2217
|
+ $rootScope.changepassword = function (isNoClose = false) {
|
2218
|
2218
|
var modalInstance = $modal.open({
|
|
2219
|
+ backdrop: !isNoClose,
|
2219
|
2220
|
templateUrl: 'assets/views/changepassword.html',
|
2220
|
2221
|
controller: function ($scope, $modalInstance, items, Restangular, SweetAlert) {
|
2221
|
2222
|
$scope.passwordnull = function (originalPwd, pwd, pwd_2) {
|
|
@@ -2234,7 +2235,7 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
|
2234
|
2235
|
});
|
2235
|
2236
|
return;
|
2236
|
2237
|
}
|
2237
|
|
- if (pwd == pwd_2 && !(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,20}$/.test(pwd))) {
|
|
2238
|
+ if (pwd == pwd_2 && !(/^(?=.*[a-z])(?=.*[A-Z]).{8,20}$/.test(pwd))) {
|
2238
|
2239
|
SweetAlert.swal({
|
2239
|
2240
|
title: "密码长度8-20位,必须包含大写和小写!",
|
2240
|
2241
|
text: "输入错误,请重新输入!",
|
|
@@ -2255,6 +2256,7 @@ app.controller('AppCtrl', ['$rootScope', '$scope', '$state', '$translate', '$loc
|
2255
|
2256
|
type: "success",
|
2256
|
2257
|
confirmButtonColor: "#007AFF"
|
2257
|
2258
|
});
|
|
2259
|
+ isNoClose && $state.go('app.dashboard');
|
2258
|
2260
|
} else {
|
2259
|
2261
|
SweetAlert.swal({
|
2260
|
2262
|
title: "修改失败!",
|