|
|
@@ -2,10 +2,10 @@
|
|
|
|
|
|
namespace ghs\controllers;
|
|
|
|
|
|
+use bizGhs\shop\classes\ShopAdminClass;
|
|
|
use bizHd\wx\classes\WxOpenClass;
|
|
|
use bizGhs\admin\classes\AdminClass;
|
|
|
use bizGhs\admin\services\AdminService;
|
|
|
-use bizHd\wx\services\WxOpenService;
|
|
|
use common\components\noticeUtil;
|
|
|
use common\components\stringUtil;
|
|
|
use common\components\util;
|
|
|
@@ -18,6 +18,25 @@ class AdminController extends BaseController
|
|
|
|
|
|
public $guestAccess = ['recent-shop', 'mini-full-info', 'mini-mobile', 'login-detail'];
|
|
|
|
|
|
+ //修改个人信息 ssh 20230505
|
|
|
+ public function actionUpdate()
|
|
|
+ {
|
|
|
+ $post = Yii::$app->request->post();
|
|
|
+ $ghsOpenId = $post['ghsOpenId'] ?? '';
|
|
|
+ $name = $post['name'] ?? '';
|
|
|
+ $admin = $this->admin;
|
|
|
+ $admin->ghsOpenId = $ghsOpenId;
|
|
|
+ if (!empty($name)) {
|
|
|
+ $admin->name = $name;
|
|
|
+ }
|
|
|
+ $admin->save();
|
|
|
+ if (!empty($name)) {
|
|
|
+ $adminId = $this->adminId;
|
|
|
+ ShopAdminClass::updateByCondition(['adminId' => $adminId], ['name' => $name]);
|
|
|
+ }
|
|
|
+ util::complete();
|
|
|
+ }
|
|
|
+
|
|
|
//绑定帐号自动登录 ssh 20210121
|
|
|
public function actionBindAutoLogin()
|
|
|
{
|