|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @remark :
|
|
|
|
* @name :ProjectIsCom.php
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/8/1 11:50
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Models\IsCom;
|
|
|
|
|
|
|
|
use App\Models\Base;
|
|
|
|
use App\Models\Project\Project;
|
|
|
|
use App\Models\Template\BTemplate;
|
|
|
|
use App\Models\Template\Template;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :是否为独立头部+底部
|
|
|
|
* @name :ProjectIsCom
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/8/1 11:51
|
|
|
|
*/
|
|
|
|
class ProjectIsCom extends Base
|
|
|
|
{
|
|
|
|
protected $table = 'gl_project_is_com';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name :(包含详情页+列表页)
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $initParam = [
|
|
|
|
'首页'=>BTemplate::SOURCE_HOME,
|
|
|
|
'产品'=>BTemplate::SOURCE_PRODUCT,
|
|
|
|
'博客'=>BTemplate::SOURCE_BLOG,
|
|
|
|
'新闻'=>BTemplate::SOURCE_NEWS,
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name : 单一界面
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
protected $initPageParam = [
|
|
|
|
'单页面'=>BTemplate::SOURCE_PAGE,
|
|
|
|
];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :初始数据
|
|
|
|
* @name :initializedData
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2024/8/1 11:52
|
|
|
|
*/
|
|
|
|
public function initializedData(){
|
|
|
|
$data = [];
|
|
|
|
$initParam = $this->initParam;
|
|
|
|
foreach ($initParam as $pKey => $pValue){
|
|
|
|
$is_list = [BTemplate::IS_LIST,BTemplate::IS_DETAIL];
|
|
|
|
foreach ($is_list as $isValue){
|
|
|
|
$name = $pKey.($isValue == 0 ? '详情' : '列表');
|
|
|
|
$data[] = [
|
|
|
|
'name'=>$name,
|
|
|
|
'source'=>$pValue,
|
|
|
|
'is_list'=>$isValue,
|
|
|
|
'header_status'=>0,
|
|
|
|
'footer_status'=>0,
|
|
|
|
'created_at'=>date('Y-m-d H:i:s'),
|
|
|
|
'updated_at'=>date('Y-m-d H:i:s'),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|