rabin 4 years ago
parent
commit
e0ae7f394e

+ 1 - 1
boot.php

@@ -1,5 +1,5 @@
 <?php 
-define('DEVER_PROJECT', 'mars');
+define('DEVER_PROJECT', 'info');
 define('DEVER_PROJECT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
 if (defined('DEVER_PACKAGE')) {
 	include('dever_package/'.DEVER_PACKAGE.'/index.php');

+ 9 - 132
config/base.php

@@ -1,72 +1,10 @@
 <?php
 $config['base'] = array
 (
-	'name' => '火星计划电子刊平台',
+	'name' => '信息宝',
 	'version' => '1.0.0 Beta',
 
-	# 路由结束时要执行的方法
-	'route' => array
-	(
-		'end' => array
-		(
-			'main/view.article' => 'main/lib/view.end',
-			'main/view.vod' => 'main/lib/view.end',
-			'main/view.live' => 'main/lib/view.end',
-			'main/view.feature' => 'main/lib/view.end',
-			'main/journal_v1.read' => 'main/lib/journal.end',
-		),
-	),
-  
-  
-	'replace' => array('https://pili-live-hls.jstyle.cn/' =>'http://pili-live-hls.jstyle.cn/'),
-
-	# 后台头部菜单
-	'top' => 'passport/system_id',
-
-	# 功能选择
-	'function' => array
-	(
-		1 => '浏览量',
-		2 => '评论',
-		3 => '喜欢',
-		//4 => '邀请阅读',
-	),
-
-	# 小程序首页
-	'applet_index' => 'pages/choice/index/index',
-
-	# 功能类型 5小刊留言视频 6小刊留言音频
-	'type' => array
-	(
-		1 => '图文',
-		2 => '视频',
-		3 => '直播',
-		4 => '小刊',
-		//5 => '小刊音视频留言',
-		6 => '专题',
-		7 => '小程序',
-		//8 => '商品',
-		//11 => '评论',
-		//12 => '直播评论',
-		13 => '小刊活动页',
-	),
-
-	# 功能类型
-	'type_table' => array
-	(
-		1 => 'content/article',
-		2 => 'video/vod',
-		3 => 'video/live',
-		4 => 'journal/info',
-		5 => 'journal/content',
-		6 => 'feature/info',
-		7 => 'content/applet',
-		//8 => 'shop/product',
-		11 => 'act/comment',
-		12 => 'act/live_comment',
-		13 => 'journal/active',
-	),
-
+	# 审核配置
 	'audit' => array
 	(
 		1 => '未审核',
@@ -74,85 +12,24 @@ $config['base'] = array
 		3 => '审核未通过',
 	),
 
-	# 上线状态
+	# 需求状态
 	'status' => array
 	(
-		1 => '下架',
-		2 => '上线发布',
+		1 => '新发布',
+		2 => '已结束',
+		3 => '已成交',
+		4 => '已取消',
 	),
 
-	# 产品表设置 主要给survey使用
-	'product' => 'service/product',
-
+	# 小程序配置
 	'applet' => array
 	(
 		'project' => 'passport/system',
-		'appid' => 'wxd0590664d0004f23',
-        'secret' => '009bf48ffd5a3ceecb6a933492d641d2',
 		'url' => 'https://api.weixin.qq.com/sns/jscode2session',
 	),
 
-	# 站点使用邮箱还是手机作为主账号,如果是手机,请填写手机验证码的配置接口
+	# 站点使用邮箱还是手机作为主账号
 	'account' => 'mobile',
-	# 性别转换 passport里1为男、2为女 3为未知,如果前端定义与这个不同,请做好转换
-	'sex' => array
-	(
-		# 前面的索引为前端传过来的值
-		2 => 2,
-		1 => 1,
-		3 => 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',
-
-	'passport_list_button' => array
-	(
-		'list1' => array('订单', '"order&project=act&search_option_uid={id}&oper_parent=user&oper_project=passport"'),
-		'list2' => array('兑换码', '"info&project=code&search_option_create_uid={id}&oper_parent=user&oper_project=passport"'),
-		'list3' => array('积分', '"user&project=score&search_option_uid={id}&oper_parent=user&oper_project=passport"'),
-	),
-
-	# 支付成功后,调用的接口
-	'pay_notify' => 'service/lib/pay.act',
 );
 
 

+ 13 - 157
config/env/localhost/default.php

@@ -16,11 +16,13 @@ if (isset($dc['data'])) {
     $config['base']['data'] = $dc['data'];
 }
 
+# 自动建表
 $create = false;
 if (isset($dc['mysql']['create'])) {
     $create = $dc['mysql']['create'];
 }
-//$create = true;
+# 自动建表并删除旧表
+$create = -1;
 $ip = isset($dc['host']) ? $dc['host'] : '192.168.33.10';
 
 $local = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $ip;
@@ -39,75 +41,13 @@ $config['database'] = array
 			'update' => isset($dc['mysql']) ? $dc['mysql']['host'] : 'web-mysql:3306',
             'create' => isset($dc['mysql']) ? $dc['mysql']['host_create'] : 'web-mysql:3306',
 		),
-		'database' => 'mars',
+		'database' => 'info',
 		'username' => isset($dc['mysql']) ? $dc['mysql']['username'] : 'root',
 		'password' => isset($dc['mysql']) ? $dc['mysql']['password'] : '123456',
 		'charset' => 'utf8mb4',
 	),
-
-    'session' => array
-    (
-        'type' => 'redis',
-        'host' => isset($dc['redis']) ? $dc['redis'][0]['host'] : 'server-redis',
-        'port' => isset($dc['redis']) ? $dc['redis'][0]['port'] : '6379',
-        'password' => isset($dc['redis']) ? $dc['redis'][0]['password'] : 'dm_redis_123',
-    ),
-
-    'session1' => array
-    (
-        'type' => 'memcache',
-        'host' => isset($dc['memcache']) ? $dc['memcache'][0]['host'] : 'server-memcached',
-        'port' => isset($dc['memcache']) ? $dc['memcache'][0]['port'] : '11211',
-        'password' => isset($dc['memcache']) ? $dc['memcache'][0]['password'] : '',
-    )
 );
 
-/*
-$dc['mysql_user'] = array
-(
-    'host' => array
-    (
-        'read' => 'web-mysql:3306',
-        'update' => 'web-mysql:3306',
-    ),
-    'database' => 'wonderful',
-    'username' => 'root',
-    'password' => '123456',
-);
-*/
-
-
-# 设置哪些项目需要切换到弹性数据库
-if (isset($dc['mysql_user'])) {
-    $dc['mysql_user']['charset'] = 'utf8';
-    $dc['mysql_user']['database'] = 'wonderful_act';
-    $dc['mysql_user']['type'] = 'pdo';
-    $config['database']['code'] = $dc['mysql_user'];
-    $config['database']['act'] = $dc['mysql_user'];
-    $config['database']['passport'] = $dc['mysql_user'];
-    $config['database']['pay'] = $dc['mysql_user'];
-    $config['database']['score'] = $dc['mysql_user'];
-    $config['database']['message'] = $dc['mysql_user'];
-    $config['database']['oauth'] = $dc['mysql_user'];
-    $config['database']['wechat'] = $dc['mysql_user'];
-}
-
-if (DEVER_APP_NAME == 'tests' && isset($dc['mysql_test'])) {
-    # 测试
-    $dc['mysql_test']['charset'] = 'utf8';
-    $dc['mysql_test']['database'] = 'wonderful_test';
-    $dc['mysql_test']['type'] = 'pdo';
-    $config['database']['default'] = $dc['mysql_test'];
-    $config['database']['code'] = $dc['mysql_test'];
-    $config['database']['act'] = $dc['mysql_test'];
-    $config['database']['passport'] = $dc['mysql_test'];
-    $config['database']['pay'] = $dc['mysql_test'];
-    $config['database']['score'] = $dc['mysql_test'];
-    $config['database']['message'] = $dc['mysql_test'];
-    $config['database']['oauth'] = $dc['mysql_test'];
-    $config['database']['wechat'] = $dc['mysql_test'];
-}
-
 # 缓存配置
 $config['cache'] = array
 (
@@ -127,76 +67,13 @@ $config['cache'] = array
     # 缓存精细控制,根据uri来控制,0则无需缓存
     'routeKey' => array
     (
-        'journal.buy_action' => 0,
-        'journal.code' => 0,
-        'passport' => 0,
-        'oauth' => 0,
-        'cron' => 0,
-        //'act' => 0,
-        'combine' => 0,
-        'service_' => 0,
-        'vip_' => 0,
-        'order.' => 0,
-        'pay.' => 0,
-        'buy_home' => 0,
-        'buy_my_code' => 0,
-        'buy_codedetail' => 0,
-        'buy.pay' => 0,
-        'journal_v1.top' => 600,
-        'journal_v1.subscribe' => 0,
-        'journal_v1.getView' => 0,
-        //'journal_v1.getList' => 0,
-        'journal_v1.view' => 0,
-        'tests_api.user' => 0,
-        'tests_api.buy' => 0,
-        'stat_' => 0,
-        'buy_' => 0,
-        'order_' => 0,
-        'pay_' => 0,
+        
     ),
 
     # 哪些路由中的参数不参与生成缓存的key
     'routeNoParam' => array
     (
-        'signature' => array
-        (
-            'content.home',
-            'content.news',
-            'content.up',
-            'content.ad',
-            'journal.home',
-            'journal.getList',
-            'journal_v1.home',
-            'journal_v1.getList',
-            'journal_v1.top',
-            'journal_v1.buy',
-            'journal_v1.read',
-            'journal_v1.getAppList',
-            'journal_v1.getView',
-            'journal_v1.getAppView',
-            'buy_list',
-            'buy_pay',
-        ),
-
-        'uid' => array
-        (
-            'content.home',
-            'content.news',
-            'content.up',
-            'content.ad',
-            'journal.home',
-            'journal.getList',
-            'journal_v1.home',
-            'journal_v1.getList',
-            'journal_v1.top',
-            'journal_v1.buy',
-            'journal_v1.read',
-            'journal_v1.getAppList',
-            'journal_v1.getView',
-            'journal_v1.getAppView',
-            'buy_list',
-            'buy_pay',
-        ),
+        
     ),
     
     # 缓存清理的参数名,请通过shell=clearcache执行
@@ -211,6 +88,7 @@ $config['cache'] = array
     # 缓存保存方式,支持多个数据源、多台缓存服务器
     'store' => array
     (
+        /*
         array
         (
             'host' => 'server-redis',
@@ -218,32 +96,21 @@ $config['cache'] = array
             'weight' => 100,
             'password' => 'dm_redis_123',
         ),
+        */
     ),
 );
 
