dever преди 6 години
родител
ревизия
563317b4b8

+ 1 - 69
config/base.php

@@ -4,77 +4,9 @@
 $config['base'] = array
 (
 	# 名称
-	'name' => '橙猫内部管理系统',
+	'name' => '嗨赚任务系统',
 	# 版本配置
 	'version' => '1.0.0 Beta',
-
-	# 微信小程序登录地址
-	'wechat' => 'https://api.weixin.qq.com/sns/jscode2session',
-	# 登录验证key
-	'secret' => 'chengmao2018_898930',
-	# 后台头部菜单
-	'top' => 'set/info_id',
-
-
-	# 微信组件url
-	'wechat_url' => 'http://wx.5dev.cn/wechat/applet/?',
-
-	# 基本数据类型
-	'type' => array
-	(
-		1 => '资讯',
-		2 => '课程',
-		3 => '会议',
-		4 => '评论',
-		5 => '服务',
-		6 => '文章',
-		7 => '商务合作',
-		8 => '活动',
-	),
-
-	# 基本数据类型 对应的表
-	'table' => array
-	(
-		1 => 'content/news',
-        2 => 'content/course',
-        3 => 'content/meeting',
-        4 => 'comment/review',
-        5 => 'content/service',
-        6 => 'content/article',
-        8 => 'activity/active',
-	),
-
-	'copyType' => array
-	(
-		1 => '手动录入',
-		2 => '复制',
-	),
-);
-
-$config['template'] = array
-(
-	# 使用的模板 注意:定义这个之后,将会强制将本项目模板(assets中的html、template)变成这个
-	'assets' => 'default',
-	# 定义这个之后,将强制将template的目录改为这个,不定义或不填写,则强制使用为template定义
-	'template' => 'default',
-	# 替换设置 一般用于替换资源,将模板中的(html中的)js等相对url换成绝对url,如果不定义,则默认为../js这样的
-	'replace' => array
-	(
-		'css' => '../css/',
-		'js' => '../js/',
-		'img' => array('../image/', '../img/', '../images/'),
-		'core' => '../../core/',
-		'lib' => '../lib/',
-		'manage' => '../manage/',
-		
-		# 以下的替换主要用于合并操作(host里的merge项)
-		'font' => '../fonts/',
-	),
-	
-	'strip' => false,
-
-	# 是否启用layout 如启用,填写要替换的class或者id即可,具体效果可参考youtube,只加载部分内容,前端请加载pjax.js
-	'layout' => '.pjax-content',
 );
 
 return $config;

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

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

+ 0 - 252
config/env/localhost/group.php

