dever 6 роки тому
батько
коміт
c3a59f4927
58 змінених файлів з 5368 додано та 0 видалено
  1. 105 0
      act/database/comment.php
  2. 105 0
      act/database/like.php
  3. 105 0
      act/database/live_comment.php
  4. 105 0
      act/database/share.php
  5. 8 0
      act/index.php
  6. 397 0
      audit/database/article.php
  7. 77 0
      audit/database/author.php
  8. 77 0
      audit/database/cate.php
  9. 8 0
      audit/index.php
  10. 8 0
      boot.php
  11. 70 0
      config/base.php
  12. 26 0
      config/env/localhost/default.php
  13. 5 0
      config/route.php
  14. 397 0
      content/database/article.php
  15. 77 0
      content/database/author.php
  16. 77 0
      content/database/cate.php
  17. 8 0
      content/index.php
  18. 323 0
      data/compile/content/manage/layadmin/console.cmp.php
  19. 66 0
      data/compile/content/manage/layadmin/home.cmp.php
  20. 28 0
      data/compile/content/manage/layadmin/inc/head.cmp.php
  21. 34 0
      data/compile/content/manage/layadmin/inc/menu.cmp.php
  22. 82 0
      data/compile/content/manage/layadmin/inc/nav.cmp.php
  23. 42 0
      data/compile/content/manage/layadmin/inc/script.cmp.php
  24. 81 0
      data/compile/content/manage/layadmin/login.cmp.php
  25. 112 0
      data/compile/content/manage/layadmin/project/database/list.cmp.php
  26. 82 0
      data/compile/content/manage/layadmin/project/database/update.cmp.php
  27. 82 0
      data/compile/content/upload/home.cmp.php
  28. 323 0
      data/compile/wonderful/manage/layadmin/console.cmp.php
  29. 66 0
      data/compile/wonderful/manage/layadmin/home.cmp.php
  30. 28 0
      data/compile/wonderful/manage/layadmin/inc/head.cmp.php
  31. 34 0
      data/compile/wonderful/manage/layadmin/inc/menu.cmp.php
  32. 82 0
      data/compile/wonderful/manage/layadmin/inc/nav.cmp.php
  33. 42 0
      data/compile/wonderful/manage/layadmin/inc/script.cmp.php
  34. 81 0
      data/compile/wonderful/manage/layadmin/login.cmp.php
  35. 112 0
      data/compile/wonderful/manage/layadmin/project/database/list.cmp.php
  36. 82 0
      data/compile/wonderful/manage/layadmin/project/database/update.cmp.php
  37. 82 0
      data/compile/wonderful/upload/show.cmp.php
  38. 1 0
      data/readme
  39. 11 0
      doc/apidoc.json
  40. 157 0
      doc/apidoc.php
  41. 143 0
      journal/database/code.php
  42. 351 0
      journal/database/info.php
  43. 8 0
      journal/index.php
  44. 87 0
      journal/lib/Manage.php
  45. 102 0
      main/database/config.php
  46. 136 0
      main/database/focus.php
  47. 8 0
      main/index.php
  48. 10 0
      manage/config/base.php
  49. 7 0
      manage/daemon/loop.php
  50. 7 0
      manage/daemon/main.php
  51. 4 0
      manage/index.php
  52. 3 0
      package.json
  53. 4 0
      passport/index.php
  54. 4 0
      poster/index.php
  55. 4 0
      upload/index.php
  56. 384 0
      video/database/live.php
  57. 410 0
      video/database/vod.php
  58. 8 0
      video/index.php

+ 105 - 0
act/database/comment.php

@@ -0,0 +1,105 @@
+<?php
+
+$table = array
+(
+	1 => '图文',
+	2 => '视频',
+);
+return array
+(
+	# 表名
+	'name' => 'comment',
+	# 显示给用户看的名称
+	'lang' => '评论管理',
+	# 是否显示在后台菜单
+	'order' => 80,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+			//'list'		=> true,
+		),
+		
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户',
+			'default' 	=> '0',
+			'desc' 		=> '请选择用户',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			//'search'	=> 'select',
+			'list'		=> '{uid} > 0 ? Dever::load("passport/user-one#name", {uid}) : "匿名用户"',
+		),
+
+		'source_table' 		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '评论类别',
+			'default' 	=> '',
+			'desc' 		=> '评论类别',
+			'match' 	=> 'option',
+			'option' 	=> $table,
+			'list'		=> true,
+		),
+		
+		'source_id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'option',
+			//'list'		=> 'Dever::load("set/manage.load", "{source_table}", {source_id})',
+		),
+		
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容',
+			'update' 	=> 'editor',
+			'key'		=> 1,
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'search'	=> 'fulltext',
+			'list'		=> 'table',
+			'modal'		=> '查看详情',
+		),
+		
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+	),
+);

+ 105 - 0
act/database/like.php

@@ -0,0 +1,105 @@
+<?php
+
+$table = array
+(
+	1 => '图文',
+	2 => '视频',
+);
+return array
+(
+	# 表名
+	'name' => 'like',
+	# 显示给用户看的名称
+	'lang' => '喜欢日志',
+	# 是否显示在后台菜单
+	'order' => 79,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+			//'list'		=> true,
+		),
+		
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户',
+			'default' 	=> '0',
+			'desc' 		=> '请选择用户',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			//'search'	=> 'select',
+			'list'		=> '{uid} > 0 ? Dever::load("passport/user-one#name", {uid}) : "匿名用户"',
+		),
+
+		'source_table' 		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '类别',
+			'default' 	=> '',
+			'desc' 		=> '类别',
+			'match' 	=> 'option',
+			'option' 	=> $table,
+			'list'		=> true,
+		),
+		
+		'source_id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'option',
+			//'list'		=> 'Dever::load("set/manage.load", "{source_table}", {source_id})',
+		),
+		
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容',
+			'update' 	=> 'editor',
+			'key'		=> 1,
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'search'	=> 'fulltext',
+			'list'		=> 'table',
+			'modal'		=> '查看详情',
+		),
+		
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+	),
+);

+ 105 - 0
act/database/live_comment.php

@@ -0,0 +1,105 @@
+<?php
+
+$table = array
+(
+	1 => '图文',
+	2 => '视频',
+);
+return array
+(
+	# 表名
+	'name' => 'live_comment',
+	# 显示给用户看的名称
+	'lang' => '直播留言管理',
+	# 是否显示在后台菜单
+	'order' => 70,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+			//'list'		=> true,
+		),
+		
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户',
+			'default' 	=> '0',
+			'desc' 		=> '请选择用户',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			//'search'	=> 'select',
+			'list'		=> '{uid} > 0 ? Dever::load("passport/user-one#name", {uid}) : "匿名用户"',
+		),
+
+		'source_table' 		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '评论类别',
+			'default' 	=> '',
+			'desc' 		=> '评论类别',
+			'match' 	=> 'option',
+			'option' 	=> $table,
+			'list'		=> true,
+		),
+		
+		'source_id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'option',
+			//'list'		=> 'Dever::load("set/manage.load", "{source_table}", {source_id})',
+		),
+		
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容',
+			'update' 	=> 'editor',
+			'key'		=> 1,
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'search'	=> 'fulltext',
+			'list'		=> 'table',
+			'modal'		=> '查看详情',
+		),
+		
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+	),
+);

+ 105 - 0
act/database/share.php

@@ -0,0 +1,105 @@
+<?php
+
+$table = array
+(
+	1 => '图文',
+	2 => '视频',
+);
+return array
+(
+	# 表名
+	'name' => 'share',
+	# 显示给用户看的名称
+	'lang' => '分享日志',
+	# 是否显示在后台菜单
+	'order' => 78,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'order'		=> 'desc',
+			//'list'		=> true,
+		),
+		
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户',
+			'default' 	=> '0',
+			'desc' 		=> '请选择用户',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			//'search'	=> 'select',
+			'list'		=> '{uid} > 0 ? Dever::load("passport/user-one#name", {uid}) : "匿名用户"',
+		),
+
+		'source_table' 		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '类别',
+			'default' 	=> '',
+			'desc' 		=> '类别',
+			'match' 	=> 'option',
+			'option' 	=> $table,
+			'list'		=> true,
+		),
+		
+		'source_id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'option',
+			//'list'		=> 'Dever::load("set/manage.load", "{source_table}", {source_id})',
+		),
+		
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容',
+			'update' 	=> 'editor',
+			'key'		=> 1,
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'search'	=> 'fulltext',
+			'list'		=> 'table',
+			'modal'		=> '查看详情',
+		),
+		
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+	),
+);

+ 8 - 0
act/index.php

@@ -0,0 +1,8 @@
+<?php
+
+define('DEVER_APP_NAME', 'act');
+define('DEVER_APP_LANG', '互动管理');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', 199);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-theme');
+include(DEVER_APP_PATH . '../boot.php');

+ 397 - 0
audit/database/article.php

@@ -0,0 +1,397 @@
+<?php
+
+$code = array
+(
+	1 => '用户ID',
+	2 => '随机数字',
+	3 => '随机数字+字母',
+);
+
+# 每页的数据量
+$page = 15;
+
+$cate = function()
+{
+	$array = array();
+	$info = Dever::db('content/cate')->state();
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+$author = function()
+{
+	$array = array();
+	$info = Dever::db('content/author')->state();
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+$share = function()
+{
+	$array = array();
+	$info = Dever::db('poster/template')->state();
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+return array
+(
+	# 表名
+	'name' => 'article',
+	# 显示给用户看的名称
+	'lang' => '图文管理',
+	'order' => 100,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+		
+		'cate_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '所属栏目',
+			'default' 	=> '1',
+			'desc' 		=> '所属栏目',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $cate,
+			'search'	=> 'select',
+		),
+
+		'author_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '作者',
+			'default' 	=> '1',
+			'desc' 		=> '作者',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $author,
+			'search'	=> 'select',
+		),
+
+  		'pic_cover'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '封面图-4:3比例的图片',
+			'default' 	=> '',
+			'desc' 		=> '封面图',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+
+		'num_add_view'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '手动增加浏览量pv数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写手动增加浏览量pv',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
+
+		'num_view'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '浏览量pv',
+			'default' 	=> '0',
+			'desc' 		=> '请填写浏览量pv',
+			'match' 	=> 'option',
+			'search'	=> 'order',
+			//'list'		=> '{num_view}+{num_add_view}',
+		),
+		
+		'num_up'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '喜欢数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写喜欢数',
+			'match' 	=> 'option',
+			//'search'	=> 'order',
+			'list'		=> '"喜欢数:{num_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
+			'list_name'	=> '统计数字',
+		),
+
+		'num_comment'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '评论数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写评论数',
+			'search'	=> 'order',
+			'match' 	=> 'option',
+			//'list'		=> true,
+		),
+
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			'key' 		=> 1,
+			'media'		=> 5,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'admin_founder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '创建人',
+			'default' 	=> '1',
+			'desc' 		=> '创建人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'admin_editor'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '操作人',
+			'default' 	=> '1',
+			'desc' 		=> '操作人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'pdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '发布时间',
+			'match' 	=> 'is_numeric',
+			'desc' 		=> '',
+			'update'	=> 'date',
+			'callback'	=> 'maketime',
+			'list'		=> 'date("Y-m-d H:i:s", {pdate})',
+		),
+
+		'share'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '分享海报-选择海报库中的海报',
+			'default' 	=> '',
+			'desc' 		=> '分享海报',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $share,
+		),
+
+		'udate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '更新时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+
+	# 索引
+	'index' => array
+	(
+		'version' => 1,
+		
+		1 => array
+		(
+			'i1' => 'uid,cate_id',
+		)
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+		//'insert' => false,
+		# 列表
+		/*
+		'list_button' => array
+		(
+			'list' => array('评论列表', '"comment&search_option_data_id={id}&oper_parent=article"'),
+		),
+		*/
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		'getAll' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'cate_ids' => array('yes-cate_id', 'in'),
+				'id' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取默认主题,按照置顶和时间排序的
+		'default' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取最新主题
+		'new' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'name' => array('yes', 'like'),
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+		
+		# 获取热门主题
+		'hot' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('num_view`+`num_add_view' => 'desc', 'id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取冷门主题
+		'cold' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('num_view`+`num_add_view' => 'asc', 'id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+
+		
+		# 更新浏览量
+		'addView' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_view' => array('1', '+='),
+			),
+		),
+		
+		# 更新回复数
+		'addComment' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_comment' => array('1', '+='),
+			),
+		),
+		
+		# 更新点赞数
+		'addUp' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_up' => array('1', '+='),
+			),
+		),
+		
+		# 更新点赞数
+		'desUp' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_up' => array('1', '-='),
+			),
+		),
+	),
+);

+ 77 - 0
audit/database/author.php

@@ -0,0 +1,77 @@
+<?php
+
+return array
+(
+	# 表名
+	'name' => 'author',
+	# 显示给用户看的名称
+	'lang' => '作者管理',
+	# 后台菜单排序
+	'order' => 8,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '作者名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'request' => array
+	(
+		
+	),
+);

+ 77 - 0
audit/database/cate.php

@@ -0,0 +1,77 @@
+<?php
+
+return array
+(
+	# 表名
+	'name' => 'cate',
+	# 显示给用户看的名称
+	'lang' => '栏目设置',
+	# 后台菜单排序
+	'order' => 9,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '栏目名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'request' => array
+	(
+		
+	),
+);

+ 8 - 0
audit/index.php

@@ -0,0 +1,8 @@
+<?php
+
+define('DEVER_APP_NAME', 'content');
+define('DEVER_APP_LANG', '内容管理');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', 200);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-tabs');
+include(DEVER_APP_PATH . '../boot.php');

+ 8 - 0
boot.php

@@ -0,0 +1,8 @@
+<?php 
+define('DEVER_PROJECT', 'wonderful');
+define('DEVER_PROJECT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+if (defined('DEVER_PACKAGE')) {
+	include('dever_package/'.DEVER_PACKAGE.'/index.php');
+} else {
+	include('dever/boot.php');
+}

+ 70 - 0
config/base.php

@@ -0,0 +1,70 @@
+<?php
+$config['base'] = array
+(
+	'name' => '内容管理平台',
+	'version' => '1.0.0 Beta',
+
+	# 产品表设置 主要给survey使用
+	'product' => 'service/product',
+
+	'applet' => array
+	(
+		'url' => 'https://api.weixin.qq.com/sns/jscode2session',
+	),
+
+	# 站点使用邮箱还是手机作为主账号,如果是手机,请填写手机验证码的配置接口
+	'account' => 'mobile',
+	# 性别转换 passport里1为男、2为女 3为未知,如果前端定义与这个不同,请做好转换
+	'sex' => array
+	(
+		# 前面的索引为前端传过来的值
+		2 => 2,
+		1 => 1,
+		0 => 3,
+	),
+	'mobileCode' => array
+	(
+		# debug模式
+		'debug' => true,
+		# 发送短信的接口
+		'url' => 'https://feginesms.market.alicloudapi.com/codeNotice',
+		# 发送方法 get、post
+		'method' => 'get',
+		# 是否json编码
+		'json' => false,
+		# header信息
+		'header' => 'Authorization:APPCODE ca584ae21ce54c999067e77b5995a27b',
+		# body信息
+		'body' => 'param={code}&phone={mobile}&sign={sign}&skin={skin}',
+		# 短信模板 发送短信时,请加上参数skin=1
+		'skin' => array
+		(
+			'reg' => 35247,
+			'order' => 35246,
+			'code' => 35245,
+			# 需要增加一个notice
+			'notice' => 38099,
+			# order的反馈方案修改后
+			'feedback' => 38747,
+		),
+		# 短信签名
+		'sign' => 47159,
+		# 验证码有效期 默认10分钟
+		'timeout' => 600,
+		# 一天之内的最大发送次数,默认为10次
+		'total' => 10,
+		# 不允许多久之内重复发送,默认为60秒
+		'time' => 60,
+		# 验证码长度
+		'length' => 6,
+	),
+	# 注册成功后,调取的接口
+	'regAction' => '',
+
+	# 注册成功后,是否发送短信,直接使用skin的key即可
+	//'regSendSms' => 'reg',
+
+	# 支付成功后,调用的接口
+	'pay_notify' => 'service/lib/pay.act',
+);
+return $config;

