ProjectIsCom.php
1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?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'),
];
}
}
}
}