@@ -1,252 +0,0 @@
-<?php
-# 集成项目的大部分配置,此为默认设置。环境不同,以下的配置也有可能不同,可以根据项目名建立配置文件
-
-# 基本配置
-$config['base'] = array
-(
-	# 项目部署的相对路径(部署在服务器的根目录,如果不定义DEVER_PROJECT_NAME,则本项必须启用并有效)
-	'path' => DIRECTORY_SEPARATOR . 'workspace' . DIRECTORY_SEPARATOR,
-
-	# 访问assets目录的物理路径
-	'assets' => DEVER_APP_PATH . 'assets' . DIRECTORY_SEPARATOR,
-
-	# 访问data目录的物理路径
-	'data' 	=> DEVER_PROJECT_PATH . 'data' . DIRECTORY_SEPARATOR,
-
-	# 访问当前项目目录的物理路径,如果项目和dever类库在一个目录中,则为DEVER_PATH,如果不在,则为DEVER_APP_PATH,当然也可随意更改,这里目前只影响合并操作(merge)
-	'workspace' => DEVER_APP_PATH,
-	
-	# 定义api的token明文,如果和其他业务有合作,建议使用系统自带的接口api,自带加密解密程序。
-	'token' => 'dever_api_2016',
-	
-	# 是否启用nocache,如果是互动类的项目且主域增加了cdn,建议开启
-	'clearHeaderCache' => false,
-
-	# api文档生成是否开启,开启后,将会根据访问来生成文档。生产环境建议禁止
-	'apiDoc' => true,
-	# api日志是否开启,开启后,将会记录所有带有_api后缀方法的请求参数和响应参数
-	'apiLog' => false,
-
-	# 定义自动转为api的目录,可以将该目录下的所有类的公共方法,都转为可以访问的api,开启该功能可能有安全性问题。
-	'apiOpenPath' => 'src',
-
-	# 启用后,将会根据api目录下的配置文件自动定位api
-	//'apiConfig' => true,
-	
-	# 开启用户触发cron,主要用于无法加到系统计划任务的虚拟主机,必须安装manage组件,谨慎开启,会稍微影响程序执行效率
-	//'cron' => true,
-);
-
-# 模板配置
-$config['template'] = array
-(
-	# 是否启用静态资源域名动态化,启用之后,静态资源的域名将动态加载,适合使用多个域名或publish启用
-	'domain' => true,
-
-	# 是否开启强制刷新页面缓存
-	'shell' => 'temp',
-	
-	# 是否开启手动更改模板名称,允许通过$_GET的方式来更改当前模板,值为$_GET的key值,默认关闭
-	//'name' => 'template',
-
-	# publish 是否发布,此项开启后,系统不会检测service(意味着不用将service打包上线),适合生产环境,并能对代码起到一定的加密保护。
-	//'publish' => true,
-);
-
-# 数据库配置
-$config['database'] = array
-(
-	# database 中的reuqest的兼容定义,如果启用了该选项,需要自行开发database/compatible目录下相对应的数据表文件中的request方法。
-	//'compatible' => 'model',
-
-	# 是否开启sql自动优化,将sql中的select * 转换为 select a,b形式,将sql中的where条件按照索引从左到右自动排序,必须打开上述的opt选项,数据量大时建议打开。
-	//'sql' => true,
-
-	# 关闭自助建表,生产环境建议开启,开启之后无法对数据表结构进行更新操作
-	//'create' => true,
-
-	# 是否开启mysql自助优化功能,开启后,会记录所有where条件和order的字段,可以方便的在后台进行分析、增加索引,必须安装manage组件
-	'opt' => true,
-
-	# 默认数据库配置
-	'default' => array
-	(
-		'type' => 'pdo',
-		'host' => array
-		(
-			'read' => 'web-mysql:3306',
-			'update' => 'web-mysql:3306',
-		),
-		'database' => 'group',
-		'username' => 'root',
-		'password' => '123456',
-		'charset' => 'utf8',
-	),
-
-	'applet' => array
-	(
-		'type' => 'pdo',
-		'host' => array
-		(
-			'read' => 'web-mysql:3306',
-			'update' => 'web-mysql:3306',
-		),
-		'database' => 'my',
-		'username' => 'root',
-		'password' => '123456',
-		'charset' => 'utf8',
-	),
-);
-
-# 缓存配置
-$config['cache'] = array
-(
-	# 启用mysql数据库缓存,这个缓存是根据表名自动生成,dever::load形式和service的all、one形式均自动支持,无需手动添加
-	'mysql' => 0,
-	# 启用页面缓存 会根据当前的url来生成缓存,相当于页面静态化。
-	'html' => 0,
-	# 启用数据级别缓存 这个缓存是程序员自定义的:Dever::cache('name', 'value', 3600);
-	'data' => 3600,
-	# 启用load加载器缓存,一般不加载
-	'load' => 0,
-	# 启用load加载器的远程加载缓存
-	'curl' => 3600,
-
-	# 缓存精细控制,可以根据缓存的key(mysql为表名、service为小写类名,规则是模糊匹配),来控制每一条缓存
-	'loadKey' => array
-	(
-		# 定义缓存名为auth.data的缓存时间
-		'auth.data' => 200,
-	),
-	
-	# 缓存清理的参数名,请通过shell=clearcache执行
-	'shell' => 'clearcache',
-
-	# 是否启用key失效时间记录,启用之后,将会记录每个key的失效时间
-	'expire' => true,
-
-	# 缓存类型
-	'type' => 'memcache',//memcache、redis
-
-	# 缓存保存方式,支持多个数据源、多台缓存服务器
-	'store' => array
-	(
-		/*
-		array
-		(
-			'host' => 'server_memcached',
-			'port' => '11211',
-			'weight' => 100,
-		),
-
-		array
-		(
-			'host' => 'server_memcached',
-			'port' => '11212',
-			'weight' => 100,
-		),
-		*/
-	),
-);
-
-# debug配置
-$config['debug'] = array
-(
-	# 开启错误提示 生产环境建议禁止
-	'error' => true,
-	
-	# 错误日志记录,为空则不开启,为数组则为socket等服务
-	'log' => true,//array('type' => 'udp', 'host' => 'host', 'port' => 'port')
-	# 是否开启记录超时时间,单位为秒
-	'overtime' => 3,
-
-	# 开始访问报告
-	# 生产环境建议禁止或添加ip限制,多个ip用逗号隔开
-	# 如禁止,值为false,下述shell也将失效
-	# 值为2,则开启强制模式,任何输出都将打印debug
-	'request' => Dever::ip(),
-
-	# 设定打印访问报告的指令
-	'shell' => 'debug',
-	# 以上指令,请通过&shell=debug来执行,如果你想设置断点或者打印当前业务逻辑下的sql,请直接用Dever::debug();打印数据
-
-);
-$local = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';
-# 本地可用这个
-$host = 'http://'.$local . '/';
-
-# 定义assets的域名
-$assets = DEVER_APP_HOST . 'assets/';
-if (DEVER_APP_NAME == 'manage') {
-	$assets = $host . 'dever_package/manage/assets/';
-}
-
-# host 设置
-$config['host'] = array
-(
-	# 跟域名
-	'base' 	=> DEVER_APP_HOST,
-
-	# cookie 域名
-	'cookie' => '',
-	
-	# assets网络路径,会自动将assets替换为assets/模板
-	'assets' => $assets,
-	# public
-	'public' => $assets . 'public/',
-	'css' => $assets . 'css/',
-	'js' => $assets . 'js/',
-	'img' => $assets . 'img/',
-	'images' => $assets . 'images/',
-	'lib' => $assets . 'lib/',
-
-	# 后台管理系统的assets路径
-	'manage' => $host . 'dever_package/manage/assets/public/',
-	
-	# 合并之后的网络路径,填写之后自动合并资源,不填写则不合并,适合把资源放到云端
-	'merge' => $host . 'applet/data/assets/' . DEVER_PROJECT . '/',
-	
-	# 上传系统的上传路径的域名(不带action)
-	'upload'=> $host . 'applet/upload/?save',
-	# 上传系统的资源访问地址
-	'uploadRes'	=> $host . 'applet/data/upload/',
-
-	# 域名替换,支持*通配符
-	/*
-    'domain' => array
-    (
-        'rule' => function()
-        {
-            $source = $desc = 'http://';
-            if(function_exists('isHttps') && isHttps())
-            {
-                $desc = 'https://';
-            }
-
-            return array($source, $desc);
-        },
-        'replace' => array('*.selfimg.com.cn')
-    ),
-    */
-	
-	# 是否启用代理功能
-	//'proxy' => $host . 'dever/application/applet/main/?data.proxy?',
-
-	# 项目定义,Dever::load将自动转为这个配置,替换掉data/project/default.php里的数据
-	'project' => array
-	(
-		/*
-		'set' => array
-		(
-			'url' => 'http://cm.5dev.cn/applet_on/set/?',
-			'path' => 'http://cm.5dev.cn/applet_on/set/?',
-		),
-		*/
-	),
-);
-
-if (DEVER_APP_NAME == 'manage') {
-	$config['host']['merge'] = false;
-}
-
-return $config;

