|
|
|
@ -130,10 +130,14 @@ Class FrontApiController extends SiteController {
@@ -130,10 +130,14 @@ Class FrontApiController extends SiteController {
|
|
|
|
|
|
|
|
|
|
if ($code == 1) { //保存视频 |
|
|
|
|
$done = $this->saveShareVideo($shareUrl, $title, $tagName); |
|
|
|
|
$msg = $done ? '视频保存完成,系统开始自动处理,1 - 3 分钟后刷新就能看到新添加的视频了。' : '视频保存失败,请稍后重试!'; |
|
|
|
|
$msg = '保存完成,系统开始自动处理,1 - 3 分钟后刷新就能看到新添加的收藏了。'; |
|
|
|
|
|
|
|
|
|
if (!$done) { |
|
|
|
|
$msg = ''; |
|
|
|
|
$err = '收藏保存失败,请确认分享网址格式正确并稍后重试!'; |
|
|
|
|
$code = 0; |
|
|
|
|
}else { |
|
|
|
|
//更新统计数据 |
|
|
|
|
if ($done) { |
|
|
|
|
$stats = TajianStats::init(); |
|
|
|
|
TajianStats::increase('video'); |
|
|
|
|
$saved = TajianStats::save(); |
|
|
|
@ -174,7 +178,10 @@ Class FrontApiController extends SiteController {
@@ -174,7 +178,10 @@ Class FrontApiController extends SiteController {
|
|
|
|
|
if (!empty(FSC::$app['config']['heroUnionEnable'])) { |
|
|
|
|
$platformName = Html::getShareVideosPlatform($shareUrl); |
|
|
|
|
$heroUnionConfig = FSC::$app['config']['heroUnion']; |
|
|
|
|
$this->addHeroUnionTask($shareUrl, $heroUnionConfig['supportedPlatforms'][$platformName]); |
|
|
|
|
$addTaskRes = $this->addHeroUnionTask($shareUrl, $heroUnionConfig['supportedPlatforms'][$platformName]); |
|
|
|
|
if (empty($addTaskRes['code'])) { |
|
|
|
|
$done = false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|