From 10dc1f46a8aa80ab149841bbddc10b1782e60763 Mon Sep 17 00:00:00 2001 From: HelloWorld Date: Tue, 21 Apr 2020 17:39:12 +0800 Subject: [PATCH] =?UTF-8?q?test=E4=B8=8D=E5=85=81=E8=AE=B8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/scripts/controllers/settings-controller.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/scripts/controllers/settings-controller.js b/www/scripts/controllers/settings-controller.js index d3586d1..cefc5ee 100644 --- a/www/scripts/controllers/settings-controller.js +++ b/www/scripts/controllers/settings-controller.js @@ -44,6 +44,11 @@ app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$ $scope.changeForm($scope.form.indexOf(true)); // 马上调用一次 $scope.resetPassword = async function () { + if($scope.user.username == 'test') { + toastr.error('此用户不允许修改密码', "错误"); + return; + } + if (!$scope.passwordOrgin || !$scope.passwordNew1 || !$scope.passwordNew2) { toastr.error('原密码跟新密码不能为空', "错误"); return;