+ 223 - 0
main/database/config.php

@@ -0,0 +1,223 @@
+<?php
+
+$comment = array
+(
+	1 => '评论需要登录',
+	2 => '评论不需要登录',
+);
+
+return array
+(
+	# 表名
+	'name' => 'config',
+	# 显示给用户看的名称
+	'lang' => '基本配置',
+	'order' => 1,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '系统ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'hr1'		=> array
+		(
+			'name' 		=> '基本信息',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+		),
+		
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '系统名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入系统名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+		
+		'logo'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '系统logo-200X200',
+			'default' 	=> '',
+			'desc' 		=> '请选择系统logo',
+			'match' 	=> 'is_string',
+			//'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '160X160',
+		),
+		
+		'info'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '系统介绍',
+			'default' 	=> '',
+			'desc' 		=> '请输入系统介绍',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+		
+		'hr2'		=> array
+		(
+			'name' 		=> 'SEO信息',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+		),
+		
+		'title'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '系统title',
+			'default' 	=> '',
+			'desc' 		=> '请输入系统标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+
+		'keyword'		=> array
+		(
+			'type' 		=> 'varchar-50',
+			'name' 		=> '系统keyword',
+			'default' 	=> '',
+			'desc' 		=> '请输入系统关键词',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+		'description'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '系统description',
+			'default' 	=> '',
+			'desc' 		=> '请输入系统描述',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+		),
+		
+		'hr3'		=> array
+		(
+			'name' 		=> '版权与介绍',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+		),
+		
+		'copyright'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '版权信息',
+			'default' 	=> '',
+			'desc' 		=> '请输入版权信息',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+		),
+		
+		'icp'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> 'icp备案信息-填写别的信息也可以的',
+			'default' 	=> '',
+			'desc' 		=> '请输入icp备案信息',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+		),
+		
+		'code'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '尾部代码-一般用于填写统计代码',
+			'default' 	=> '',
+			'desc' 		=> '请输入尾部代码',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'hr4'		=> array
+		(
+			'name' 		=> '其他配置',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+		),
+
+		'score_name'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '积分名称',
+			'default' 	=> '',
+			'desc' 		=> '积分名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+
+		'score_name_ext'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '积分单位',
+			'default' 	=> '',
+			'desc' 		=> '积分名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+
+		'group_name'		=> array
+		(
+			'type' 		=> 'varchar-200',
+			'name' 		=> '战队名称',
+			'default' 	=> '',
+			'desc' 		=> '战队名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+
+		'exchange'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '积分兑换比例-积分兑换元的比例,输入1则1个积分兑换1元,输入2则2个积分兑换1元',
+			'default' 	=> '1',
+			'desc' 		=> '积分兑换比例',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+
+		'exchange_min'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '积分最低兑换数量',
+			'default' 	=> '10',
+			'desc' 		=> '积分最低兑换数量',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+
+	'default' => array
+	(
+		'col' => 'name,info,title,keyword,description,copyright,icp,score_name,score_name_ext,group_name,cdate',
+		'value' => array
+		(
+			'"嗨赚","做任务赚钱花-嗨赚任务系统","嗨赚任务系统","嗨赚,赚钱,任务系统","做任务赚钱花-嗨赚任务系统","Made With By Dever Hiz","京ICP备15006344号","金币","枚","小队",' . time(),
+		),
+	),
+
+	'manage' => array
+	(
+		# 后台管理不要列表页
+		'list' => 'update',
+	),
+);

