diff --git a/frontend/controllers/CommonController.php b/frontend/controllers/CommonController.php index 3d8ba01..4eacfe6 100644 --- a/frontend/controllers/CommonController.php +++ b/frontend/controllers/CommonController.php @@ -25,6 +25,7 @@ class CommonController extends \yii\web\Controller public $my = null; public $web = null; public $enableCsrfValidation = false; + public $layout = 'blue-main'; public function init() { @@ -237,6 +238,7 @@ class CommonController extends \yii\web\Controller $request = Yii::$app->request; $result = array(); $result['success'] = false; + $result['msg'] = '更改失败'; if($request->isPost){ $user_id = $request->post('id'); @@ -260,20 +262,19 @@ class CommonController extends \yii\web\Controller if($user!= '' && $user_pwd != '') { $user->salt = MyLib::randomStr(4); $user->password = MyLib::hashPwd($user_pwd,$user->salt); - $user_res = $user->save(); - if(!$user_res){ - throw new \Exception('操作失败!'); + if(!$user->save()) { + throw new \Exception(print_r($user->getErrors(), true)); } $result['success'] = true; $result['msg'] = '保存成功'; - $tran->commit(); } + $tran->commit(); }catch(\Exception $e){ $tran->rollBack(); - throw $e; + $result['msg'] = $e->getMessage(); } - return $result; } + return $result; } public function actionLeft() diff --git a/frontend/views/common/login.php b/frontend/views/common/login.php index b7c47a8..b74cc42 100644 --- a/frontend/views/common/login.php +++ b/frontend/views/common/login.php @@ -30,7 +30,7 @@
-

汇盈车险业务系统

+

汇盈车险业务系统

diff --git a/frontend/views/common/update-pwd.php b/frontend/views/common/update-pwd.php index ce0a71b..c3d09af 100644 --- a/frontend/views/common/update-pwd.php +++ b/frontend/views/common/update-pwd.php @@ -1,53 +1,86 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - -
工号username?>
姓名name?>
电话phone?>
修改密码 - -
确认密码 - -
- -
- - - + +beginBlock('header_css'); ?> + +endBlock(); ?> + +
+
+
+
修改密码
+
+
+
+
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +beginBlock('footer_js'); ?> +endBlock('footer_js'); ?> diff --git a/frontend/web/assets/img/login_bj.jpg b/frontend/web/assets/img/login_bj.jpg index 06201ba..90dc7c2 100644 Binary files a/frontend/web/assets/img/login_bj.jpg and b/frontend/web/assets/img/login_bj.jpg differ