Browse Source

add HeroUnion option config: heroUnionEnable

master
filesite 7 months ago
parent
commit
b6c0613f65
  1. 1
      conf/app.php
  2. 5
      conf/custom_config_tajian.json
  3. 8
      themes/tajian/controller/FrontapiController.php

1
conf/app.php

@ -100,6 +100,7 @@ $configs = array( @@ -100,6 +100,7 @@ $configs = array(
),
//对接HeroUnion英雄联盟,实现提交任务和接收任务完成回调通知
'heroUnionEnable' => false,
'heroUnion' => array(
'server_url' => 'https://herounion.filesite.io',
'uuid' => 'machete_tajian',

5
conf/custom_config_tajian.json

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
{
"theme":"tajian",
"content_directory":"tajian/",
"theme": "tajian",
"content_directory": "tajian/",
"heroUnionEnable": true,
"heroUnion": {
"server_url": "https://herounion.filesite.io",
"uuid": "machete_tajian",

8
themes/tajian/controller/FrontapiController.php

@ -140,9 +140,11 @@ Class FrontApiController extends SiteController { @@ -140,9 +140,11 @@ Class FrontApiController extends SiteController {
}
//调用HeroUnion联盟接口,提交新的数据抓取任务
$platformName = Html::getShareVideosPlatform($shareUrl);
$heroUnionConfig = FSC::$app['config']['heroUnion'];
$this->addHeroUnionTask($shareUrl, $heroUnionConfig['supportedPlatforms'][$platformName]);
if (!empty(FSC::$app['config']['heroUnionEnable'])) {
$platformName = Html::getShareVideosPlatform($shareUrl);
$heroUnionConfig = FSC::$app['config']['heroUnion'];
$this->addHeroUnionTask($shareUrl, $heroUnionConfig['supportedPlatforms'][$platformName]);
}
}
return $done;

Loading…
Cancel
Save