+ 96 - 0
main/database/help.php

@@ -0,0 +1,96 @@
+<?php
+
+return array
+(
+	# 表名
+	'name' => 'help',
+	# 显示给用户看的名称
+	'lang' => '帮助中心',
+	'order' => 8,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			'list'		=> true,
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-24',
+			'name' 		=> '名称',
+			'default' 	=> '',
+			'desc' 		=> '名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+			//'modal'		=> '点此打开',
+		),
+		
+		'content'		=> array
+		(
+			'type' 		=> 'text-1000',
+			'name' 		=> '内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'option',
+			'update'	=> 'editor',
+		),
+		
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			//'option' 	=> $option,
+			//'update'	=> 'radio',
+		),
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+	
+	# 索引
+	'index' => array
+	(
+		# 索引名 => 索引id
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+		
+	),
+	
+	# request 请求接口定义
+	'request' => array
+	(
+		# all 取所有
+		'getAll' => array
+		(
+			'where' => array
+			(
+				'state' => 1,
+			),
+			'type' => 'all',
+			'order' => array('id', 'desc'),
+			'limit' => array(10, 0),
+			'col' => '*',
+		),
+	),
+);

+ 137 - 0
main/database/menu.php

@@ -0,0 +1,137 @@
+<?php
+
+# 定义几个常用的选项
+$option = array
+(
+	1 => '显示',
+	2 => '不显示',
+);
+
+$target = array
+(
+	'_blank' => '是',
+	'_self' => '否',
+);
+
+$time = time();
+
+return array
+(
+	# 表名
+	'name' => 'menu',
+	# 显示给用户看的名称
+	'lang' => '菜单管理',
+	# 后台菜单排序
+	'order' => 9,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '菜单ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'search'	=> 'order',
+			//'list'		=> true,
+			'order'		=> 'desc',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '菜单名称',
+			'default' 	=> '',
+			'desc' 		=> '请输入菜单名称',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'order,fulltext',
+			'list'		=> true,
+		),
+
+		'icon'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '图标-宽度为150的图片',
+			'default' 	=> '',
+			'desc' 		=> '请选择图标',
+			'match' 	=> 'is_string',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+
+		'link'		=> array
+		(
+			'type' 		=> 'text-200',
+			'name' 		=> '链接',
+			'default' 	=> '',
+			'desc' 		=> '请输入链接',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+		
+		'target'		=> array
+		(
+			'type' 		=> 'varchar-24',
+			'name' 		=> '打开新页面',
+			'default' 	=> '_self',
+			'desc' 		=> '打开新页面',
+			'match' 	=> 'option',
+			'option' 	=> $target,
+			'update'	=> 'radio',
+			//'list'		=> true,
+		),
+		
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $option,
+			'update'	=> 'radio',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+
+	# 默认值
+	'default' => array
+	(
+		'col' => 'name,link,reorder,target,state,cdate',
+		'value' => array
+		(
+			'"领任务", '. Dever::url("task/list", 'main') . '",10, "_self",1,' . $time,
+
+			'"我的任务", '. Dever::url("task/my", 'main') . '",9, "_self",1,' . $time,
+
+			'"我的账户", '. Dever::url("user/my", 'main') . '",8, "_self",1,' . $time,
+		),
+	),
+);

+ 8 - 0
main/index.php

