Przeglądaj źródła

添加密码登录

lyh 2 lat temu
rodzic
commit
e878ef3d7c
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      app/Services/Api/MemberService.php

+ 2 - 1
app/Services/Api/MemberService.php

@@ -465,6 +465,7 @@ class MemberService extends BaseService
         $province = isset($ipData['regionName'])? $ipData['regionName'] : '';
         $province = isset($ipData['regionName'])? $ipData['regionName'] : '';
         $city = isset($ipData['city'])? $ipData['city'] : '';
         $city = isset($ipData['city'])? $ipData['city'] : '';
         $emailName = explode('@', $email)[0];
         $emailName = explode('@', $email)[0];
+        $password  = isset($params['password']) ? $params['password'] : 'xl123456';
 
 
         // 钱包
         // 钱包
         $data = [
         $data = [
@@ -475,7 +476,7 @@ class MemberService extends BaseService
             'avatar' => '',
             'avatar' => '',
             'nickname' => $nickname ? $nickname : 'XL'.substr($emailName?$emailName:substr($mobile,-8,8),-8,8),
             'nickname' => $nickname ? $nickname : 'XL'.substr($emailName?$emailName:substr($mobile,-8,8),-8,8),
             'username' => $registerType==1? $email : $mobile,
             'username' => $registerType==1? $email : $mobile,
-            'password' => get_password('xl123456'),
+            'password' => get_password($password),
             'code' => strtoupper(get_random_code(9, 'X', "{$id}")),
             'code' => strtoupper(get_random_code(9, 'X', "{$id}")),
             'email' => $email,
             'email' => $email,
             'mobile' => $mobile,
             'mobile' => $mobile,