|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace ghs\controllers;
|
|
|
|
|
|
+use biz\admin\classes\AdminClass;
|
|
|
use bizHd\wx\classes\WxOpenClass;
|
|
|
use bizGhs\shop\classes\ShopAdminClass;
|
|
|
use bizGhs\admin\services\AdminRoleService;
|
|
|
@@ -118,6 +119,14 @@ class ShopAdminController extends BaseController
|
|
|
$relation->status = $status;
|
|
|
$relation->save();
|
|
|
ShopAdminClass::valid($relation, $this->shopId);
|
|
|
+ //若有传密码,则修改密码
|
|
|
+ $password = $post['password']??'';
|
|
|
+ if(!empty($password)){
|
|
|
+ $adminId = $relation->adminId;
|
|
|
+ $password = password_hash($password, PASSWORD_BCRYPT);
|
|
|
+ AdminClass::updateById($adminId,['password'=>$password]);
|
|
|
+ }
|
|
|
+
|
|
|
util::complete('修改成功');
|
|
|
}
|
|
|
|
|
|
@@ -134,4 +143,4 @@ class ShopAdminController extends BaseController
|
|
|
util::complete();
|
|
|
}
|
|
|
|
|
|
-}
|
|
|
+}
|