Browse Source

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

geek 4 years ago
parent
commit
1fb4c91e14

+ 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']]);
     }