ソースを参照

feat():修改获取授权码的方式

geek 4 年 前
コミット
1fb4c91e14
共有2 個のファイルを変更した3 個の追加2 個の削除を含む
  1. 1 0
      application/common/service/SettingService.php
  2. 2 2
      application/index/controller/Setting.php

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

@@ -87,6 +87,7 @@ class SettingService {
         if ($info['status'] !== 'y') {
             throw new ApiException("设置自定义授权url失败--" . (string)$response);
         }
+        return $info;
     }
 
     public function getAuthCode(int $channelId) {

+ 2 - 2
application/index/controller/Setting.php

@@ -113,8 +113,8 @@ class Setting extends BaseController {
     }
 
     public function authCode($channelId) {
-        $authCode = (new SettingService())->getAuthCode((int)$channelId);
-        Until::output(['authCode' => $authCode]);
+        $info = (new SettingService())->setAuthUrl((int)$channelId,'https://webcast.bizconfstreaming.com/soa-mdl?channelId'.$channelId);
+        Until::output(['authCode' => $info['encrypt_code']]);
     }