shish 4 năm trước cách đây
mục cha
commit
3613c9f4c0
1 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 4 3
      biz-ghs/admin/classes/AdminClass.php

+ 4 - 3
biz-ghs/admin/classes/AdminClass.php

@@ -8,6 +8,7 @@ use biz\shop\classes\ShopClass;
 use common\components\dict;
 use common\components\imgUtil;
 use common\components\sms;
+use common\components\stringUtil;
 use common\components\util;
 use common\services\ImageService;
 use Yii;
@@ -79,12 +80,12 @@ class AdminClass extends BaseClass
         if (!empty($adminId)) {
             $shopAdmin = ShopAdminClass::getByCondition(['shopId' => $shopId, 'adminId' => $adminId]);
             if (empty($shopAdmin)) {
-                $text = (string)'a@' . rand(1111, 9999);
+                $randPwd = (string)stringUtil::charsShuffleLowerCase(3) . rand(111, 999);
                 $admin = \biz\admin\classes\AdminClass::getById($adminId, true);
                 if (empty($admin)) {
                     util::fail('没有找到员工');
                 }
-                $admin->password = password_hash($text, PASSWORD_BCRYPT);
+                $admin->password = password_hash($randPwd, PASSWORD_BCRYPT);
                 $admin->mobile = $mobile;
                 $admin->super = 1;
                 $admin->openShop = 3;
@@ -107,7 +108,7 @@ class AdminClass extends BaseClass
                     'founder' => 2,
                 ];
                 ShopAdminClass::add($shopData);
-                sms::freeSend($mobile . ',' . $mobile . ',' . $text, '开店审核通过,帐号:{$var} 密码:{$var},登录APP后,点右下角菜单 我的-修改密码 及时修改密码');
+                sms::freeSend($mobile . ',' . $mobile . ',' . $randPwd, '开店审核通过,帐号:{$var} 密码:{$var},登录APP后,点右下角菜单 我的-修改密码 及时修改密码');
             }
         }
     }