+ 26 - 0
config/env/localhost/default.php

@@ -0,0 +1,26 @@
+<?php
+
+# 数据库配置
+$config['database'] = array
+(
+	# 默认数据库配置
+	'default' => array
+	(
+		'type' => 'pdo',
+		'host' => array
+		(
+			'read' => 'web-mysql:3306',
+			'update' => 'web-mysql:3306',
+		),
+		'database' => 'wonderful',
+		'username' => 'root',
+		'password' => '123456',
+		'charset' => 'utf8',
+	),
+);
+
+$config['debug'] = array
+(
+	'log' => array('type' => 'file'),
+);
+return $config;

+ 5 - 0
config/route.php

@@ -0,0 +1,5 @@
+<?php
+return array
+(
+'home' => 'home',
+);

+ 397 - 0
content/database/article.php

@@ -0,0 +1,397 @@
+<?php
+
+$code = array
+(
+	1 => '用户ID',
+	2 => '随机数字',
+	3 => '随机数字+字母',
+);
+
+# 每页的数据量
+$page = 15;
+
+$cate = function()
+{
+	$array = array();
+	$info = Dever::db('content/cate')->state();
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+$author = function()
+{
+	$array = array();
+	$info = Dever::db('content/author')->state();
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+$share = function()
+{
+	$array = array();
+	$info = Dever::db('poster/template')->state();
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+return array
+(
+	# 表名
+	'name' => 'article',
+	# 显示给用户看的名称
+	'lang' => '图文管理',
+	'order' => 100,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+		
+		'cate_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '所属栏目',
+			'default' 	=> '1',
+			'desc' 		=> '所属栏目',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $cate,
+			'search'	=> 'select',
+		),
+
+		'author_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '作者',
+			'default' 	=> '1',
+			'desc' 		=> '作者',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $author,
+			'search'	=> 'select',
+		),
+
+  		'pic_cover'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '封面图-4:3比例的图片',
+			'default' 	=> '',
+			'desc' 		=> '封面图',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+
+		'num_add_view'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '手动增加浏览量pv数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写手动增加浏览量pv',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
+
+		'num_view'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '浏览量pv',
+			'default' 	=> '0',
+			'desc' 		=> '请填写浏览量pv',
+			'match' 	=> 'option',
+			'search'	=> 'order',
+			//'list'		=> '{num_view}+{num_add_view}',
+		),
+		
+		'num_up'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '喜欢数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写喜欢数',
+			'match' 	=> 'option',
+			//'search'	=> 'order',
+			'list'		=> '"喜欢数:{num_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
+			'list_name'	=> '统计数字',
+		),
+
+		'num_comment'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '评论数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写评论数',
+			'search'	=> 'order',
+			'match' 	=> 'option',
+			//'list'		=> true,
+		),
+
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			'key' 		=> 1,
+			'media'		=> 5,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'admin_founder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '创建人',
+			'default' 	=> '1',
+			'desc' 		=> '创建人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'admin_editor'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '操作人',
+			'default' 	=> '1',
+			'desc' 		=> '操作人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'pdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '发布时间',
+			'match' 	=> 'is_numeric',
+			'desc' 		=> '',
+			'update'	=> 'date',
+			'callback'	=> 'maketime',
+			'list'		=> 'date("Y-m-d H:i:s", {pdate})',
+		),
+
+		'share'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '分享海报-选择海报库中的海报',
+			'default' 	=> '',
+			'desc' 		=> '分享海报',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $share,
+		),
+
+		'udate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '更新时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+
+	# 索引
+	'index' => array
+	(
+		'version' => 1,
+		
+		1 => array
+		(
+			'i1' => 'uid,cate_id',
+		)
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+		//'insert' => false,
+		# 列表
+		/*
+		'list_button' => array
+		(
+			'list' => array('评论列表', '"comment&search_option_data_id={id}&oper_parent=article"'),
+		),
+		*/
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		'getAll' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'cate_ids' => array('yes-cate_id', 'in'),
+				'id' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取默认主题,按照置顶和时间排序的
+		'default' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取最新主题
+		'new' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'name' => array('yes', 'like'),
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+		
+		# 获取热门主题
+		'hot' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('num_view`+`num_add_view' => 'desc', 'id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取冷门主题
+		'cold' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('num_view`+`num_add_view' => 'asc', 'id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+
+		
+		# 更新浏览量
+		'addView' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_view' => array('1', '+='),
+			),
+		),
+		
+		# 更新回复数
+		'addComment' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_comment' => array('1', '+='),
+			),
+		),
+		
+		# 更新点赞数
+		'addUp' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_up' => array('1', '+='),
+			),
+		),
+		
+		# 更新点赞数
+		'desUp' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_up' => array('1', '-='),
+			),
+		),
+	),
+);

+ 77 - 0
content/database/author.php

@@ -0,0 +1,77 @@
+<?php
+
+return array
+(
+	# 表名
+	'name' => 'author',
+	# 显示给用户看的名称
+	'lang' => '作者管理',
+	# 后台菜单排序
+	'order' => 8,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '作者名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'request' => array
+	(
+		
+	),
+);

+ 77 - 0
content/database/cate.php

@@ -0,0 +1,77 @@
+<?php
+
+return array
+(
+	# 表名
+	'name' => 'cate',
+	# 显示给用户看的名称
+	'lang' => '栏目设置',
+	# 后台菜单排序
+	'order' => 9,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '栏目名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+		
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'request' => array
+	(
+		
+	),
+);

+ 8 - 0
content/index.php

@@ -0,0 +1,8 @@
+<?php
+
+define('DEVER_APP_NAME', 'content');
+define('DEVER_APP_LANG', '内容管理');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', 200);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-tabs');
+include(DEVER_APP_PATH . '../boot.php');

+ 323 - 0
data/compile/content/manage/layadmin/console.cmp.php

@@ -0,0 +1,323 @@
+<?php $data['manage/auth.notice']=Dever::load('manage/auth.notice') ?>
+
+
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/head.cmp.php' ?>
+</head>
+<body>
+  
+  <div class="layui-fluid">
+    <div class="layui-row layui-col-space15">
+      <div class="layui-col-md8">
+        <div class="layui-row layui-col-space15">
+          <div class="layui-col-md6">
+            <div class="layui-card">
+              <div class="layui-card-header">快捷方式</div>
+              <div class="layui-card-body">
+                
+                <div class="layui-carousel layadmin-carousel layadmin-shortcut">
+                  <div carousel-item>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs3">
+                        <a lay-href="home/homepage1.html">
+                          <i class="layui-icon layui-icon-console"></i>
+                          <cite>主页一</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="home/homepage2.html">
+                          <i class="layui-icon layui-icon-chart"></i>
+                          <cite>主页二</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="component/layer/list.html">
+                          <i class="layui-icon layui-icon-template-1"></i>
+                          <cite>弹层</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a layadmin-event="im">
+                          <i class="layui-icon layui-icon-chat"></i>
+                          <cite>聊天</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="component/progress/index.html">
+                          <i class="layui-icon layui-icon-find-fill"></i>
+                          <cite>进度条</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="app/workorder/list.html">
+                          <i class="layui-icon layui-icon-survey"></i>
+                          <cite>工单</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="user/user/list.html">
+                          <i class="layui-icon layui-icon-user"></i>
+                          <cite>用户</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/system/website.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>设置</cite>
+                        </a>
+                      </li>
+                    </ul>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                    </ul>
+                    
+                  </div>
+                </div>
+                
+              </div>
+            </div>
+          </div>
+          <div class="layui-col-md6">
+            <div class="layui-card">
+              <div class="layui-card-header">待办事项</div>
+              <div class="layui-card-body">
+
+                <div class="layui-carousel layadmin-carousel layadmin-backlog">
+                  <div carousel-item>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs6">
+                        <a lay-href="app/content/comment.html" class="layadmin-backlog-body">
+                          <h3>待审评论</h3>
+                          <p><cite>66</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a lay-href="app/forum/list.html" class="layadmin-backlog-body">
+                          <h3>待审帖子</h3>
+                          <p><cite>12</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a lay-href="template/goodslist.html" class="layadmin-backlog-body">
+                          <h3>待审商品</h3>
+                          <p><cite>99</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a href="javascript:;" onclick="layer.tips('不跳转', this, {tips: 3});" class="layadmin-backlog-body">
+                          <h3>待发货</h3>
+                          <p><cite>20</cite></p>
+                        </a>
+                      </li>
+                    </ul>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs6">
+                        <a href="javascript:;" class="layadmin-backlog-body">
+                          <h3>待审友情链接</h3>
+                          <p><cite style="color: #FF5722;">5</cite></p>
+                        </a>
+                      </li>
+                    </ul>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="layui-col-md12">
+            <div class="layui-card">
+              <div class="layui-card-header">数据概览</div>
+              <div class="layui-card-body">
+                
+                <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-index-dataview">
+                  <div carousel-item id="LAY-index-dataview">
+                    <div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>
+                    <div></div>
+                    <div></div>
+                  </div>
+                </div>
+                
+              </div>
+            </div>
+            <div class="layui-card">
+              <div class="layui-tab layui-tab-brief layadmin-latestData">
+                <ul class="layui-tab-title">
+                  <li class="layui-this">今日热搜</li>
+                  <li>今日热帖</li>
+                </ul>
+                <div class="layui-tab-content">
+                  <div class="layui-tab-item layui-show">
+                    <table id="LAY-index-topSearch"></table>
+                  </div>
+                  <div class="layui-tab-item">
+                    <table id="LAY-index-topCard"></table>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      
+      <div class="layui-col-md4">
+
+        <div class="layui-card dever-notice" style="<?php if(!(Dever::load('manage/auth.notice'))): ?>display:none;<?php endif; ?>">
+          <div class="layui-card-header">系统公告</div>
+          <div class="layui-card-body">
+            <div class="layui-carousel layadmin-carousel layadmin-news" data-autoplay="true" data-anim="fade" lay-filter="news">
+              <div carousel-item id="dever-notice">
+                <?php if(isset($data['manage/auth.notice']) && is_array($data['manage/auth.notice'])): ?><?php $t=count($data['manage/auth.notice'])-1 ?><?php $i=0 ?><?php foreach($data['manage/auth.notice'] as $k => $v): ?><div><a href="<?php  echo Dever::url("notice?where_id=".$v['id']."&where_config=".$v['config']) ?>" target="_blank" class="layui-bg-red" title="<?php  echo $v['name'] ?>" style="background-color: #FF5722!important;"><?php  echo $v['name'] ?></a></div><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/auth.notice'] ?><?php endif; ?>
+                 
+                
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <div class="layui-card">
+          <div class="layui-card-header">版本信息</div>
+          <div class="layui-card-body layui-text">
+            <table class="layui-table">
+              <colgroup>
+                <col width="100">
+                <col>
+              </colgroup>
+              <tbody>
+                <tr>
+                  <td>当前版本</td>
+                  <td>
+                    <script type="text/html" template>
+                      v{{ layui.admin.v }}
+                    </script>
+                  </td>
+                </tr>
+                <tr>
+                  <td>基于框架</td>
+                  <td>
+                    <script type="text/html" template>
+                      layui-v{{ layui.v }}
+                    </script>
+                 </td>
+                </tr>
+                <tr>
+                  <td>主要特色</td>
+                  <td>零门槛 / 响应式 / 清爽 / 极简</td>
+                </tr>
+                <tr>
+                  <td>获取渠道</td>
+                  <td style="padding-bottom: 0;">
+                    <div class="layui-btn-container">
+                      <a href="http://www.layui.com/admin/" target="_blank" class="layui-btn layui-btn-danger">获取授权</a>
+                      <a href="http://fly.layui.com/download/layuiAdmin/" target="_blank" class="layui-btn">立即下载</a>
+                    </div>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </div>
+        
+        <div class="layui-card">
+          <div class="layui-card-header">效果报告</div>
+          <div class="layui-card-body layadmin-takerates">
+            <div class="layui-progress" lay-showpercent="yes">
+              <h3>转化率(日同比 28% <span class="layui-edge layui-edge-top" lay-tips="增长" lay-offset="-15"></span>)</h3>
+              <div class="layui-progress-bar" lay-percent="65%"></div>
+            </div>
+            <div class="layui-progress" lay-showpercent="yes">
+              <h3>签到率(日同比 11% <span class="layui-edge layui-edge-bottom" lay-tips="下降" lay-offset="-15"></span>)</h3>
+              <div class="layui-progress-bar" lay-percent="32%"></div>
+            </div>
+          </div>
+        </div>
+        
+        <div class="layui-card">
+          <div class="layui-card-header">实时监控</div>
+          <div class="layui-card-body layadmin-takerates">
+            <div class="layui-progress" lay-showpercent="yes">
+              <h3>CPU使用率</h3>
+              <div class="layui-progress-bar" lay-percent="58%"></div>
+            </div>
+            <div class="layui-progress" lay-showpercent="yes">
+              <h3>内存占用率</h3>
+              <div class="layui-progress-bar layui-bg-red" lay-percent="90%"></div>
+            </div>
+          </div>
+        </div>
+
+        <div class="layui-card">
+          <div class="layui-card-header">
+            作者心语
+            <i class="layui-icon layui-icon-tips" lay-tips="要支持的噢" lay-offset="5"></i>
+          </div>
+          <div class="layui-card-body layui-text layadmin-text">
+            <p>一直以来,layui 秉承无偿开源的初心,虔诚致力于服务各层次前后端 Web 开发者,在商业横飞的当今时代,这一信念从未动摇。即便身单力薄,仍然重拾决心,埋头造轮,以尽可能地填补产品本身的缺口。</p>
+            <p>在过去的一段的时间,我一直在寻求持久之道,已维持你眼前所见的一切。而 layuiAdmin 是我们尝试解决的手段之一。我相信真正有爱于 layui 生态的你,定然不会错过这一拥抱吧。</p>
+            <p>子曰:君子不用防,小人防不住。请务必通过官网正规渠道,获得 <a href="http://www.layui.com/admin/" target="_blank">layuiAdmin</a>!</p>
+            <p>—— 贤心(<a href="http://www.layui.com/" target="_blank">layui.com</a>)</p>
+          </div>
+        </div>
+      </div>
+      
+    </div>
+  </div>
+
+  <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/script.cmp.php' ?>
+  <script>
+    layui.config({
+        base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+    }).extend({
+        index: 'lib/index' //主入口模块
+    }).use(['index', 'console']);
+</script>
+</body>
+</html>
+

+ 66 - 0
data/compile/content/manage/layadmin/home.cmp.php

