wupengfei vor 2 Jahren
Ursprung
Commit
7acc61829b
3 geänderte Dateien mit 9 neuen und 5 gelöschten Zeilen
  1. 6 2
      .idea/workspace.xml
  2. 1 1
      application/api/controller/Login.php
  3. 2 2
      application/common.php

+ 6 - 2
.idea/workspace.xml

@@ -1,7 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ChangeListManager">
-    <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="" />
+    <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Login.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Login.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/common.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/common.php" afterDir="false" />
+    </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -175,7 +179,7 @@
       <workItem from="1668041658444" duration="593000" />
       <workItem from="1668042326649" duration="24523000" />
       <workItem from="1668212914124" duration="17446000" />
-      <workItem from="1668387546036" duration="6887000" />
+      <workItem from="1668387546036" duration="8112000" />
     </task>
     <servers />
   </component>

+ 1 - 1
application/api/controller/Login.php

@@ -93,7 +93,7 @@ class Login extends Base
                //if($user_info['facility_'.$facility_type] != '' && $facility_code != $user_info['facility_'.$facility_type]) $this->exception('设备号错误');
                 if(!$user_info['facility_'.$facility_type]) User::where('id',$user_info['id'])->update(['facility_'.$facility_type=>$facility_code] );
             }
-            if(!$user_info['hx_username']) hx_register($user_info['id'],'act'.$user_info['id'].rand(000,999));
+            if(!$user_info['hx_username']) hx_register($user_info['id']);
             $ret_data['token'] =  $this->createJwt($user_info['id'],$facility_code);
             Db::commit();
         }catch (\Exception $e){

+ 2 - 2
application/common.php

@@ -281,7 +281,7 @@ function get32Str($length='32'){
 
 
 
- function hx_register($username,$password='999999'){
+ function hx_register($username){
     $data = array(
         'grant_type' => 'client_credentials',
         'client_id' => 'YXA6NS5H0GDGEe20Q9VWb7Fpew',
@@ -291,7 +291,7 @@ function get32Str($length='32'){
     $token_res = json_decode($token_res,true);
     $param = array(
         'username' => 'act'.$username.rand(0000,9999),
-        'password' => $password
+        'password' => 'act'.$username.rand(0000,9999).'@'
     );
     $hx_account = http_post_json('https://a1-vip5.easemob.com/1414221110068467/kefuchannelapp104968/users',json_encode($param),$token_res['access_token']);
     if(!isset($hx_account['entities'][0]['uuid'])){