@@ -0,0 +1,8 @@
+<?php
+
+define('DEVER_APP_NAME', 'main');
+define('DEVER_APP_LANG', '系统设置');
+define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
+define('DEVER_MANAGE_ORDER', -20);
+define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower');
+include(DEVER_APP_PATH . '../boot.php');

+ 43 - 0
main/src/Data.php

@@ -0,0 +1,43 @@
+<?php
+
+namespace Main\Src;
+
+use Dever;
+
+class Data
+{
+	# 启用测试服务
+	public function test()
+	{
+		return Dever::test();
+	}
+	
+	# 启用代理服务
+	public function proxy()
+	{
+		$user = Dever::load('passport/user.data');
+		
+		if (!$user) {
+			//Dever::abert('请先登录');
+		}
+		
+		return Dever::proxy();
+	}
+	
+	# 启用安装服务
+	public function setup()
+	{
+		return Dever::setup();
+	}
+
+	public function page($id)
+	{
+		if ($id < 5) {
+			$url = 'javascript:;';
+		} else {
+			$url = Dever::url("page?id=" . $id, "main");
+		}
+
+		return $url;
+	}
+}

+ 4 - 0
message/index.php

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

+ 1 - 1
task/database/cate.php

@@ -7,7 +7,7 @@ return array
     'name' => 'cate',
     # 显示给用户看的名称
     'lang' => '任务类别',
-    'order' => 98,
+    'order' => 2,
     # 数据结构
     'struct' => array
     (

+ 1 - 1
task/database/company.php

@@ -7,7 +7,7 @@ return array
     'name' => 'company',
     # 显示给用户看的名称
     'lang' => '商家管理',
-    'order' => 10,
+    'order' => 3,
     # 数据结构
     'struct' => array
     (

+ 89 - 7
task/database/info.php

@@ -36,11 +36,17 @@ $company = function()
 $demand = array
 (
 	'username' => '账号名',
-	'crop' => '截图',
+	'pic' => '截图',
 	'link' => '链接',
 	'desc' => '文字说明',
 );
 
+$status = array
+(
+	1 => '进行中',
+	2 => '已结束',
+);
+
 return array
 (
 	# 表名
@@ -147,7 +153,7 @@ return array
 
 		'hr2'		=> array
 		(
-			'name' 		=> '限制设置',
+			'name' 		=> '任务限制',
 			'class'		=> '',//本项必须填写
 			'attr'		=> '',
 		),
@@ -155,9 +161,9 @@ return array
 		'num'		=> array
 		(
 			'type' 		=> 'int-11',
-			'name' 		=> '领取人数',
+			'name' 		=> '任务领取人数',
 			'default' 	=> '0',
-			'match' 	=> '领取人数',
+			'match' 	=> '任务领取人数',
 			'match' 	=> 'is_numeric',
 			'update'	=> 'text',
 			//'list'		=> true,
@@ -166,9 +172,42 @@ return array
 		'report_num'		=> array
 		(
 			'type' 		=> 'int-11',
-			'name' 		=> '报告上限',
+			'name' 		=> '报告数量上限',
+			'default' 	=> '0',
+			'match' 	=> '报告数量上限',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+			//'list'		=> true,
+		),
+
+		'report_user_num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '人均报告数量',
+			'default' 	=> '0',
+			'match' 	=> '人均报告数量',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+			//'list'		=> true,
+		),
+
+		'report_cate_num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '类别数量限制小于',
 			'default' 	=> '0',
-			'match' 	=> '报告上限',
+			'match' 	=> '类别数量限制小于',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+			//'list'		=> true,
+		),
+
+		'report_company_num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '商家参与次数小于',
+			'default' 	=> '0',
+			'match' 	=> '商家参与次数小于',
 			'match' 	=> 'is_numeric',
 			'update'	=> 'text',
 			//'list'		=> true,
@@ -176,7 +215,36 @@ return array
 
 		'hr3'		=> array
 		(
-			'name' 		=> '限制设置',
+			'name' 		=> '任务酬劳',
+			'class'		=> '',//本项必须填写
+			'attr'		=> '',
+		),
+
+		'task_cash'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '单任务报告酬劳',
+			'default' 	=> '0',
+			'match' 	=> '单任务报告酬劳',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+			//'list'		=> true,
+		),
+
+		'group_cash'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '下线提成酬劳',
+			'default' 	=> '0',
+			'match' 	=> '下线提成酬劳',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+			//'list'		=> true,
+		),
+
+		'hr4'		=> array
+		(
+			'name' 		=> '其他设置',
 			'class'		=> '',//本项必须填写
 			'attr'		=> '',
 		),