@@ -0,0 +1,66 @@
+<?php $data['manage/database.cookie']=Dever::load('manage/database.cookie') ?>
+<?php $data['manage/menu.link']=Dever::load('manage/menu.link') ?>
+
+
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/head.cmp.php' ?>
+</head>
+<body class="theme-<?php  echo Dever::load("manage/auth.config#template") ?>" test="公告">
+
+  <div id="LAY_app" class="<?php echo $data['manage/database.cookie']['wrapper'] ?>">
+    <div class="layui-layout layui-layout-admin">
+
+      <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/nav.cmp.php' ?>
+
+      <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/menu.cmp.php' ?>
+
+      
+      <div class="layadmin-pagetabs" id="LAY_app_tabs">
+        <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
+        <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
+        <div class="layui-icon layadmin-tabs-control layui-icon-down">
+          <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
+            <li class="layui-nav-item" lay-unselect>
+              <a href="javascript:;"></a>
+              <dl class="layui-nav-child layui-anim-fadein">
+                <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
+                <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
+                <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
+              </dl>
+            </li>
+          </ul>
+        </div>
+        <div class="layui-tab" lay-unauto lay-allowclose="true" lay-filter="layadmin-layout-tabs">
+          <ul class="layui-tab-title" id="LAY_app_tabsheader">
+            <li lay-id="<?php echo $data['manage/menu.link']['console'] ?>" lay-attr="<?php echo $data['manage/menu.link']['console'] ?>" class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
+          </ul>
+        </div>
+      </div>
+      
+      
+      
+      <div class="layui-body" id="LAY_app_body">
+        <div class="layadmin-tabsbody-item layui-show">
+          <iframe src="<?php echo $data['manage/menu.link']['console'] ?>" frameborder="0" class="layadmin-iframe"></iframe>
+        </div>
+      </div>
+      
+      
+      <div class="layadmin-body-shade" layadmin-event="shade"></div>
+    </div>
+  </div>
+
+  <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/script.cmp.php' ?>
+  <script>
+    layui.config({
+        base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+    }).extend({
+        index: 'lib/index' //主入口模块
+    }).use('index');
+</script>
+</body>
+</html>
+
+

+ 28 - 0
data/compile/content/manage/layadmin/inc/head.cmp.php

@@ -0,0 +1,28 @@
+<?php $data['manage/auth.config']=Dever::load('manage/auth.config') ?>
+<meta charset="utf-8">
+<title><?php echo $data['manage/auth.config']['title'] ?></title>
+<meta name="keywords" content="<?php echo $data['manage/auth.config']['title'] ?>">
+<meta name="description" content="<?php echo $data['manage/auth.config']['title'] ?>">
+<meta name="apple-mobile-web-app-title" content="<?php echo $data['manage/auth.config']['title'] ?>" />
+<meta name="author" content="rabin">
+<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/layui/css/layui.css" />
+<link rel="stylesheet" href="<?php echo Dever::config("host")->script ?>lib/layui/admin/style/admin.css" media="all">
+
+
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/color/colpick.css">
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/kindeditor/themes/default/default.css" />
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/valid/validationEngine.jquery.css">
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/pnotify/pnotify.css">
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/fancybox/jquery.fancybox.css">
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/highlight/highlight.min.css">
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/datetime/jquery.datetimepicker.css">
+
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/ui/ui.min.css">
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/jquery/jquery.min.js"></script>
+<script id="script"><?php  echo Dever::script() ?>config.template="<?php  echo $data["manage/auth.config"]["template"] ?>";config.lib="<?php  echo Dever::config("host")->public ?>"</script>
+<style type="text/css" id="style"><?php  echo Dever::load("manage/auth.loading") ? ".content,.content-page{margin-left: 0px;min-height:auto}" : "" ?></style>

+ 34 - 0
data/compile/content/manage/layadmin/inc/menu.cmp.php

@@ -0,0 +1,34 @@
+<?php $data['manage/auth.config']=Dever::load('manage/auth.config') ?>
+<?php $data['manage/menu.link']=Dever::load('manage/menu.link') ?>
+<?php $data['manage/menu.all']=Dever::load('manage/menu.all') ?>
+
+      <div class="layui-side layui-side-menu">
+        <div class="layui-side-scroll">
+          <div class="layui-logo" id="console-url" lay-href="<?php echo $data['manage/menu.link']['console'] ?>">
+            <span id="dever-name"><?php echo $data['manage/auth.config']['title'] ?></span>
+          </div>
+          
+          <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
+            <?php if(isset($data['manage/menu.all']) && is_array($data['manage/menu.all'])): ?><?php $t=count($data['manage/menu.all'])-1 ?><?php $i=0 ?><?php foreach($data['manage/menu.all'] as $k => $v): ?><li data-name="home" class="layui-nav-item<?php if(Dever::input("menu") == $v['key'] || (!Dever::input("menu_id") && $k == "console")):?> layui-nav-itemed<?php endif; ?>">
+              <a href="javascript:;" lay-tips="<?php  echo $v['name'] ?>" lay-direction="2" data-target=".<?php  echo $v['key'] ?>-menu" class="<?php if(Dever::input("menu") == $v['key'] || !Dever::input("menu")):?>layui-nav-itemed<?php endif; ?>">
+                <i class="<?php  echo $v['icon'] ? "layui-icon " . $v['icon'] : "layui-icon layui-icon-home" ?>"></i>
+                <cite><?php  echo $v['name'] ?></cite>
+              </a>
+              <dl class="layui-nav-child" id="<?php  echo $v['key'] ?>-menu">
+                <?php if(isset($v['child']) && $v['child'] && is_array($v['child'])):foreach($v['child'] as $k1 => $v1):if($v1): ?><dd data-name="console" class="<?php if(Dever::input("menu_id") == $v1['id']):?>layui-this<?php elseif(!Dever::input("menu_id") && $k1 == "console.index"): ?>layui-this<?php endif; ?>">
+                  <a lay-href="<?php  echo $v1['link'] ?>"><?php  echo $v1['name'] ?></a>
+                </dd><?php endif;endforeach;endif; ?>
+                
+                
+              </dl>
+            </li><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/menu.all'] ?><?php endif; ?>
+            
+            
+            
+            
+            
+            
+            
+          </ul>
+        </div>
+      </div>

+ 82 - 0
data/compile/content/manage/layadmin/inc/nav.cmp.php

@@ -0,0 +1,82 @@
+<?php $data['manage/database.res']=Dever::load('manage/database.res') ?>
+<?php $data['manage/auth.config']=Dever::load('manage/auth.config') ?>
+<?php $data['manage/auth.info']=Dever::load('manage/auth.info') ?>
+<?php $data['manage/menu.link']=Dever::load('manage/menu.link') ?>
+<?php $data['manage/top.get']=Dever::load('manage/top.get') ?>
+<div id="load_style" style="display:none;"><?php echo $data['manage/database.res']['css'] ?></div>
+<div id="dever-name" style="display:none;"><?php echo $data['manage/auth.config']['title'] ?></div>
+<div class="layui-header" id="nav" style="<?php  echo Dever::load("manage/auth.loading") ? "display:none;" : "" ?>">
+
+<ul class="layui-nav layui-layout-left">
+  <li class="layui-nav-item layadmin-flexible" lay-unselect>
+    <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
+      <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="http://www.layui.com/admin/" target="_blank" title="前台">
+      <i class="layui-icon layui-icon-website"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item" lay-unselect>
+    <a href="javascript:;" layadmin-event="refresh" title="刷新">
+      <i class="layui-icon layui-icon-refresh-3"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <input type="text" placeholder="搜索..." autocomplete="off" class="layui-input layui-input-search" layadmin-event="serach" lay-action="template/search.html?keywords="> 
+  </li>
+</ul>
+<ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
+
+  <?php if(isset($data['manage/top.get']) && is_array($data['manage/top.get'])): ?><?php $t=count($data['manage/top.get'])-1 ?><?php $i=0 ?><?php foreach($data['manage/top.get'] as $k => $v): ?><li class="layui-nav-item auth-top" lay-unselect style="display:none">
+    <a href="javascript:;">
+      <cite><span><?php  echo $v['name'] ?></span></cite>
+    </a>
+    <ul class="layui-nav-child">
+      <?php if(isset($v['child']) && $v['child'] && is_array($v['child'])):foreach($v['child'] as $k1 => $v1):if($v1): ?><li><a lay-href="set/user/info.html" data-id="<?php  echo $v1['id'] ?>" onclick="topMenu($(this))"><a lay-href="set/user/info.html" data-id="<?php  echo $v1['id'] ?>" onclick="topMenu($(this))"><?php  echo $v1['name'] ?></a></li><?php endif;endforeach;endif; ?>
+    </ul>
+  </li><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/top.get'] ?><?php endif; ?>
+
+  <li class="layui-nav-item" lay-unselect style="display:none;">
+    <a lay-href="app/message/index.html" layadmin-event="message" lay-text="消息中心">
+      <i class="layui-icon layui-icon-notice"></i>  
+      
+      
+      <span class="layui-badge-dot"></span>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect>
+    <a href="javascript:;" layadmin-event="theme">
+      <i class="layui-icon layui-icon-theme"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="note">
+      <i class="layui-icon layui-icon-note"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect>
+    <a href="javascript:;" layadmin-event="fullscreen">
+      <i class="layui-icon layui-icon-screen-full"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item" lay-unselect>
+    <a href="javascript:;">
+      <cite id="manage-name"><?php echo $data['manage/auth.info']['username'] ?></cite>
+    </a>
+    <dl class="layui-nav-child">
+      <dd><a id="edit_password" onclick="pass($(this));" style="cursor: pointer;">修改密码</a></dd>
+      <hr>
+      <dd layadmin-event="logout" id="logout-url" style="text-align: center;" href="<?php echo $data['manage/menu.link']['logout'] ?>"><a>退出</a></dd>
+    </dl>
+  </li>
+  
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
+  </li>
+  <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
+    <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
+  </li>
+</ul>
+</div>

+ 42 - 0
data/compile/content/manage/layadmin/inc/script.cmp.php

@@ -0,0 +1,42 @@
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/pic/webp.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/jquery/store.js"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/bootstrap/js/bootstrap.min.js"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/pjax/pjax.js"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/pjax/nprogress.js"></script>
+
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/color/colpick.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/datetime/jquery.datetimepicker.min.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/pnotify/pnotify.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/fancybox/jquery.fancybox.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/echarts/echarts.common.min.js?v1"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/highlight/highlight.min.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/manage/main.js?v7"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/valid/jquery.validationEngine.min.js?v3"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/kindeditor/kindeditor-all-min.js?v4"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/kindeditor/lang/zh-CN.js"></script>
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/ui/ui.min.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/layui/upload.js?v1"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/layui/layui.js"></script>

+ 81 - 0
data/compile/content/manage/layadmin/login.cmp.php

@@ -0,0 +1,81 @@
+<?php $data['manage/auth.set']=Dever::load('manage/auth.set') ?>
+
+
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/head.cmp.php' ?>
+  <link rel="stylesheet" href="<?php echo Dever::config("host")->script ?>lib/layui/admin/style/login.css" media="all">
+</head>
+<body>
+
+  <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">
+    <form action="<?php  echo Dever::url("auth.login") ?>" method="post" target="f1" class="form-horizontal m-t-20" id="login">
+    <input type="hidden" name="function" id="function" value="msg">
+    <input type="hidden" name="refer" id="refer" value="<?php echo $data['manage/auth.set']['refer'] ?>">
+    <iframe id="f1" name="f1" style="display:none;"></iframe>
+    <div class="layadmin-user-login-main">
+      <div class="layadmin-user-login-box layadmin-user-login-header">
+        <h2 id="name"><?php  echo Dever::load("manage/auth.config#title") ?></h2>
+      </div>
+      <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
+        <div class="layui-form-item">
+          <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
+          <input type="text" name="username" id="username" lay-verify="required" placeholder="账号" class="layui-input">
+        </div>
+        <div class="layui-form-item">
+          <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
+          <input name="password" id="password" type="password" lay-verify="required" placeholder="密码" class="layui-input">
+        </div>
+        <div class="layui-form-item">
+          <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-login-submit">登 入</button>
+        </div>
+      </div>
+    </div>
+    
+    <div class="layui-trans layadmin-user-login-footer">
+      <p id="footer" style="<?php if(!(Dever::config("base")->copyright)): ?>display:none;<?php endif; ?>"><?php  echo Dever::config("base")->copyright ?></p>
+    </div>
+    
+    <div class="ladmin-user-login-theme" style="display:none;">
+      <script type="text/html" template>
+        <ul>
+          <li data-theme=""><img src="{{ layui.setter.base }}style/res/bg-none.jpg"></li>
+          <li data-theme="#03152A" style="background-color: #03152A;"></li>
+          <li data-theme="#2E241B" style="background-color: #2E241B;"></li>
+          <li data-theme="#50314F" style="background-color: #50314F;"></li>
+          <li data-theme="#344058" style="background-color: #344058;"></li>
+          <li data-theme="#20222A" style="background-color: #20222A;"></li>
+        </ul>
+      </script>
+    </div>
+    </form> 
+  </div>
+
+  <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/script.cmp.php' ?>
+  <script>
+  $(function()
+  {
+    $("#login").bind("keydown",function(e){
+      var theEvent = e || window.event;    
+      var code = theEvent.keyCode || theEvent.which || theEvent.charCode;    
+      if (code == 13) {    
+              $("#login").submit();
+          }
+     });
+  });
+
+  </script>
+  <script>
+  layui.config({
+    base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'user'], function(){
+    var $ = layui.$
+    ,setter = layui.setter
+    ,admin = layui.admin
+  });
+  </script>
+</body>
+</html>

+ 112 - 0
data/compile/content/manage/layadmin/project/database/list.cmp.php

@@ -0,0 +1,112 @@
+<?php $data['manage/database.page_list']=Dever::load('manage/database.page_list') ?>
+<?php $data['manage/database.info']=Dever::load('manage/database.info') ?>
+<?php $data['manage/database.listStyle']=Dever::load('manage/database.listStyle') ?>
+<?php $data['manage/database.list_search']=Dever::load('manage/database.list_search') ?>
+<?php $data['manage/database.list_thead_layui']=Dever::load('manage/database.list_thead_layui') ?>
+<?php $data['manage/database.list_tbody_layui']=Dever::load('manage/database.list_tbody_layui') ?>
+<?php $data['manage/database.page_list_table']=Dever::load('manage/database.page_list_table') ?>
+<?php $data['manage/database.list_button']=Dever::load('manage/database.list_button') ?>
+<?php $data['manage/database.list_mul']=Dever::load('manage/database.list_mul') ?>
+<?php $data['manage/auth.config']=Dever::load('manage/auth.config') ?>
+
+
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/head.cmp.php' ?>
+</head>
+<body class="theme-<?php  echo Dever::load("/auth.config#template") ?>">
+<style id="addstyle"><?php echo $data['manage/database.listStyle'] ?></style>
+<style>
+.layui-table-cell .layui-select,.layui-table-cell .layui-input
+{
+    height: 25px;
+}
+</style>
+<span id="dever-name" style="display:none;"><?php echo $data['manage/auth.config']['title'] ?></span>
+<div class="topbar">
+    <div class="banner dever-layout" style="display:none;">
+        <a target="_blank"><img src="#"></a>
+        <span>项目名称</span>
+    </div>
+</div>
+<div id="content_1" style="<?php echo $data['manage/database.page_list']['s1'] ?>"><?php echo $data['manage/database.page_list']['content'] ?></div>
+<div id="content_2" style="<?php echo $data['manage/database.page_list']['s2'] ?>">
+  <div class="layui-fluid">
+    <div class="layui-card">
+      <form id="form1" name="form1" method="post" target="f1" action="<?php echo $data['manage/database.info']['list'] ?>">
+      <input type="hidden" name="function" id="function" value="msg"/>
+      <input type="hidden" name="url" id="url" value="<?php echo $data['manage/database.info']['mul'] ?>"/>
+      <input type="hidden" name="method" id="method" value="search"/>
+      <iframe id="f1" name="f1" style="display:none;"></iframe>
+      <div class="layui-card-header" style="display:none;"><span id="list-name"><?php echo $data['manage/database.info']['list_header'] ?></span> > <span id="list-project"><?php echo $data['manage/database.info']['project_name'] ?></span></div>
+        <div class="layui-card-body">
+
+          <div class="layui-form layui-card-header layuiadmin-card-header-auto">
+            <div class="layui-form-item">
+              <div id="search"><?php echo $data['manage/database.list_search'] ?></div>
+            </div>
+          </div>
+        </div>
+      <div class="layui-card-body">
+        <div style="padding-bottom: 10px;">
+          <a class="layui-btn layuiadmin-btn-list" data-type="add" id="list-parent" style="<?php echo $data['manage/database.info']['parent_state'] ?>" href="<?php echo $data['manage/database.info']['parent'] ?>">返回上一页</a>
+
+          <a class="layui-btn layuiadmin-btn-list" data-type="add" id="list-add" href="<?php echo $data['manage/database.info']['add'] ?>" style="<?php echo $data['manage/database.info']['add_state'] ?>">新增</a>
+
+          <span id="list-button"><?php echo $data['manage/database.list_button'] ?></span>
+        </div>
+        <div id="table_1" style="<?php echo $data['manage/database.page_list_table']['s1'] ?>"><?php echo $data['manage/database.page_list_table']['content'] ?></div>
+        <div id="table_2" style="<?php echo $data['manage/database.page_list_table']['s2'] ?>"> 
+          <table class="table layui-table" id="table" lay-filter="table" style="display:none;">
+          <thead>
+              <tr>
+                  <th>Company</th>
+              </tr>
+          </thead>
+          <tbody>
+              <tr>
+                  <th></th>
+              </tr>      
+              
+          </tbody>
+      </table>
+
+      <div id="mul"><?php echo $data['manage/database.list_mul'] ?></div>
+      <div id="page"><?php  echo Dever::page("current") ?></div>
+      <div class="dever_desc" id="desc" style="<?php if(!(Dever::load('manage/database.info#listDesc'))): ?>display:none;<?php endif; ?>"><?php echo $data['manage/database.info']['listDesc'] ?></div>
+        </div>
+      </div>
+       </div>
+        </div>
+      </form>
+      <form id="form2" name="form2" method="get" style="display: none;"></form>
+      <div id="struct" style="display:none;"></div>
+    </div>
+  </div>
+</div>
+
+  <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/script.cmp.php' ?>
+  <script id="list-thead"><?php if(isset($data['manage/database.list_thead_layui']) && is_array($data['manage/database.list_thead_layui'])): ?><?php $t=count($data['manage/database.list_thead_layui'])-1 ?><?php $i=0 ?><?php foreach($data['manage/database.list_thead_layui'] as $k => $v): ?><?php echo $v ?><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/database.list_thead_layui'] ?><?php endif; ?></script>
+  <script id="list-tbody"><?php if(isset($data['manage/database.list_tbody_layui']) && is_array($data['manage/database.list_tbody_layui'])): ?><?php $t=count($data['manage/database.list_tbody_layui'])-1 ?><?php $i=0 ?><?php foreach($data['manage/database.list_tbody_layui'] as $k => $v): ?><?php echo $v ?><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/database.list_tbody_layui'] ?><?php endif; ?></script>
+  <script>
+  layui.config({
+    base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'contlist', 'table', 'form'], function(){
+    var table = layui.table;
+    var form = layui.form; 
+
+    table.render({
+      elem: '#table'
+      ,page: false
+      ,cols: config.table.cols
+      ,data: config.table.data
+    });
+
+    init();
+  });
+  </script>
+</body>
+</html>

