修正一堆bug

This commit is contained in:
muzi_ys 2022-07-10 22:17:00 +08:00
parent b1ac3377b5
commit 3db7eebf5b
3 changed files with 84 additions and 259 deletions

View File

@ -17,6 +17,7 @@ class Data
const DATA_SYSTEM_CONFIG = 'data_system_config'; //系统配置
const DATA_ADVERT = 'data_advert'; //广告
const DATA_ARCHIVE = "data_archive"; //文章归档
const DATA_DOCUMENT_LIST = "data_document_list"; //文章列表
//文档类型
const DOCUMENT_TYPE_ARTICLE = "article";

View File

@ -262,6 +262,9 @@ function getSubs($categorys,$catId=0,$level=1){
return $subs;
}
/**
* @return array
*/
function get_document_category_all()
{
$documentCategoryList = get_document_category_list();
@ -400,7 +403,6 @@ function tpl_get_list($orderBy, int $pageSize, $cid, $type, $table = 'article',
'model' => $documentListModel,
'lists' => $lists
];
//dd($re);
return $re;
}
@ -575,7 +577,7 @@ function tpl_get_friend_link($type, $row)
*/
function tpl_get_advert($type, $row)
{
$advertList = cache(Data::DATA_ADVERT . '_' . $type);
$advertList = cache(Data::DATA_ADVERT . '_' . $type .'_'. $row);
if ($advertList === null) {
$advertList = (new Advert())->alias("a")
->leftJoin("advert_info i",'a.id = i.advert_id')
@ -593,7 +595,7 @@ function tpl_get_advert($type, $row)
}
$item['cover_path'] = file_cdn($item['cover_path']);
}
cache(Data::DATA_ADVERT . '_' . $type, $advertList);
cache(Data::DATA_ADVERT . '_' . $type .'_'. $row, $advertList);
}
return $advertList;
}

File diff suppressed because one or more lines are too long