debug
This commit is contained in:
@@ -7,6 +7,11 @@ use app\home\controller\Novel;
|
||||
use app\home\controller\User;
|
||||
use think\facade\Route;
|
||||
|
||||
|
||||
Route::get('article/fenlei/:category', function (\think\Request $Request) {
|
||||
return view('test/test01/index.html');
|
||||
});
|
||||
|
||||
/**
|
||||
* 路由配置文件
|
||||
*/
|
||||
@@ -103,7 +108,7 @@ $arrRoutes = [
|
||||
'history' => ['/history', '/reading-history', '/read-record', '/lishi', '/yuedu-lishi', '/browse-past'],
|
||||
// 首页
|
||||
'index' => ['/'],
|
||||
|
||||
|
||||
],
|
||||
|
||||
];
|
||||
@@ -196,7 +201,7 @@ foreach ($arrRoutes['prefixes'] as $platform => $prefixes) {
|
||||
// 首页
|
||||
if ($platform == 'h5') {
|
||||
Route::get($strRoute, [Index::class, 'index'])->append(['boolIsMobile' => $boolIsMobile]);
|
||||
}else{
|
||||
} else {
|
||||
Route::get($strRoute, [Index::class, 'getPcIndex'])->append(['boolIsMobile' => $boolIsMobile]);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
use app\model\AutoSwitchViewModel;
|
||||
use app\services\SiteContext;
|
||||
|
||||
return AutoSwitchViewModel::getViewConfig();
|
||||
return app(SiteContext::class)->getViewConfig();
|
||||
|
||||
@@ -60,6 +60,10 @@ class Index extends BaseController
|
||||
$strKey = sprintf('%s:H5:INDEX:RANK:%s:%s', $Request->DomainModel->d_domain, 'total', 'finished');
|
||||
$arrEndNovelRankNovel = $NovelModel->getRankNovelOnCache($strKey, 10, 0, 'total', $strStatus);
|
||||
|
||||
/** @var DomainModel **/
|
||||
$Request->DomainModel;
|
||||
|
||||
|
||||
$strHostNovelDescriptionTemplate = $Request->DomainModel->getFomartSubject('INDEX_POPULAR_NOVELS');
|
||||
$strNewsNovelDescriptionTemplate = $Request->DomainModel->getFomartSubject('INDEX_NEWS_NOVELS');
|
||||
$strRankNovelDescriptionTemplate = $Request->DomainModel->getFomartSubject('INDEX_RANK_NOVELS');
|
||||
|
||||
@@ -12,6 +12,7 @@ use app\model\NovelClicksModel;
|
||||
use app\model\NovelModel;
|
||||
use think\facade\View;
|
||||
use app\Request;
|
||||
use app\services\NovelService;
|
||||
use template\page\CusteomPage02;
|
||||
|
||||
class Novel extends BaseController
|
||||
@@ -204,7 +205,7 @@ class Novel extends BaseController
|
||||
$strTemplate = 'pc/getLibrary';
|
||||
}
|
||||
|
||||
$strBaseUrl = NovelModel::getNovelCategoryUrl($strGender, $strCategory, $strStatus, '{page}');
|
||||
$strBaseUrl = app(NovelService::class)->getNovelCategoryUrl($strGender, $strCategory, $strStatus, '{page}');
|
||||
$arrPaginator = CusteomPage02::generate($intPage, $arrPage['total'], $intLimit, $strBaseUrl, $intButtomNum);
|
||||
|
||||
// 更新值
|
||||
@@ -911,7 +912,7 @@ class Novel extends BaseController
|
||||
|
||||
// $strSearchInfoUrlTemp = $Request->DomainModel->getFomartSubject('SEARCH_INFO_URL','',false);
|
||||
// $strBaseUrl = sprintf('/search.html?keyword=%s&page={page}', $strSearchKeywords);
|
||||
$strBaseUrl = NovelModel::getNovelSearchUrl($strSearchKeywords, '{page}');
|
||||
$strBaseUrl = app(NovelService::class)->getNovelSearchUrl($strSearchKeywords, '{page}');
|
||||
$arrPaginator = CusteomPage02::generate($intPage, $arrPage['total'], $intLimit, $strBaseUrl, $intButtomNum);
|
||||
|
||||
// 更新值
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\model;
|
||||
|
||||
use think\Request;
|
||||
use think\exception\HttpException;
|
||||
|
||||
class AutoSwitchViewModel
|
||||
{
|
||||
static public function getViewConfig(): array
|
||||
{
|
||||
$Request = request();
|
||||
|
||||
$strDomain = $Request->rootDomain();
|
||||
|
||||
$DomainModel = DomainModel::getDomainOnCacheByDomain($strDomain);
|
||||
|
||||
if (empty($DomainModel)) {
|
||||
throw new HttpException(404, 'Site config not Found');
|
||||
}
|
||||
|
||||
$TemplatesModel = TemplatesModel::getTemplateOnCacheByTId($DomainModel->t_id);
|
||||
|
||||
if (empty($DomainModel)) {
|
||||
throw new HttpException(500, 'Site template not Found');
|
||||
}
|
||||
|
||||
$Request->DomainModel = $DomainModel;
|
||||
|
||||
$Request->TemplatesModel = $TemplatesModel;
|
||||
|
||||
return [
|
||||
'type' => 'Think',
|
||||
'auto_rule' => 3,
|
||||
'view_dir_name' => 'view',
|
||||
'view_suffix' => 'html',
|
||||
'view_path' => root_path($TemplatesModel->t_path),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@ class DomainModel extends BaseModel
|
||||
* Undocumented function
|
||||
*
|
||||
* @param string $strKey
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getFomartSubject($strKey, $strDiff = '', bool $boolJoin = true)
|
||||
{
|
||||
@@ -144,25 +144,5 @@ class DomainModel extends BaseModel
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param array $arrArgs
|
||||
* @return string
|
||||
*/
|
||||
static public function getPageUrl($strKey, array $arrArgs): string
|
||||
{
|
||||
$Request = request();
|
||||
|
||||
$strSfVal = $Request->DomainModel->getFomartSubject($strKey,'',false);
|
||||
$arrKeys = [];
|
||||
$arrVals = [];
|
||||
foreach ($arrArgs as $strKey => $strVal) {
|
||||
$arrKeys[] = '{' . $strKey . '}';
|
||||
$arrVals[] = $strVal;
|
||||
}
|
||||
|
||||
return str_replace($arrKeys, $arrVals, $strSfVal);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,139 +482,4 @@ class NovelModel extends MongoModel
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*/
|
||||
static public function getNovelInfoUrl($intNId, $intPinYin): string
|
||||
{
|
||||
$strKey = 'NOVEL_INFO_URL';
|
||||
$strUrl = DomainModel::getPageUrl($strKey, [
|
||||
'intNId' => $intNId,
|
||||
'strPinYin' => $intPinYin
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
* 伪造小说
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*/
|
||||
static public function getForgeNovelInfoUrl($intNId, $intPinYin,$intNForgeId): string
|
||||
{
|
||||
$strKey = 'KAN_NOVEL_INFO_URL';
|
||||
$strUrl = DomainModel::getPageUrl($strKey, [
|
||||
'intNId' => $intNId,
|
||||
'strPinYin' => $intPinYin,
|
||||
'intNForgeId' => $intNForgeId,
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
static public function getNovelChapterUrl($intNId, $intPinYin, $intChapterSort,$intChapterPage=1): string
|
||||
{
|
||||
$strKey = 'CONTENT_INFO_URL';
|
||||
$strUrl = DomainModel::getPageUrl($strKey, [
|
||||
'intNId' => $intNId,
|
||||
'strPinYin' => $intPinYin,
|
||||
'intChapterSort' => $intChapterSort,
|
||||
'intChapterPage' => $intChapterPage,
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
static public function getNovelLasterChapterUrl($intNId, $intPinYin): string
|
||||
{
|
||||
$strKey = 'NEWS_CONTENT_INFO_URL';
|
||||
$strUrl = DomainModel::getPageUrl($strKey, [
|
||||
'intNId' => $intNId,
|
||||
'strPinYin' => $intPinYin,
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
* 小说分类
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
static public function getNovelCategoryUrl($strGender, $strCategory, $strStatus, $intPage): string
|
||||
{
|
||||
$strKey = 'CATEGORY_INFO_URL';
|
||||
$strUrl = DomainModel::getPageUrl($strKey, [
|
||||
'strGender' => $strGender,
|
||||
'strCategory' => $strCategory,
|
||||
'strStatus' => $strStatus,
|
||||
'intPage' => $intPage,
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
* 小说目录
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
static public function getNovelCatalogUrl($intNId, $intPinYin, $strOrder,$intPage=1): string
|
||||
{
|
||||
$strKey = 'NOVEL_CATALOG_URL';
|
||||
$strUrl = DomainModel::getPageUrl($strKey, [
|
||||
'intNId' => $intNId,
|
||||
'strPinYin' => $intPinYin,
|
||||
'strOrder' => $strOrder,
|
||||
'intPage' => $intPage,
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param int $intPage
|
||||
* @param string $strKeyWords
|
||||
* @return string
|
||||
*/
|
||||
static public function getNovelSearchUrl($strKeyWords, $intPage = 1): string
|
||||
{
|
||||
$strKey = 'SEARCH_INFO_URL';
|
||||
$strUrl = DomainModel::getPageUrl($strKey, [
|
||||
'intPage' => $intPage,
|
||||
'strSearchKeywords' => $strKeyWords
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
27
code/app/services/ChapterService.php
Normal file
27
code/app/services/ChapterService.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\services;
|
||||
|
||||
use app\model\ChapterModel;
|
||||
|
||||
class ChapterService
|
||||
{
|
||||
/**
|
||||
* SiteContext
|
||||
*
|
||||
* @var SiteContext
|
||||
*/
|
||||
public $SiteContext;
|
||||
|
||||
/**
|
||||
* ChapterModel
|
||||
*
|
||||
* @var ChapterModel
|
||||
*/
|
||||
public $ChapterModel;
|
||||
|
||||
public function __construct(SiteContext $SiteContext)
|
||||
{
|
||||
$this->ChapterModel = ChapterModel::getInstance();
|
||||
}
|
||||
}
|
||||
254
code/app/services/NovelService.php
Normal file
254
code/app/services/NovelService.php
Normal file
@@ -0,0 +1,254 @@
|
||||
<?php
|
||||
|
||||
namespace app\services;
|
||||
|
||||
use app\model\DomainModel;
|
||||
use app\model\NovelModel;
|
||||
|
||||
class NovelService
|
||||
{
|
||||
/**
|
||||
* SiteContext
|
||||
*
|
||||
* @var SiteContext
|
||||
*/
|
||||
public $SiteContext;
|
||||
|
||||
/**
|
||||
* NovelModel
|
||||
*
|
||||
* @var NovelModel
|
||||
*/
|
||||
public $NovelModel;
|
||||
|
||||
public function __construct(SiteContext $SiteContext)
|
||||
{
|
||||
$this->SiteContext = $SiteContext;
|
||||
$this->NovelModel = NovelModel::getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* GetNovelInfoUrl
|
||||
*
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*/
|
||||
public function getNovelInfoUrl($intNId, $intPinYin): string
|
||||
{
|
||||
$strKey = 'NOVEL_INFO_URL';
|
||||
$strUrl = $this->getPageUrl($strKey, [
|
||||
'intNId' => $intNId,
|
||||
'strPinYin' => $intPinYin
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* GetForgeNovelInfoUrl
|
||||
* 伪造小说
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*/
|
||||
public function getForgeNovelInfoUrl($intNId, $intPinYin, $intNForgeId): string
|
||||
{
|
||||
$strKey = 'KAN_NOVEL_INFO_URL';
|
||||
$strUrl = $this->getPageUrl($strKey, [
|
||||
'intNId' => $intNId,
|
||||
'strPinYin' => $intPinYin,
|
||||
'intNForgeId' => $intNForgeId,
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* GetNovelChapterUrl
|
||||
*
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function getNovelChapterUrl($intNId, $intPinYin, $intChapterSort, $intChapterPage = 1): string
|
||||
{
|
||||
$strKey = 'CONTENT_INFO_URL';
|
||||
$strUrl = $this->getPageUrl($strKey, [
|
||||
'intNId' => $intNId,
|
||||
'strPinYin' => $intPinYin,
|
||||
'intChapterSort' => $intChapterSort,
|
||||
'intChapterPage' => $intChapterPage,
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* GetNovelLasterChapterUrl
|
||||
*
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function getNovelLasterChapterUrl($intNId, $intPinYin): string
|
||||
{
|
||||
$strKey = 'NEWS_CONTENT_INFO_URL';
|
||||
$strUrl = $this->getPageUrl($strKey, [
|
||||
'intNId' => $intNId,
|
||||
'strPinYin' => $intPinYin,
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* GetNovelCategoryUrl
|
||||
* 小说分类
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function getNovelCategoryUrl($strGender, $strCategory, $strStatus, $intPage): string
|
||||
{
|
||||
$strKey = 'CATEGORY_INFO_URL';
|
||||
$strUrl = $this->getPageUrl($strKey, [
|
||||
'strGender' => $strGender,
|
||||
'strCategory' => $strCategory,
|
||||
'strStatus' => $strStatus,
|
||||
'intPage' => $intPage,
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* getNovelCatalogUrl
|
||||
* 小说目录
|
||||
* @param int $intNId
|
||||
* @param string $intPinYin
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function getNovelCatalogUrl($intNId, $intPinYin, $strOrder, $intPage = 1): string
|
||||
{
|
||||
$strKey = 'NOVEL_CATALOG_URL';
|
||||
$strUrl = $this->getPageUrl($strKey, [
|
||||
'intNId' => $intNId,
|
||||
'strPinYin' => $intPinYin,
|
||||
'strOrder' => $strOrder,
|
||||
'intPage' => $intPage,
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param int $intPage
|
||||
* @param string $strKeyWords
|
||||
* @return string
|
||||
*/
|
||||
public function getNovelSearchUrl($strKeyWords, $intPage = 1): string
|
||||
{
|
||||
$strKey = 'SEARCH_INFO_URL';
|
||||
$strUrl = $this->getPageUrl($strKey, [
|
||||
'intPage' => $intPage,
|
||||
'strSearchKeywords' => $strKeyWords
|
||||
]);
|
||||
return (string)$strUrl;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
* @param array $arrArgs
|
||||
* @return string
|
||||
*/
|
||||
public function getPageUrl($strKey, array $arrArgs,): string
|
||||
{
|
||||
$strSfVal = $this->SiteContext->DomainModel->getFomartSubject($strKey, '', false);
|
||||
$arrKeys = [];
|
||||
$arrVals = [];
|
||||
foreach ($arrArgs as $strKey => $strVal) {
|
||||
$arrKeys[] = '{' . $strKey . '}';
|
||||
$arrVals[] = $strVal;
|
||||
}
|
||||
|
||||
return str_replace($arrKeys, $arrVals, $strSfVal);
|
||||
}
|
||||
|
||||
protected $arrSortType = [
|
||||
'day_desc' => 'daily',
|
||||
'week_desc' => 'weekly',
|
||||
'month_desc' => 'monthly',
|
||||
'total_desc' => 'total',
|
||||
'tuijian_desc' => 'total',
|
||||
];
|
||||
|
||||
protected $arrStatus = [
|
||||
'all' => NULL,
|
||||
'lianzai' => '连载中',
|
||||
'wanjie' => '已完结',
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* 获取小说数据
|
||||
*
|
||||
* @param array $arrParams
|
||||
* @return void
|
||||
*/
|
||||
public function getNovelData(array $arrParams): array
|
||||
{
|
||||
// 提取参数
|
||||
$intPage = (int)$arrParams['page'] ?? 0;
|
||||
$intLimit = (int)$arrParams['limit'] ?? 10;
|
||||
$strNCategory = $arrParams['n_category'] ?? '';
|
||||
$strSortType = (string)$arrParams['sort_type'] ?? '';
|
||||
$strNStatus = (string) $arrParams['n_status'] ?? '';
|
||||
$strNSex = (string) $arrParams['n_sex'] ?? '';
|
||||
$strKey = (string) $arrParams['key'] ?? '';
|
||||
$strDiffKey = (string) $arrParams['diff_key'] ?? '';
|
||||
$intCacheKey = (int)$arrParams['cache_life'] ?? 0;
|
||||
echo $intPage;
|
||||
print_r($arrParams);
|
||||
exit;
|
||||
|
||||
|
||||
if ($intPage == 0) {
|
||||
} else {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 模拟数据处理(可以根据实际需求从数据库获取数据)
|
||||
$data = [];
|
||||
for ($i = 1; $i <= $arrParams['limit']; $i++) {
|
||||
$data[] = [
|
||||
'id' => $i,
|
||||
'name' => "小说名称 {$i}",
|
||||
'category' => $arrParams['n_category'] ?? '默认分类',
|
||||
'status' => $arrParams['n_status'] ?? '连载中',
|
||||
'order' => $arrParams['sort_type'] ?? '默认排序',
|
||||
];
|
||||
}
|
||||
|
||||
// 分页数据
|
||||
$p_data = [
|
||||
'current_page' => $arrParams['page'],
|
||||
'total_page' => 5,
|
||||
'total_count' => 50,
|
||||
];
|
||||
|
||||
|
||||
|
||||
return [
|
||||
'data' => $data,
|
||||
'p_data' => $p_data,
|
||||
];
|
||||
}
|
||||
}
|
||||
72
code/app/services/SiteContext.php
Normal file
72
code/app/services/SiteContext.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
namespace app\services;
|
||||
|
||||
use app\model\DomainModel;
|
||||
use app\model\TemplatesModel;
|
||||
use think\facade\Request;
|
||||
use think\facade\Config;
|
||||
use think\exception\HttpException;
|
||||
|
||||
class SiteContext
|
||||
{
|
||||
/**
|
||||
* Request
|
||||
*
|
||||
* @var \think\Request
|
||||
*/
|
||||
public $Request;
|
||||
|
||||
/**
|
||||
* DomainModel
|
||||
*
|
||||
* @var DomainModel
|
||||
*/
|
||||
public $DomainModel;
|
||||
|
||||
/**
|
||||
* TemplatesModel
|
||||
*
|
||||
* @var TemplatesModel
|
||||
*/
|
||||
public $TemplatesModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->Request = request();
|
||||
}
|
||||
|
||||
/**
|
||||
* GetViewConfig
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getViewConfig(): array
|
||||
{
|
||||
$strDomain = $this->Request->rootDomain();
|
||||
|
||||
$this->DomainModel = DomainModel::getDomainOnCacheByDomain($strDomain);
|
||||
|
||||
if (empty($this->DomainModel)) {
|
||||
throw new HttpException(404, 'Site config not Found');
|
||||
}
|
||||
|
||||
$this->TemplatesModel = TemplatesModel::getTemplateOnCacheByTId($this->DomainModel->t_id);
|
||||
|
||||
if (empty($this->DomainModel)) {
|
||||
throw new HttpException(500, 'Site template not Found');
|
||||
}
|
||||
|
||||
$this->Request->DomainModel = $this->DomainModel;
|
||||
|
||||
$this->Request->TemplatesModel = $this->TemplatesModel;
|
||||
|
||||
return [
|
||||
'type' => 'Think',
|
||||
'auto_rule' => 3,
|
||||
'view_dir_name' => 'view',
|
||||
'view_suffix' => 'html',
|
||||
'view_path' => root_path(ltrim($this->TemplatesModel->t_path, '/')),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,11 @@ use app\task\crawler\zw\Scheduler as ZwScheduler;
|
||||
*/
|
||||
class Scheduler extends ZwScheduler
|
||||
{
|
||||
|
||||
protected $intStartNSourceId = 1;
|
||||
|
||||
protected $intEndNSourceId = 500000;
|
||||
|
||||
/**
|
||||
* Undocumented function
|
||||
*
|
||||
@@ -19,7 +24,7 @@ class Scheduler extends ZwScheduler
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
$this->intSlice = 4;
|
||||
$this->intSlice = 3;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace app\task\crawler\zw630\page;
|
||||
use app\task\crawler\zw\page\Site as ZwSite;
|
||||
use GuzzleHttp\Promise;
|
||||
use GuzzleHttp\Client;
|
||||
|
||||
/**
|
||||
* @mixin think\Model
|
||||
*/
|
||||
@@ -99,10 +100,10 @@ class Site extends ZwSite
|
||||
|
||||
if ($intPage == 0) {
|
||||
|
||||
$arrItem['uri'] = sprintf('/shu/%s.html', $intNSourceId);
|
||||
$strUri = sprintf('/shu/%s.html', $intNSourceId);
|
||||
} else {
|
||||
|
||||
$arrItem['uri'] = sprintf('/shu/%s_%s.html', $intNSourceId, $intPage);
|
||||
$strUri = sprintf('/shu/%s_%s.html', $intNSourceId, $intPage);
|
||||
}
|
||||
|
||||
return $strUri;
|
||||
|
||||
Reference in New Issue
Block a user