+ 82 - 0
data/compile/content/manage/layadmin/project/database/update.cmp.php

@@ -0,0 +1,82 @@
+<?php $data['manage/database.page_update']=Dever::load('manage/database.page_update') ?>
+<?php $data['manage/database.info']=Dever::load('manage/database.info') ?>
+<?php $data['manage/database.update']=Dever::load('manage/database.update') ?>
+<?php $data['/database.info']=Dever::load('/database.info') ?>
+<?php $data['manage/database.valid']=Dever::load('manage/database.valid') ?>
+<?php $data['manage/database.save']=Dever::load('manage/database.save') ?>
+<?php $data['manage/database.update_button']=Dever::load('manage/database.update_button') ?>
+<?php $data['/database.layui_card']=Dever::load('/database.layui_card') ?>
+<?php $data['/database.card']=Dever::load('/database.card') ?>
+
+
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/head.cmp.php' ?>
+  <style>
+    .layui-input
+    {
+      width: 50%;
+    }
+    </style>
+</head>
+<body class="theme-<?php  echo Dever::load("/auth.config#template") ?>">
+<div class="topbar">
+    <div class="banner dever-layout" style="display:none;">
+        <a target="_blank"><img src="#"></a>
+        <span>项目名称</span>
+    </div>
+</div>
+<div id="content_1" style="<?php echo $data['manage/database.page_update']['s1'] ?>"><?php echo $data['manage/database.page_update']['content'] ?></div>
+<div id="content_2" style="<?php echo $data['manage/database.page_update']['s2'] ?>">
+  <div class="layui-fluid">
+    <div style="display:none;"><span id="list-name"><?php echo $data['manage/database.info']['update_header'] ?></span> > <span id="list-project"><?php echo $data['manage/database.info']['project_name'] ?></span></div>
+    <form method="post" target="f1" class="form1" role="form" autocomplete="off" action="<?php echo $data['manage/database.info']['action'] ?>">
+    <input type="hidden" name="function" id="function" value="msg"/>
+    <input type="hidden" name="url" id="url" value="<?php echo $data['manage/database.info']['list'] ?>" />
+    <input type="hidden" name="project" id="project" value="<?php echo $data['manage/database.info']['project'] ?>" />
+    <input type="hidden" name="table" id="table" value="<?php echo $data['manage/database.info']['table'] ?>" />
+    <input type="hidden" name="update_where_id" id="update_where_id" value="<?php echo $data['manage/database.info']['id'] ?>"/>
+    <input type="hidden" name="copy_num" id="copy_num" value="0"/>
+    <iframe id="f1" name="f1" style="display:none;"></iframe>
+
+    <div class="layui-row layui-col-space15">
+      <div class="<?php echo $data['/database.card'] ?>">
+        <div class="layui-card" style="<?php if(!(Dever::load('/database.layui_card'))): ?>display:none;<?php endif; ?>">
+          <div class="layui-card-header" style="display:none;">响应式组合</div>
+          <div class="layui-card-body" id="content"><?php if(isset($data['manage/database.update']) && is_array($data['manage/database.update'])): ?><?php $t=count($data['manage/database.update'])-1 ?><?php $i=0 ?><?php foreach($data['manage/database.update'] as $k => $v): ?><?php echo $v ?><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/database.update'] ?><?php endif; ?></div>
+          <div class="layui-card-body">
+            <div class="layui-form-item">
+                <div id="update_button" submit="<?php  echo Dever::submit() ?>"><?php echo $data['manage/database.update_button'] ?></div>
+              </div>
+            </div>
+        </div>
+      </div>
+    </div>
+    <div id="valid"><?php echo $data['manage/database.valid'] ?></div>
+    <div id="struct" style="display:none;" save="<?php echo $data['manage/database.save'] ?>"><?php echo $data['/database.info']['struct'] ?></div>
+
+    <script>
+        $(document).ready(function()
+        {
+          init();
+        });
+    </script>
+    </form>
+  </div>
+</div>
+
+  
+  <?php require Dever::config("base")->data . 'compile/content/manage/layadmin/inc/script.cmp.php' ?>
+  <script>
+  layui.config({
+    base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'contlist', 'table', 'form'], function(){
+    var table = layui.table;
+    var form = layui.form; 
+  });
+  </script>
+</body>
+</html>

+ 82 - 0
data/compile/content/upload/home.cmp.php

@@ -0,0 +1,82 @@
+
+<style>
+  #component-anim .layui-card-body{padding: 15px;}
+
+  #component-anim .component-anim-demo{font-size: 0;}
+  #component-anim .component-anim-demo li{display: inline-block; vertical-align: middle; width: 127px; line-height: 25px; padding: 20px 0; font-size: 14px; text-align: center; color: #666; transition: all .3s; -webkit-transition: all .3s;}
+  #component-anim .component-anim-demo li .layui-icon{display: inline-block; font-size: 36px;}
+
+  #component-anim .component-anim-demo li .fontclass{display: none;}
+  #component-anim .component-anim-demo li .name{color: #c2c2c2;}
+  #component-anim .component-anim-demo li:hover{background-color: #f2f2f2; color: #000;}
+
+  #component-anim .component-anim-demo li{width: 168px;}
+  #component-anim .component-anim-demo .layui-anim{cursor: pointer;}
+  #component-anim .component-anim-demo .layui-anim{width:150px;height:100px;}
+  #component-anim .component-anim-demo .code{height:25px;}
+
+  #component-anim .component-anim-demo .layui-anim-yes
+  {
+  	border:1px solid #0000ff;
+  }
+  #component-anim .component-anim-demo .layui-anim-no
+  {
+  	border: 1px solid #e2e2e2;
+  }
+  </style>
+
+<div class="layui-card"  id="component-anim">
+  <div class="layui-card-header">
+  	<input type="hidden" class="file_key" value="<?php  echo $config['id'] ?>">
+  	<input type="hidden" class="file_pg" value="<?php  echo $search_pg ?>">
+  	<input type="hidden" class="file_cur" value="<?php  echo $cur ?>">
+  	<div class="layui-inline"><div class="layui-input-inline"><input type="text" style="width: 100%;" class="layui-input file_filename" value="<?php  echo $search_name ?>" autocomplete="new-password" placeholder="文件名"></div></div>
+
+  	<div class="layui-inline" style="display: none;"><div class="layui-input-inline"><input type="text" style="width: 100%;"  class="layui-input file_tag" value="<?php  echo $search_tag ?>" autocomplete="new-password" placeholder="标签"></div></div>
+
+  	<div class="layui-inline"><div class="layui-input-inline"><select lay-ignore="" class="layui-input file_cate" style="width: 100%;"><option parent="" value="-1" selected="">选择分类</option>
+  		<?php if(isset($cate) && is_array($cate)): foreach($cate as $k => $v): ?>
+  		<option parent="" value="<?php  echo $v['id'] ?>" <?php if($v['id'] == $search_cate): ?>selected<?php endif ?>><?php  echo $v['name'] ?></option>
+  		<?php endforeach;endif; ?>
+  	</select></div></div>
+
+  	<div class="layui-inline" class="file-search" onclick="showUploadFilesSearch($(this))"><div class="layui-input-inline"><button type="button" class="layui-btn"><i class="fa fa-save"></i> 搜索</button></div></div>
+
+  </div>
+  <div class="layui-card-body">
+    
+    <ul class="component-anim-demo">
+    	<?php if(isset($file) && is_array($file)): foreach($file as $k1 => $v1): ?>
+      <li class="<?php if(strstr($cur, $v1['url'])): ?>layui-anim-yes<?php else: ?>layui-anim-no<?php endif ?>">
+        <div class="layui-anim" data-anim="layui-anim-up" onclick="showUploadFilesSet($(this), '<?php  echo $v1['name'] ?>','<?php  echo $v1['url'] ?>')"><img src="<?php  echo $v1['pic'] ?>" style="max-width: 150px;max-height: 100px;margin-left: 10px;"/></div>
+        <div class="code"><?php  echo $v1['source_name'] ?></div>
+      </li>
+      <?php endforeach;endif; ?>
+    </ul>
+    <div id="file-page"></div>
+</div>
+
+  
+
+<script>
+layui.use('laypage', function(){
+  var laypage = layui.laypage;
+  
+  //执行一个laypage实例
+  laypage.render({
+    elem: 'file-page' //注意,这里的 test1 是 ID,不用加 # 号
+    ,count: <?php  echo $total ?> //数据总数,从服务端得到
+    ,limit:12
+    ,curr:<?php  echo $search_pg ?>
+    ,jump: function(obj, first){
+	    //首次不执行
+	    if(!first){
+	      $('.file_pg').val(obj.curr);
+	    	showUploadFilesSearch($('.file_pg'));
+	    }
+	  }
+  });
+});
+</script>
+
+</div>

+ 323 - 0
data/compile/wonderful/manage/layadmin/console.cmp.php