@@ -203,6 +271,20 @@ return array
 			'update'	=> 'editor',
 		),
 
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '状态',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
 		'state'		=> array
 		(
 			'type' 		=> 'tinyint-1',

+ 4 - 4
task/database/level.php

@@ -6,8 +6,8 @@ return array
 	# 表名
 	'name' => 'level',
 	# 显示给用户看的名称
-	'lang' => '任务级别',
-	'order' => 99,
+	'lang' => '任务级别设置',
+	'order' => 1,
 	# 数据结构
 	'struct' => array
 	(
@@ -38,9 +38,9 @@ return array
 		'num'		=> array
 		(
 			'type' 		=> 'int-11',
-			'name' 		=> '级别数字',
+			'name' 		=> '级别积分',
 			'default' 	=> '',
-			'desc' 		=> '名称',
+			'desc' 		=> '级别积分',
 			'match' 	=> 'is_numeric',
 			'update'	=> 'text',
 			'search'	=> 'fulltext',

+ 132 - 0
task/database/user_cash.php

@@ -0,0 +1,132 @@
+<?php
+
+$type = array
+(
+	1 => '微信',
+	2 => '支付宝',
+);
+
+$status = array
+(
+	1 => '申请中',
+	2 => '兑现中',
+	3 => '已完成',
+	4 => '失败',
+);
+
+return array
+(
+	# 表名
+	'name' => 'user_cash',
+	# 显示给用户看的名称
+	'lang' => '用户兑现',
+	'menu' => 'passport',
+	'order' => 98,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			//'search'	=> 'order',
+			'order'		=> 'desc',
+			'list'		=> true,
+		),
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户名',
+			'default' 	=> '',
+			'desc' 		=> '用户名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			'search'	=> array
+			(
+				'api' => 'passport/user-all',
+				'col' => 'username',
+				'result' => 'id',
+			),
+			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
+		),
+
+		'num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '兑现积分',
+			'default' 	=> '',
+			'desc' 		=> '兑现积分',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+		),
+
+		'cash_num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '兑换金额',
+			'default' 	=> '',
+			'desc' 		=> '兑换金额',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+		),
+
+		'type'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '兑现类型',
+			'default' 	=> '1',
+			'desc' 		=> '兑现类型',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $type,
+			'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,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		'insert' => false,
+		//'edit' => false,
+		'delete' => false,
+	),
+);

+ 117 - 0
task/database/user_group.php

@@ -0,0 +1,117 @@
+<?php
+
+
+$status = array
+(
+	1 => '审核中',
+	2 => '已审核',
+	3 => '未审核',
+);
+
+return array
+(
+	# 表名
+	'name' => 'user_group',
+	# 显示给用户看的名称
+	'lang' => '用户战队',
+	'menu' => 'passport',
+	'order' => 18,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			//'search'	=> 'order',
+			'order'		=> 'desc',
+			'list'		=> true,
+		),
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '队长用户名',
+			'default' 	=> '',
+			'desc' 		=> '队长用户名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			'search'	=> array
+			(
+				'api' => 'passport/user-all',
+				'col' => 'username',
+				'result' => 'id',
+			),
+			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
+		),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-180',
+			'name' 		=> '战队名',
+			'default' 	=> '',
+			'desc' 		=> '战队名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'code'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '邀请码',
+			'default' 	=> '',
+			'desc' 		=> '邀请码',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '审核状态',
+			'default' 	=> '2',
+			'desc' 		=> '审核状态',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+		'delete' => false,
+	),
+);

+ 109 - 0
task/database/user_group_member.php

@@ -0,0 +1,109 @@
+<?php
+
+$status = array
+(
+	1 => '审核中',
+	2 => '已审核',
+	3 => '未审核',
+);
+
+return array
+(
+	# 表名
+	'name' => 'user_group_member',
+	# 显示给用户看的名称
+	'lang' => '战队队员',
+	'menu' => false,
+	'order' => 17,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			//'search'	=> 'order',
+			'order'		=> 'desc',
+			'list'		=> true,
+		),
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户名',
+			'default' 	=> '',
+			'desc' 		=> '用户名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			'search'	=> array
+			(
+				'api' => 'passport/user-all',
+				'col' => 'username',
+				'result' => 'id',
+			),
+			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
+		),
+		
+		'group_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '战队名',
+			'default' 	=> '',
+			'desc' 		=> '战队名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			'search'	=> array
+			(
+				'api' => 'task/user_group-all',
+				'col' => 'name',
+				'result' => 'id',
+			),
+			'list'		=> 'Dever::load("task/user_group-one#name", {group_id})',
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '审核状态',
+			'default' 	=> '2',
+			'desc' 		=> '审核状态',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+		'delete' => false,
+	),
+);

