mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-23 09:50:25 +08:00
修改页面配置
This commit is contained in:
parent
3ac20bf05b
commit
37681826e7
@ -11,6 +11,15 @@ use think\admin\Controller;
|
|||||||
*/
|
*/
|
||||||
class Config extends Controller
|
class Config extends Controller
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* 页面类型
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $pageTypes = [
|
||||||
|
'关于我们' => '关于我们',
|
||||||
|
'用户协议' => '用户协议',
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信小程序配置
|
* 微信小程序配置
|
||||||
* @auth true
|
* @auth true
|
||||||
@ -33,7 +42,6 @@ class Config extends Controller
|
|||||||
public function pageHome()
|
public function pageHome()
|
||||||
{
|
{
|
||||||
$this->title = '内容页面管理';
|
$this->title = '内容页面管理';
|
||||||
$this->types = ['关于我们', '用户协议'];
|
|
||||||
$this->fetch('page_home');
|
$this->fetch('page_home');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,8 +54,8 @@ class Config extends Controller
|
|||||||
*/
|
*/
|
||||||
public function pageEdit()
|
public function pageEdit()
|
||||||
{
|
{
|
||||||
$this->skey = input('type');
|
$this->skey = input('type') ?: $this->pageTypes[0];
|
||||||
$this->title = '编辑' . $this->skey;
|
$this->title = '编辑' . $this->pageTypes[$this->skey] ?? '';
|
||||||
$this->__sysdata('page_form', 'javascript:history.back()');
|
$this->__sysdata('page_form', 'javascript:history.back()');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
{block name='content'}
|
{block name='content'}
|
||||||
<div class="layui-row layui-col-space20 portal-block-container notselect">
|
<div class="layui-row layui-col-space20 portal-block-container notselect">
|
||||||
{foreach $types as $type}
|
{foreach $pageTypes as $key=>$type}
|
||||||
<div class="layui-col-sm6 layui-col-md6 layui-col-lg4 ">
|
<div class="layui-col-xs6 layui-col-sm4 layui-col-md4 layui-col-lg3">
|
||||||
<!--{if auth('pageEdit')}-->
|
<!--{if auth('pageEdit')}-->
|
||||||
<div class="pointer" data-open="{:url('pageEdit')}?type={$type}">
|
<div class="pointer" data-open="{:url('pageEdit')}?type={$key}">
|
||||||
<div class="portal-block-item nowrap think-bg-violet">
|
<div class="portal-block-item nowrap think-bg-violet">
|
||||||
<div class="">编辑页面内容</div>
|
<div>编辑页面内容</div>
|
||||||
<div style="font-size:26px">{$type|default=''}</div>
|
<div style="font-size:26px">{$type|default=''}</div>
|
||||||
</div>
|
</div>
|
||||||
<i class="portal-block-icon layui-icon layui-icon-read"></i>
|
<i class="portal-block-icon layui-icon layui-icon-read"></i>
|
||||||
</div>
|
</div>
|
||||||
<!--{else}-->
|
<!--{else}-->
|
||||||
<div class="portal-block-item nowrap think-bg-violet">
|
<div class="portal-block-item nowrap think-bg-violet">
|
||||||
<div class="">编辑页面内容</div>
|
<div>编辑页面内容</div>
|
||||||
<div style="font-size:26px">{$type|default=''}</div>
|
<div style="font-size:26px">{$type|default=''}</div>
|
||||||
</div>
|
</div>
|
||||||
<i class="portal-block-icon layui-icon layui-icon-read"></i>
|
<i class="portal-block-icon layui-icon layui-icon-read"></i>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user