修改页面管理

This commit is contained in:
邹景立 2021-02-24 18:01:06 +08:00
parent bb8a7568d3
commit e640f28115
6 changed files with 136 additions and 88 deletions

View File

@ -11,7 +11,7 @@
Target Server Version : 50562
File Encoding : 65001
Date: 28/01/2021 16:01:16
Date: 24/02/2021 18:00:55
*/
SET NAMES utf8mb4;
@ -35,7 +35,7 @@ CREATE TABLE `system_menu` (
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_system_menu_status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 94 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-菜单' ROW_FORMAT = COMPACT;
) ENGINE = InnoDB AUTO_INCREMENT = 95 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-菜单' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of system_menu
@ -63,19 +63,17 @@ INSERT INTO `system_menu` VALUES (66, 60, '默认回复配置', 'layui-icon layu
INSERT INTO `system_menu` VALUES (67, 0, '控制台', '', '', '#', '', '_self', 300, 1, '2020-07-13 06:51:46');
INSERT INTO `system_menu` VALUES (68, 67, '数据管理(接口案例)', '', '', '#', '', '_self', 0, 1, '2020-07-13 06:51:54');
INSERT INTO `system_menu` VALUES (70, 68, '文章内容管理', 'layui-icon layui-icon-template', '', 'data/news_item/index', '', '_self', 10, 1, '2020-07-13 06:52:26');
INSERT INTO `system_menu` VALUES (71, 68, '轮播图片管理', 'layui-icon layui-icon-carousel', '', 'data/config/slider', '', '_self', 8, 1, '2020-07-14 01:17:02');
INSERT INTO `system_menu` VALUES (71, 68, '轮播图片管理', 'layui-icon layui-icon-carousel', 'data/config/sliderhome', 'data/config/sliderhome', '', '_self', 8, 1, '2020-07-14 01:17:02');
INSERT INTO `system_menu` VALUES (73, 67, '商城管理(开发中)', '', '', '#', '', '_self', 0, 1, '2020-09-08 02:51:30');
INSERT INTO `system_menu` VALUES (75, 73, '商品分类管理', 'layui-icon layui-icon-form', 'data/shop_goods_cate/index', 'data/shop_goods_cate/index', '', '_self', 70, 1, '2020-09-08 03:35:58');
INSERT INTO `system_menu` VALUES (75, 73, '商品分类管理', 'layui-icon layui-icon-tabs', 'data/shop_goods_cate/index', 'data/shop_goods_cate/index', '', '_self', 70, 1, '2020-09-08 03:35:58');
INSERT INTO `system_menu` VALUES (76, 73, '商品数据管理', 'layui-icon layui-icon-star', 'data/shop_goods/index', 'data/shop_goods/index', '', '_self', 90, 1, '2020-09-08 07:13:19');
INSERT INTO `system_menu` VALUES (77, 90, '会员用户管理', 'layui-icon layui-icon-user', 'data/user/index', 'data/user/index', '', '_self', 900, 1, '2020-09-10 01:48:02');
INSERT INTO `system_menu` VALUES (78, 73, '订单数据管理', 'layui-icon layui-icon-template-1', 'data/shop_order/index', 'data/shop_order/index', '', '_self', 60, 1, '2020-09-10 01:48:41');
INSERT INTO `system_menu` VALUES (78, 73, '订单数据管理', 'layui-icon layui-icon-template', 'data/shop_order/index', 'data/shop_order/index', '', '_self', 60, 1, '2020-09-10 01:48:41');
INSERT INTO `system_menu` VALUES (79, 73, '订单发货管理', 'layui-icon layui-icon-transfer', 'data/shop_order_send/index', 'data/shop_order_send/index', '', '_self', 50, 1, '2020-09-10 01:50:12');
INSERT INTO `system_menu` VALUES (81, 73, '快递公司管理', 'layui-icon layui-icon-website', 'data/shop_truck_company/index', 'data/shop_truck_company/index', '', '_self', 0, 1, '2020-09-15 08:47:46');
INSERT INTO `system_menu` VALUES (82, 73, '邮费模板管理', 'layui-icon layui-icon-template-1', 'data/shop_truck_template/index', 'data/shop_truck_template/index', '', '_self', 0, 1, '2020-09-15 09:14:46');
INSERT INTO `system_menu` VALUES (83, 73, '配送区域管理', 'layui-icon layui-icon-location', 'data/shop_truck_template/region', 'data/shop_truck_template/region', '', '_self', 0, 1, '2020-09-17 09:13:35');
INSERT INTO `system_menu` VALUES (84, 68, '微信小程序配置', 'layui-icon layui-icon-set', 'data/config/wxapp', 'data/config/wxapp', '', '_self', 5, 1, '2020-09-21 16:34:08');
INSERT INTO `system_menu` VALUES (85, 68, '会员服务协议', 'layui-icon layui-icon-template-1', 'data/config/agreement', 'data/config/agreement', '', '_self', 30, 1, '2020-09-22 16:00:10');
INSERT INTO `system_menu` VALUES (86, 68, '关于我们描述', 'layui-icon layui-icon-app', 'data/config/about', 'data/config/about', '', '_self', 40, 1, '2020-09-22 16:12:44');
INSERT INTO `system_menu` VALUES (87, 68, '支付参数管理', 'layui-icon layui-icon-rmb', 'data/shop_payment/index', 'data/shop_payment/index', '', '_self', 6, 1, '2020-12-12 09:08:09');
INSERT INTO `system_menu` VALUES (88, 68, '系统通知管理', 'layui-icon layui-icon-notice', 'data/user_notify/index', 'data/user_notify/index', '', '_self', 6, 1, '2021-01-20 10:07:32');
INSERT INTO `system_menu` VALUES (89, 90, '余额充值记录', 'layui-icon layui-icon-rmb', 'data/user_balance/index', 'data/user_balance/index', '', '_self', 800, 1, '2021-01-20 10:09:49');
@ -83,5 +81,6 @@ INSERT INTO `system_menu` VALUES (90, 67, '用户管理', '', '', '#', '', '_sel
INSERT INTO `system_menu` VALUES (91, 90, '用户等级管理', 'layui-icon layui-icon-senior', 'data/user_level/index', 'data/user_level/index', '', '_self', 700, 1, '2021-01-22 05:43:27');
INSERT INTO `system_menu` VALUES (92, 90, '用户折扣方案', 'layui-icon layui-icon-set', 'data/user_discount/index', 'data/user_discount/index', '', '_self', 0, 1, '2021-01-27 05:44:51');
INSERT INTO `system_menu` VALUES (93, 90, '用户提现管理', 'layui-icon layui-icon-component', 'data/user_transfer/index', 'data/user_transfer/index', '', '_self', 0, 1, '2021-01-28 06:48:34');
INSERT INTO `system_menu` VALUES (94, 68, '页面内容管理', 'layui-icon layui-icon-read', 'data/config/pagehome', 'data/config/pagehome', '', '_self', 20, 1, '2021-02-24 08:49:16');
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -11,7 +11,7 @@
Target Server Version : 50562
File Encoding : 65001
Date: 24/02/2021 16:01:15
Date: 24/02/2021 18:00:34
*/
SET NAMES utf8mb4;
@ -4588,11 +4588,12 @@ CREATE TABLE `system_auth` (
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_system_auth_title`(`title`) USING BTREE,
INDEX `idx_system_auth_status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-权限' ROW_FORMAT = COMPACT;
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-权限' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of system_auth
-- ----------------------------
INSERT INTO `system_auth` VALUES (1, 'test', '', 0, 1, '2021-02-24 09:24:55');
-- ----------------------------
-- Table structure for system_auth_node
@ -4658,11 +4659,13 @@ CREATE TABLE `system_data` (
`value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '配置值',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_system_data_name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-数据' ROW_FORMAT = COMPACT;
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-数据' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of system_data
-- ----------------------------
INSERT INTO `system_data` VALUES (1, '关于我们', 'a:2:{s:4:\"name\";s:8:\"23512322\";s:7:\"content\";s:16:\"<p>512351235</p>\";}');
INSERT INTO `system_data` VALUES (2, '用户协议', 'a:2:{s:4:\"name\";s:7:\"2315123\";s:7:\"content\";s:16:\"<p>512351235</p>\";}');
-- ----------------------------
-- Table structure for system_menu
@ -4682,7 +4685,7 @@ CREATE TABLE `system_menu` (
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_system_menu_status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 94 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-菜单' ROW_FORMAT = COMPACT;
) ENGINE = InnoDB AUTO_INCREMENT = 95 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-菜单' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of system_menu
@ -4710,7 +4713,7 @@ INSERT INTO `system_menu` VALUES (66, 60, '默认回复配置', 'layui-icon layu
INSERT INTO `system_menu` VALUES (67, 0, '控制台', '', '', '#', '', '_self', 300, 1, '2020-07-13 06:51:46');
INSERT INTO `system_menu` VALUES (68, 67, '数据管理(接口案例)', '', '', '#', '', '_self', 0, 1, '2020-07-13 06:51:54');
INSERT INTO `system_menu` VALUES (70, 68, '文章内容管理', 'layui-icon layui-icon-template', '', 'data/news_item/index', '', '_self', 10, 1, '2020-07-13 06:52:26');
INSERT INTO `system_menu` VALUES (71, 68, '轮播图片管理', 'layui-icon layui-icon-carousel', '', 'data/config/slider', '', '_self', 8, 1, '2020-07-14 01:17:02');
INSERT INTO `system_menu` VALUES (71, 68, '轮播图片管理', 'layui-icon layui-icon-carousel', 'data/config/sliderhome', 'data/config/sliderhome', '', '_self', 8, 1, '2020-07-14 01:17:02');
INSERT INTO `system_menu` VALUES (73, 67, '商城管理(开发中)', '', '', '#', '', '_self', 0, 1, '2020-09-08 02:51:30');
INSERT INTO `system_menu` VALUES (75, 73, '商品分类管理', 'layui-icon layui-icon-tabs', 'data/shop_goods_cate/index', 'data/shop_goods_cate/index', '', '_self', 70, 1, '2020-09-08 03:35:58');
INSERT INTO `system_menu` VALUES (76, 73, '商品数据管理', 'layui-icon layui-icon-star', 'data/shop_goods/index', 'data/shop_goods/index', '', '_self', 90, 1, '2020-09-08 07:13:19');
@ -4721,8 +4724,6 @@ INSERT INTO `system_menu` VALUES (81, 73, '快递公司管理', 'layui-icon layu
INSERT INTO `system_menu` VALUES (82, 73, '邮费模板管理', 'layui-icon layui-icon-template-1', 'data/shop_truck_template/index', 'data/shop_truck_template/index', '', '_self', 0, 1, '2020-09-15 09:14:46');
INSERT INTO `system_menu` VALUES (83, 73, '配送区域管理', 'layui-icon layui-icon-location', 'data/shop_truck_template/region', 'data/shop_truck_template/region', '', '_self', 0, 1, '2020-09-17 09:13:35');
INSERT INTO `system_menu` VALUES (84, 68, '微信小程序配置', 'layui-icon layui-icon-set', 'data/config/wxapp', 'data/config/wxapp', '', '_self', 5, 1, '2020-09-21 16:34:08');
INSERT INTO `system_menu` VALUES (85, 68, '会员服务协议', 'layui-icon layui-icon-template-1', 'data/config/agreement', 'data/config/agreement', '', '_self', 30, 1, '2020-09-22 16:00:10');
INSERT INTO `system_menu` VALUES (86, 68, '关于我们描述', 'layui-icon layui-icon-app', 'data/config/about', 'data/config/about', '', '_self', 40, 1, '2020-09-22 16:12:44');
INSERT INTO `system_menu` VALUES (87, 68, '支付参数管理', 'layui-icon layui-icon-rmb', 'data/shop_payment/index', 'data/shop_payment/index', '', '_self', 6, 1, '2020-12-12 09:08:09');
INSERT INTO `system_menu` VALUES (88, 68, '系统通知管理', 'layui-icon layui-icon-notice', 'data/user_notify/index', 'data/user_notify/index', '', '_self', 6, 1, '2021-01-20 10:07:32');
INSERT INTO `system_menu` VALUES (89, 90, '余额充值记录', 'layui-icon layui-icon-rmb', 'data/user_balance/index', 'data/user_balance/index', '', '_self', 800, 1, '2021-01-20 10:09:49');
@ -4730,6 +4731,7 @@ INSERT INTO `system_menu` VALUES (90, 67, '用户管理', '', '', '#', '', '_sel
INSERT INTO `system_menu` VALUES (91, 90, '用户等级管理', 'layui-icon layui-icon-senior', 'data/user_level/index', 'data/user_level/index', '', '_self', 700, 1, '2021-01-22 05:43:27');
INSERT INTO `system_menu` VALUES (92, 90, '用户折扣方案', 'layui-icon layui-icon-set', 'data/user_discount/index', 'data/user_discount/index', '', '_self', 0, 1, '2021-01-27 05:44:51');
INSERT INTO `system_menu` VALUES (93, 90, '用户提现管理', 'layui-icon layui-icon-component', 'data/user_transfer/index', 'data/user_transfer/index', '', '_self', 0, 1, '2021-01-28 06:48:34');
INSERT INTO `system_menu` VALUES (94, 68, '页面内容管理', 'layui-icon layui-icon-read', 'data/config/pagehome', 'data/config/pagehome', '', '_self', 20, 1, '2021-02-24 08:49:16');
-- ----------------------------
-- Table structure for system_oplog
@ -4744,13 +4746,22 @@ CREATE TABLE `system_oplog` (
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作人用户名',
`create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-日志' ROW_FORMAT = COMPACT;
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-日志' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of system_oplog
-- ----------------------------
INSERT INTO `system_oplog` VALUES (1, 'admin/api.plugs/optimize', '127.0.0.1', '系统运维管理', '创建数据库优化任务', 'admin', '2021-02-23 09:21:43');
INSERT INTO `system_oplog` VALUES (2, 'admin/api.queue/stop', '127.0.0.1', '系统运维管理', '尝试停止后台服务主进程', 'admin', '2021-02-23 09:21:54');
INSERT INTO `system_oplog` VALUES (3, 'admin/login/index', '127.0.0.1', '系统用户登录', '登录系统后台成功', 'admin', '2021-02-24 08:48:12');
INSERT INTO `system_oplog` VALUES (4, 'admin/menu/add', '127.0.0.1', '系统菜单管理', '添加系统菜单[94]成功', 'admin', '2021-02-24 08:49:16');
INSERT INTO `system_oplog` VALUES (5, 'admin/menu/remove', '127.0.0.1', '系统菜单管理', '删除系统菜单[86]成功', 'admin', '2021-02-24 09:18:29');
INSERT INTO `system_oplog` VALUES (6, 'admin/menu/remove', '127.0.0.1', '系统菜单管理', '删除系统菜单[85]成功', 'admin', '2021-02-24 09:18:33');
INSERT INTO `system_oplog` VALUES (7, 'admin/menu/edit', '127.0.0.1', '系统菜单管理', '修改系统菜单[71]成功', 'admin', '2021-02-24 09:23:18');
INSERT INTO `system_oplog` VALUES (8, 'admin/menu/edit', '127.0.0.1', '系统菜单管理', '修改系统菜单[94]成功', 'admin', '2021-02-24 09:23:35');
INSERT INTO `system_oplog` VALUES (9, 'admin/auth/add', '127.0.0.1', '系统权限管理', '添加系统权限[1]成功', 'admin', '2021-02-24 09:24:55');
INSERT INTO `system_oplog` VALUES (10, 'admin/menu/edit', '127.0.0.1', '系统菜单管理', '修改系统菜单[94]成功', 'admin', '2021-02-24 09:32:05');
INSERT INTO `system_oplog` VALUES (11, 'admin/menu/edit', '127.0.0.1', '系统菜单管理', '修改系统菜单[71]成功', 'admin', '2021-02-24 09:32:18');
-- ----------------------------
-- Table structure for system_queue
@ -4817,7 +4828,7 @@ CREATE TABLE `system_user` (
-- ----------------------------
-- Records of system_user
-- ----------------------------
INSERT INTO `system_user` VALUES (10000, 'admin', '21232f297a57a5a743894a0e4a801fc3', '系统管理员', 'http://127.0.0.1:8000/upload/cf/d4b538dc1d8b96a09310cab5fa44c9.gif', ',,', '', '', '', '127.0.0.1', '2021-02-23 07:39:39', 77, '', 1, 0, 0, '2015-11-13 15:14:22');
INSERT INTO `system_user` VALUES (10000, 'admin', '21232f297a57a5a743894a0e4a801fc3', '系统管理员', 'http://127.0.0.1:8000/upload/cf/d4b538dc1d8b96a09310cab5fa44c9.gif', ',,', '', '', '', '127.0.0.1', '2021-02-24 08:48:12', 78, '', 1, 0, 0, '2015-11-13 15:14:22');
-- ----------------------------
-- Table structure for wechat_fans

View File

@ -26,74 +26,44 @@ class Config extends Controller
}
/**
* 关于我们描述
* 内容页面管理
* @auth true
* @menu true
*/
public function pageHome()
{
$this->title = '内容页面管理';
$this->types = ['关于我们', '用户协议'];
$this->fetch('page_home');
}
/**
* 内容页面编辑
* @auth true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function about()
public function pageEdit()
{
$this->skey = 'about';
$this->title = '关于我们描述';
$this->__sysdata('content');
$this->skey = input('type');
$this->title = '编辑' . $this->skey;
$this->__sysdata('page_form', 'javascript:history.back()');
}
/**
* 应用轮播图片
* 首页轮播图片
* @menu true
* @auth true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function slider()
public function sliderHome()
{
$this->skey = 'slider';
$this->title = '应用轮播图片';
$this->__sysdata($this->skey);
}
/**
* 用户服务协议
* @auth true
* @menu true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function agreement()
{
$this->skey = 'agreement';
$this->title = '用户服务协议';
$this->__sysdata('content');
}
/**
* 显示并保存数据
* @param string $template 模板文件
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
private function __sysdata(string $template)
{
if ($this->request->isGet()) {
$this->data = sysdata($this->skey);
$this->fetch($template);
} elseif ($this->request->isPost()) {
if (is_string(input('data'))) {
$data = json_decode(input('data'), true) ?: [];
} else {
$data = $this->request->post();
}
if (sysdata($this->skey, $data) !== false) {
$this->success('内容保存成功!', '');
} else {
$this->error('内容保存失败,请稍候再试!');
}
}
$this->skey = 'SliderHome';
$this->title = '首页轮播图片';
$this->__sysdata('slider');
}
/**
@ -107,10 +77,39 @@ class Config extends Controller
{
if ($this->request->isGet()) {
$this->fetch($template);
} elseif ($this->request->isPost()) {
}
if ($this->request->isPost()) {
$data = $this->request->post();
foreach ($data as $k => $v) sysconf($k, $v);
$this->success('配置保存成功!');
}
}
/**
* 显示并保存数据
* @param string $template 模板文件
* @param string $history 跳转处理
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
private function __sysdata(string $template, $history = '')
{
if ($this->request->isGet()) {
$this->data = sysdata($this->skey);
$this->fetch($template);
}
if ($this->request->isPost()) {
if (is_string(input('data'))) {
$data = json_decode(input('data'), true) ?: [];
} else {
$data = $this->request->post();
}
if (sysdata($this->skey, $data) !== false) {
$this->success('内容保存成功!', $history);
} else {
$this->error('内容保存失败,请稍候再试!');
}
}
}
}

View File

@ -1,20 +0,0 @@
{extend name="../../admin/view/main"}
{block name="content"}
<div class="think-box-shadow">
<form onsubmit="return false;" data-auto="true" action="{$request->url()}" method="post" class='layui-form layui-card' autocomplete="off">
<div class="layui-card-body padding-30">
<textarea class="layui-hide" name="content">{$data.content|default=''}</textarea>
</div>
<div class="hr-line-dashed margin-bottom-20"></div>
<div class="layui-form-item text-center">
<button class="layui-btn" type="submit">保存内容</button>
</div>
</form>
<script>
require(['ckeditor'], function () {
createEditor('[name="content"]', {height: 500});
});
</script>
</div>
{/block}

View File

@ -0,0 +1,37 @@
{extend name="../../admin/view/main"}
{block name='content'}
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
<div class="layui-card-body padding-40">
<label class="layui-form-item relative block">
<span class="color-green font-w7">页面名称</span>
<span class="color-desc margin-left-5">Page Name</span>
<input required name="name" value='{$data.name|default=""}' placeholder="请输入页面名称" class="layui-input">
</label>
<div class="layui-form-item relative block">
<span class="color-green font-w7 label-required-prev">页面名称</span>
<span class="color-desc margin-left-5">Page Content</span>
<label class="relative block">
<textarea class="layui-hide" name="content">{$data.content|default=''}</textarea>
</label>
</div>
<div class="hr-line-dashed"></div>
<div class="layui-form-item text-center">
<button type="submit" class="layui-btn">保存数据</button>
<button type='button' class="layui-btn layui-btn-danger" data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
</div>
</div>
</form>
<script>
layui.form.render();
require(['ckeditor'], function () {
window.createEditor('[name=content]', {height: 500});
});
</script>
{/block}

View File

@ -0,0 +1,22 @@
{extend name="../../admin/view/main"}
{block name='content'}
<div class="layui-row layui-col-space20 portal-block-container notselect">
{foreach $types as $type}
<div class="layui-col-sm6 layui-col-md6 layui-col-lg4 ">
<!--{if auth('pageEdit')}-->
<div class="portal-block-item nowrap pointer think-bg-violet" data-open="{:url('pageEdit')}?type={$type}">
<div class="">编辑页面内容</div>
<div style="font-size:26px">{$type|default=''}</div>
</div>
<!--{else}-->
<div class="portal-block-item nowrap pointer think-bg-violet">
<div class="">编辑页面内容</div>
<div style="font-size:26px">{$type|default=''}</div>
</div>
<!--{/if}-->
<i class="portal-block-icon layui-icon layui-icon-read"></i>
</div>
{/foreach}
</div>
{/block}