shish преди 5 години
родител
ревизия
3a013a1f45

+ 0 - 2
app-ghs/controllers/ShopAdminController.php

@@ -62,8 +62,6 @@ class ShopAdminController extends BaseController
         if ($openShop != AdminClass::OPEN_SHOP_NO) {
             util::fail('您已申请开过店,不能成为别人的员工');
         }
-        // 头像
-        $post['avatar'] = $admin['avatar'];
         $respond = ShopAdminService::generateAdmin($post);
         util::success($respond);
     }

+ 0 - 2
app-hd/controllers/ShopAdminController.php

@@ -61,8 +61,6 @@ class ShopAdminController extends BaseController
         if ($openShop != AdminClass::OPEN_SHOP_NO) {
             util::fail('您已申请开过店,不能成为别人的员工');
         }
-        // 头像
-        $post['avatar'] = $admin['avatar'];
         $respond = ShopAdminService::generateAdmin($post);
         util::success($respond);
     }

+ 1 - 1
biz-ghs/shop/services/ShopAdminService.php

@@ -39,6 +39,7 @@ class ShopAdminService extends BaseService
         $mobile = $data['mobile'] ?? '';
         $adminId = $data['adminId'] ?? 0;
         $shopId = $data['shopId'] ?? 0;
+        $name = $data['name'] ?? '未命名';
 
         $admin = AdminClass::getById($adminId);
         if (empty($admin)) {
@@ -47,7 +48,6 @@ class ShopAdminService extends BaseService
         if (isset($admin['subscribe']) == false || $admin['subscribe'] != 1) {
             //util::fail("请关注公众号");
         }
-        $name = $admin['name'] ?? '未命名';
         $avatar = $admin['avatar'] ?? '';
 
         $bindData = ShopAdminClass::getBindAdminData($shopId, $recommendAdminId);

+ 2 - 3
biz-hd/admin/services/ShopAdminService.php

@@ -44,12 +44,12 @@ class ShopAdminService extends BaseService
         $mobile = isset($data['mobile']) ? $data['mobile'] : '';
         $shopId = isset($data['shopId']) ? $data['shopId'] : 0;
         $adminId = isset($data['adminId']) ? $data['adminId'] : 0;
-        $avatar = isset($data['avatar']) ? $data['avatar'] : '';
+        $name = $data['name'] ?? '未命名';
+
         $bindData = ShopAdminClass::getBindAdminData($shopId, $recommendAdminId);
         if (empty($bindData)) {
             util::fail('小程序码已失效,请重新创建员工');
         }
-
         $admin = AdminClass::getById($adminId);
         if (empty($admin)) {
             util::fail('没有找到管理员信息');
@@ -57,7 +57,6 @@ class ShopAdminService extends BaseService
         if (isset($admin['subscribe']) == false || $admin['subscribe'] != 1) {
             //util::fail("请关注公众号");
         }
-        $name = $admin['name'] ?? '未命名';
         $avatar = $admin['avatar'] ?? '';
 
         $password = isset($bindData['password']) ? password_hash($bindData['password'], PASSWORD_BCRYPT) : '';