diff --git a/themes/tajian/controller/FrontapiController.php b/themes/tajian/controller/FrontapiController.php index 71ecd85..149a094 100644 --- a/themes/tajian/controller/FrontapiController.php +++ b/themes/tajian/controller/FrontapiController.php @@ -179,7 +179,7 @@ Class FrontApiController extends SiteController { $platformName = Html::getShareVideosPlatform($shareUrl); $heroUnionConfig = FSC::$app['config']['heroUnion']; $addTaskRes = $this->addHeroUnionTask($shareUrl, $heroUnionConfig['supportedPlatforms'][$platformName]); - if (empty($addTaskRes['code'])) { + if (empty($addTaskRes) || empty($addTaskRes['code'])) { $done = false; } } @@ -317,7 +317,7 @@ Class FrontApiController extends SiteController { //以json格式post数据 $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; } //保存快捷方式