|
|
@@ -17,7 +17,7 @@ class AdminController extends BaseController
|
|
|
//获取登陆员工的权限 shish 2019.11.24
|
|
|
public function actionLoginAuth()
|
|
|
{
|
|
|
- $auth = AdminService::getAuth();
|
|
|
+ $auth = AdminService::getAuth($this->adminId,$this->merchantId);
|
|
|
util::success($auth);
|
|
|
}
|
|
|
|
|
|
@@ -50,7 +50,7 @@ class AdminController extends BaseController
|
|
|
AdminService::deleteAdmin($admin, $this->adminId);
|
|
|
util::ok();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//修改员工 shish 2019.12.9
|
|
|
public function actionUpdate()
|
|
|
{
|
|
|
@@ -61,7 +61,7 @@ class AdminController extends BaseController
|
|
|
AdminService::updateAdmin($originalAdmin, $post);
|
|
|
util::ok('修改成功');
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//查看员工详情 shish 2019.12.9
|
|
|
public function actionDetail()
|
|
|
{
|
|
|
@@ -71,4 +71,32 @@ class AdminController extends BaseController
|
|
|
util::success($admin);
|
|
|
}
|
|
|
|
|
|
+ //密码修改
|
|
|
+ public function actionPassword()
|
|
|
+ {
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $old = isset($post['old']) ? $post['old'] : '';
|
|
|
+ $new = isset($post['new']) ? $post['new'] : '';
|
|
|
+ $confirm = isset($post['confirm']) ? $post['confirm'] : '';
|
|
|
+ if ($new != $confirm) {
|
|
|
+ util::fail('二次密码不一致');
|
|
|
+ }
|
|
|
+ $admin = $this->admin;
|
|
|
+ if (empty($old) && !empty($admin['password'])) {
|
|
|
+ util::fail('请输入旧密码');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //确认密码修改
|
|
|
+ public function actionConfirmPassword()
|
|
|
+ {
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $old = isset($post['old']) ? $post['old'] : '';
|
|
|
+ $new = isset($post['new']) ? $post['new'] : '';
|
|
|
+ $confirm = isset($post['confirm']) ? $post['confirm'] : '';
|
|
|
+ if ($new != $confirm) {
|
|
|
+ util::fail('二次密码不一致');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|