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(
), ),
//对接HeroUnion英雄联盟,实现提交任务和接收任务完成回调通知 //对接HeroUnion英雄联盟,实现提交任务和接收任务完成回调通知
'heroUnionEnable' => false,
'heroUnion' => array( 'heroUnion' => array(
'server_url' => 'https://herounion.filesite.io', 'server_url' => 'https://herounion.filesite.io',
'uuid' => 'machete_tajian', 'uuid' => 'machete_tajian',

5
conf/custom_config_tajian.json

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

8
themes/tajian/controller/FrontapiController.php

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

Loading…
Cancel
Save