-if (isset($dc['redis']) && $config['cache']['type'] == 'redis') { 
-    $config['cache']['store'] = $dc['redis'];
-}
-if (isset($dc['memcache'])  && $config['cache']['type'] == 'memcache') {
-    $config['cache']['store'] = $dc['memcache'];
-}
 
 $config['debug'] = array
 (
-	'log' => false
+	'log' => array('type' => 'file')
 );
 
-/*
-if (DEVER_APP_NAME == 'source') {
-    $config['debug']['log'] = array('type' => 'file'); 
-}
-*/
-
 
 $host = 'http://'.$local . '/';
 
-$upload = $host . 'upload/';
-$uploadcdn = $host . 'upload/data/';
+$upload = $host . 'info/package/';
+$uploadcdn = $host . 'info/data/';
 
 $config['host'] = array
 (
@@ -251,22 +118,11 @@ $config['host'] = array
     'uploadRes'     => isset($dc['res']) && $dc['res'] ? $dc['res'] : $uploadcdn . 'upload/',
     'project' => array
     (
-        'upload' => array
+        # 自定义资源库,这里不用定义了
+        'uploads' => array
         (
             'path' => $host. 'upload/upload/?',
         ),
-        'pays' => array
-        (
-            'path' => $host. 'pay/pay/?',
-        ),
-        'wechat_applet' => array
-        (
-            'path' => $host. 'wechat/wechat_applet/?',
-        ),
-        'jingpin' => array
-        (
-            'path' => 'http://192.168.33.10/jingpin/content/?'
-        ),
     ),
 );
 

+ 323 - 0
data/compile/info/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/info/manage/layadmin/inc/head.cmp.php' ?>
+</head>
+<body>
+  
+  <div class="layui-fluid">
+    <div class="layui-row layui-col-space15">
+    <blockquote class="layui-elem-quote layui-quote-nm" id="content">欢迎光临本系统,控制台功能迭代优化中</blockquote>
+    </div>
+    <div class="layui-row layui-col-space15" style="display:none;">
+      <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 isset($v['name']) ? $v['name'] : "" ?>" style="background-color: #FF5722!important;"><?php echo isset($v['name']) ? $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/info/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>

+ 62 - 0
data/compile/info/manage/layadmin/home.cmp.php

@@ -0,0 +1,62 @@
+<?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/info/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/info/manage/layadmin/inc/nav.cmp.php' ?>
+
+      <?php require Dever::config("base")->data . 'compile/info/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/info/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>

+ 27 - 0
data/compile/info/manage/layadmin/inc/head.cmp.php

@@ -0,0 +1,27 @@
+<?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?v3" 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?v1" />
+<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/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/info/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 isset($v['name']) ? $v['name'] : "" ?>" lay-direction="2" data-target=".<?php echo isset($v['key']) ? $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 isset($v['name']) ? $v['name'] : "" ?></cite>
+              </a>
+              <dl class="layui-nav-child" id="<?php echo isset($v['key']) ? $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 isset($v1['link']) ? $v1['link'] : "" ?>"><?php echo isset($v1['name']) ? $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>

+ 86 - 0
data/compile/info/manage/layadmin/inc/nav.cmp.php

@@ -0,0 +1,86 @@
+<?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') ?>
+<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" lay-unselect>
+    <a href="javascript:;" layadmin-event="back" title="上一页">
+      <i class="layui-icon layui-icon-return"></i>
+    </a>
+  </li>
+  <li class="layui-nav-item layui-hide-xs" id="front-url" lay-unselect style="<?php echo $data['manage/auth.config']['front_display'] ?>">
+    <a href="<?php echo $data['manage/auth.config']['front_url'] ?>" target="_blank" title="<?php echo $data['manage/auth.config']['front_name'] ?>">
+      <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">
+
+  <li class="layui-nav-item auth-top" lay-unselect style="display:none;">
+    <a href="javascript:;">
+      <cite><span></span></cite>
+    </a>
+    <ul class="layui-nav-child">
+      <li><a lay-href="set/user/info.html">基本资料</a></li>
+    </ul>
+  </li>
+
+  <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 style="text-align: center;"><a id="logout-url" href="<?php echo $data['manage/menu.link']['logout'] ?>">退出</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>

+ 49 - 0
data/compile/info/manage/layadmin/inc/script.cmp.php

@@ -0,0 +1,49 @@
+<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/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/valid/jquery.validationEngine.min.js?v3"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/kindeditor/kindeditor-all-min.js?v9"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/kindeditor/lang/zh-CN.js?v7"></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/qiniu/upload/plupload.full.min.js"></script>
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/qiniu/qiniu.upload.js"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/tool/md5.js"></script>
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/layui/upload.js?v6"></script>
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/layui/layui.js"></script>
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/clipboard/clipboard.js"></script>
+
+
+<script type="text/javascript" src="<?php echo Dever::config("host")->script ?>lib/manage/main.js?v30"></script>

+ 146 - 0
data/compile/info/manage/layadmin/project/database/list.cmp.php

@@ -0,0 +1,146 @@
+<?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.page_list_table']=Dever::load('manage/database.page_list_table') ?>
+<?php $data['manage/database.list_search']=Dever::load('manage/database.list_search') ?>
+<?php $data['manage/database.list_thead']=Dever::load('manage/database.list_thead') ?>
+<?php $data['manage/database.list_tbody']=Dever::load('manage/database.list_tbody') ?>
+<?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') ?>
+<?php $data['manage/top.get']=Dever::load('manage/top.get') ?>
+<!DOCTYPE html>
+<!--power by dever--><html>
+<head>
+  <?php require Dever::config("base")->data . 'compile/info/manage/layadmin/inc/head.cmp.php' ?>
+  <link rel="stylesheet" href="<?php echo Dever::config("host")->script ?>lib/layui/admin/modules/plugin/formselects/formselects.css" media="all" />
+</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;
+}
+.layui-table-cell {
+    height: auto;
+}
+
+.table th,.table td {
+  min-width: 70px;
+}
+#table_2,#table_1 {
+  overflow: auto;
+}
+.layui-btn-xs
+{
+  margin-top:1px;
+}
+.dever-emoji img {
+  width:16px;
+}
+.layui-tab-title {
+  height: 100%;
+  white-space: inherit;
+}
+</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">
+      <input type="hidden" name="url1" id="url" value="<?php echo $data['manage/database.info']['mul'] ?>"/>
+
+      <form id="form1" name="form1" method="get" target="f1" action="<?php echo $data['manage/database.info']['list'] ?>">
+      <input type="hidden" name="l" id="l" value="<?php echo $data['manage/database.info']['l'] ?>"/>
+      <input type="hidden" name="project" id="project" value="<?php echo $data['manage/database.info']['project'] ?>"/>
+      <input type="hidden" name="table" id="tables" value="<?php echo $data['manage/database.info']['table'] ?>"/>
+      <input type="hidden" name="menu" id="menu" value="<?php echo $data['manage/database.info']['menu'] ?>"/>
+      <?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): ?><input type="hidden" name="menu_id" id="menu_id" value="<?php echo $data['manage/database.info']['menu_id'] ?>" style="display:none"/><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/top.get'] ?><?php endif; ?>
+      <input type="hidden" name="search_option_state" id="search_option_state" value="<?php echo $data['manage/database.info']['state'] ?>"/>
+
+      <input type="hidden" name="function" id="function" value="msg"/>
+      <input type="hidden" name="method" id="method" value="search"/>
+      <div id="search_param"><?php echo $data['manage/database.info']['search_param'] ?></div> 
+      <iframe id="f1" name="f1" style="display:none;"></iframe>
+      <div class="layui-card-header" style="display:none;"><span id="list-name"><?php echo isset($v['name']) ? $v['name'] : "" ?></span> > <span id="list-project"><?php echo $data['manage/database.info']['project_name'] ?></span></div>
+        <div class="layui-card-body" id="search_content" style="<?php if(!(Dever::load('manage/database.list_search'))): ?>display:none;<?php endif; ?>">
+
+          <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 layui-table-body" id="table">
+          <thead id="list-thead">
+              <tr><?php if(isset($data['manage/database.list_thead']) && is_array($data['manage/database.list_thead'])): ?><?php $t=count($data['manage/database.list_thead'])-1 ?><?php $i=0 ?><?php foreach($data['manage/database.list_thead'] as $k => $v): ?><?php echo $v ?><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/database.list_thead'] ?><?php endif; ?></tr>
+          </thead>
+          <tbody id="list-tbody"><?php if(isset($data['manage/database.list_tbody']) && is_array($data['manage/database.list_tbody'])): ?><?php $t=count($data['manage/database.list_tbody'])-1 ?><?php $i=0 ?><?php foreach($data['manage/database.list_tbody'] as $k => $v): ?><?php echo $v ?><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['manage/database.list_tbody'] ?><?php endif; ?></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/info/manage/layadmin/inc/script.cmp.php' ?>
+  <script ids="list-thead">
+    config.table = {};
+    config.table.cols = [];
+  </script>
+  <script ids="list-tbody">
+    config.table.data = [];
+  </script>
+  <script>
+  layui.config({
+    base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    formSelects: 'plugin/formselects/formselects',
+    index: 'lib/index' //主入口模块
+  }).use(['index', 'contlist', 'table', 'form', 'formSelects'], function(){
+    var table = layui.table;
+    var form = layui.form; 
+    var formSelects = layui.formSelects;
+
+    /*
+    table.render({
+      elem: '#table'
+      ,page: false
+      ,limit:20
+      ,cols: config.table.cols
+      ,data: config.table.data
+    });
+    */
+
+    init();
+  });
+  </script>
+</body>
+</html>

+ 110 - 0
data/compile/info/manage/layadmin/project/database/update.cmp.php