@@ -0,0 +1,323 @@
+<?php $data['manage/auth.notice']=Dever::load('manage/auth.notice') ?>
+
+
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/head.cmp.php' ?>
+</head>
+<body>
+  
+  <div class="layui-fluid">
+    <div class="layui-row layui-col-space15">
+      <div class="layui-col-md8">
+        <div class="layui-row layui-col-space15">
+          <div class="layui-col-md6">
+            <div class="layui-card">
+              <div class="layui-card-header">快捷方式</div>
+              <div class="layui-card-body">
+                
+                <div class="layui-carousel layadmin-carousel layadmin-shortcut">
+                  <div carousel-item>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs3">
+                        <a lay-href="home/homepage1.html">
+                          <i class="layui-icon layui-icon-console"></i>
+                          <cite>主页一</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="home/homepage2.html">
+                          <i class="layui-icon layui-icon-chart"></i>
+                          <cite>主页二</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="component/layer/list.html">
+                          <i class="layui-icon layui-icon-template-1"></i>
+                          <cite>弹层</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a layadmin-event="im">
+                          <i class="layui-icon layui-icon-chat"></i>
+                          <cite>聊天</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="component/progress/index.html">
+                          <i class="layui-icon layui-icon-find-fill"></i>
+                          <cite>进度条</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="app/workorder/list.html">
+                          <i class="layui-icon layui-icon-survey"></i>
+                          <cite>工单</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="user/user/list.html">
+                          <i class="layui-icon layui-icon-user"></i>
+                          <cite>用户</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/system/website.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>设置</cite>
+                        </a>
+                      </li>
+                    </ul>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs3">
+                        <a lay-href="set/user/info.html">
+                          <i class="layui-icon layui-icon-set"></i>
+                          <cite>我的资料</cite>
+                        </a>
+                      </li>
+                    </ul>
+                    
+                  </div>
+                </div>
+                
+              </div>
+            </div>
+          </div>
+          <div class="layui-col-md6">
+            <div class="layui-card">
+              <div class="layui-card-header">待办事项</div>
+              <div class="layui-card-body">
+
+                <div class="layui-carousel layadmin-carousel layadmin-backlog">
+                  <div carousel-item>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs6">
+                        <a lay-href="app/content/comment.html" class="layadmin-backlog-body">
+                          <h3>待审评论</h3>
+                          <p><cite>66</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a lay-href="app/forum/list.html" class="layadmin-backlog-body">
+                          <h3>待审帖子</h3>
+                          <p><cite>12</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a lay-href="template/goodslist.html" class="layadmin-backlog-body">
+                          <h3>待审商品</h3>
+                          <p><cite>99</cite></p>
+                        </a>
+                      </li>
+                      <li class="layui-col-xs6">
+                        <a href="javascript:;" onclick="layer.tips('不跳转', this, {tips: 3});" class="layadmin-backlog-body">
+                          <h3>待发货</h3>
+                          <p><cite>20</cite></p>
+                        </a>
+                      </li>
+                    </ul>
+                    <ul class="layui-row layui-col-space10">
+                      <li class="layui-col-xs6">
+                        <a href="javascript:;" class="layadmin-backlog-body">
+                          <h3>待审友情链接</h3>
+                          <p><cite style="color: #FF5722;">5</cite></p>
+                        </a>
+                      </li>
+                    </ul>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+          <div class="layui-col-md12">
+            <div class="layui-card">
+              <div class="layui-card-header">数据概览</div>
+              <div class="layui-card-body">
+                
+                <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-index-dataview">
+                  <div carousel-item id="LAY-index-dataview">
+                    <div><i class="layui-icon layui-icon-loading1 layadmin-loading"></i></div>
+                    <div></div>
+                    <div></div>
+                  </div>
+                </div>
+                
+              </div>
+            </div>
+            <div class="layui-card">
+              <div class="layui-tab layui-tab-brief layadmin-latestData">
+                <ul class="layui-tab-title">
+                  <li class="layui-this">今日热搜</li>
+                  <li>今日热帖</li>
+                </ul>
+                <div class="layui-tab-content">
+                  <div class="layui-tab-item layui-show">
+                    <table id="LAY-index-topSearch"></table>
+                  </div>
+                  <div class="layui-tab-item">
+                    <table id="LAY-index-topCard"></table>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+      
+      <div class="layui-col-md4">
+
+        <div class="layui-card dever-notice" style="<?php if(!(Dever::load('manage/auth.notice'))): ?>display:none;<?php endif; ?>">
+          <div class="layui-card-header">系统公告</div>
+          <div class="layui-card-body">
+            <div class="layui-carousel layadmin-carousel layadmin-news" data-autoplay="true" data-anim="fade" lay-filter="news">
+              <div carousel-item id="dever-notice">
+                <?php if(isset($data['manage/auth.notice']) && is_array($data['manage/auth.notice'])): ?><?php $t=count($data['manage/auth.notice'])-1 ?><?php $i=0 ?><?php foreach($data['manage/auth.notice'] as $k => $v): ?><div><a href="<?php  echo Dever::url("notice?where_id=".$v['id']."&where_config=".$v['config']) ?>" target="_blank" class="layui-bg-red" title="<?php  echo $v['name'] ?>" style="background-color: #FF5722!important;"><?php  echo $v['name'] ?></a></div><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/auth.notice'] ?><?php endif; ?>
+                 
+                
+              </div>
+            </div>
+          </div>
+        </div>
+
+        <div class="layui-card">
+          <div class="layui-card-header">版本信息</div>
+          <div class="layui-card-body layui-text">
+            <table class="layui-table">
+              <colgroup>
+                <col width="100">
+                <col>
+              </colgroup>
+              <tbody>
+                <tr>
+                  <td>当前版本</td>
+                  <td>
+                    <script type="text/html" template>
+                      v{{ layui.admin.v }}
+                    </script>
+                  </td>
+                </tr>
+                <tr>
+                  <td>基于框架</td>
+                  <td>
+                    <script type="text/html" template>
+                      layui-v{{ layui.v }}
+                    </script>
+                 </td>
+                </tr>
+                <tr>
+                  <td>主要特色</td>
+                  <td>零门槛 / 响应式 / 清爽 / 极简</td>
+                </tr>
+                <tr>
+                  <td>获取渠道</td>
+                  <td style="padding-bottom: 0;">
+                    <div class="layui-btn-container">
+                      <a href="http://www.layui.com/admin/" target="_blank" class="layui-btn layui-btn-danger">获取授权</a>
+                      <a href="http://fly.layui.com/download/layuiAdmin/" target="_blank" class="layui-btn">立即下载</a>
+                    </div>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </div>
+        
+        <div class="layui-card">
+          <div class="layui-card-header">效果报告</div>
+          <div class="layui-card-body layadmin-takerates">
+            <div class="layui-progress" lay-showpercent="yes">
+              <h3>转化率(日同比 28% <span class="layui-edge layui-edge-top" lay-tips="增长" lay-offset="-15"></span>)</h3>
+              <div class="layui-progress-bar" lay-percent="65%"></div>
+            </div>
+            <div class="layui-progress" lay-showpercent="yes">
+              <h3>签到率(日同比 11% <span class="layui-edge layui-edge-bottom" lay-tips="下降" lay-offset="-15"></span>)</h3>
+              <div class="layui-progress-bar" lay-percent="32%"></div>
+            </div>
+          </div>
+        </div>
+        
+        <div class="layui-card">
+          <div class="layui-card-header">实时监控</div>
+          <div class="layui-card-body layadmin-takerates">
+            <div class="layui-progress" lay-showpercent="yes">
+              <h3>CPU使用率</h3>
+              <div class="layui-progress-bar" lay-percent="58%"></div>
+            </div>
+            <div class="layui-progress" lay-showpercent="yes">
+              <h3>内存占用率</h3>
+              <div class="layui-progress-bar layui-bg-red" lay-percent="90%"></div>
+            </div>
+          </div>
+        </div>
+
+        <div class="layui-card">
+          <div class="layui-card-header">
+            作者心语
+            <i class="layui-icon layui-icon-tips" lay-tips="要支持的噢" lay-offset="5"></i>
+          </div>
+          <div class="layui-card-body layui-text layadmin-text">
+            <p>一直以来,layui 秉承无偿开源的初心,虔诚致力于服务各层次前后端 Web 开发者,在商业横飞的当今时代,这一信念从未动摇。即便身单力薄,仍然重拾决心,埋头造轮,以尽可能地填补产品本身的缺口。</p>
+            <p>在过去的一段的时间,我一直在寻求持久之道,已维持你眼前所见的一切。而 layuiAdmin 是我们尝试解决的手段之一。我相信真正有爱于 layui 生态的你,定然不会错过这一拥抱吧。</p>
+            <p>子曰:君子不用防,小人防不住。请务必通过官网正规渠道,获得 <a href="http://www.layui.com/admin/" target="_blank">layuiAdmin</a>!</p>
+            <p>—— 贤心(<a href="http://www.layui.com/" target="_blank">layui.com</a>)</p>
+          </div>
+        </div>
+      </div>
+      
+    </div>
+  </div>
+
+  <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/script.cmp.php' ?>
+  <script>
+    layui.config({
+        base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+    }).extend({
+        index: 'lib/index' //主入口模块
+    }).use(['index', 'console']);
+</script>
+</body>
+</html>
+

+ 66 - 0
data/compile/wonderful/manage/layadmin/home.cmp.php

@@ -0,0 +1,66 @@
+<?php $data['manage/database.cookie']=Dever::load('manage/database.cookie') ?>
+<?php $data['manage/menu.link']=Dever::load('manage/menu.link') ?>
+
+
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/head.cmp.php' ?>
+</head>
+<body class="theme-<?php  echo Dever::load("manage/auth.config#template") ?>" test="公告">
+
+  <div id="LAY_app" class="<?php echo $data['manage/database.cookie']['wrapper'] ?>">
+    <div class="layui-layout layui-layout-admin">
+
+      <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/nav.cmp.php' ?>
+
+      <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/menu.cmp.php' ?>
+
+      
+      <div class="layadmin-pagetabs" id="LAY_app_tabs">
+        <div class="layui-icon layadmin-tabs-control layui-icon-prev" layadmin-event="leftPage"></div>
+        <div class="layui-icon layadmin-tabs-control layui-icon-next" layadmin-event="rightPage"></div>
+        <div class="layui-icon layadmin-tabs-control layui-icon-down">
+          <ul class="layui-nav layadmin-tabs-select" lay-filter="layadmin-pagetabs-nav">
+            <li class="layui-nav-item" lay-unselect>
+              <a href="javascript:;"></a>
+              <dl class="layui-nav-child layui-anim-fadein">
+                <dd layadmin-event="closeThisTabs"><a href="javascript:;">关闭当前标签页</a></dd>
+                <dd layadmin-event="closeOtherTabs"><a href="javascript:;">关闭其它标签页</a></dd>
+                <dd layadmin-event="closeAllTabs"><a href="javascript:;">关闭全部标签页</a></dd>
+              </dl>
+            </li>
+          </ul>
+        </div>
+        <div class="layui-tab" lay-unauto lay-allowclose="true" lay-filter="layadmin-layout-tabs">
+          <ul class="layui-tab-title" id="LAY_app_tabsheader">
+            <li lay-id="<?php echo $data['manage/menu.link']['console'] ?>" lay-attr="<?php echo $data['manage/menu.link']['console'] ?>" class="layui-this"><i class="layui-icon layui-icon-home"></i></li>
+          </ul>
+        </div>
+      </div>
+      
+      
+      
+      <div class="layui-body" id="LAY_app_body">
+        <div class="layadmin-tabsbody-item layui-show">
+          <iframe src="<?php echo $data['manage/menu.link']['console'] ?>" frameborder="0" class="layadmin-iframe"></iframe>
+        </div>
+      </div>
+      
+      
+      <div class="layadmin-body-shade" layadmin-event="shade"></div>
+    </div>
+  </div>
+
+  <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/script.cmp.php' ?>
+  <script>
+    layui.config({
+        base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+    }).extend({
+        index: 'lib/index' //主入口模块
+    }).use('index');
+</script>
+</body>
+</html>
+
+

+ 28 - 0
data/compile/wonderful/manage/layadmin/inc/head.cmp.php

@@ -0,0 +1,28 @@
+<?php $data['manage/auth.config']=Dever::load('manage/auth.config') ?>
+<meta charset="utf-8">
+<title><?php echo $data['manage/auth.config']['title'] ?></title>
+<meta name="keywords" content="<?php echo $data['manage/auth.config']['title'] ?>">
+<meta name="description" content="<?php echo $data['manage/auth.config']['title'] ?>">
+<meta name="apple-mobile-web-app-title" content="<?php echo $data['manage/auth.config']['title'] ?>" />
+<meta name="author" content="rabin">
+<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/layui/css/layui.css" />
+<link rel="stylesheet" href="<?php echo Dever::config("host")->script ?>lib/layui/admin/style/admin.css" media="all">
+
+
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/color/colpick.css">
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/kindeditor/themes/default/default.css" />
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/valid/validationEngine.jquery.css">
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/pnotify/pnotify.css">
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/fancybox/jquery.fancybox.css">
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/highlight/highlight.min.css">
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/datetime/jquery.datetimepicker.css">
+
+<link rel="stylesheet" type="text/css" href="<?php echo Dever::config("host")->script ?>lib/ui/ui.min.css">
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/jquery/jquery.min.js"></script>
+<script id="script"><?php  echo Dever::script() ?>config.template="<?php  echo $data["manage/auth.config"]["template"] ?>";config.lib="<?php  echo Dever::config("host")->public ?>"</script>
+<style type="text/css" id="style"><?php  echo Dever::load("manage/auth.loading") ? ".content,.content-page{margin-left: 0px;min-height:auto}" : "" ?></style>

+ 34 - 0
data/compile/wonderful/manage/layadmin/inc/menu.cmp.php

@@ -0,0 +1,34 @@
+<?php $data['manage/auth.config']=Dever::load('manage/auth.config') ?>
+<?php $data['manage/menu.link']=Dever::load('manage/menu.link') ?>
+<?php $data['manage/menu.all']=Dever::load('manage/menu.all') ?>
+
+      <div class="layui-side layui-side-menu">
+        <div class="layui-side-scroll">
+          <div class="layui-logo" id="console-url" lay-href="<?php echo $data['manage/menu.link']['console'] ?>">
+            <span id="dever-name"><?php echo $data['manage/auth.config']['title'] ?></span>
+          </div>
+          
+          <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
+            <?php if(isset($data['manage/menu.all']) && is_array($data['manage/menu.all'])): ?><?php $t=count($data['manage/menu.all'])-1 ?><?php $i=0 ?><?php foreach($data['manage/menu.all'] as $k => $v): ?><li data-name="home" class="layui-nav-item<?php if(Dever::input("menu") == $v['key'] || (!Dever::input("menu_id") && $k == "console")):?> layui-nav-itemed<?php endif; ?>">
+              <a href="javascript:;" lay-tips="<?php  echo $v['name'] ?>" lay-direction="2" data-target=".<?php  echo $v['key'] ?>-menu" class="<?php if(Dever::input("menu") == $v['key'] || !Dever::input("menu")):?>layui-nav-itemed<?php endif; ?>">
+                <i class="<?php  echo $v['icon'] ? "layui-icon " . $v['icon'] : "layui-icon layui-icon-home" ?>"></i>
+                <cite><?php  echo $v['name'] ?></cite>
+              </a>
+              <dl class="layui-nav-child" id="<?php  echo $v['key'] ?>-menu">
+                <?php if(isset($v['child']) && $v['child'] && is_array($v['child'])):foreach($v['child'] as $k1 => $v1):if($v1): ?><dd data-name="console" class="<?php if(Dever::input("menu_id") == $v1['id']):?>layui-this<?php elseif(!Dever::input("menu_id") && $k1 == "console.index"): ?>layui-this<?php endif; ?>">
+                  <a lay-href="<?php  echo $v1['link'] ?>"><?php  echo $v1['name'] ?></a>
+                </dd><?php endif;endforeach;endif; ?>
+                
+                
+              </dl>
+            </li><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/menu.all'] ?><?php endif; ?>
+            
+            
+            
+            
+            
+            
+            
+          </ul>
+        </div>
+      </div>

+ 82 - 0
data/compile/wonderful/manage/layadmin/inc/nav.cmp.php

@@ -0,0 +1,82 @@
+<?php $data['manage/database.res']=Dever::load('manage/database.res') ?>
+<?php $data['manage/auth.config']=Dever::load('manage/auth.config') ?>
+<?php $data['manage/auth.info']=Dever::load('manage/auth.info') ?>
+<?php $data['manage/menu.link']=Dever::load('manage/menu.link') ?>
+<?php $data['manage/top.get']=Dever::load('manage/top.get') ?>
+<div id="load_style" style="display:none;"><?php echo $data['manage/database.res']['css'] ?></div>
+<div id="dever-name" style="display:none;"><?php echo $data['manage/auth.config']['title'] ?></div>
+<div class="layui-header" id="nav" style="<?php  echo Dever::load("manage/auth.loading") ? "display:none;" : "" ?>">
+
+<ul class="layui-nav layui-layout-left">
+  <li class="layui-nav-item layadmin-flexible" lay-unselect>
+    <a href="javascript:;" layadmin-event="flexible" title="侧边伸缩">
+      <i class="layui-icon layui-icon-shrink-right" id="LAY_app_flexible"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="http://www.layui.com/admin/" target="_blank" title="前台">
+      <i class="layui-icon layui-icon-website"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item" lay-unselect>
+    <a href="javascript:;" layadmin-event="refresh" title="刷新">
+      <i class="layui-icon layui-icon-refresh-3"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <input type="text" placeholder="搜索..." autocomplete="off" class="layui-input layui-input-search" layadmin-event="serach" lay-action="template/search.html?keywords="> 
+  </li>
+</ul>
+<ul class="layui-nav layui-layout-right" lay-filter="layadmin-layout-right">
+
+  <?php if(isset($data['manage/top.get']) && is_array($data['manage/top.get'])): ?><?php $t=count($data['manage/top.get'])-1 ?><?php $i=0 ?><?php foreach($data['manage/top.get'] as $k => $v): ?><li class="layui-nav-item auth-top" lay-unselect style="display:none">
+    <a href="javascript:;">
+      <cite><span><?php  echo $v['name'] ?></span></cite>
+    </a>
+    <ul class="layui-nav-child">
+      <?php if(isset($v['child']) && $v['child'] && is_array($v['child'])):foreach($v['child'] as $k1 => $v1):if($v1): ?><li><a lay-href="set/user/info.html" data-id="<?php  echo $v1['id'] ?>" onclick="topMenu($(this))"><a lay-href="set/user/info.html" data-id="<?php  echo $v1['id'] ?>" onclick="topMenu($(this))"><?php  echo $v1['name'] ?></a></li><?php endif;endforeach;endif; ?>
+    </ul>
+  </li><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/top.get'] ?><?php endif; ?>
+
+  <li class="layui-nav-item" lay-unselect style="display:none;">
+    <a lay-href="app/message/index.html" layadmin-event="message" lay-text="消息中心">
+      <i class="layui-icon layui-icon-notice"></i>  
+      
+      
+      <span class="layui-badge-dot"></span>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect>
+    <a href="javascript:;" layadmin-event="theme">
+      <i class="layui-icon layui-icon-theme"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="note">
+      <i class="layui-icon layui-icon-note"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" lay-unselect>
+    <a href="javascript:;" layadmin-event="fullscreen">
+      <i class="layui-icon layui-icon-screen-full"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item" lay-unselect>
+    <a href="javascript:;">
+      <cite id="manage-name"><?php echo $data['manage/auth.info']['username'] ?></cite>
+    </a>
+    <dl class="layui-nav-child">
+      <dd><a id="edit_password" onclick="pass($(this));" style="cursor: pointer;">修改密码</a></dd>
+      <hr>
+      <dd layadmin-event="logout" id="logout-url" style="text-align: center;" href="<?php echo $data['manage/menu.link']['logout'] ?>"><a>退出</a></dd>
+    </dl>
+  </li>
+  
+  <li class="layui-nav-item layui-hide-xs" lay-unselect style="display:none;">
+    <a href="javascript:;" layadmin-event="about"><i class="layui-icon layui-icon-more-vertical"></i></a>
+  </li>
+  <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-unselect>
+    <a href="javascript:;" layadmin-event="more"><i class="layui-icon layui-icon-more-vertical"></i></a>
+  </li>
+</ul>
+</div>

