Browse Source

HeroUnion notify handler done

master
filesite 8 months ago
parent
commit
82e676bad5
  1. 16
      themes/tajian/controller/FrontapiController.php
  2. 2
      themes/tajian/controller/SiteController.php
  3. 2
      themes/tajian/views/layout/main.php

16
themes/tajian/controller/FrontapiController.php

@ -312,12 +312,22 @@ eof; @@ -312,12 +312,22 @@ eof;
if (strtolower($mySign) != strtolower($sign)) {
$code = 0;
$err = '签名验证不通过!';
}else {
}else if (!empty($task_result['done'])) { //如果任务成功抓取到数据
$saveUrlRes = $this->saveUrlShortCut($task_id, $task_result['url']);
$saveDescRes = $this->saveDescriptionFiles($task_id, $task_result);
if (!$saveUrlRes) {
$code = 0;
$err = '网址快捷方式文件保存失败!';
}else if (!$saveDescRes) {
$code = 0;
$err = '标题文件、图片及其描述文件保存失败!';
}else {
$msg = '视频相关文件保存完成。';
}
}
}
echo 'Done';
return $this->renderJson(compact('code', 'msg', 'err'));
}
}

2
themes/tajian/controller/SiteController.php

@ -167,7 +167,7 @@ Class SiteController extends Controller { @@ -167,7 +167,7 @@ Class SiteController extends Controller {
$pageTitle = '添加视频收藏';
$viewName = 'new';
$params = compact('cateId', 'dirTree', 'scanResults', 'htmlReadme', 'tags');
$params = compact('dirTree', 'scanResults', 'htmlReadme', 'tags');
return $this->render($viewName, $params, $pageTitle);
}

2
themes/tajian/views/layout/main.php

@ -50,7 +50,7 @@ require_once __DIR__ . '/../../../../plugins/Html.php'; @@ -50,7 +50,7 @@ require_once __DIR__ . '/../../../../plugins/Html.php';
<div class="g_ls_menus hide_movi_xs">
<div class="meuns_title">视频分类</div>
<?php
$selectedId = $viewData['cateId'];
$selectedId = !empty($viewData['cateId']) ? $viewData['cateId'] : '';
$breadcrumbs = !empty($viewData['breadcrumbs']) ? $viewData['breadcrumbs'] : [];
if (!empty($viewData['tags'])) { //显示tags分类
foreach($viewData['tags'] as $id => $item) {

Loading…
Cancel
Save