|
|
@@ -5,6 +5,7 @@ namespace hd\controllers;
|
|
|
use biz\shop\classes\ShopClass;
|
|
|
use biz\shop\services\ShopAdminService;
|
|
|
use bizHd\admin\classes\AdminClass;
|
|
|
+use bizHd\admin\classes\ShopAdminClass;
|
|
|
use bizHd\admin\services\AdminService;
|
|
|
use bizHd\wx\services\WxOpenService;
|
|
|
use common\components\noticeUtil;
|
|
|
@@ -18,6 +19,32 @@ class AdminController extends BaseController
|
|
|
|
|
|
public $guestAccess = ['mini-full-info', 'mini-mobile', 'login-detail'];
|
|
|
|
|
|
+ //个人信息 ssh 20230505
|
|
|
+ public function actionInfo()
|
|
|
+ {
|
|
|
+ $admin = $this->admin;
|
|
|
+ util::success(['info' => $admin]);
|
|
|
+ }
|
|
|
+
|
|
|
+ //修改个人信息 ssh 20230505
|
|
|
+ public function actionUpdateAdmin()
|
|
|
+ {
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $openId = $post['openId'] ?? '';
|
|
|
+ $name = $post['name'] ?? '';
|
|
|
+ $admin = $this->admin;
|
|
|
+ $admin->openId = $openId;
|
|
|
+ if (!empty($name)) {
|
|
|
+ $admin->name = $name;
|
|
|
+ }
|
|
|
+ $admin->save();
|
|
|
+ if (!empty($name)) {
|
|
|
+ $adminId = $this->adminId;
|
|
|
+ ShopAdminClass::updateByCondition(['adminId' => $adminId], ['name' => $name]);
|
|
|
+ }
|
|
|
+ util::complete();
|
|
|
+ }
|
|
|
+
|
|
|
//修改miniOpenId ssh 20220912
|
|
|
public function actionUpdateMiniOpenId()
|
|
|
{
|