+ 42 - 0
data/compile/wonderful/manage/layadmin/inc/script.cmp.php

@@ -0,0 +1,42 @@
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/pic/webp.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/jquery/store.js"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/bootstrap/js/bootstrap.min.js"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/pjax/pjax.js"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/pjax/nprogress.js"></script>
+
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/color/colpick.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/datetime/jquery.datetimepicker.min.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/pnotify/pnotify.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/fancybox/jquery.fancybox.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/echarts/echarts.common.min.js?v1"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/highlight/highlight.min.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/manage/main.js?v7"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/valid/jquery.validationEngine.min.js?v3"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/kindeditor/kindeditor-all-min.js?v4"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/kindeditor/lang/zh-CN.js"></script>
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/ui/ui.min.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/layui/upload.js?v1"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/layui/layui.js"></script>

+ 81 - 0
data/compile/wonderful/manage/layadmin/login.cmp.php

@@ -0,0 +1,81 @@
+<?php $data['manage/auth.set']=Dever::load('manage/auth.set') ?>
+
+
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/head.cmp.php' ?>
+  <link rel="stylesheet" href="<?php echo Dever::config("host")->script ?>lib/layui/admin/style/login.css" media="all">
+</head>
+<body>
+
+  <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login">
+    <form action="<?php  echo Dever::url("auth.login") ?>" method="post" target="f1" class="form-horizontal m-t-20" id="login">
+    <input type="hidden" name="function" id="function" value="msg">
+    <input type="hidden" name="refer" id="refer" value="<?php echo $data['manage/auth.set']['refer'] ?>">
+    <iframe id="f1" name="f1" style="display:none;"></iframe>
+    <div class="layadmin-user-login-main">
+      <div class="layadmin-user-login-box layadmin-user-login-header">
+        <h2 id="name"><?php  echo Dever::load("manage/auth.config#title") ?></h2>
+      </div>
+      <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
+        <div class="layui-form-item">
+          <label class="layadmin-user-login-icon layui-icon layui-icon-username" for="LAY-user-login-username"></label>
+          <input type="text" name="username" id="username" lay-verify="required" placeholder="账号" class="layui-input">
+        </div>
+        <div class="layui-form-item">
+          <label class="layadmin-user-login-icon layui-icon layui-icon-password" for="LAY-user-login-password"></label>
+          <input name="password" id="password" type="password" lay-verify="required" placeholder="密码" class="layui-input">
+        </div>
+        <div class="layui-form-item">
+          <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-login-submit">登 入</button>
+        </div>
+      </div>
+    </div>
+    
+    <div class="layui-trans layadmin-user-login-footer">
+      <p id="footer" style="<?php if(!(Dever::config("base")->copyright)): ?>display:none;<?php endif; ?>"><?php  echo Dever::config("base")->copyright ?></p>
+    </div>
+    
+    <div class="ladmin-user-login-theme" style="display:none;">
+      <script type="text/html" template>
+        <ul>
+          <li data-theme=""><img src="{{ layui.setter.base }}style/res/bg-none.jpg"></li>
+          <li data-theme="#03152A" style="background-color: #03152A;"></li>
+          <li data-theme="#2E241B" style="background-color: #2E241B;"></li>
+          <li data-theme="#50314F" style="background-color: #50314F;"></li>
+          <li data-theme="#344058" style="background-color: #344058;"></li>
+          <li data-theme="#20222A" style="background-color: #20222A;"></li>
+        </ul>
+      </script>
+    </div>
+    </form> 
+  </div>
+
+  <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/script.cmp.php' ?>
+  <script>
+  $(function()
+  {
+    $("#login").bind("keydown",function(e){
+      var theEvent = e || window.event;    
+      var code = theEvent.keyCode || theEvent.which || theEvent.charCode;    
+      if (code == 13) {    
+              $("#login").submit();
+          }
+     });
+  });
+
+  </script>
+  <script>
+  layui.config({
+    base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'user'], function(){
+    var $ = layui.$
+    ,setter = layui.setter
+    ,admin = layui.admin
+  });
+  </script>
+</body>
+</html>

+ 112 - 0
data/compile/wonderful/manage/layadmin/project/database/list.cmp.php

@@ -0,0 +1,112 @@
+<?php $data['manage/database.page_list']=Dever::load('manage/database.page_list') ?>
+<?php $data['manage/database.info']=Dever::load('manage/database.info') ?>
+<?php $data['manage/database.listStyle']=Dever::load('manage/database.listStyle') ?>
+<?php $data['manage/database.list_search']=Dever::load('manage/database.list_search') ?>
+<?php $data['manage/database.list_thead_layui']=Dever::load('manage/database.list_thead_layui') ?>
+<?php $data['manage/database.list_tbody_layui']=Dever::load('manage/database.list_tbody_layui') ?>
+<?php $data['manage/database.page_list_table']=Dever::load('manage/database.page_list_table') ?>
+<?php $data['manage/database.list_button']=Dever::load('manage/database.list_button') ?>
+<?php $data['manage/database.list_mul']=Dever::load('manage/database.list_mul') ?>
+<?php $data['manage/auth.config']=Dever::load('manage/auth.config') ?>
+
+
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/head.cmp.php' ?>
+</head>
+<body class="theme-<?php  echo Dever::load("/auth.config#template") ?>">
+<style id="addstyle"><?php echo $data['manage/database.listStyle'] ?></style>
+<style>
+.layui-table-cell .layui-select,.layui-table-cell .layui-input
+{
+    height: 25px;
+}
+</style>
+<span id="dever-name" style="display:none;"><?php echo $data['manage/auth.config']['title'] ?></span>
+<div class="topbar">
+    <div class="banner dever-layout" style="display:none;">
+        <a target="_blank"><img src="#"></a>
+        <span>项目名称</span>
+    </div>
+</div>
+<div id="content_1" style="<?php echo $data['manage/database.page_list']['s1'] ?>"><?php echo $data['manage/database.page_list']['content'] ?></div>
+<div id="content_2" style="<?php echo $data['manage/database.page_list']['s2'] ?>">
+  <div class="layui-fluid">
+    <div class="layui-card">
+      <form id="form1" name="form1" method="post" target="f1" action="<?php echo $data['manage/database.info']['list'] ?>">
+      <input type="hidden" name="function" id="function" value="msg"/>
+      <input type="hidden" name="url" id="url" value="<?php echo $data['manage/database.info']['mul'] ?>"/>
+      <input type="hidden" name="method" id="method" value="search"/>
+      <iframe id="f1" name="f1" style="display:none;"></iframe>
+      <div class="layui-card-header" style="display:none;"><span id="list-name"><?php echo $data['manage/database.info']['list_header'] ?></span> > <span id="list-project"><?php echo $data['manage/database.info']['project_name'] ?></span></div>
+        <div class="layui-card-body">
+
+          <div class="layui-form layui-card-header layuiadmin-card-header-auto">
+            <div class="layui-form-item">
+              <div id="search"><?php echo $data['manage/database.list_search'] ?></div>
+            </div>
+          </div>
+        </div>
+      <div class="layui-card-body">
+        <div style="padding-bottom: 10px;">
+          <a class="layui-btn layuiadmin-btn-list" data-type="add" id="list-parent" style="<?php echo $data['manage/database.info']['parent_state'] ?>" href="<?php echo $data['manage/database.info']['parent'] ?>">返回上一页</a>
+
+          <a class="layui-btn layuiadmin-btn-list" data-type="add" id="list-add" href="<?php echo $data['manage/database.info']['add'] ?>" style="<?php echo $data['manage/database.info']['add_state'] ?>">新增</a>
+
+          <span id="list-button"><?php echo $data['manage/database.list_button'] ?></span>
+        </div>
+        <div id="table_1" style="<?php echo $data['manage/database.page_list_table']['s1'] ?>"><?php echo $data['manage/database.page_list_table']['content'] ?></div>
+        <div id="table_2" style="<?php echo $data['manage/database.page_list_table']['s2'] ?>"> 
+          <table class="table layui-table" id="table" lay-filter="table" style="display:none;">
+          <thead>
+              <tr>
+                  <th>Company</th>
+              </tr>
+          </thead>
+          <tbody>
+              <tr>
+                  <th></th>
+              </tr>      
+              
+          </tbody>
+      </table>
+
+      <div id="mul"><?php echo $data['manage/database.list_mul'] ?></div>
+      <div id="page"><?php  echo Dever::page("current") ?></div>
+      <div class="dever_desc" id="desc" style="<?php if(!(Dever::load('manage/database.info#listDesc'))): ?>display:none;<?php endif; ?>"><?php echo $data['manage/database.info']['listDesc'] ?></div>
+        </div>
+      </div>
+       </div>
+        </div>
+      </form>
+      <form id="form2" name="form2" method="get" style="display: none;"></form>
+      <div id="struct" style="display:none;"></div>
+    </div>
+  </div>
+</div>
+
+  <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/script.cmp.php' ?>
+  <script id="list-thead"><?php if(isset($data['manage/database.list_thead_layui']) && is_array($data['manage/database.list_thead_layui'])): ?><?php $t=count($data['manage/database.list_thead_layui'])-1 ?><?php $i=0 ?><?php foreach($data['manage/database.list_thead_layui'] as $k => $v): ?><?php echo $v ?><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/database.list_thead_layui'] ?><?php endif; ?></script>
+  <script id="list-tbody"><?php if(isset($data['manage/database.list_tbody_layui']) && is_array($data['manage/database.list_tbody_layui'])): ?><?php $t=count($data['manage/database.list_tbody_layui'])-1 ?><?php $i=0 ?><?php foreach($data['manage/database.list_tbody_layui'] as $k => $v): ?><?php echo $v ?><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/database.list_tbody_layui'] ?><?php endif; ?></script>
+  <script>
+  layui.config({
+    base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'contlist', 'table', 'form'], function(){
+    var table = layui.table;
+    var form = layui.form; 
+
+    table.render({
+      elem: '#table'
+      ,page: false
+      ,cols: config.table.cols
+      ,data: config.table.data
+    });
+
+    init();
+  });
+  </script>
+</body>
+</html>

+ 82 - 0
data/compile/wonderful/manage/layadmin/project/database/update.cmp.php

@@ -0,0 +1,82 @@
+<?php $data['manage/database.page_update']=Dever::load('manage/database.page_update') ?>
+<?php $data['manage/database.info']=Dever::load('manage/database.info') ?>
+<?php $data['manage/database.update']=Dever::load('manage/database.update') ?>
+<?php $data['/database.info']=Dever::load('/database.info') ?>
+<?php $data['manage/database.valid']=Dever::load('manage/database.valid') ?>
+<?php $data['manage/database.save']=Dever::load('manage/database.save') ?>
+<?php $data['manage/database.update_button']=Dever::load('manage/database.update_button') ?>
+<?php $data['/database.layui_card']=Dever::load('/database.layui_card') ?>
+<?php $data['/database.card']=Dever::load('/database.card') ?>
+
+
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/head.cmp.php' ?>
+  <style>
+    .layui-input
+    {
+      width: 50%;
+    }
+    </style>
+</head>
+<body class="theme-<?php  echo Dever::load("/auth.config#template") ?>">
+<div class="topbar">
+    <div class="banner dever-layout" style="display:none;">
+        <a target="_blank"><img src="#"></a>
+        <span>项目名称</span>
+    </div>
+</div>
+<div id="content_1" style="<?php echo $data['manage/database.page_update']['s1'] ?>"><?php echo $data['manage/database.page_update']['content'] ?></div>
+<div id="content_2" style="<?php echo $data['manage/database.page_update']['s2'] ?>">
+  <div class="layui-fluid">
+    <div style="display:none;"><span id="list-name"><?php echo $data['manage/database.info']['update_header'] ?></span> > <span id="list-project"><?php echo $data['manage/database.info']['project_name'] ?></span></div>
+    <form method="post" target="f1" class="form1" role="form" autocomplete="off" action="<?php echo $data['manage/database.info']['action'] ?>">
+    <input type="hidden" name="function" id="function" value="msg"/>
+    <input type="hidden" name="url" id="url" value="<?php echo $data['manage/database.info']['list'] ?>" />
+    <input type="hidden" name="project" id="project" value="<?php echo $data['manage/database.info']['project'] ?>" />
+    <input type="hidden" name="table" id="table" value="<?php echo $data['manage/database.info']['table'] ?>" />
+    <input type="hidden" name="update_where_id" id="update_where_id" value="<?php echo $data['manage/database.info']['id'] ?>"/>
+    <input type="hidden" name="copy_num" id="copy_num" value="0"/>
+    <iframe id="f1" name="f1" style="display:none;"></iframe>
+
+    <div class="layui-row layui-col-space15">
+      <div class="<?php echo $data['/database.card'] ?>">
+        <div class="layui-card" style="<?php if(!(Dever::load('/database.layui_card'))): ?>display:none;<?php endif; ?>">
+          <div class="layui-card-header" style="display:none;">响应式组合</div>
+          <div class="layui-card-body" id="content"><?php if(isset($data['manage/database.update']) && is_array($data['manage/database.update'])): ?><?php $t=count($data['manage/database.update'])-1 ?><?php $i=0 ?><?php foreach($data['manage/database.update'] as $k => $v): ?><?php echo $v ?><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/database.update'] ?><?php endif; ?></div>
+          <div class="layui-card-body">
+            <div class="layui-form-item">
+                <div id="update_button" submit="<?php  echo Dever::submit() ?>"><?php echo $data['manage/database.update_button'] ?></div>
+              </div>
+            </div>
+        </div>
+      </div>
+    </div>
+    <div id="valid"><?php echo $data['manage/database.valid'] ?></div>
+    <div id="struct" style="display:none;" save="<?php echo $data['manage/database.save'] ?>"><?php echo $data['/database.info']['struct'] ?></div>
+
+    <script>
+        $(document).ready(function()
+        {
+          init();
+        });
+    </script>
+    </form>
+  </div>
+</div>
+
+  
+  <?php require Dever::config("base")->data . 'compile/wonderful/manage/layadmin/inc/script.cmp.php' ?>
+  <script>
+  layui.config({
+    base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'contlist', 'table', 'form'], function(){
+    var table = layui.table;
+    var form = layui.form; 
+  });
+  </script>
+</body>
+</html>

+ 82 - 0
data/compile/wonderful/upload/show.cmp.php

