wugg 1 year ago
parent
commit
31adeded95
2 changed files with 3 additions and 2 deletions
  1. 2 1
      app/admin/common/User.php
  2. 1 1
      app/common.php

+ 2 - 1
app/admin/common/User.php

@@ -125,6 +125,7 @@ class User
     private function post($url, $param = [])
     {
         $this->param = $param;
+        $this->header=['Content-Type' => 'multipart/json;charset=utf-8'];
         $this->makeHeader();
         if (is_array($param)) $post = http_build_query($param);
         $curl = curl_init();
@@ -214,7 +215,6 @@ class User
     public function handle(string $key = '', array $param = [])
     {
         $rs = $this->post($this->host . $this->api[$key], $param);
-//        echo $rs;exit;
         return json_decode($rs, true);
     }
 
@@ -223,6 +223,7 @@ class User
     {
         $rs = $this->post($this->host . $this->api[$key], $param);
         echo $rs;
+       
         exit;
     }
 

+ 1 - 1
app/common.php

@@ -1260,7 +1260,7 @@ if (!function_exists('get_company_name_by_uid')) {
         $userCommon = CommonUser::getIns();
 
         $rs = $userCommon->handle('get_company_name_by_uid',['uid'=>$uid,'get_tops'=>$get_tops]);
-
+		
         //为了兼容旧的数据格式
         if(is_array($uid)) return $rs['data'];
         else return $rs['data'][$uid]??[];