Browse Source

bug fix for api result parse

master
filesite 6 months ago
parent
commit
ea15b62a97
  1. 4
      themes/tajian/controller/FrontapiController.php

4
themes/tajian/controller/FrontapiController.php

@ -179,7 +179,7 @@ Class FrontApiController extends SiteController {
$platformName = Html::getShareVideosPlatform($shareUrl); $platformName = Html::getShareVideosPlatform($shareUrl);
$heroUnionConfig = FSC::$app['config']['heroUnion']; $heroUnionConfig = FSC::$app['config']['heroUnion'];
$addTaskRes = $this->addHeroUnionTask($shareUrl, $heroUnionConfig['supportedPlatforms'][$platformName]); $addTaskRes = $this->addHeroUnionTask($shareUrl, $heroUnionConfig['supportedPlatforms'][$platformName]);
if (empty($addTaskRes['code'])) { if (empty($addTaskRes) || empty($addTaskRes['code'])) {
$done = false; $done = false;
} }
} }
@ -317,7 +317,7 @@ Class FrontApiController extends SiteController {
//以json格式post数据 //以json格式post数据
$res = $this->request($api, json_encode($params), $timeout, $pc, $headers); $res = $this->request($api, json_encode($params), $timeout, $pc, $headers);
return !empty($res) && $res['status'] == 200 ? $res['result'] : false; return !empty($res) && $res['status'] == 200 ? json_decode($res['result'], true) : false;
} }
//保存快捷方式 //保存快捷方式

Loading…
Cancel
Save