@@ -0,0 +1,82 @@
+
+<style>
+  #component-anim .layui-card-body{padding: 15px;}
+
+  #component-anim .component-anim-demo{font-size: 0;}
+  #component-anim .component-anim-demo li{display: inline-block; vertical-align: middle; width: 127px; line-height: 25px; padding: 20px 0; font-size: 14px; text-align: center; color: #666; transition: all .3s; -webkit-transition: all .3s;}
+  #component-anim .component-anim-demo li .layui-icon{display: inline-block; font-size: 36px;}
+
+  #component-anim .component-anim-demo li .fontclass{display: none;}
+  #component-anim .component-anim-demo li .name{color: #c2c2c2;}
+  #component-anim .component-anim-demo li:hover{background-color: #f2f2f2; color: #000;}
+
+  #component-anim .component-anim-demo li{width: 168px;}
+  #component-anim .component-anim-demo .layui-anim{cursor: pointer;}
+  #component-anim .component-anim-demo .layui-anim{width:150px;height:100px;}
+  #component-anim .component-anim-demo .code{height:25px;}
+
+  #component-anim .component-anim-demo .layui-anim-yes
+  {
+  	border:1px solid #0000ff;
+  }
+  #component-anim .component-anim-demo .layui-anim-no
+  {
+  	border: 1px solid #e2e2e2;
+  }
+  </style>
+
+<div class="layui-card"  id="component-anim">
+  <div class="layui-card-header">
+  	<input type="hidden" class="file_key" value="<?php  echo $config['id'] ?>">
+  	<input type="hidden" class="file_pg" value="<?php  echo $search_pg ?>">
+  	<input type="hidden" class="file_cur" value="<?php  echo $cur ?>">
+  	<div class="layui-inline"><div class="layui-input-inline"><input type="text" style="width: 100%;" class="layui-input file_filename" value="<?php  echo $search_name ?>" autocomplete="new-password" placeholder="文件名"></div></div>
+
+  	<div class="layui-inline" style="display: none;"><div class="layui-input-inline"><input type="text" style="width: 100%;"  class="layui-input file_tag" value="<?php  echo $search_tag ?>" autocomplete="new-password" placeholder="标签"></div></div>
+
+  	<div class="layui-inline"><div class="layui-input-inline"><select lay-ignore="" class="layui-input file_cate" style="width: 100%;"><option parent="" value="-1" selected="">选择分类</option>
+  		<?php if(isset($cate) && is_array($cate)): foreach($cate as $k => $v): ?>
+  		<option parent="" value="<?php  echo $v['id'] ?>" <?php if($v['id'] == $search_cate): ?>selected<?php endif ?>><?php  echo $v['name'] ?></option>
+  		<?php endforeach;endif; ?>
+  	</select></div></div>
+
+  	<div class="layui-inline" class="file-search" onclick="showUploadFilesSearch($(this))"><div class="layui-input-inline"><button type="button" class="layui-btn"><i class="fa fa-save"></i> 搜索</button></div></div>
+
+  </div>
+  <div class="layui-card-body">
+    
+    <ul class="component-anim-demo">
+    	<?php if(isset($file) && is_array($file)): foreach($file as $k1 => $v1): ?>
+      <li class="<?php if(strstr($cur, $v1['url'])): ?>layui-anim-yes<?php else: ?>layui-anim-no<?php endif ?>">
+        <div class="layui-anim" data-anim="layui-anim-up" onclick="showUploadFilesSet($(this), '<?php  echo $v1['name'] ?>','<?php  echo $v1['url'] ?>')"><img src="<?php  echo $v1['pic'] ?>" style="max-width: 150px;max-height: 100px;margin-left: 10px;"/></div>
+        <div class="code"><?php  echo $v1['source_name'] ?></div>
+      </li>
+      <?php endforeach;endif; ?>
+    </ul>
+    <div id="file-page"></div>
+</div>
+
+  
+
+<script>
+layui.use('laypage', function(){
+  var laypage = layui.laypage;
+  
+  //执行一个laypage实例
+  laypage.render({
+    elem: 'file-page' //注意,这里的 test1 是 ID,不用加 # 号
+    ,count: <?php  echo $total ?> //数据总数,从服务端得到
+    ,limit:12
+    ,curr:<?php  echo $search_pg ?>
+    ,jump: function(obj, first){
+	    //首次不执行
+	    if(!first){
+	      $('.file_pg').val(obj.curr);
+	    	showUploadFilesSearch($('.file_pg'));
+	    }
+	  }
+  });
+});
+</script>
+
+</div>

+ 1 - 0
data/readme

@@ -0,0 +1 @@
+dever create

+ 11 - 0
doc/apidoc.json

@@ -0,0 +1,11 @@
+{
+  "name": "精美时尚内容平台接口文档",
+  "version": "1.0.0",
+  "description": "精美时尚内容平台接口文档",
+  "title": "精美时尚内容平台接口文档",
+  "url" : "https://huoxingkandiqiu.com/",
+  "template": {
+    "withCompare": true,
+    "withGenerator": true
+  }
+}

+ 157 - 0
doc/apidoc.php

@@ -0,0 +1,157 @@
+<?php 
+
+/**
+ * @api {get} common 公共参数说明
+ * @apiVersion 1.0.0
+ * @apiName common
+ * @apiGroup Common
+ *
+ * @apiDescription 介绍公共参数
+ *
+ * @apiParam {Number} json 是否返回json格式的数据1为返回2为不返回
+ * @apiParam {Number} signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
+ *
+ * @apiSuccess {Number}   status  状态,1为有效2为无效
+ * @apiSuccess {String}   msg 请求的数据是否成功的提示
+ * @apiSuccess {String}   data 如果status为1,data有值
+ * @apiSuccess {Object[]}   page 分页信息
+ * @apiSuccess {Number}   page.total 分页总数
+ * @apiSuccess {Number}   page.current_page 当前页
+ * @apiSuccess {Number}   page.total_page 总页数
+ * @apiSuccess {Number}   page.next_page 下一页
+ * @apiSuccess {Number}   page.prev_page 上一页
+ * @apiSuccess {Number}   page.status 是否有下一页数据,0为没有
+ */
+
+
+/**
+ * @api {get} passport/?l=applet.bind 用户登录
+ * @apiVersion 1.0.0
+ * @apiName applet.bind
+ * @apiGroup Passport
+ *
+ * @apiDescription 用户登录
+ *
+ * @apiParam {String} code 微信登录返回的code
+ *
+ * @apiSuccess {Number}   vid  微信id,请保存在本地
+ * @apiSuccess {Number}   uid  用户id,请保存在本地
+ * @apiSuccess {String}   signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
+ */
+
+/**
+ * @api {get} passport/?l=applet.update 更新用户信息
+ * @apiVersion 1.0.0
+ * @apiName applet.update
+ * @apiGroup Passport
+ *
+ * @apiDescription 更新用户信息
+ *
+ * @apiParam {String} nickname 用户昵称
+ * @apiParam {String} avatarurl 用户头像
+ * @apiParam {String} iv 微信的加密参数
+ * @apiParam {String} encryptedData 微信的加密参数
+ * @apiParam {Number} vid 微信id
+ * @apiParam {Number} uid 用户id
+ * @apiParam {String} signature signature
+ *
+ *
+ * @apiSuccess {Number}   vid  微信id,请保存在本地
+ * @apiSuccess {Number}   uid  用户id,请保存在本地
+ * @apiSuccess {String}   signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
+ */
+
+
+/**
+ * @api {get} passport/?l=applet.mobile 更新用户手机号-微信绑定
+ * @apiVersion 1.0.0
+ * @apiName applet.mobile
+ * @apiGroup Passport
+ *
+ * @apiDescription 更新用户手机号-微信绑定
+ *
+ * @apiParam {String} iv 微信的加密参数
+ * @apiParam {String} encryptedData 微信的加密参数
+ * @apiParam {Number} vid 微信id
+ * @apiParam {Number} uid 用户id
+ * @apiParam {String} signature signature
+ *
+ *
+ * @apiSuccess {Number}   vid  微信id,请保存在本地
+ * @apiSuccess {Number}   uid  用户id,请保存在本地
+ * @apiSuccess {String}   signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
+ */
+
+/**
+ * @api {get} passport/?l=applet.bind_mobile 绑定手机号-验证码绑定
+ * @apiVersion 1.0.0
+ * @apiName applet.bind_mobile
+ * @apiGroup Passport
+ *
+ * @apiDescription 绑定手机号-验证码绑定
+ *
+ * @apiParam {Number} uid 用户id
+ * @apiParam {Number} mobile 手机号
+ * @apiParam {String} mcode 验证码
+ * @apiParam {String} signature signature
+ *
+
+ * @apiSuccess {Number}   uid  用户id,请保存在本地
+ * @apiSuccess {String}   signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
+ */
+
+/**
+ * @api {get} passport/?l=reg.getMCode 获取手机验证码
+ * @apiVersion 1.0.0
+ * @apiName reg.getMCode
+ * @apiGroup Passport
+ *
+ * @apiDescription 获取手机验证码
+ *
+ * @apiParam {Number} mobile 手机号
+ * @apiParam {String} signature signature
+ *
+ * @apiSuccess {String}   msg 验证码已发送至您的手机,请注意查收,十分钟之内有效
+ */
+
+/**
+ * @api {get} content/?l=api.home 获取首页数据
+ * @apiVersion 1.0.0
+ * @apiName api.home
+ * @apiGroup Content
+ *
+ * @apiDescription 获取首页数据
+ *
+ * @apiParam {String} signature signature
+ *
+ *
+ * @apiSuccess {Number}   uid  用户id 所有Service接口中都有该项
+ * @apiSuccess {Object[]} config 基本配置 所有Service接口中都有该项
+ * @apiSuccess {String}   config.name 小程序名称
+ * @apiSuccess {String}   config.info 小程序介绍
+ * @apiSuccess {String}   config.edate 产品有效期
+ * @apiSuccess {String}   config.article 	公众号链接-引导关注公众号
+ * @apiSuccess {String}   config.task_id 软装任务链接-一般填写APPID
+ * @apiSuccess {String}   config.desc_name 介绍标题-首页服务介绍
+ * @apiSuccess {String}   config.desc_content 介绍内容-首页服务介绍
+ * @apiSuccess {String}   config.flow_name 服务流程标题-首页服务流程
+ * @apiSuccess {Object[]}   config.flow_content 服务流程内容
+ * @apiSuccess {String}   config.video_content 	视频页介绍
+ * @apiSuccess {String}   config.question_content 		问卷介绍
+
+ * @apiSuccess {Object[]} focus 焦点图
+ * @apiSuccess {String}   focus.name 名称
+ * @apiSuccess {String}   focus.pic 图片
+
+ * @apiSuccess {Object[]} product 产品列表
+ * @apiSuccess {String}   product.id 产品id
+ * @apiSuccess {String}   product.name 名称
+ * @apiSuccess {String}   product.info 介绍
+ * @apiSuccess {String}   product.content 内容
+ * @apiSuccess {Object[]}   product.price 规格
+ * @apiSuccess {String}   product.price.price 原价
+ * @apiSuccess {String}   product.price.zhe_price 折扣价(特价)
+ * @apiSuccess {String}   product.price.type 获取方式 1为购买,2为兑换,同时出现1,2,两个按钮同时出现
+ * @apiSuccess {String}   product.price.cash 购买金额,当type=1时有效
+ * @apiSuccess {String}   product.price.code 兑换码数量,当type=2时有效
+ */

+ 143 - 0
journal/database/code.php

@@ -0,0 +1,143 @@
+<?php
+
+# 定义几个常用的选项
+$type = array
+(
+	1 => '未领取',
+	2 => '已领取',
+	3 => '已使用',
+);
+
+$product = function()
+{
+	return Dever::db('journal/info')->state();
+};
+
+$product_price = function()
+{
+	return Dever::db('journal/info_price')->state();
+};
+
+return array
+(
+	# 表名
+	'name' => 'info',
+	# 显示给用户看的名称
+	'lang' => '兑换码列表',
+	'order' => 10,
+	# 数据结构
+	'struct' => array
+	(
+	
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> true,
+		),
+
+		'product_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '小刊',
+			'default' 	=> '',
+			'desc' 		=> '小刊',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $product,
+			'search'	=> 'select',
+			'list'		=> true,
+		),
+
+		'product_price_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '小刊价格',
+			'default' 	=> '',
+			'desc' 		=> '小刊价格',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			//'option'	=> $product_price,
+			'search'	=> 'select',
+			//'list'		=> true,
+		),
+
+		'code'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '兑换码',
+			'default' 	=> '',
+			'desc' 		=> '兑换码',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'type'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '使用状态',
+			'default' 	=> '1',
+			'desc' 		=> '使用状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $type,
+			'search'	=> 'select',
+			'update'	=> 'select',
+			'list'		=> true,
+		),
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户信息',
+			'default' 	=> '0',
+			'desc' 		=> '用户信息',
+			'match' 	=> 'is_numeric',
+			//'list'		=> 'Dever::load("code/lib/manage.showUserInfo", "{uid}", "{ldate}")',
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'ldate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '领取时间',
+			'match' 	=> 'option',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'search'	=> 'date',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '生成时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			//'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'excel'	=> true,
+		'delete' => false,
+		'edit' => false,
+		'insert' => false,
+	),
+);

+ 351 - 0
journal/database/info.php

@@ -0,0 +1,351 @@
+<?php
+$page = 15;
+return array
+(
+	# 表名
+	'name' => 'info',
+	# 显示给用户看的名称
+	'lang' => '小刊管理',
+	'order' => 100,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+  		'pic_list_cover'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '列表封面图-4:3比例的图片',
+			'default' 	=> '',
+			'desc' 		=> '列表封面图',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+
+		'pic_cover'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '封面图-1:1比例的图片',
+			'default' 	=> '',
+			'desc' 		=> '封面图',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+
+		'num_add_ding'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '手动增加订阅数',
+			'default' 	=> '0',
+			'desc' 		=> '手动增加阅读数',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
+
+		'num_ding'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '订阅数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写订阅数',
+			'match' 	=> 'option',
+			'search'	=> 'order',
+			//'list'		=> '{num_view}+{num_add_view}',
+		),
+
+		'num_add_view'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '手动增加阅读数',
+			'default' 	=> '0',
+			'desc' 		=> '手动增加阅读数',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
+
+		'num_view'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '阅读数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写阅读数',
+			'match' 	=> 'option',
+			'search'	=> 'order',
+			//'list'		=> '{num_view}+{num_add_view}',
+		),
+		
+		'num_up'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '喜欢数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写喜欢数',
+			'match' 	=> 'option',
+			//'search'	=> 'order',
+			'list'		=> '"订阅数:{num_add_ding}+{num_ding}<br />喜欢数:{num_up}<br />阅读数:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
+			'list_name'	=> '统计数字',
+		),
+
+		'num_comment'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '评论数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写评论数',
+			'search'	=> 'order',
+			'match' 	=> 'option',
+			//'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'admin_founder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '创建人',
+			'default' 	=> '1',
+			'desc' 		=> '创建人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'admin_editor'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '操作人',
+			'default' 	=> '1',
+			'desc' 		=> '操作人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'pdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '发布时间',
+			'match' 	=> 'is_numeric',
+			'desc' 		=> '',
+			'update'	=> 'date',
+			'callback'	=> 'maketime',
+			'list'		=> 'date("Y-m-d H:i:s", {pdate})',
+		),
+
+		'udate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '更新时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+
+	# 索引
+	'index' => array
+	(
+		'version' => 1,
+		
+		1 => array
+		(
+			'i1' => 'uid,cate_id',
+		)
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+		//'insert' => false,
+		# 列表
+		/*
+		'list_button' => array
+		(
+			'list' => array('评论列表', '"comment&search_option_data_id={id}&oper_parent=article"'),
+		),
+		*/
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		'getAll' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'cate_ids' => array('yes-cate_id', 'in'),
+				'id' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取默认主题,按照置顶和时间排序的
+		'default' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取最新主题
+		'new' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'name' => array('yes', 'like'),
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+		
+		# 获取热门主题
+		'hot' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('num_view`+`num_add_view' => 'desc', 'id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取冷门主题
+		'cold' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('num_view`+`num_add_view' => 'asc', 'id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+
+		
+		# 更新浏览量
+		'addView' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_view' => array('1', '+='),
+			),
+		),
+		
+		# 更新回复数
+		'addComment' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_comment' => array('1', '+='),
+			),
+		),
+		
+		# 更新点赞数
+		'addUp' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_up' => array('1', '+='),
+			),
+		),
+		
+		# 更新点赞数
+		'desUp' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_up' => array('1', '-='),
+			),
+		),
+	),
+);

+ 8 - 0
journal/index.php

@@ -0,0 +1,8 @@
+<?php
+
+define('DEVER_APP_NAME', 'journal');
+define('DEVER_APP_LANG', '小刊');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', 190);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-cellphone-fine');
+include(DEVER_APP_PATH . '../boot.php');

+ 87 - 0
journal/lib/Manage.php