@@ -0,0 +1,110 @@
+<?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/info/manage/layadmin/inc/head.cmp.php' ?>
+<link rel="stylesheet" href="<?php echo Dever::config("host")->script ?>lib/layui/admin/modules/plugin/formselects/formselects.css" media="all" />
+  <style>
+    .layui-input,.xm-select-parent
+    {
+      width: 50%;
+    }
+
+    textarea{
+      padding-top: 5px;
+    }
+
+    .dever-color {
+      width: 100%;
+    }
+
+    .dever_form_add_child {
+      padding:15px;
+    }
+    .dever_form_delete {
+      float: right;
+      margin-right: 10px;
+      color: red;
+    }
+    .dever_score_child {
+      margin: 15px;
+    }
+    .layui-tab-title {
+      height: 100%;
+      white-space: inherit;
+    }
+    </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>
+    </form>
+  </div>
+</div>
+
+  
+  <?php require Dever::config("base")->data . 'compile/info/manage/layadmin/inc/script.cmp.php' ?>
+  <script id="update_script">
+  layui.config({
+    base: '<?php echo Dever::config("host")->script ?>lib/layui/admin/' //静态资源所在路径
+  }).extend({
+    index: 'lib/index', //主入口模块
+    formSelects: 'plugin/formselects/formselects'
+  }).use(['index', 'contlist', 'table', 'form', 'formSelects'], function(){
+    var table = layui.table;
+    var form = layui.form; 
+    var formSelects = layui.formSelects;
+
+    /*
+    $('select').each(function() {
+        if ($(this).attr('xm-value')) {
+          formSelects.value($(this).attr('xm-select'), $(this).attr('xm-value'));
+        }
+    });
+    */
+
+    init();
+  });
+  </script>
+</body>
+</html>

+ 82 - 0
data/compile/info/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;margin:5px;}
+  #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 isset($key) ? $key : "" ?>">
+  	<input type="hidden" class="file_pg" value="<?php echo isset($search_pg) ? $search_pg : "" ?>">
+  	<input type="hidden" class="file_cur" value="<?php echo isset($cur) ? $cur : "" ?>">
+  	<div class="layui-inline"><div class="layui-input-inline"><input type="text" style="width: 100%;" class="layui-input file_filename" value="<?php echo isset($search_name) ? $search_name : "" ?>" autocomplete="new-password" placeholder="<?php echo isset($name) ? $name : "" ?>"></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 isset($search_tag) ? $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 isset($v['id']) ? $v['id'] : "" ?>" <?php if($v['id'] == $search_cate): ?>selected<?php endif ?>><?php echo isset($v['name']) ? $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($v1['check']): ?>layui-anim-yes<?php else: ?>layui-anim-no<?php endif ?>">
+        <div class="layui-anim" data-anim="layui-anim-up" onclick="showUploadFilesSet($(this), '<?php echo isset($v1['name']) ? $v1['name'] : "" ?>','<?php echo isset($v1['url']) ? $v1['url'] : "" ?>','<?php echo isset($v1['id']) ? $v1['id'] : "" ?>')"><img src="<?php echo isset($v1['pic']) ? $v1['pic'] : "" ?>" style="max-width: 150px;max-height: 100px;margin-left: 10px;"/></div>
+        <div class="code"><?php echo isset($v1['source_name']) ? $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 isset($total) ? $total : "" ?> //数据总数,从服务端得到
+    ,limit:12
+    ,curr:<?php echo isset($search_pg) ? $search_pg : "" ?>
+    ,jump: function(obj, first){
+	    //首次不执行
+	    if(!first){
+	      $('.file_pg').val(obj.curr);
+	    	showUploadFilesSearch($('.file_pg'));
+	    }
+	  }
+  });
+});
+</script>
+
+</div>

+ 325 - 0
demand/database/info.php

@@ -0,0 +1,325 @@
+<?php
+
+$audit = Dever::config('base')->audit;
+
+$status = Dever::config('base')->status;
+
+$poster_pay_type = array
+(
+	1 => '未支付',
+	2 => '已支付',
+);
+
+$config = array
+(
+	# 表名
+	'name' => 'info',
+	# 显示给用户看的名称
+	'lang' => '需求列表',
+	'order' => 200,
+	'auto' => 10000000,
+
+	'end' => array
+	(
+		'insert' => 'demand/lib/manage.demandUpdate',
+		'update' => 'demand/lib/manage.demandUpdate',
+	),
+
+	# 同步更新另外一个或多个表的数据
+	'sync' => array
+	(
+		'demand/info_category' => array
+		(
+			# 更新另外一个表的字段 => 本表的字段
+			'where' => array('info_id', 'id'),
+			# 要更新的数据
+			'update' => array('category_id' => 'category'),
+			# 同步更新的类型,delete为先删再插入,update为直接更新
+			'type' => 'delete',
+		)
+	),
+
+	# 数据结构 不同的字段放这里
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			//'list'		=> true,
+		),
+
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-180',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			//'list'		=> true,
+			//'edit'		=> true,
+		),
+
+		'category'		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '分类',
+			'default' 	=> '',
+			'desc' 		=> '分类',
+			'match' 	=> 'is_string',
+			'search'	=> 'linkage',
+			'update'	=> 'linkage',
+			'option'	=> Dever::url('api.get', 'category'),
+			//'list'		=> 'Dever::load("category/api.string", "{category}")',
+		),
+
+		'category_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '分类ID-最后一个级别的分类,用于分类查询',
+			'default' 	=> '-1',
+			'desc' 		=> '分类ID',
+			'match' 	=> 'is_numeric',
+		),
+
+		'pic_cover'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '封面图-图片尺寸300*300px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+			'default' 	=> '',
+			'desc' 		=> '封面图',
+			'match' 	=> 'is_string',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+			'list_name'	=> '需求详情',
+			'list'		=> 'Dever::load("demand/lib/manage.demandInfo", "{id}")',
+		),
+
+		'view_price'	  => array
+		(
+			'type'	  => 'float-11',
+			'name'	  => '信息服务费-直接填写数字,此处为空则直接使用“需求设置”中的信息服务费,默认为空,如果为负数,则本需求不需要信息服务费,用户可以直接查看信息',
+			'default'   => '0',
+			'desc'	  => '查看需求价格',
+			'match'	 => 'is_string',
+			'update'	=> 'text',
+			//'list'		=> true,
+		),
+
+		'num_view'		=> 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',
+		),
+
+		'poster_uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '创建人名称',
+			'default' 	=> '-1',
+			'desc' 		=> '创建人名称',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			'search'	=> array
+			(
+				'api' => 'passport/user-all',
+				'col' => 'username',
+				'result' => 'id',
+			),
+		),
+
+		'poster_pay_type'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '创建人是否支付',
+			'default' 	=> '1',
+			'desc' 		=> '创建人是否支付',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'option'	=> $poster_pay_type,
+			'search'	=> 'select',
+		),
+
+		'audit'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '审核',
+			'default' 	=> '1',
+			'desc' 		=> '审核',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'option'	=> $audit,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '状态',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'admin_editor'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '后台操作人',
+			'default' 	=> '1',
+			'desc' 		=> '后台操作人',
+			'match' 	=> 'is_numeric',
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序-数值越大越靠前,相当于置顶',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			//'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'udate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '更新时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+		),
+
+		'content'		=> array
+		(
+			'type' 		=> 'text-800',
+			'name' 		=> '内容描述',
+			'default' 	=> '',
+			'desc' 		=> '内容描述',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			'key'		=> '1',
+		),
+
+		'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,
+		//'delete' => false,
+		'mul' => true,
+		# 自定义快捷新增和编辑
+        'button' => array
+        (
+        	'类别管理' => array('list', 'cate&project=demand&search_option_key=cate&search_option_tablename=类别&oper_parent=info&oper_project=demand'),
+        ),
+
+		# 列表
+		'list_button' => array
+		(
+			'add1' => array('属性', '"info_attr&project=demand&search_option_info_id={id}&search_option_category={category}&search_option_category_id={category_id}&oper_parent=info&oper_project=demand&where_id={id}&oper_save_jump=info"'),
+		),
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		'search' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'ids' => array('yes-id', 'in'),
+				'name' => array('yes', 'like'),
+				'id' => 'yes',
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder' => 'desc', 'id' => 'desc'),
+			'limit' => '0,1000',
+			'col' => 'name as name, id, id as value, "" as selected, "" as disabled|id',
+		),
+
+		'getAll' => array
+		(
+			# 匹配的正则或函数 选填项
+			'option' => array
+			(
+				'audit' => 2,
+				'cate_id' => 'yes',
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('reorder' => 'desc', 'id' => 'desc'),
+			//'page' => array(10, 'list'),
+			'col' => '*',
+		),
+		
+		# 更新浏览量
+		'addView' => array
+		(
+			'type' => 'update',
+			'where' => array
+			(
+				'id' => 'yes',
+			),
+			'set' => array
+			(
+				'num_view' => array('1', '+='),
+			),
+		),
+	),
+);
+
+return $config;

+ 159 - 0
demand/database/info_attr.php

