lgy 2 months ago
parent
commit
c8074fb6e4
1 changed files with 7 additions and 6 deletions
  1. 7 6
      jcjyhr/app/zskk/servies/EmpowerServies.php

+ 7 - 6
jcjyhr/app/zskk/servies/EmpowerServies.php

@@ -44,16 +44,17 @@ class EmpowerServies
     {
         $orgCode = $params['clientid']; //机构编码
         $authID = $params['clientsecret'];  //授权码
-        $institution = $this->institutionModel->where('port_empower',$authID)->where('institution_code',$orgCode)->find();
-        if(empty($institution))
-        {
-            return ['msg'=>'机构编码或授权码错误','data'=>[]];
-        }
+//        $institution = $this->institutionModel->where('port_empower',$authID)->where('institution_code',$orgCode)->find();
+//        if(empty($institution))
+//        {
+//            return ['msg'=>'机构编码或授权码错误','data'=>[]];
+//        }
         $key = md5($orgCode.rand(0,99));
         $expire = 3600;
         $aesKey = $this->generateRandomLetters();
         // todo
-        $aesKey = 'zLxapoeqWYpoeqWY';
+//        $aesKey = 'zLxapoeqWYpoeqWY';
+        $institution['id'] = '001';
         $token = base64_encode(md5($orgCode.$institution['id'].$aesKey));
         $arr = ['token'=>$token,'key'=>$aesKey,'expire'=>$expire,'appId'=>$key,'orgCode'=>$orgCode];
 //        if(empty(Cache::get($orgCode)))