+ 185 - 0
task/database/user_info.php

@@ -0,0 +1,185 @@
+<?php
+
+
+$status = array
+(
+	1 => '审核中',
+	2 => '已认证',
+	3 => '未认证',
+);
+
+return array
+(
+	# 表名
+	'name' => 'user_info',
+	# 显示给用户看的名称
+	'lang' => '用户认证',
+	'menu' => 'passport',
+	'order' => 20,
+	'fast' => 10,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			//'search'	=> 'order',
+			'order'		=> 'desc',
+			'list'		=> true,
+		),
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户名',
+			'default' 	=> '',
+			'desc' 		=> '用户名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			'search'	=> array
+			(
+				'api' => 'passport/user-all',
+				'col' => 'username',
+				'result' => 'id',
+			),
+			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
+		),
+		
+		'truename'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '真实姓名',
+			'default' 	=> '',
+			'desc' 		=> '真实姓名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'card'		=> array
+		(
+			'type' 		=> 'varchar-32',
+			'name' 		=> '身份证号',
+			'default' 	=> '',
+			'desc' 		=> '身份证号',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
+
+		'card_front'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '身份证正面',
+			'default' 	=> '',
+			'desc' 		=> '身份证正面',
+			'match' 	=> 'is_string',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+			'list_name'		=> '详细信息',
+			'list'		=> 'table',
+			'modal'		=> '查看详情',
+		),
+
+		'card_end'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '身份证反面',
+			'default' 	=> '',
+			'desc' 		=> '身份证反面',
+			'match' 	=> 'is_string',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+
+		'wechat'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '微信号',
+			'default' 	=> '',
+			'desc' 		=> '身份证号',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+
+		'alipay'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '支付宝',
+			'default' 	=> '',
+			'desc' 		=> '支付宝',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			//'search'	=> 'fulltext',
+			//'list'		=> true,
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '审核状态',
+			'default' 	=> '1',
+			'desc' 		=> '审核状态',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'control'	=> 'status',
+		),
+
+		'status_desc'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '审核说明',
+			'default' 	=> '',
+			'desc' 		=> '请输入审核说明',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+			'show'		=> 'status=3',
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+		'delete' => false,
+		# 快捷更新
+		'list_button' => array
+		(
+			'edit' => array('审核', 'status,status_desc'),
+		),
+	),
+);

+ 197 - 0
task/database/user_report.php

@@ -0,0 +1,197 @@
+<?php
+
+$status = array
+(
+	1 => '待审核',
+	2 => '审核通过',
+	3 => '审核未通过',
+);
+
+$num_status = array
+(
+	1 => '未入账',
+	2 => '已入账',
+);
+
+return array
+(
+	# 表名
+	'name' => 'user_report',
+	# 显示给用户看的名称
+	'lang' => '用户报告',
+	'menu' => 'passport',
+	'order' => 99,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			//'search'	=> 'order',
+			'order'		=> 'desc',
+			'list'		=> true,
+		),
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户名',
+			'default' 	=> '',
+			'desc' 		=> '用户名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			'search'	=> array
+			(
+				'api' => 'passport/user-all',
+				'col' => 'username',
+				'result' => 'id',
+			),
+			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
+		),
+
+		'task_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '任务名',
+			'default' 	=> '-1',
+			'desc' 		=> '任务名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'search'	=> array
+			(
+				'api' => 'task/info-all',
+				'col' => 'name',
+				'result' => 'id',
+			),
+			'list'		=> '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"',
+		),
+
+		'username'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '账号名',
+			'default' 	=> '',
+			'desc' 		=> '账号名',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'pic'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '任务截屏',
+			'default' 	=> '',
+			'desc' 		=> '任务截屏',
+			'match' 	=> 'is_string',
+			'update'	=> 'images',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+
+		'link'		=> array
+		(
+			'type' 		=> 'varchar-100',
+			'name' 		=> '链接',
+			'default' 	=> '',
+			'desc' 		=> '请输入链接',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+		),
+
+		'desc'		=> array
+		(
+			'type' 		=> 'varchar-800',
+			'name' 		=> '文字说明',
+			'default' 	=> '',
+			'desc' 		=> '文字说明',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '审核状态',
+			'default' 	=> '1',
+			'desc' 		=> '审核状态',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'status_desc'		=> array
+		(
+			'type' 		=> 'varchar-300',
+			'name' 		=> '审核说明',
+			'default' 	=> '',
+			'desc' 		=> '请输入审核说明',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '积分',
+			'default' 	=> '',
+			'desc' 		=> '积分',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+		),
+
+		'num_status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '是否入账',
+			'default' 	=> '1',
+			'desc' 		=> '是否入账',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $num_status,
+			'search'	=> 'select',
+			'list'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '领取时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+		'delete' => false,
+		# 快捷更新
+		'list_button' => array
+		(
+			'edit' => array('审核', 'status,status_desc'),
+		),
+	),
+);