@@ -0,0 +1,159 @@
+<?php
+
+$category = Dever::input('search_option_category');
+
+$table = '';
+$attr = array();
+$create = Dever::config('database')->create;
+if ($category) {
+	$where['category'] = $category;
+	$attr = Dever::db('category/attr')->one($where);
+	if ($attr) {
+		$table = '_' . str_replace(',', '_', $category);
+		# 自动建表开启并且自动添加字段
+		$create = false;
+		$attr = Dever::load('attr/api')->getValue($attr['attr'], $attr['attr_input']);
+	}
+}
+
+$config = array
+(
+	# 表名
+	'name' => 'info_attr' . $table,
+	# 显示给用户看的名称
+	'lang' => '需求属性',
+	'order' => 100,
+	'menu' => false,
+	'create' => $create,
+	'attr' => $attr,
+
+	'end' => array
+	(
+		//'insert' => 'demand/lib/manage.attrUpdate',
+		//'update' => 'demand/lib/manage.attrUpdate',
+	),
+
+	# 数据结构 不同的字段放这里
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			//'list'		=> true,
+		),
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		
+	),
+);
+
+
+# 属性完全自定义吧。这种情况用dever就是方便了。其他框架都需要自己实现
+if ($attr) {
+	foreach ($attr as $k => $v) {
+		$k = 'attr_' . $v['id'];
+		$config['struct'][$k] = array();
+
+		$option = array();
+		if ($v['type_option']) {
+			$v['type_option'] = explode("\n", $v['type_option']);
+			foreach ($v['type_option'] as $k1 => $v1) {
+				$option[$k1+1] = $v1;
+			}
+		}
+
+		$config['struct'][$k]['name'] = $v['name'];
+		$config['struct'][$k]['default'] = '';
+		$config['struct'][$k]['desc'] = $v['name'];
+
+		switch ($v['type']) {
+			case 2:
+				$config['struct'][$k]['update'] = 'textarea';
+				$config['struct'][$k]['search'] = 'fulltext';
+				$config['struct'][$k]['type'] = 'varchar-800';
+				$config['struct'][$k]['match'] = 'is_string';
+				break;
+			case 3:
+				$config['struct'][$k]['type'] = 'text-255';
+				$config['struct'][$k]['update'] = 'editor';
+				$config['struct'][$k]['match'] = 'is_string';
+				$config['struct'][$k]['key'] = 1;
+			case 4:
+				$config['struct'][$k]['update'] = 'image';
+				$config['struct'][$k]['type'] = 'varchar-150';
+				$config['struct'][$k]['match'] = 'is_string';
+				$config['struct'][$k]['key'] = 1;
+				break;
+			case 5:
+				$config['struct'][$k]['update'] = 'images';
+				$config['struct'][$k]['type'] = 'text-255';
+				$config['struct'][$k]['match'] = 'is_string';
+				$config['struct'][$k]['key'] = 1;
+				break;
+			case 6:
+				$config['struct'][$k]['type'] = 'varchar-800';
+				$config['struct'][$k]['match'] = 'is_string';
+				$config['struct'][$k]['update'] = 'linkage';
+				$config['struct'][$k]['search'] = 'linkage';
+				$config['struct'][$k]['option'] = Dever::url('area/api.get');
+				//$config['struct'][$k]['list'] = 'Dever::load("area/api.string", "{area}")';
+				break;
+
+			case 10:
+				$config['struct'][$k]['update'] = 'radio';
+				$config['struct'][$k]['type'] = 'int-11';
+				$config['struct'][$k]['match'] = 'is_numeric';
+				$config['struct'][$k]['option'] = $option;
+				$config['struct'][$k]['search'] = 'select';
+				$config['struct'][$k]['default'] = 1;
+
+				break;
+			case 11:
+				$config['struct'][$k]['update'] = 'checkbox';
+				$config['struct'][$k]['type'] = 'varchar-150';
+				$config['struct'][$k]['match'] = 'is_string';
+				$config['struct'][$k]['option'] = $option;
+				$config['struct'][$k]['search'] = 'select';
+				$config['struct'][$k]['default'] = 1;
+				break;
+			case 12:
+				$config['struct'][$k]['update'] = 'select';
+				$config['struct'][$k]['type'] = 'int-11';
+				$config['struct'][$k]['match'] = 'is_numeric';
+				$config['struct'][$k]['option'] = $option;
+				$config['struct'][$k]['search'] = 'select';
+				$config['struct'][$k]['default'] = 1;
+				break;
+			
+			default:
+				$config['struct'][$k]['update'] = 'text';
+				$config['struct'][$k]['search'] = 'fulltext';
+				if ($v['data_type'] == 1) {
+					$config['struct'][$k]['type'] = 'int-11';
+					$config['struct'][$k]['match'] = 'is_numeric';
+				} else {
+					$config['struct'][$k]['type'] = 'varchar-800';
+					$config['struct'][$k]['match'] = 'is_string';
+				}
+		}
+
+		if ($v['option_type'] && $v['option_type'] == 2) {
+			$config['struct'][$k]['match'] = 'option';
+		}
+	}
+}
+
+return $config;

+ 65 - 0
demand/database/info_category.php

@@ -0,0 +1,65 @@
+<?php
+
+return array
+(
+	# 表名
+	'name' => 'info_category',
+	# 显示给用户看的名称
+	'lang' => '需求分类关联表',
+	'menu' => false,
+
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> true,
+		),
+		
+		'info_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '需求ID',
+			'default' 	=> '',
+			'desc' 		=> '需求ID',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'category_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '分类ID',
+			'default' 	=> '',
+			'desc' 		=> '分类ID',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', DEVER_TIME),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	'manage' => array
+	(
+		'delete' => false,
+		'edit' => false,
+		'insert' => false,
+	),
+);

+ 8 - 0
demand/index.php

@@ -0,0 +1,8 @@
+<?php
+
+define('DEVER_APP_NAME', 'demand');
+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-cellphone-fine');
+include(DEVER_APP_PATH . '../boot.php');

+ 10 - 0
demand/lib/Data.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace Demand\Lib;
+
+use Dever;
+
+class Data
+{
+    
+}

+ 129 - 0
demand/lib/Manage.php

@@ -0,0 +1,129 @@
+<?php
+
+namespace Demand\Lib;
+
+use Dever;
+
+class Manage
+{
+    /**
+     * 更新需求信息
+     *
+     * @return mixed
+     */
+    public function demandUpdate($id, $name, $data)
+    {
+        # 更新分类id
+        $category = Dever::param('category', $data);
+        if ($category) {
+            $array = explode(',', $category);
+            $category_id = end($array);
+
+            $update['category_id'] = $category_id;
+            $update['where_id'] = $id;
+            Dever::db('demand/info')->update($update);
+        }
+    }
+
+    /**
+     * 更新需求属性信息
+     *
+     * @return mixed
+     */
+    public function attrUpdate($id, $name, $data)
+    {
+        print_r($data);die;
+        foreach ($data as $k => $v) {
+
+        }
+    }
+
+    /**
+     * 显示需求信息
+     *
+     * @return mixed
+     */
+    public function demandInfo($id)
+    {
+        $info = Dever::db('demand/info')->one($id);
+        if ($info) {
+            $table['需求编号'] = $info['id'];
+            $table['需求标题'] = $info['name'];
+            $table['需求分类'] = Dever::load("category/api.string", $info['category']);
+
+            if ($info['pic_cover']) {
+                $table['封面图'] = '<img src="'.$info['pic_cover'].'" width="150" />';
+            }
+            
+            $table['信息服务费'] = '无';
+            if ($info['view_price'] > 0) {
+                $table['信息服务费'] = $info['view_price'] . '元';
+            }
+
+            if ($info['poster_uid'] > 0) {
+                $user = Dever::load('passport/user-one', $info['poster_uid']);
+                $table['创建人'] = $user['username'] . '(UID:'.$info['poster_uid'].')';
+                if ($poster_pay_type == 1) {
+                    //$table['支付状态'] = '';
+                }
+            }
+
+            /*
+            if ($info['area']) {
+                $table['地区'] = Dever::load("area/api.string", $info['area']);
+            }
+
+            $method = $type . 'Load';
+            //$this->$method($info, $table);
+            */
+
+            if ($info['cdate']) {
+                $table['发布时间'] = date("Y-m-d H:i:s", $info['cdate']);
+            }
+        }
+
+        return Dever::table($table);
+    }
+
+    # 根据type 显示不同的字段
+    private function houseLoad($info, &$table)
+    {
+        if ($info['price_type'] == 1) {
+            $price_type = '元';
+        } else {
+            $price_type = '万';
+        }
+        $table['价格'] = $info['price'] . $price_type;
+    }
+
+    public function area($id, $name, $data)
+    {
+        # 不再执行syncone等后续操作
+        Dever::config('base')->after = 1;
+
+        $type = Dever::input('type');
+
+        $area = Dever::param('area', $data);
+
+        if ($area) {
+
+            if (isset($area[2])) {
+                $update['district_id'] = $area[2];
+            }
+
+            if (isset($area[1])) {
+                $update['city_id'] = $area[1];
+            }
+
+            if (isset($area[0])) {
+                $update['province_id'] = $area[0];
+            }
+
+            if (isset($update)) {
+                $update['where_id'] = $id;
+
+                Dever::db($type . '/info')->update($update);
+            }
+        }
+    }
+}

+ 37 - 0
demand/src/Api.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace Journal\Src;
+
+use Dever;
+
+class Api
+{
+	public function data()
+	{
+		return Dever::db('journal/info')->state();
+	}
+
+	public function ding($data)
+    {
+        if (isset($data['num_add_ding']) && isset($data['num_ratio_ding'])) {
+
+            if ($data['buy'] == 1 && !$data['num_ding']) {
+                $stat = Dever::db('stat/journal')->getNumByJournal(array('journal_id' => $data['id']));
+                if (!$stat) {
+                    $stat['buy_num'] = 0;
+                }
+
+                if (!$stat['buy_num']) {
+                    $stat['buy_num'] = 0;
+                }
+                $data['num_ding'] = $stat['buy_num'];
+            }
+            
+            $data['num_ding'] = $data['num_ding'] + $data['num_up'];
+            $data['buy_num'] = $data['num_ding'];
+            $data['num_ding'] = round(($data['num_ding']+$data['num_add_ding'])*$data['num_ratio_ding']);
+        }
+
+        return $data;
+    }
+}

+ 4 - 4
doc/apidoc.json

