소스 검색

feat():授权

geek 4 년 전
부모
커밋
9981dc610c
2개의 변경된 파일1개의 추가작업 그리고 9개의 파일을 삭제
  1. 0 8
      application/common/service/SettingService.php
  2. 1 1
      application/index/exception/ExceptionHandel.php

+ 0 - 8
application/common/service/SettingService.php

@@ -8,9 +8,6 @@ namespace app\common\service;
 
 
 use app\index\exception\ApiException;
-use GuzzleHttp\Client;
-use GuzzleHttp\Exception\RequestException;
-use think\Exception;
 
 class SettingService {
 
@@ -42,9 +39,7 @@ class SettingService {
                 'Content-Type: application/json'
             ],
         ]);
-
         $response = curl_exec($curl);
-
         curl_close($curl);
         $info = json_decode($response, true);
         if ($channelName !== $info['name']) {
@@ -86,11 +81,8 @@ class SettingService {
                 'Content-Type: application/json',
             ],
         ]);
-
         $response = curl_exec($curl);
-
         curl_close($curl);
-
         $info = json_decode($response, true);
         if ($info['status'] !== 'y') {
             throw new ApiException("设置自定义授权url失败--" . (string)$response);

+ 1 - 1
application/index/exception/ExceptionHandel.php

@@ -36,7 +36,7 @@ class ExceptionHandel extends Handle {
         }
 
         if ($e instanceof Exception || $e instanceof Error) {
-            Until::output([], $e->getMessage().' file:' . str_replace('/mnt/www','ROOT',$e->getFile()) . ' line:' . $e->getLine() ,Enum::THROW_ERR_CODE);
+            Until::output([], $e->getMessage().' file:' . str_replace('/ky100/www','ROOT',$e->getFile()) . ' line:' . $e->getLine() ,Enum::THROW_ERR_CODE);
         }
         // 其他错误交给系统处理
         return parent::render($e);