chore: src/app 目录与华为云第一台服务器上的代码做第一次比较合并
This commit is contained in:
@@ -201,8 +201,89 @@ class DiyViewLink extends BaseModel
|
||||
$link_list[ $k ][ 'child_list' ] = [];
|
||||
}
|
||||
}
|
||||
|
||||
// PDF文件分类列表
|
||||
foreach ($link_list as $k => $v) {
|
||||
if (isset($v[ 'child_list' ])) {
|
||||
foreach ($v[ 'child_list' ] as $ck => $cv) {
|
||||
if ($cv[ 'name' ] == 'FILES_CATE_PAGE') {
|
||||
$link_list[ $k ][ 'child_list' ][ $ck ][ 'child_list' ] = [ $this->getFllesCateGoryPageLinkList($params[ 'site_id' ])[ 'data' ] ];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$link_list[ $k ][ 'child_list' ] = [];
|
||||
}
|
||||
}
|
||||
|
||||
// PDF文件列表
|
||||
foreach ($link_list as $k => $v) {
|
||||
if (isset($v[ 'child_list' ])) {
|
||||
foreach ($v[ 'child_list' ] as $ck => $cv) {
|
||||
if ($cv[ 'name' ] == 'FILES_LIST_PAGE') {
|
||||
$link_list[ $k ][ 'child_list' ][ $ck ][ 'child_list' ] = [ $this->getFllesPageLinkList($params[ 'site_id' ])[ 'data' ] ];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$link_list[ $k ][ 'child_list' ] = [];
|
||||
}
|
||||
}
|
||||
file_put_contents(__DIR__ . '/debug.txt', var_export($link_list,true));
|
||||
return $this->success($link_list);
|
||||
}
|
||||
/**
|
||||
* 查询文章列表
|
||||
* @param $site_id
|
||||
* @return array
|
||||
*/
|
||||
public function getFllesPageLinkList($site_id)
|
||||
{
|
||||
// $article_model = new ArticleModel();
|
||||
// $condition = [ [ 'site_id', '=', $site_id ], [ 'status', '=', 1 ] ];
|
||||
// $site_diy_view_list = $article_model->getArticleList($condition,'*', 'create_time desc', 100);
|
||||
$files_list = model('files')->getList( [ [ 'site_id', '=', $site_id ] ]);
|
||||
|
||||
$link_mic = [
|
||||
'name' => 'FILES_LIST',
|
||||
'title' => '文件列表',
|
||||
'parent' => 'FILES_LIST_PAGE',
|
||||
'child_list' => []
|
||||
];
|
||||
foreach ($files_list as $page_k => $page_v) {
|
||||
$link_mic[ 'child_list' ][] = [
|
||||
'name' => 'FILES_'.$page_v[ 'files_id' ],
|
||||
'title' => $page_v[ 'files_title' ],
|
||||
'parent' => 'FILES_LIST',
|
||||
'wap_url' => '/pages_tool/files/detail?files_id=' . $page_v[ 'files_id' ]
|
||||
];
|
||||
}
|
||||
|
||||
return $this->success($link_mic);
|
||||
}
|
||||
/**
|
||||
* 查询文件分类列表
|
||||
* @param $site_id
|
||||
* @return array
|
||||
*/
|
||||
public function getFllesCateGoryPageLinkList($site_id)
|
||||
{
|
||||
$cate_gorylist = model('files_category')->getList( [ [ 'site_id', '=', $site_id ] ]);
|
||||
$link_mic = [
|
||||
'name' => 'FILESCATEGORY_LIST',
|
||||
'title' => '文件分类',
|
||||
'parent' => 'FILES_CATE_PAGE',
|
||||
'child_list' => []
|
||||
];
|
||||
foreach ($cate_gorylist as $page_k => $page_v) {
|
||||
$link_mic[ 'child_list' ][] = [
|
||||
'name' => 'FILES_CATEGORY_'.$page_v[ 'id' ],
|
||||
'title' => $page_v[ 'category_name' ],
|
||||
'parent' => 'FILES_CATEGORY_LIST',
|
||||
'wap_url' => '/pages_tool/files/list?category_id=' . $page_v[ 'id' ]
|
||||
];
|
||||
}
|
||||
return $this->success($link_mic);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文章分类列表
|
||||
* @param $site_id
|
||||
|
||||
Reference in New Issue
Block a user