@@ -1,9 +1,9 @@
 {
-  "name": "火星计划电子刊平台接口文档",
+  "name": "信息宝接口文档",
   "version": "1.0.0",
-  "description": "火星计划电子刊平台接口文档",
-  "title": "火星计划电子刊平台接口文档",
-  "url" : "http://www.huoxingkandiqiu.com/",
+  "description": "信息宝接口文档",
+  "title": "信息宝接口文档",
+  "url" : "http://data.dever.cc/",
   "template": {
     "withCompare": true,
     "withGenerator": true

+ 35 - 503
doc/apidoc.php

@@ -24,19 +24,6 @@
  * @apiSuccess {Number}   page.status 是否有下一页数据,0为没有
  */
 
-/**
- * @api {get} common.type 类型设置说明
- * @apiVersion 1.0.0
- * @apiName common.type
- * @apiGroup Common
- *
- * @apiDescription 类型设置说明
- *
- * @apiParam {String} source_type 请在header中定义,ios:ios | android:android | 移动h5:h5  | 小程序:applet | 公众号:service | pc网站:pc
- * @apiParam {Number} type 图文:1 | 视频:2 | 直播:3 | 小刊:4 | 小刊音视频:5 | 专题:6 | 小程序:7 | 商品:8 | 链接:10 | 评论: 11 || 直播评论:12 | 小刊活动页:13
- * @apiParam {Number} push_ 所有带push_开头的返回参数,返回字典都是一样的,参考获取首页数据中的push_focus
- */
-
 /**
  * @api {post} upload/upload/?save.start 上传图片接口
  * @apiVersion 1.0.0
@@ -50,14 +37,34 @@
 */
 
 /**
- * @api {get} mars/passport/?l=applet.login 用户登录
- * @apiVersion 2.0.0
+ * @api {get} saike/passport/?l=applet.bind 用户登录 未授权
+ * @apiVersion 1.0.0
+ * @apiName applet.bind
+ * @apiGroup AppletPassport
+ *
+ * @apiDescription 用户登录
+ *
+ * @apiParam {String} code 微信登录返回的code
+ * @apiParam {String} create 1为创建临时用户,2为不创建,默认为2
+ *
+ * @apiSuccess {String}   session_key  create==1时返回,保存下来。然后请求applet.login
+ * @apiSuccess {String}   openid  create==1时返回,保存下来。然后请求applet.login
+ * @apiSuccess {Number}   vid  create==2时返回,微信id,请保存在本地
+ * @apiSuccess {Number}   uid  create==2时返回,用户id,请保存在本地
+ * @apiSuccess {String}   signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
+ */
+
+/**
+ * @api {get} wonderful/passport/?l=applet.login 用户登录 已授权
+ * @apiVersion 1.0.0
  * @apiName applet.login
  * @apiGroup AppletPassport
  *
  * @apiDescription 用户登录
  *
  * @apiParam {String} code 微信登录返回的code
+ * @apiParam {String} session_key 如果进行了applet.bind并获取了session_key。需要传入
+ * @apiParam {String} openid 如果进行了applet.bind并获取了session_key。需要传入
  * @apiParam {String} nickname 用户昵称
  * @apiParam {String} avatarurl 用户头像
  * @apiParam {String} gender 性别
@@ -73,7 +80,7 @@
  */
 
 /**
- * @api {get} wonderful/passport/?l=applet.update 更新用户信息
+ * @api {get} saike/passport/?l=applet.update 更新用户信息
  * @apiVersion 1.0.0
  * @apiName applet.update
  * @apiGroup AppletPassport
@@ -100,7 +107,7 @@
 
 
 /**
- * @api {get} wonderful/passport/?l=applet.mobile 更新用户手机号-微信绑定
+ * @api {get} saike/passport/?l=applet.mobile 更新用户手机号-微信绑定
  * @apiVersion 1.0.0
  * @apiName applet.mobile
  * @apiGroup AppletPassport
@@ -120,7 +127,7 @@
  */
 
 /**
- * @api {get} wonderful/passport/?l=applet.bind_mobile 更新用户手机号-验证码绑定
+ * @api {get} saike/passport/?l=applet.bind_mobile 更新用户手机号-验证码绑定
  * @apiVersion 1.0.0
  * @apiName applet.bind_mobile
  * @apiGroup AppletPassport
@@ -138,7 +145,7 @@
  */
 
 /**
- * @api {get} wonderful/passport/?l=reg.getMCode 获取手机验证码
+ * @api {get} saike/passport/?l=reg.getMCode 获取手机验证码
  * @apiVersion 1.0.0
  * @apiName reg.getMCode
  * @apiGroup AppletPassport
@@ -151,7 +158,7 @@
  */
 
 /**
- * @api {get} wonderful/passport/?l=reg.getMCode 获取手机验证码,未登录状态
+ * @api {get} saike/passport/?l=reg.getMCode 获取手机验证码,未登录状态
  * @apiVersion 1.0.0
  * @apiName reg.getMCode
  * @apiGroup AppPassport
@@ -164,7 +171,7 @@
  */
 
 /**
- * @api {get} wonderful/passport/?l=reg.getMCodeLogin 获取手机验证码,已登录状态
+ * @api {get} saike/passport/?l=reg.getMCodeLogin 获取手机验证码,已登录状态
  * @apiVersion 1.0.0
  * @apiName reg.getMCode
  * @apiGroup AppPassport
@@ -178,7 +185,7 @@
  */
 
 /**
- * @api {get} wonderful/passport/?l=app.login 登录与注册
+ * @api {get} saike/passport/?l=app.login 登录与注册
  * @apiVersion 1.0.0
  * @apiName app.login
  * @apiGroup AppPassport
@@ -193,7 +200,7 @@
  */
 
 /**
- * @api {get} wonderful/passport/?l=app.login_uuid UUID登录
+ * @api {get} saike/passport/?l=app.login_uuid UUID登录
  * @apiVersion 1.0.0
  * @apiName app.login_uuid
  * @apiGroup AppPassport
@@ -207,7 +214,7 @@
  */
 
 /**
- * @api {get} wonderful/passport/?l=app.bind_mobile 更新用户手机号-验证码绑定
+ * @api {get} saike/passport/?l=app.bind_mobile 更新用户手机号-验证码绑定
  * @apiVersion 1.0.0
  * @apiName app.bind_mobile
  * @apiGroup AppPassport
@@ -225,7 +232,7 @@
  */
 
 /**
- * @api {get} wonderful/passport/?l=app.wechat_reg 第三方登录-已经拥有openid
+ * @api {get} saike/passport/?l=app.wechat_reg 第三方登录-已经拥有openid
  * @apiVersion 1.0.0
  * @apiName app.wechat_reg
  * @apiGroup AppPassport
@@ -250,7 +257,7 @@
  */
 
 /**
- * @api {get} wonderful/oauth/?l=request.callback 第三方登录
+ * @api {get} saike/oauth/?l=request.callback 第三方登录
  * @apiVersion 1.0.0
  * @apiName request.callback
  * @apiGroup AppPassport
@@ -270,7 +277,7 @@
  */
 
 /**
- * @api {get} wonderful/passport/?l=app.update 更新用户信息
+ * @api {get} saike/passport/?l=app.update 更新用户信息
  * @apiVersion 1.0.0
  * @apiName app.update
  * @apiGroup AppPassport
@@ -287,479 +294,4 @@
  *
  * @apiSuccess {Number}   uid  用户id,请保存在本地
  * @apiSuccess {String}   signature 用于登录后的uid验证,每次都要传入,请登录后将这个值保存在本地
- */
-
-/**
- * @api {get} wonderful/main/?l=view.getHtml 获取富文本内容
- * @apiVersion 1.0.0
- * @apiName view.getHtml
- * @apiGroup App
- *
- * @apiDescription 获取富文本内容
- *
- * @apiParam {Number} signature 用户signature
- * @apiParam {String} type 类型1为图文、2为视频、3为直播、4为小刊内容,6为专题
- * @apiParam {String} id 图文等内容id,如果为4,则为小刊的内容id,而非小刊id
- *
- * @apiSuccess {String}   html 直接返回html的信息,请注意里面的协议:jstyle://live_note?id=0&live_id=1&file=test
-
- 其中有几个:
-
- jstyle://video?id=0&vod_id=1&file=test 播放视频 id=0为content_array里的数组索引,vod_id为视频id,file为视频文件地址
-
- jstyle://live?id=0&live_id=1&file=test 播放直播 id=0为content_array里的数组索引,live_id为直播id,file为直播文件地址
-
- jstyle://live_note?id=0&live_id=1&file=test&note=1 设置直播提醒 id=0为content_array里的数组索引,live_id为直播id,file为直播文件地址,note值为1是已设置提醒,2为未设置提醒
-
- jstyle://auido?id=0&file=test&note=1 播放视频 id=0为content_array里的数组索引,file为直播文件地址
- */
-
-/**
- * @api {get} wonderful/main/?l=user.submit_comment 提交评论
- * @apiVersion 1.0.0
- * @apiName user.submit_comment
- * @apiGroup UserAction
- *
- * @apiDescription 提交评论
- *
- * @apiParam {String} signature signature
- * @apiParam {Number} type type类型
- * @apiParam {Number} id 当前的数据id
- * @apiParam {String} content 评论内容
- *
- * @apiSuccess {Number}  id 当前的数据id
- */
-
-/**
- * @api {get} mars/main/?l=journal.getList 小程序小刊列表
- * @apiVersion 2.0.0
- * @apiName journal.getList
- * @apiGroup Journal
- *
- * @apiDescription 小刊列表,按照分类读取,根据获取的信息,可以直接进入到小刊详情页,无需再次请求接口。
- *
- * @apiParam {String} signature signature
- * @apiParam {String} system 分类id,默认为1,传入-1就是获取全部
- *
- * @apiSuccess {Object[]} journal 小刊数据列表
- * @apiSuccess {String}   journal.id 小刊id
- * @apiSuccess {String}   journal.name 名称
- * @apiSuccess {String}   journal.subname 期号
- * @apiSuccess {String}   journal.pic_cover 列表封面图片 暂时无效
- * @apiSuccess {String}   journal.pic_view_cover 小刊封面图片 封面图都用这个
- * @apiSuccess {String}   journal.pic_view_bg 全屏背景图,多张图片,这是一个数组
- * @apiSuccess {String}   journal.pic_gd 小刊推广图
- * @apiSuccess {String}   journal.pdate 时间
- * @apiSuccess {String}   journal.num_ding 订阅数
- * @apiSuccess {String}   journal.buy 小刊是否收费 1收费 2免费 3会员
- * @apiSuccess {String}   journal.bgmusic 小刊背景音乐
- * @apiSuccess {Object[]}   journal.button 按钮判断 如果不需要这个,可以不用
- * @apiSuccess {Object[]}   journal.button.read 第一个按钮 阅读按钮
- * @apiSuccess {String}   journal.button.read.status 状态 -1不显示 1为进入阅读 2为兑换 3为预售,注意,当值为2时,必须在阅读按钮上,当用户点击按钮时,绑定一个事件,该事件的接口为journal.subscribe
- * @apiSuccess {String}   journal.button.read.name 按钮上的名字
- * @apiSuccess {Object[]}   journal.button.buy 第二个按钮 购买按钮
- * @apiSuccess {String}   journal.button.buy.status 状态 -1不显示 1为购买
- * @apiSuccess {String}   journal.button.buy.name 按钮上的名字
- * @apiSuccess {Object[]}   journal.button.share 第三个按钮 排行榜按钮
- * @apiSuccess {String}   journal.button.share.status 状态 -1不显示 1为排行榜
- * @apiSuccess {String}   journal.button.share.name 按钮上的名字
- *
- * @apiSuccess {Object[]} push 主推小刊
- * @apiSuccess {String}   push.id 小刊id
- * @apiSuccess {String}   push.name 名称
- * @apiSuccess {String}   push.num_ding 订阅数
-
- * @apiSuccess {Object[]} cate 当前分类
- * @apiSuccess {String}   cate.id 分类id
- * @apiSuccess {String}   cate.name 名称
- */
-
-/**
- * @api {get} mars/main/?l=journal.getAppList APP小刊列表
- * @apiVersion 2.0.0
- * @apiName journal.getAppList
- * @apiGroup Journal
- *
- * @apiDescription 小刊列表,按照分类读取,根据获取的信息,可以直接进入到小刊详情页,无需再次请求接口。
- *
- * @apiParam {String} signature signature
- * @apiParam {String} system 分类id,默认为1,传入-1就是获取全部
- *
- * @apiSuccess {Object[]} journal 小刊数据列表
- * @apiSuccess {String}   journal.id 小刊id
- * @apiSuccess {String}   journal.name 名称
- * @apiSuccess {String}   journal.subname 期号
- * @apiSuccess {String}   journal.pic_cover 列表封面图片 暂时无效
- * @apiSuccess {String}   journal.pic_view_cover 小刊封面图片 封面图都用这个
- * @apiSuccess {String}   journal.pic_view_bg 全屏背景图,多张图片,这是一个数组
- * @apiSuccess {String}   journal.pic_gd 小刊推广图
- * @apiSuccess {String}   journal.pdate 时间
- * @apiSuccess {String}   journal.num_ding 订阅数
- * @apiSuccess {String}   journal.buy 小刊是否收费 1收费 2免费 3会员
- * @apiSuccess {String}   journal.bgmusic 小刊背景音乐
- * @apiSuccess {Object[]}   journal.button 按钮判断 如果不需要这个,可以不用
- * @apiSuccess {Object[]}   journal.button.read 第一个按钮 阅读按钮
- * @apiSuccess {String}   journal.button.read.status 状态 -1不显示 1为进入阅读 2为兑换 3为预售,注意,当值为2时,必须在阅读按钮上,当用户点击按钮时,绑定一个事件,该事件的接口为journal.subscribe
- * @apiSuccess {String}   journal.button.read.name 按钮上的名字
- * @apiSuccess {Object[]}   journal.button.buy 第二个按钮 购买按钮
- * @apiSuccess {String}   journal.button.buy.status 状态 -1不显示 1为购买
- * @apiSuccess {String}   journal.button.buy.name 按钮上的名字
- * @apiSuccess {Object[]}   journal.button.share 第三个按钮 排行榜按钮
- * @apiSuccess {String}   journal.button.share.status 状态 -1不显示 1为排行榜
- * @apiSuccess {String}   journal.button.share.name 按钮上的名字
- *
- * @apiSuccess {Object[]} push 主推小刊
- * @apiSuccess {String}   push.id 小刊id
- * @apiSuccess {String}   push.name 名称
- * @apiSuccess {String}   push.num_ding 订阅数
-
- * @apiSuccess {Object[]} cate 当前分类
- * @apiSuccess {String}   cate.id 分类id
- * @apiSuccess {String}   cate.name 名称
-
- * @apiSuccess {Object[]} cateList 分类列表
- * @apiSuccess {String}   cateList.id 分类id
- * @apiSuccess {String}   cateList.name 名称
- */
-
-/**
- * @api {get} mars/act/?l=order.getMyList 我的订单列表
- * @apiVersion 2.0.0
- * @apiName order.getMyList
- * @apiGroup UserActionV1
- *
- * @apiDescription 我的订单列表
- *
- * @apiParam {String} signature signature
- * @apiParam {String} system 分类id
- *
- * @apiSuccess {Object[]} order 订单信息
- * @apiSuccess {String}   order.name 名称
- * @apiSuccess {String}   order.order_id 订单id
- * @apiSuccess {String}   order.buy_num 购买本数
- * @apiSuccess {String}   order.cdate 购买时间
- */
-
-/**
- * @api {get} mars/act/?l=order.getMyCodeList 我的兑换码列表
- * @apiVersion 2.0.0
- * @apiName order.getMyCodeList
- * @apiGroup UserActionV1
- *
- * @apiDescription 我的兑换码列表
- *
- * @apiParam {String} signature signature
- * @apiParam {String} order_id 订单id
- *
- * @apiSuccess {Object[]} code 兑换码列表
- * @apiSuccess {String}   code.code 兑换码
- * @apiSuccess {String}   code.type 类型 1为未使用 3为已使用 4为已作废
- */
-
-/**
- * @api {get} mars/main/?l=journal.read 小刊阅读页
- * @apiVersion 2.0.0
- * @apiName journal.read
- * @apiGroup Journal
- *
- * @apiDescription 小刊阅读页
- *
- * @apiParam {String} signature signature
- * @apiParam {Number} id 小刊id
- *
- * @apiSuccess {Object[]} content 内容数据列表,每页显示10条,请在翻到第7或者第8条时,请求第2页
- * @apiSuccess {String}   content.id 内容id
- * @apiSuccess {String}   content.type 内容类型1全屏图、2长图、3图文内容、11关联图文、12关联视频、13关联直播、4全屏视频、5留言视频、6留言音频|||新增:7长屏图、8横屏图、9无边框图片、10四宫格图片、21对话模板
- * @apiSuccess {String}   content.name 标题。type=5,6时有效
- * @apiSuccess {String}   content.cover 音频或者视频的封面图,type=4,5,6时有效
- * @apiSuccess {String}   content.video 视频地址。type=4,5时有效
- * @apiSuccess {String}   content.music 音频地址。type=6时有效
- * @apiSuccess {String}   content.pic 全屏图或者长图,type=1,2,7,8,9时有效
- * @apiSuccess {String}   content.pic_info 全屏图或者长图的图片信息,type=1,2,7,8,9时有效,值如1024_768_548.12_35,请用_分隔成数组使用,1024为宽度,768为高度,548.12为图片大小,35为图片id
- * @apiSuccess {String}   content.is_button 全屏图上的保存按钮,1显示2不显示,type=1时有效
- * @apiSuccess {String}   content.button_name 全屏图上的保存按钮的文字,type=1时有效
- * @apiSuccess {String}   content.button_color 全屏图上的保存按钮的文字颜色,type=1时有效
- * @apiSuccess {String}   content.note 是否预约提醒1为已预约,2为未预约
- * @apiSuccess {Object[]}   content.text 全屏图上的九个文字位置,type=1时有效
- * @apiSuccess {String}   content.text.text 文字位置,1上左2上中3上右4中左5正中6中右7下左8下中9下右
- * @apiSuccess {String}   content.text.name 文字内容 换行用\n隔开
- * @apiSuccess {String}   content.text.color 文字颜色
- * @apiSuccess {String}   content.text.bgcolor 文字背景颜色
- * @apiSuccess {String}   content.text.bgcolor_type 是否设置文字背景颜色,1设置,2不设置,不设置则文字背景颜色为透明。
- * @apiSuccess {String}   content.text.size 文字像素大小
- * @apiSuccess {Object[]}   content.info type=3,11,12,13时有效,当等于11,12,13时,分别对应图文详情、视频详情、直播详情里的字段,等于3时,请查看以下字段
- * @apiSuccess {String}   content.info.name 标题
- * @apiSuccess {String}   content.info.focus 焦点图
- * @apiSuccess {String}   content.info.content 内容
- * @apiSuccess {String}   content.info.content_array 数组内容
- * @apiSuccess {Object[]}   content.info.author 作者
-
- * @apiSuccess {Object[]}   content.palaces 四宫格图片的四个图片,type=10时有效
- * @apiSuccess {String}   content.palaces.palaces 图片位置,1上左2上右3下左4下右
- * @apiSuccess {String}   content.palaces.pic 图片
-
- * @apiSuccess {String}   content.talk_pic 对话模板的置顶图片,为空则不显示,type=21时有效
- * @apiSuccess {Object[]}   content.talk 对话模板里的对话内容,type=21时有效
- * @apiSuccess {String}   content.talk.talk_location 对话位置,1左2右
- * @apiSuccess {String}   content.talk.talk_type 对话类型,1文字,2图片,3音频
- * @apiSuccess {String}   content.talk.avatar 头像
- * @apiSuccess {String}   content.talk.text 文字
- * @apiSuccess {String}   content.talk.pic 图片
- * @apiSuccess {String}   content.talk.audio 音频
- */
-
-/**
- * @api {get} mars/main/?l=journal.getView 小刊详情页
- * @apiVersion 2.0.0
- * @apiName journal.getView
- * @apiGroup Journal
- *
- * @apiDescription 小刊详情页,如果是分享进来的,请求这个接口来获取按钮
- *
- * @apiParam {String} signature signature
- * @apiParam {Number} id 小刊id
- *
- * @apiSuccess {Object[]} info 小刊详情
- * @apiSuccess {String}   info.id 小刊id
- * @apiSuccess {String}   info.name 名称
- * @apiSuccess {String}   journal.subname 期号
- * @apiSuccess {String}   info.pic_cover 列表封面图片 暂时无效
- * @apiSuccess {String}   info.pic_view_cover 小刊封面图片 封面图都用这个
- * @apiSuccess {String}   info.pic_view_bg 全屏背景图,多张图片,这是一个数组
- * @apiSuccess {String}   info.pic_gd 小刊推广图
- * @apiSuccess {String}   info.pdate 时间
- * @apiSuccess {String}   info.ydate 预售时间
- * @apiSuccess {String}   info.ytype 预售状态,1为可以阅读2显示预售弹窗,如果用button就不用判断该字段了
- * @apiSuccess {String}   info.num_ding 订阅数
- * @apiSuccess {String}   info.buy 小刊是否收费 1收费 2不收费
- * @apiSuccess {String}   info.subscribe 是否订阅,1为已订阅2为未订阅
- * @apiSuccess {String}   info.active 是否有活动,1为有2为没有,有则显示排行榜按钮
-
- * @apiSuccess {Object[]}   button 按钮判断 如果不需要这个,可以不用
- * @apiSuccess {Object[]}   button.read 第一个按钮 阅读按钮
- * @apiSuccess {String}   button.read.status 状态 -1不显示 1为进入阅读 2为兑换 3为预售,注意,当值为2时,必须在阅读按钮上,当用户点击按钮时,绑定一个事件,该事件的接口为journal.subscribe
- * @apiSuccess {String}   button.read.name 按钮上的名字
- * @apiSuccess {Object[]}   button.buy 第二个按钮 购买按钮
- * @apiSuccess {String}   button.buy.status 状态 -1不显示 1为购买
- * @apiSuccess {String}   button.buy.name 按钮上的名字
- * @apiSuccess {Object[]}   button.share 第三个按钮 排行榜按钮
- * @apiSuccess {String}   button.share.status 状态 -1不显示 1为排行榜
- * @apiSuccess {String}   button.share.name 按钮上的名字
- */
-
-/**
- * @api {get} mars/main/?l=journal.getAppView APP小刊详情页
- * @apiVersion 2.0.0
- * @apiName journal.getAppView
- * @apiGroup Journal
- *
- * @apiDescription APP小刊详情页,如果是分享进来的,请求这个接口来获取按钮
- *
- * @apiParam {String} signature signature
- * @apiParam {Number} id 小刊id
- *
- * @apiSuccess {Object[]} info 小刊详情
- * @apiSuccess {String}   info.id 小刊id
- * @apiSuccess {String}   info.name 名称
- * @apiSuccess {String}   journal.subname 期号
- * @apiSuccess {String}   info.pic_cover 列表封面图片 暂时无效
- * @apiSuccess {String}   info.pic_view_cover 小刊封面图片 封面图都用这个
- * @apiSuccess {String}   info.pic_view_bg 全屏背景图,多张图片,这是一个数组
- * @apiSuccess {String}   info.pic_gd 小刊推广图
- * @apiSuccess {String}   info.pdate 时间
- * @apiSuccess {String}   info.ydate 预售时间
- * @apiSuccess {String}   info.ytype 预售状态,1为可以阅读2显示预售弹窗,如果用button就不用判断该字段了
- * @apiSuccess {String}   info.num_ding 订阅数
- * @apiSuccess {String}   info.buy 小刊是否收费 1收费 2不收费
- * @apiSuccess {String}   info.subscribe 是否订阅,1为已订阅2为未订阅
- * @apiSuccess {String}   info.active 是否有活动,1为有2为没有,有则显示排行榜按钮
-
- * @apiSuccess {Object[]}   button 按钮判断 如果不需要这个,可以不用
- * @apiSuccess {Object[]}   button.read 第一个按钮 阅读按钮
- * @apiSuccess {String}   button.read.status 状态 -1不显示 1为进入阅读 2为兑换 3为预售,注意,当值为2时,必须在阅读按钮上,当用户点击按钮时,绑定一个事件,该事件的接口为journal.subscribe
- * @apiSuccess {String}   button.read.name 按钮上的名字
- * @apiSuccess {Object[]}   button.buy 第二个按钮 购买按钮
- * @apiSuccess {String}   button.buy.status 状态 -1不显示 1为购买
- * @apiSuccess {String}   button.buy.name 按钮上的名字
- * @apiSuccess {Object[]}   button.share 第三个按钮 排行榜按钮
- * @apiSuccess {String}   button.share.status 状态 -1不显示 1为排行榜
- * @apiSuccess {String}   button.share.name 按钮上的名字
- */
-
-/**
- * @api {get} mars/main/?l=journal.subscribe 检测小刊是否可以阅读
- * @apiVersion 2.0.0
- * @apiName journal.subscribe
- * @apiGroup Journal
- *
- * @apiDescription 检测小刊是否可以阅读
- *
- * @apiParam {String} signature signature
- * @apiParam {Number} id 小刊id
- *
- * @apiSuccess {String}   subscribe 1为已订阅可以阅读,2为未订阅不能阅读,弹出兑换码
- */
-
-/**
- * @api {get} mars/main/?l=journal.buy 小刊购买页
- * @apiVersion 2.0.0
- * @apiName journal.buy
- * @apiGroup Journal
- *
- * @apiDescription 小刊购买页
- *
- * @apiParam {String} signature signature
- * @apiParam {Number} id 小刊id
- *
- * @apiSuccess {Object[]} info 小刊详情
- * @apiSuccess {String}   info.id 小刊id
- * @apiSuccess {String}   info.name 名称
- *
- * @apiSuccess {String} buy_desc 购买说明
- * @apiSuccess {Object[]}   buy_list 购买列表
- * @apiSuccess {String}   buy_list.id 购买id 支付时使用
- * @apiSuccess {String}   buy_list.name 名称
- * @apiSuccess {String}   buy_list.price 标价
- * @apiSuccess {String}   buy_list.cash 实际支付价格
- */
-
-/**
- * @api {get} mars/act/?l=order.pay 发起支付
- * @apiVersion 2.0.0
- * @apiName order.pay
- * @apiGroup UserActionV1
- *
- * @apiDescription 发起支付:请注意,如果是苹果支付,请在发起苹果支付之后,将苹果返回的验证数据,传入该接口
- *
- * @apiParam {String} signature signature
- * @apiParam {String} journal_id 小刊id
- * @apiParam {String} buy_id 购买本数id
- * @apiParam {String} receipt 当header中的source_type为ios时,请传入该参数,参数的值为苹果支付后返回的参数,即可发起支付验证。
-*
- * @apiSuccess {Object[]} pay 微信支付返回的数据
- * @apiSuccess {String}   pay.time 服务器时间戳
- * @apiSuccess {String}   pay.nonce_str 随机字符串
- * @apiSuccess {String}   pay.prepay_id 统一下单接口返回的 prepay_id 参数值,通过'prepay_id=' + prepay_id 拼装成package
- * @apiSuccess {String}   pay.sign_type 签名算法
- * @apiSuccess {String}   pay.sign 签名
- * @apiSuccess {String}   pay.yes 苹果支付时显示改参数,1为支付成功2为支付失败
- * @apiSuccess {String}   pay.order_id 支付的订单id
- */
-
-/**
- * @api {get} mars/act/?l=order.code 兑换码兑换
- * @apiVersion 2.0.0
- * @apiName order.code
- * @apiGroup UserActionV1
-
- * @apiDescription 兑换码兑换
- *
- * @apiParam {String} signature signature
- * @apiParam {String} journal_id 小刊id
- * @apiParam {String} code 兑换码
- *
- * @apiSuccess {String}   ok 兑换成功
- */
-
-/**
- * @api {get} mars/main/?l=journal.top 小刊本数排行榜
- * @apiVersion 2.0.0
- * @apiName journal.top
- * @apiGroup Journal
- *
- * @apiDescription 小刊本数排行榜
- *
- * @apiParam {String} signature signature
- * @apiParam {Number} id 小刊id
- *
- * @apiSuccess {Object[]} info 小刊详情
- * @apiSuccess {String}   info.id 小刊id
- * @apiSuccess {String}   info.name 名称
- *
- * @apiSuccess {Object[]}   top 本数排行
- * @apiSuccess {String}   top.uid 用户id
- * @apiSuccess {String}   top.num 本数
- * @apiSuccess {String}   top.username 用户名
- * @apiSuccess {String}   top.avatar 头像
-  *
- * @apiSuccess {Object[]}   active 活动说明表
- * @apiSuccess {String}   active.name 名称
- * @apiSuccess {String}   active.status 活动状态 1活动进行中 2活动已结束
- * @apiSuccess {String}   active.desc 描述
- * @apiSuccess {String}   active.invite_title 邀请好友标题
- * @apiSuccess {String}   active.invite_desc 邀请好友描述 换行用\n隔开
- * @apiSuccess {String}   active.content 活动说明,富文本
- */
-
-/**
- * @api {get} wonderful/main/?l=user.my 获取用户信息
- * @apiVersion 1.0.0
- * @apiName user.my
- * @apiGroup User
- *
- * @apiDescription 获取用户信息
- *
- * @apiParam {String} signature signature
- *
- * @apiSuccess {Object[]} user 用户基本信息
- * @apiSuccess {String}   user.id 用户id
- * @apiSuccess {String}   user.username 用户名
- * @apiSuccess {String}   user.mobile 手机号
- * @apiSuccess {String}   user.avatar 头像
- * @apiSuccess {String}   user.level 等级
- * @apiSuccess {String}   user.score 积分
- * @apiSuccess {String}   user.vip_type 会员状态,-1为未开通,-2为已过期,大于0则为正式会员的过期时间戳
- * @apiSuccess {String}   user.vip_end 当vip_type>0时存在,正式会员的过期时间
- * @apiSuccess {String}   user.vip_state vip_state=1则显示购买按钮,=2则不显示
- * @apiSuccess {Number}   user_msg 用户新消息数
- */
-
-/**
- * @api {get} wonderful/main/?l=user.my_msg 获取我的消息
- * @apiVersion 1.0.0
- * @apiName user.my_msg
- * @apiGroup User
- *
- * @apiDescription 获取我的消息
- *
- * @apiParam {String} signature signature
- *
- * @apiSuccess {Object[]} msg 消息列表
- * @apiSuccess {String}   msg.uid 用户id
- * @apiSuccess {String}   msg.from_uid 消息来源uid,暂时不用管
- * @apiSuccess {String}   msg.name 消息标题
- * @apiSuccess {String}   msg.content 消息内容
- * @apiSuccess {String}   msg.cdate 时间戳
- * @apiSuccess {String}   msg.cdate_time 转换成了Y-m-d H:i:s的时间
- * @apiSuccess {String}   msg.status 消息已读状态1未读2已读
- * @apiSuccess {String}   msg.type 消息类型,暂时不用管,目前都为11
- * @apiSuccess {String}   msg.param 消息传入参数,这是一个数组:name消息名称,type是上述公共参数所定义的类型,id是底层页id,link是链接地址,有则跳转到该地址
- */
-
-/**
- * @api {get} wonderful/main/?l=user.my_comment 获取我评论的信息
- * @apiVersion 1.0.0
- * @apiName user.my_comment
- * @apiGroup User
- *
- * @apiDescription 获取我喜欢的信息
- *
- * @apiParam {String} signature signature
- *
- * @apiSuccess {Object[]} comment 用户基本信息
- * @apiSuccess {String}   comment.uid 用户id
- * @apiSuccess {String}   comment.data_id 数据id
- * @apiSuccess {String}   comment.content 评论内容
- * @apiSuccess {String}   comment.time 时间:x小时前
- * @apiSuccess {String}   comment.cdate 时间戳
- * @apiSuccess {String}   comment.cdate_time 转换成了Y-m-d H:i:s的时间
- * @apiSuccess {String}   comment.type 类型,参考公共参数中的类型设置说明中的type说明
- * @apiSuccess {Object[]}   comment.info 基本信息 根据type不同,里面的字段有所不同
- * @apiSuccess {String}   comment.info.id 数据id
- * @apiSuccess {String}   comment.info.name 名称
- * @apiSuccess {String}   comment.info.cate_id 栏目ID
- * @apiSuccess {String}   comment.info.cate_name 栏目名称
- * @apiSuccess {String}   comment.info.pic_cover 4:3图片
- * @apiSuccess {String}   comment.info.pic_cover_169 16:9图片
- * @apiSuccess {String}   comment.info.pdate 发布时间
- */
+ */

+ 5 - 193
main/database/config.php

@@ -1,26 +1,13 @@
 <?php
 
-$ios_pay = array
-(
-	1 => '关闭小程序支付',
-	2 => '开启公众号支付',
-	3 => '开启小程序支付',
-);
-
-$video = array
-(
-	1 => '显示',
-	2 => '不显示',
-);
-
 return array
 (
 	# 表名
 	'name' => 'config',
 	# 显示给用户看的名称
-	'lang' => '基础设置',
-	'order' => 100,
-	'menu'	=> 'manage',
+	'lang' => '系统配置',
+	'order' => 1,
+	//'menu'	=> 'manage',
 	# 数据结构
 	'struct' => array
 	(
@@ -61,181 +48,6 @@ return array
 			'update'	=> 'textarea',
 		),
 
-		'logo'		=> array
-		(
-			'type' 		=> 'varchar-150',
-			'name' 		=> 'logo图片',
-			'default' 	=> '',
-			'desc' 		=> 'logo图片',
-			'match' 	=> 'option',
-			'update'	=> 'image',
-			'key' 		=> '1',
-			'place'		=> '150',
-		),
-
-		'hr2'		=> array
-		(
-			'name' 		=> '分享设置',
-			'class'		=> '',//本项必须填写
-			'attr'		=> '',
-		),
-
-		'article_share_name'		=> array
-		(
-			'type' 		=> 'varchar-100',
-			'name' 		=> '图文详情页分享文字设置',
-			'default' 	=> '喜欢就邀请好友一起阅读',
-			'desc' 		=> '图文详情页分享文字设置',
-			'match' 	=> 'is_string',
-			'update'	=> 'text',
-		),
-
-		'vod_share_name'		=> array
-		(
-			'type' 		=> 'varchar-100',
-			'name' 		=> '视频详情页分享文字设置',
-			'default' 	=> '喜欢就邀请好友一起阅读',
-			'desc' 		=> '视频详情页分享文字设置',
-			'match' 	=> 'is_string',
-			'update'	=> 'text',
-		),
-
-		'live_share_name'		=> array
-		(
-			'type' 		=> 'varchar-100',
-			'name' 		=> '直播详情页分享文字设置',
-			'default' 	=> '喜欢就邀请好友一起阅读',
-			'desc' 		=> '直播详情页分享文字设置',
-			'match' 	=> 'is_string',
-			'update'	=> 'text',
-		),
-
-		'hr3'		=> array
-		(
-			'name' 		=> '小程序支付设置',
-			'class'		=> '',//本项必须填写
-			'attr'		=> '',
-		),
-
-		'ios_pay'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> 'ios支付设置',
-			'default' 	=> '1',
-			'desc' 		=> 'ios支付设置',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'radio',
-			'option'	=> $ios_pay,
-		),
-
-		'ios_pay_pic'		=> array
-		(
-			'type' 		=> 'varchar-150',
-			'name' 		=> 'ios支付引导图-ios支付引导图',
-			'default' 	=> '',
-			'desc' 		=> 'ios支付引导图',
-			'match' 	=> 'option',
-			'update'	=> 'image',
-			'key' 		=> '1',
-			'place'		=> '150',
-			//直接上传到云端
-			//'upload'	=> 'qiniu',
-			//上传大数据
-			//'large' 	=> true,
-		),
-
-		'hr4'		=> array
-		(
-			'name' 		=> '公众号支付设置',
-			'class'		=> '',//本项必须填写
-			'attr'		=> '',
-		),
-
-		'service_name'		=> array
-		(
-			'type' 		=> 'varchar-100',
-			'name' 		=> '公众号名称',
-			'default' 	=> '',
-			'desc' 		=> '公众号名称',
-			'match' 	=> 'option',
-			'update'	=> 'text',
-		),
-
-		'service_text'		=> array
-		(
-			'type' 		=> 'varchar-100',
-			'name' 		=> '公众号支付成功时的小程序名称',
-			'default' 	=> 'Jstyle精美电子刊',
-			'desc' 		=> '公众号支付成功时的小程序名称',
-			'match' 	=> 'is_string',
-			'update'	=> 'text',
-		),
-
-		'hr5'		=> array
-		(
-			'name' 		=> '视频设置',
-			'class'		=> '',//本项必须填写
-			'attr'		=> '',
-		),
-
-		'video'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '是否显示视频',
-			'default' 	=> '1',
-			'desc' 		=> '是否显示视频',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'radio',
-			'option'	=> $video,
-		),
-
-		'version'		=> array
-		(
-			'type' 		=> 'varchar-100',
-			'name' 		=> '版本号',
-			'default' 	=> '',
-			'desc' 		=> '版本号',
-			'match' 	=> 'option',
-			'update'	=> 'text',
-		),
-
-		'hr6'		=> array
-		(
-			'name' 		=> 'APP分享内容',
-			'class'		=> '',//本项必须填写
-			'attr'		=> '',
-		),
-
-		'share_content'		=> array
-		(
-			'type' 		=> 'varchar-400',
-			'name' 		=> 'APP固定分享内容-内容中可以设置变量,{link}为下载链接',
-			'default' 	=> '',
-			'desc' 		=> 'APP固定分享内容',
-			'match' 	=> 'is_string',
-			'update'	=> 'textarea',
-		),
-
-		'ios_link'		=> array
-		(
-			'type' 		=> 'varchar-200',
-			'name' 		=> 'IOS下载链接',
-			'default' 	=> '',
-			'desc' 		=> 'IOS下载链接',
-			'match' 	=> 'is_string',
-			'update'	=> 'textarea',
-		),
-
-		'android_link'		=> array
-		(
-			'type' 		=> 'varchar-200',
-			'name' 		=> 'android下载链接',
-			'default' 	=> '',
-			'desc' 		=> 'android下载链接',
-			'match' 	=> 'is_string',
-			'update'	=> 'textarea',
-		),
-
 		'cdate'		=> array
 		(
 			'type' 		=> 'int-11',
@@ -249,10 +61,10 @@ return array
 
 	'default' => array
 	(
-		'col' => 'name,info,cdate',
+		'col' => 'name,cdate',
 		'value' => array
 		(
-			'"精美时尚内容平台","精美时尚内容平台",' . time(),
+			'"信息宝",' . time(),
 		),
 	),
 

+ 0 - 256
main/database/version.php

@@ -1,256 +0,0 @@
-<?php
-
-$up = array
-(
-	1 => '是',
-	2 => '否',
-);
-
-$source_type = array (
-	'ios' => 'ios',
-	'android' => 'android',
-);
-
-$vip = array
-(
-	1 => '显示',
-	2 => '不显示',
-);
-
-$button = array
-(
-	1 => '显示',
-	2 => '不显示',
-);
-
-$update = array
-(
-	1 => '显示',
-	2 => '不显示',
-);
-
-$login = array
-(
-	1 => '是',
-	2 => '否',
-);
-
-$anonymous = array
-(
-	1 => '是',
-	2 => '否',
-);
-
-return array
-(
-	# 表名
-	'name' => 'version',
-	# 显示给用户看的名称
-	'lang' => '版本管理',
-	# 后台菜单排序
-	'order' => 1,
-	'menu' => 'stat',
-	# 数据结构
-	'struct' => array
-	(
-		'id' 		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> 'ID',
-			'default' 	=> '',
-			'desc' 		=> '',
-			'match' 	=> 'is_numeric',
-			'search'	=> 'order',
-			//'list'		=> true,
-			'order'		=> 'desc',
-		),
-
-		'source_type'		=> array
-		(
-			'type' 		=> 'varchar-32',
-			'name' 		=> '平台',
-			'default' 	=> '1',
-			'desc' 		=> '平台',
-			'match' 	=> 'is_string',
-			'update'	=> 'select',
-			'search'	=> 'select',
-			'option'	=> $source_type,
-			'list'		=> true,
-		),
-
-		'appname'		=> array
-		(
-			'type' 		=> 'varchar-50',
-			'name' 		=> 'app名称',
-			'default' 	=> '',
-			'desc' 		=> 'app名称',
-			'match' 	=> 'is_string',
-			'update'	=> 'text',
-			//'list'		=> true,
-		),
-		
-		'name'		=> array
-		(
-			'type' 		=> 'varchar-32',
-			'name' 		=> '版本名称',
-			'default' 	=> '',
-			'desc' 		=> '请输入名称',
-			'match' 	=> 'is_string',
-			'update'	=> 'text',
-			'search'	=> 'fulltext',
-			'list'		=> true,
-		),
-
-		'code'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '版本号-只能填写数字',
-			'default' 	=> '',
-			'desc' 		=> '版本号',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'text',
-			'search'	=> 'fulltext',
-			'order'		=> 'desc',
-			'list'		=> true,
-		),
-
-		'desc'		=> array
-		(
-			'type' 		=> 'varchar-500',
-			'name' 		=> '版本描述',
-			'default' 	=> '',
-			'desc' 		=> '版本描述',
-			'match' 	=> 'is_string',
-			'update'	=> 'textarea',
-		),
-
-		'up'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '是否强制升级',
-			'default' 	=> '2',
-			'desc' 		=> '是否强制升级',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'select',
-			'option'	=> $up,
-		),
-
-		'link'		=> array
-		(
-			'type' 		=> 'varchar-400',
-			'name' 		=> '下载链接',
-			'default' 	=> '',
-			'desc' 		=> '下载链接',
-			'match' 	=> 'is_string',
-			'update'	=> 'text',
-		),
-
-		'file'		=> array
-		(
-			'type' 		=> 'varchar-150',
-			'name' 		=> '上传APP文件',
-			'default' 	=> '',
-			'desc' 		=> '上传APP文件',
-			'match' 	=> 'option',
-			'update'	=> 'upload',
-			'key' 		=> '7',
-			'upload'	=> 'qiniu',
-			'large' 	=> true,
-			//不覆盖原文件,生成新文件
-			'cover'		=> 2,
-		),
-
-		'updates'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '是否显示更新提醒',
-			'default' 	=> '2',
-			'desc' 		=> '是否显示更新提醒',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'radio',
-			'option'	=> $update,
-		),
-
-		'login'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '是否强制登录',
-			'default' 	=> '2',
-			'desc' 		=> '是否强制登录',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'radio',
-			'option'	=> $login,
-		),
-
-		'anonymous'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '是否匿名登录',
-			'default' 	=> '2',
-			'desc' 		=> '是否匿名登录',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'radio',
-			'option'	=> $anonymous,
-		),
-
-		'vip'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '会员-是否显示会员信息和会员按钮',
-			'default' 	=> '2',
-			'desc' 		=> '会员',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'radio',
-			'option'	=> $vip,
-		),
-
-		'button'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '兑换阅读按钮-是否显示兑换阅读按钮',
-			'default' 	=> '2',
-			'desc' 		=> '兑换阅读按钮',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'radio',
-			'option'	=> $button,
-		),
-
-		'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
-	(
-		'getOne' => array
-		(
-			# 匹配的正则或函数 选填项
-			'option' => array
-			(
-				'source_type' => 'yes',
-				'code' => 'yes',
-				'name' => 'yes',
-				'state' => 1,
-			),
-			'type' => 'one',
-			'order' => array('code' => 'desc', 'cdate' => 'desc'),
-			'col' => '*',
-		),
-	),
-);

+ 7 - 0
package/area/daemon/import.php

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

+ 4 - 0
package/area/index.php

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

+ 4 - 0
package/attr/index.php

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

+ 4 - 0
package/category/index.php

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

+ 4 - 0
package/share/index.php

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