+ 82 - 0
task/database/user_score.php

@@ -0,0 +1,82 @@
+<?php
+
+
+return array
+(
+	# 表名
+	'name' => 'user_score',
+	# 显示给用户看的名称
+	'lang' => '用户积分',
+	'menu' => 'passport',
+	'order' => 19,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			//'search'	=> 'order',
+			'order'		=> 'desc',
+			'list'		=> true,
+		),
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户名',
+			'default' 	=> '',
+			'desc' 		=> '用户名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			'search'	=> array
+			(
+				'api' => 'passport/user-all',
+				'col' => 'username',
+				'result' => 'id',
+			),
+			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
+		),
+
+		'num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '积分',
+			'default' 	=> '',
+			'desc' 		=> '积分',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+		'delete' => false,
+	),
+);

+ 168 - 0
task/database/user_score_log.php

@@ -0,0 +1,168 @@
+<?php
+
+$status = array
+(
+	1 => '支出',
+	2 => '收入',
+);
+
+$cash = array
+(
+	1 => '微信',
+	2 => '支付宝',
+);
+
+$type = array
+(
+	1 => '积分兑现',
+	2 => '任务奖励',
+	3 => '任务提成',
+	4 => '系统奖励',
+);
+
+return array
+(
+	# 表名
+	'name' => 'user_score_log',
+	# 显示给用户看的名称
+	'lang' => '用户积分日志',
+	'menu' => false,
+	'order' => 19,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			//'search'	=> 'order',
+			'order'		=> 'desc',
+			'list'		=> true,
+		),
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户名',
+			'default' 	=> '',
+			'desc' 		=> '用户名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			'search'	=> array
+			(
+				'api' => 'passport/user-all',
+				'col' => 'username',
+				'result' => 'id',
+			),
+			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
+		),
+
+		'num'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '积分',
+			'default' 	=> '',
+			'desc' 		=> '积分',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'text',
+		),
+
+		'task_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '任务名',
+			'default' 	=> '-1',
+			'desc' 		=> '任务名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'search'	=> array
+			(
+				'api' => 'task/info-all',
+				'col' => 'name',
+				'result' => 'id',
+			),
+			'list'		=> '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"',
+		),
+
+		'type'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '积分类型',
+			'default' 	=> '1',
+			'desc' 		=> '积分类型',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $type,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'cash'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '兑现途径',
+			'default' 	=> '1',
+			'desc' 		=> '兑现途径',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $cash,
+			'search'	=> 'select',
+			'list'		=> true,
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '收入支出状态',
+			'default' 	=> '1',
+			'desc' 		=> '收入支出状态',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'cash_date'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '申请兑现时间',
+			'default' 	=> '',
+			'match' 	=> 'is_numeric',
+			'desc' 		=> '申请兑现时间',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		'insert' => false,
+		//'edit' => false,
+		'delete' => false,
+	),
+);

+ 108 - 0
task/database/user_task.php

@@ -0,0 +1,108 @@
+<?php
+
+$status = array
+(
+	1 => '正常',
+	2 => '异常',
+);
+
+return array
+(
+	# 表名
+	'name' => 'user_task',
+	# 显示给用户看的名称
+	'lang' => '用户任务',
+	'menu' => 'passport',
+	'order' => 100,
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			//'search'	=> 'order',
+			'order'		=> 'desc',
+			'list'		=> true,
+		),
+
+		'uid'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '用户名',
+			'default' 	=> '',
+			'desc' 		=> '用户名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'text',
+			'search'	=> array
+			(
+				'api' => 'passport/user-all',
+				'col' => 'username',
+				'result' => 'id',
+			),
+			'list'		=> 'Dever::load("passport/user-one#username", {uid})',
+		),
+
+		'task_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '任务名',
+			'default' 	=> '-1',
+			'desc' 		=> '任务名',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'search'	=> array
+			(
+				'api' => 'task/info-all',
+				'col' => 'name',
+				'result' => 'id',
+			),
+			'list'		=> '{task_id} > 0 ? Dever::load("task/info-one#name", {task_id}) : "系统"',
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '审核状态',
+			'default' 	=> '1',
+			'desc' 		=> '审核状态',
+			'match' 	=> 'is_numeric',
+			'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+		
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '领取时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+			'search'	=> 'date',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+		),
+	),
+	
+	'manage' => array
+	(
+		'insert' => false,
+		'edit' => false,
+		'delete' => false,
+	),
+);