@@ -0,0 +1,87 @@
+<?php
+
+namespace Code\Lib;
+
+use Dever;
+
+class Manage
+{
+	/**
+	 * 显示用户信息
+	 *
+	 * @return mixed
+	 */
+	public function showUserInfo($uid, $ldate = false)
+	{
+		if ($uid) {
+			$user = Dever::db('passport/user')->one($uid);
+			if ($user) {
+				$table = array();
+				$table['用户名'] = $user['username'];
+				$table['手机号'] = $user['mobile'];
+				$table['领取时间'] = date('Y-m-d H:i:s', $ldate);
+				return Dever::table($table);
+			}
+		} else {
+			return '';
+		}
+	}
+
+    /**
+	 * 创建兑换码
+	 *
+	 * @return mixed
+	 */
+	public function create($id, $name, $data)
+	{
+		$code = Dever::param('code', $data);
+		$type = Dever::param('type', $data);
+		$product_id = Dever::param('product_id', $data);
+		$product_id = $id;
+		if (!in_array(2, $type)) {
+			return;
+		}
+
+		$total = Dever::db('code/info')->total(array('product_id' => $product_id,'product_price_id' => $id, 'type' => 1));
+		if ($code > 0 && $code > $total) {
+			$num = $code - $total;
+
+			for ($i = 0; $i < $num; $i++) {
+				$this->createCode($product_id, $id);
+			}
+		}
+	}
+
+	private function createCode($product_id, $id)
+	{
+		$code = Dever::rand(8, 0);
+		$data['product_id'] = $product_id;
+		$data['product_price_id'] = $id;
+		$data['code'] = $code;
+		$total = Dever::db('code/info')->total($data);
+		if ($total > 0) {
+			return $this->createCode($product_id, $id);
+		}
+		$data['type'] = 1;
+		Dever::db('code/info')->insert($data);
+		return $code;
+	}
+
+	/**
+	 * 资料审核
+	 *
+	 * @return mixed
+	 */
+	public function info_audit($id, $name, $data)
+	{
+		$info = Dever::db('task/user_info')->one($id);
+		$status = Dever::param('status', $data);
+		$desc = Dever::param('status_desc', $data);
+		if ($info && $status == 3) {
+			$uid = $info['uid'];
+			$name = '用户认证未通过';
+			$content = '原因:' . $desc;
+			Dever::load('message/lib/data.push', -1, $uid, $name, $content, 11);
+		}
+	}
+}

+ 102 - 0
main/database/config.php

@@ -0,0 +1,102 @@
+<?php
+
+$code = array
+(
+	1 => '用户ID',
+	2 => '随机数字',
+	3 => '随机数字+字母',
+);
+
+return array
+(
+	# 表名
+	'name' => 'config',
+	# 显示给用户看的名称
+	'lang' => '基本配置',
+	'order' => 1,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '系统ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'hr1'		=> array
+		(
+			'name' 		=> '通用设置',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+		),
+		
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '系统名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入系统名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+		
+		'info'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '系统介绍',
+			'default' 	=> '',
+			'desc' 		=> '请输入系统介绍',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+  		'hr2'		=> array
+		(
+			'name' 		=> '精选页设置',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+			//'right'		=> true,
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+
+	'default' => array
+	(
+		'col' => 'name,info,cdate',
+		'value' => array
+		(
+			'"精美时尚内容平台","精美时尚内容平台",' . time(),
+		),
+	),
+
+	/*
+	'alter' => array
+	(
+		2 => array
+		(
+			array('update', 'task_id', 'task_id', 'varchar-800  软装任务链接'),
+			//array('add', 'config', 'config', 'int-11 1 配置'),
+		),
+		'version' => 2,
+	),
+	*/
+
+	'manage' => array
+	(
+		# 后台管理不要列表页
+		'list' => 'update',
+	),
+);

+ 136 - 0
main/database/focus.php

@@ -0,0 +1,136 @@
+<?php
+
+$type = array
+(
+	1 => '链接',
+	2 => '文章',
+	3 => '视频',
+	4 => '直播',
+	5 => '杂志',
+);
+
+return array
+(
+	# 表名
+	'name' => 'focus',
+	# 显示给用户看的名称
+	'lang' => '焦点图管理',
+	# 后台菜单排序
+	'order' => 9,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+			/*
+			'key'		=> 1,
+			'media'		=> 5,
+			*/
+		),
+
+		'type'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '类型',
+			'default' 	=> '1',
+			'desc' 		=> '请选择类型',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $type,
+		),
+
+		'link'		=> array
+		(
+			'type' 		=> 'varchar-400',
+			'name' 		=> '链接或者内容id',
+			'default' 	=> '',
+			'desc' 		=> '请输入链接',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+			//'searchbox' => array('ku/lib/manage.search_product?json=1', 'id', 'ku/lib/manage.search_product_by_ids', 'type'),
+		),
+
+		'pic'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '图片-图片大小:000px*000px',
+			'default' 	=> '',
+			'desc' 		=> '请选择图片',
+			'match' 	=> 'is_string',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+		
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'request' => array
+	(
+		'getAll' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
+			'col' => '*',
+		),
+	),
+);

+ 8 - 0
main/index.php

@@ -0,0 +1,8 @@
+<?php
+
+define('DEVER_APP_NAME', 'main');
+define('DEVER_APP_LANG', '基础设置');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', 98);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-component');
+include(DEVER_APP_PATH . '../boot.php');

+ 10 - 0
manage/config/base.php

@@ -0,0 +1,10 @@
+<?php
+
+# 模板配置
+$config['template'] = array
+(
+	# 使用的模板 注意:定义这个之后,将会强制将本项目模板变成这个
+	'assets' => 'layadmin',
+);
+
+return $config;

+ 7 - 0
manage/daemon/loop.php

@@ -0,0 +1,7 @@
+<?php
+
+define('DEVER_DAEMON', true);
+
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../index.php');
+
+Dever::load('manage/project.loop');

+ 7 - 0
manage/daemon/main.php

@@ -0,0 +1,7 @@
+<?php
+
+define('DEVER_DAEMON', true);
+
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../index.php');
+
+Dever::load('manage/project.cron');

+ 4 - 0
manage/index.php

@@ -0,0 +1,4 @@
+<?php 
+define('DEVER_PACKAGE', 'manage');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../boot.php');

+ 3 - 0
package.json

@@ -0,0 +1,3 @@
+{
+	"rely": "manage,pay,passport,excel"
+}

+ 4 - 0
passport/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'passport');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../boot.php');

+ 4 - 0
poster/index.php

@@ -0,0 +1,4 @@
+<?php
+define('DEVER_PACKAGE',  'poster');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../boot.php');

+ 4 - 0
upload/index.php

@@ -0,0 +1,4 @@
+<?php 
+define('DEVER_PACKAGE', 'upload');
+define('DEVER_APP_SETUP', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+include(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../boot.php');

+ 384 - 0
video/database/live.php

@@ -0,0 +1,384 @@
+<?php
+
+$page = 15;
+$share = function()
+{
+	$array = array();
+	$info = Dever::db('poster/template')->state();
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+return array
+(
+	# 表名
+	'name' => 'live',
+	# 显示给用户看的名称
+	'lang' => '直播视频管理',
+	'order' => 99,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+  		'pic_cover'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '封面图-4:3比例的图片',
+			'default' 	=> '',
+			'desc' 		=> '封面图',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+
+		'link'		=> array
+		(
+			'type' 		=> 'varchar-800',
+			'name' 		=> '直播推流地址',
+			'default' 	=> '',
+			'desc' 		=> '直播推流地址',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'num_add_user'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '手动增加在线人数',
+			'default' 	=> '0',
+			'desc' 		=> '手动增加在线人数',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
+
+		'num_user'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '在线人数',
+			'default' 	=> '0',
+			'desc' 		=> '在线人数',
+			'match' 	=> 'option',
+			'search'	=> 'order',
+		),
+
+		'num_add_view'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '手动增加浏览量pv数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写手动增加浏览量pv',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
+
+		'num_view'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '浏览量pv',
+			'default' 	=> '0',
+			'desc' 		=> '请填写浏览量pv',
+			'match' 	=> 'option',
+			'search'	=> 'order',
+			//'list'		=> '{num_view}+{num_add_view}',
+		),
+		
+		'num_up'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '喜欢数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写喜欢数',
+			'match' 	=> 'option',
+			//'search'	=> 'order',
+			'list'		=> '"在线人数:{num_user}+{num_add_user}<br />喜欢数:{num_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
+			'list_name'	=> '统计数字',
+		),
+
+		'num_comment'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '评论数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写评论数',
+			'search'	=> 'order',
+			'match' 	=> 'option',
+			//'list'		=> true,
+		),
+
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容介绍',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			'key' 		=> 1,
+			'media'		=> 5,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'admin_founder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '创建人',
+			'default' 	=> '1',
+			'desc' 		=> '创建人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'admin_editor'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '操作人',
+			'default' 	=> '1',
+			'desc' 		=> '操作人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'sdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '开始时间',
+			'match' 	=> 'is_numeric',
+			'desc' 		=> '',
+			'update'	=> 'date',
+			'callback'	=> 'maketime',
+			'list'		=> 'date("Y-m-d H:i:s", {sdate})',
+		),
+
+		'pdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '发布时间',
+			'match' 	=> 'is_numeric',
+			'desc' 		=> '',
+			'update'	=> 'date',
+			'callback'	=> 'maketime',
+			'list'		=> 'date("Y-m-d H:i:s", {pdate})',
+		),
+
+		'share'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '分享海报-选择海报库中的海报',
+			'default' 	=> '',
+			'desc' 		=> '分享海报',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $share,
+		),
+
+		'udate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '更新时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+
+	# 索引
+	'index' => array
+	(
+		'version' => 1,
+		
+		1 => array
+		(
+			'i1' => 'uid,cate_id',
+		)
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+		//'insert' => false,
+		# 列表
+		/*
+		'list_button' => array
+		(
+			'list' => array('评论列表', '"comment&search_option_data_id={id}&oper_parent=article"'),
+		),
+		*/
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		'getAll' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'cate_ids' => array('yes-cate_id', 'in'),
+				'id' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取默认主题,按照置顶和时间排序的
+		'default' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取最新主题
+		'new' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'name' => array('yes', 'like'),
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+		
+		# 获取热门主题
+		'hot' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('num_view`+`num_add_view' => 'desc', 'id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取冷门主题
+		'cold' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('num_view`+`num_add_view' => 'asc', 'id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+
+		
+		# 更新浏览量
+		'addView' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_view' => array('1', '+='),
+			),
+		),
+		
+		# 更新回复数
+		'addComment' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_comment' => array('1', '+='),
+			),
+		),
+		
+		# 更新点赞数
+		'addUp' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_up' => array('1', '+='),
+			),
+		),
+		
+		# 更新点赞数
+		'desUp' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_up' => array('1', '-='),
+			),
+		),
+	),
+);

+ 410 - 0
video/database/vod.php

@@ -0,0 +1,410 @@
+<?php
+$page = 15;
+$cate = function()
+{
+	$array = array();
+	$info = Dever::db('content/cate')->state();
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+$author = function()
+{
+	$array = array();
+	$info = Dever::db('content/author')->state();
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+$share = function()
+{
+	$array = array();
+	$info = Dever::db('poster/template')->state();
+	if($info)
+	{
+		$array += $info;
+	}
+	return $array;
+};
+
+return array
+(
+	# 表名
+	'name' => 'vod',
+	# 显示给用户看的名称
+	'lang' => '点播视频管理',
+	'order' => 100,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'link'		=> array
+		(
+			'type' 		=> 'varchar-800',
+			'name' 		=> '点播地址',
+			'default' 	=> '',
+			'desc' 		=> '点播地址',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'video'		=> array
+		(
+			'type' 		=> 'varchar-800',
+			'name' 		=> '上传点播视频',
+			'default' 	=> '',
+			'desc' 		=> '上传点播视频',
+			'match' 	=> 'option',
+			'update'	=> 'upload',
+			'key' 		=> '5',
+			'place'		=> '150',
+		),
+		
+		'cate_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '所属栏目',
+			'default' 	=> '1',
+			'desc' 		=> '所属栏目',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $cate,
+			'search'	=> 'select',
+		),
+
+		'author_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '作者',
+			'default' 	=> '1',
+			'desc' 		=> '作者',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $author,
+			'search'	=> 'select',
+		),
+
+  		'pic_cover'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '封面图-4:3比例的图片',
+			'default' 	=> '',
+			'desc' 		=> '封面图',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+
+		'num_add_view'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '手动增加浏览量pv数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写手动增加浏览量pv',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+		),
+
+		'num_view'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '浏览量pv',
+			'default' 	=> '0',
+			'desc' 		=> '请填写浏览量pv',
+			'match' 	=> 'option',
+			'search'	=> 'order',
+			//'list'		=> '{num_view}+{num_add_view}',
+		),
+		
+		'num_up'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '喜欢数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写喜欢数',
+			'match' 	=> 'option',
+			//'search'	=> 'order',
+			'list'		=> '"喜欢数:{num_up}<br />浏览量:{num_view}+{num_add_view}<br />评论数:{num_comment}<br />"',
+			'list_name'	=> '统计数字',
+		),
+
+		'num_comment'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '评论数',
+			'default' 	=> '0',
+			'desc' 		=> '请填写评论数',
+			'search'	=> 'order',
+			'match' 	=> 'option',
+			//'list'		=> true,
+		),
+
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			'key' 		=> 1,
+			'media'		=> 5,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'admin_founder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '创建人',
+			'default' 	=> '1',
+			'desc' 		=> '创建人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'admin_editor'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '操作人',
+			'default' 	=> '1',
+			'desc' 		=> '操作人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'pdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '发布时间',
+			'match' 	=> 'is_numeric',
+			'desc' 		=> '',
+			'update'	=> 'date',
+			'callback'	=> 'maketime',
+			'list'		=> 'date("Y-m-d H:i:s", {pdate})',
+		),
+
+		'share'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '分享海报-选择海报库中的海报',
+			'default' 	=> '',
+			'desc' 		=> '分享海报',
+			'match' 	=> 'option',
+			'update'	=> 'checkbox',
+			'option'	=> $share,
+		),
+
+		'udate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '更新时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+
+	# 索引
+	'index' => array
+	(
+		'version' => 1,
+		
+		1 => array
+		(
+			'i1' => 'uid,cate_id',
+		)
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+		//'insert' => false,
+		# 列表
+		/*
+		'list_button' => array
+		(
+			'list' => array('评论列表', '"comment&search_option_data_id={id}&oper_parent=article"'),
+		),
+		*/
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		'getAll' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'cate_ids' => array('yes-cate_id', 'in'),
+				'id' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取默认主题,按照置顶和时间排序的
+		'default' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取最新主题
+		'new' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'name' => array('yes', 'like'),
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+		
+		# 获取热门主题
+		'hot' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('num_view`+`num_add_view' => 'desc', 'id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+		# 获取冷门主题
+		'cold' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'cate_id' => 'yes',
+				'uid' => 'yes',
+			),
+			'type' => 'all',
+			'order' => array('num_view`+`num_add_view' => 'asc', 'id' => 'desc'),
+			'page' => array($page, 'list'),
+			'col' => '*',
+		),
+
+
+		
+		# 更新浏览量
+		'addView' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_view' => array('1', '+='),
+			),
+		),
+		
+		# 更新回复数
+		'addComment' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_comment' => array('1', '+='),
+			),
+		),
+		
+		# 更新点赞数
+		'addUp' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_up' => array('1', '+='),
+			),
+		),
+		
+		# 更新点赞数
+		'desUp' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_up' => array('1', '-='),
+			),
+		),
+	),
+);

+ 8 - 0
video/index.php

@@ -0,0 +1,8 @@
+<?php
+
+define('DEVER_APP_NAME', 'video');
+define('DEVER_APP_LANG', '视频管理');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', 195);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-video');
+include(DEVER_APP_PATH . '../boot.php');