rabin %!s(int64=5) %!d(string=hai) anos
pai
achega
ad0a885bef

+ 0 - 65
app/collection/database/cate.php

@@ -2,71 +2,6 @@
 # 获取分类权限
 $auth = Dever::tops();
 $status = Dever::config('base')->status;
-$type = array
-(
-    # 默认类型
-    3 => '图文内容',
-    1 => '全屏图',
-    
-    # 2019-03-27 增加两个类型
-    7 => '长图(文字)',
-    8 => '横屏图',
-
-    2 => '长图',
-    9 => '无边框图片',
-    10 => '四宫格图片',
-
-    # 2018-12-11 增加3个类型
-    4 => '全屏视频',
-    5 => '留言视频',
-    6 => '留言音频',
-
-    # 2019-03-27 增加三个类型
-    21 => '对话模板',
-
-    # 关联类型 > 10
-    //11 => '关联图文',
-    12 => '关联视频',
-    13 => '关联直播',
-
-    # 2019-07-26
-    31 => '电商产品',
-    32 => 'H5',
-);
-
-$type = array
-(
-    # 图文
-    1 => '图文内容',
-    2 => '全屏图+文字',
-    3 => '长图+文字',
-    4 => '横屏图+文字',
-
-    # 图片
-    11 => '长图',
-    12 => '无边框图片',
-    13 => '四宫格图片',
-
-    # 音视频
-    21 => '全屏视频',
-    22 => '留言视频',
-    23 => '留言音频',
-
-    # 交互
-    31 => '对话模板',
-
-    # 电商
-    41 => '电商产品',
-
-    # h5
-    51 => '链接地址',
-
-    # 关联
-    61 => '关联图文',
-    62 => '关联视频',
-    63 => '关联直播',
-);
-
 $type = Dever::db('collection/type')->state();
 
 $list = array

+ 5 - 5
app/collection/database/info.php

@@ -283,7 +283,7 @@ $config = array
         (
             'type'      => 'varchar-50',
             'name'      => '门票单张支付价格-单位元,直接填写数字即可',
-            'default'   => '',
+            'default'   => '10',
             'desc'      => '支付价格',
             'match'     => 'is_string',
             'update'    => 'text',
@@ -574,12 +574,12 @@ $config = array
 			'br1' => array('<br />'),
 			'edit' => array('预览链接', str_replace('https://api.', 'http://www.', Dever::url('main/preview.get?type=4'))),
 			'br2' => array('<br />'),
-			'list10' => array('榜单列表', '"collection_ranking&project=act&search_type=4&search_option_collection_id={id}&oper_parent=info&oper_project=collection"' , '{audit} == 1 && {buy} == 1'),
-			'add1' => array('榜单设置', '"ranking&project=collection&search_option_info_id={id}&oper_parent=info&oper_project=collection&oper_save_jump=info&where_id={id}"', '{audit} == 1 && {buy} == 1'),
+			'list10' => array('榜单列表', '"collection_ranking&project=act&search_type=4&search_option_collection_id={id}&oper_table=info&oper_project=collection"' , '{audit} == 1 && {buy} == 1'),
+			'add1' => array('榜单设置', '"ranking&project=collection&search_option_info_id={id}&oper_table=info&oper_project=collection&oper_save_jump=info&where_id={id}"', '{audit} == 1 && {buy} == 1'),
 
-			'list' => array('内容管理', '"content&search_option_info_id={id}&oper_parent=info&page_type=1"' , '{audit} == 1'),
+			'list' => array('内容管理', '"content&search_option_info_id={id}&oper_table=info&page_type=1"' , '{audit} == 1'),
 			
-			'list1' => array('门票管理', '"buy&search_option_info_id={id}&oper_parent=info"' , '{audit} == 1 && {buy} == 1'),
+			'list1' => array('门票管理', '"buy&search_option_info_id={id}&oper_table=info"' , '{audit} == 1 && {buy} == 1'),
 		),
 	),
 

+ 13 - 11
app/collection/database/type.php

@@ -95,25 +95,27 @@ return array
         'col' => 'name,`table`,reorder,state,cdate',
         'value' => array
         (
-            '"图文内容","content/news",99,1,' . DEVER_TIME,
+            '"图文内容","content/news",199,1,' . DEVER_TIME,
 
-            '"普通图片","content/pic",89,1,' . DEVER_TIME,
-            '"四宫格图片","content/pic_grid",88,1,' . DEVER_TIME,
+            '"普通图片","content/pic",189,1,' . DEVER_TIME,
+            '"四宫格图片","content/pic_grid",188,1,' . DEVER_TIME,
 
-            '"普通视频","content/video",79,1,' . DEVER_TIME,
-            '"短视频","content/video_short",78,1,' . DEVER_TIME,
+            '"普通视频","content/video",179,1,' . DEVER_TIME,
+            '"短视频","content/video_short",178,1,' . DEVER_TIME,
 
-            '"普通音频","content/audio",69,1,' . DEVER_TIME,
+            '"普通音频","content/audio",169,1,' . DEVER_TIME,
 
-            '"直播","content/live",59,1,' . DEVER_TIME,
+            '"直播","content/live",159,1,' . DEVER_TIME,
 
-            '"活动","content/act",49,1,' . DEVER_TIME,
+            '"活动","content/act",149,1,' . DEVER_TIME,
 
-            '"对话","content/dialogue",39,1,' . DEVER_TIME,
+            '"对话","content/dialogue",139,1,' . DEVER_TIME,
 
-            '"电商产品","content/product",29,1,' . DEVER_TIME,
+            '"电商产品","content/product",129,1,' . DEVER_TIME,
 
-            '"链接地址","content/link",19,1,' . DEVER_TIME,
+            '"直接链接","content/link",119,1,' . DEVER_TIME,
+
+            '"多个链接","content/link-list",118,1,' . DEVER_TIME,
         ),
     ),
 

+ 41 - 6
app/collection/lib/Manage.php

@@ -172,23 +172,58 @@ class Manage
                 $data[$k]['editurl'] = $link;
 
                 $table = $type[$v['type']]['table'];
+                $list = false;
+                $method = 'edit';
+                if (strstr($table, '-list')) {
+                    $list = true;
+                    $table = str_replace('-list', '', $table);
+                    $method = 'list';
+                }
 
                 # 验证有没有数据
                 $info = Dever::db($table)->one(array('content_id' => $v['id'], 'info_id' => $v['info_id']));
 
-                if ($info) {
-                     $data[$k]['data_name'] = '更新内容';
-                 } else {
+                if ($list) {
+                    $data[$k]['data_name'] = '内容列表';
+                } elseif ($info) {
+                    $data[$k]['data_name'] = '更新内容';
+                } else {
                     $data[$k]['data_name'] = '新增内容';
-                 }
+                }
 
                 $temp = explode('/', $table);
                 $project_name = $temp[0];
                 $table_name = $temp[1];
 
-                $link = $database->url('edit', $v['id']) . '&search_option_info_id=' . $v['info_id'] . '&search_option_content_id=' . $v['id'] . '&project='.$project_name.'&table='.$table_name.'&oper_parent='.$project_name.'&oper_project=collection&oper_save_jump='.$project_name.'';
+                Dever::setInput('search_option_info_id', $v['info_id']);
+                Dever::setInput('search_option_content_id', $v['id']);
+
+                # 当前表和项目
+                Dever::setInput('table', $table_name);
+                Dever::setInput('project', $project_name);
+
+                # 保存之后要跳转的表和项目
+                if ($list) {
+                    Dever::setInput('oper_page_type', 1);
+                    Dever::setInput('oper_save_table', $table_name);
+                    Dever::setInput('oper_save_project', $project_name);
+                    # 上级表和项目
+                    Dever::setInput('oper_table', 'content');
+                    Dever::setInput('oper_project', 'collection');
+                    Dever::setInput('top_table', 'info');
+                    Dever::setInput('top_project', 'collection');
+
+                } else {
+                    Dever::setInput('oper_save_table', 'content');
+                    Dever::setInput('oper_save_project', 'collection');
+                    Dever::setInput('oper_table', 'info');
+                    Dever::setInput('oper_project', 'collection');
+                }
+
+                http://192.168.33.10/dreamland/package/manage/?l=project/database/list&project=collection&search_option_info_id=1&oper_table=info&page_type=1&table=info&table=info&menu=collection&menu_id=24&search_option_state=1
 
-                $data[$k]['data_editurl'] = $link;
+                
+                $data[$k]['data_editurl'] = $database->url($method, $v['id'], $table_name, '', $project_name);
 
                 $data[$k]['delete'] = $database->url('delete', $v['id']);
             }

+ 162 - 0
app/content/database/act.php

@@ -0,0 +1,162 @@
+<?php
+
+$status = Dever::config('base')->status;
+
+return array
+(
+	# 表名
+	'name' => 'news',
+	# 显示给用户看的名称
+	'lang' => '图文内容',
+	'order' => 100,
+	'menu' => false,
+
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'list'		=> true,
+		),
+
+		'info_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '合集',
+            'default'   => '',
+            'desc'      => '合集',
+            'match'     => 'is_numeric',
+            'update'    => 'hidden',
+            'value'     => Dever::input('search_option_info_id')
+        ),
+
+        'content_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '合集内容id',
+            'default'   => '',
+            'desc'      => '合集内容id',
+            'match'     => 'is_numeric',
+            'update'    => 'hidden',
+            'value'     => Dever::input('search_option_content_id')
+        ),
+		
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '活动标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+			'search'	=> 'fulltext',
+			//增加预览
+			'preview'	=> true,
+		),
+
+		'desc'		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '活动摘要',
+			'default' 	=> '',
+			'desc' 		=> '摘要',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+		),
+
+		'udate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '更新时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+		),
+
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '活动内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			'key'		=> '1',
+		),
+
+		'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			'key'		=> '1',
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '发布状态',
+			'default' 	=> '1',
+			'desc' 		=> '发布状态',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			//'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		
+	),
+);

+ 85 - 30
app/content/database/dialogue.php

@@ -2,14 +2,14 @@
 
 $status = Dever::config('base')->status;
 
-$talk_type = array
+$type = array
 (
     1 => '文字',
     2 => '图片',
     3 => '音频',
 );
 
-$talk_location = array
+$location = array
 (
     1 => '显示在左侧',
     2 => '显示在右侧',
@@ -84,41 +84,96 @@ return array
 		),
 
 		
-        'pic'		=> array
-		(
-			'type' 		=> 'varchar-150',
-			'name' 		=> '封面图-封面图图片尺寸750*422px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
-			'default' 	=> '',
-			'desc' 		=> '封面图',
-			'match' 	=> 'option',
-			'update'	=> 'image',
-			'key' 		=> '1',
-			'place'		=> '380',
-		),
-
-        'audio'     => array
+        'pic'     => array
         (
-            'type'      => 'varchar-800',
-            'name'      => '上传音频-格式mp3,上传大小不能超过100M',
+            'type'      => 'varchar-150',
+            'name'      => '置顶图片-图片尺寸750*1386px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式。为空则不显示',
             'default'   => '',
-            'desc'      => '上传音频',
-            'match'     => 'is_string',
-            'update'    => 'upload',
-            'key'       => '3',
-            'place'     => '150',
-            'upload'    => 'qiniu',
-            'large'     => true,
-            //不覆盖原文件,生成新文件
-            'cover'     => 2,   
+            'desc'      => '图片',
+            'match'     => 'option',
+            'update'    => 'image',
+            'key'       => '1',
+            'place'     => '150',   
         ),
 
-        'audio_info'        => array
+        'text'       => array
         (
-            'type'      => 'text-255',
-            'name'      => '音频信息',
+            'type'      => 'text-1000',
+            'name'      => '对话设置',
             'default'   => '',
-            'desc'      => '音频信息',
+            'desc'      => '对话设置',
             'match'     => 'is_string',
+            'update'    => array
+            (
+                array
+                (
+                    'col'       => 'location',
+                    'name'      => '对话位置',
+                    'default'   => '1',
+                    'desc'      => '对话位置',
+                    'match'     => 'is_string',
+                    'update'    => 'radio',
+                    'option'    => $location,
+                ),
+
+                array
+                (
+                    'col'       => 'avatar',
+                    'name'      => '头像-图片尺寸120*120px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式。',
+                    'default'   => '',
+                    'desc'      => '头像',
+                    'match'     => 'option',
+                    'update'    => 'image',
+                    'key'       => 1,
+                ),
+
+                array
+                (
+                    'col'       => 'type',
+                    'name'      => '对话类型',
+                    'default'   => '1',
+                    'desc'      => '对话类型',
+                    'match'     => 'is_string',
+                    'update'    => 'radio',
+                    'option'    => $type,
+                    'control'   => 'type',
+                ),
+
+                array
+                (
+                    'col'       => 'text',
+                    'name'      => '文字内容-为空则不显示',
+                    'default'   => '',
+                    'desc'      => '文字内容',
+                    'match'     => 'option',
+                    'update'    => 'textarea',
+                    'show'      => 'type=1'
+                ),
+
+                array
+                (
+                    'col'       => 'pic',
+                    'name'      => '图片-图片尺寸750*1386px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式,可以上传GIF格式。为空则不显示',
+                    'default'   => '',
+                    'desc'      => '图片',
+                    'match'     => 'option',
+                    'update'    => 'image',
+                    'key'       => 1,
+                    'show'      => 'type=2'
+                ),
+
+                array
+                (
+                    'col'       => 'audio',
+                    'name'      => '音频-音频格式mp3,上传大小不能超过100M,为空则不显示',
+                    'default'   => '',
+                    'desc'      => '音频',
+                    'match'     => 'option',
+                    'update'    => 'upload',
+                    'key'       => 2,
+                    'show'      => 'type=3'
+                ),
+            ),
         ),
 
 		'udate'		=> array

+ 163 - 0
app/content/database/link.php

@@ -0,0 +1,163 @@
+<?php
+
+$status = Dever::config('base')->status;
+
+return array
+(
+	# 表名
+	'name' => 'link',
+	# 显示给用户看的名称
+	'lang' => '链接',
+	'order' => 100,
+	'menu' => false,
+
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'list'		=> true,
+		),
+
+		'info_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '合集',
+            'default'   => '',
+            'desc'      => '合集',
+            'match'     => 'is_numeric',
+            'update'    => 'hidden',
+            'value'     => Dever::input('search_option_info_id')
+        ),
+
+        'content_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '合集内容id',
+            'default'   => '',
+            'desc'      => '合集内容id',
+            'match'     => 'is_numeric',
+            'update'    => 'hidden',
+            'value'     => Dever::input('search_option_content_id')
+        ),
+
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '标题-不填不显示',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'list'		=> true,
+			'search'	=> 'fulltext',
+			//增加预览
+			'preview'	=> true,
+		),
+
+		'desc'		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '摘要-不填不显示',
+			'default' 	=> '',
+			'desc' 		=> '摘要',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		'pic'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> 'LOGO图-图片尺寸150*150px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+			'default' 	=> '',
+			'desc' 		=> 'LOGO图',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '380',
+		),
+
+        'link'     => array
+        (
+            'type'      => 'varchar-800',
+            'name'      => '链接地址',
+            'default'   => '',
+            'desc'      => '链接地址',
+            'match'     => 'is_string',
+            'update'    => 'textarea',
+            'key'       => '1',
+        ),
+
+		'udate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '更新时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '发布状态',
+			'default' 	=> '1',
+			'desc' 		=> '发布状态',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			//'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+		
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		
+	),
+);

+ 164 - 0
app/content/database/live.php

@@ -0,0 +1,164 @@
+<?php
+
+$status = Dever::config('base')->status;
+
+return array
+(
+	# 表名
+	'name' => 'live',
+	# 显示给用户看的名称
+	'lang' => '直播',
+	'order' => 100,
+	'menu' => false,
+
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'list'		=> true,
+		),
+
+		'info_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '合集',
+            'default'   => '',
+            'desc'      => '合集',
+            'match'     => 'is_numeric',
+            'update'    => 'hidden',
+            'value'     => Dever::input('search_option_info_id')
+        ),
+
+        'content_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '合集内容id',
+            'default'   => '',
+            'desc'      => '合集内容id',
+            'match'     => 'is_numeric',
+            'update'    => 'hidden',
+            'value'     => Dever::input('search_option_content_id')
+        ),
+
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '标题-不填不显示',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'option',
+			'update'	=> 'text',
+			'list'		=> true,
+			'search'	=> 'fulltext',
+			//增加预览
+			'preview'	=> true,
+		),
+
+		'desc'		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '摘要-不填不显示',
+			'default' 	=> '',
+			'desc' 		=> '摘要',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+		),
+
+		
+        'pic'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '封面图-封面图图片尺寸750*422px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+			'default' 	=> '',
+			'desc' 		=> '封面图',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '380',
+		),
+
+        'live'     => array
+        (
+            'type'      => 'varchar-800',
+            'name'      => '直播地址',
+            'default'   => '',
+            'desc'      => '直播地址',
+            'match'     => 'is_string',
+            'update'    => 'textarea',
+            'key'       => '1',
+        ),
+
+		'udate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '更新时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+		),
+
+		'status'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '发布状态',
+			'default' 	=> '1',
+			'desc' 		=> '发布状态',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			//'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+		
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		
+	),
+);

+ 205 - 0
app/content/database/product.php

@@ -0,0 +1,205 @@
+<?php
+
+$status = Dever::config('base')->status;
+
+return array
+(
+	# 表名
+	'name' => 'product',
+	# 显示给用户看的名称
+	'lang' => '电商产品',
+	'order' => 100,
+	'menu' => false,
+
+	# 数据结构
+	'struct' => array
+	(
+		'id' 		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> 'ID',
+			'default' 	=> '',
+			'desc' 		=> '',
+			'match' 	=> 'is_numeric',
+			'list'		=> true,
+		),
+
+		'info_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '合集',
+            'default'   => '',
+            'desc'      => '合集',
+            'match'     => 'is_numeric',
+            'update'    => 'hidden',
+            'value'     => Dever::input('search_option_info_id')
+        ),
+
+        'content_id'      => array
+        (
+            'type'      => 'int-11',
+            'name'      => '合集内容id',
+            'default'   => '',
+            'desc'      => '合集内容id',
+            'match'     => 'is_numeric',
+            'update'    => 'hidden',
+            'value'     => Dever::input('search_option_content_id')
+        ),
+
+		'name'		=> array
+		(
+			'type' 		=> 'varchar-80',
+			'name' 		=> '标题',
+			'default' 	=> '',
+			'desc' 		=> '标题',
+			'match' 	=> 'is_string',
+			'update'	=> 'text',
+			'list'		=> true,
+			'search'	=> 'fulltext',
+			//增加预览
+			'preview'	=> true,
+		),
+
+		'desc'		=> array
+		(
+			'type' 		=> 'varchar-500',
+			'name' 		=> '摘要',
+			'default' 	=> '',
+			'desc' 		=> '摘要',
+			'match' 	=> 'is_string',
+			'update'	=> 'textarea',
+		),
+
+		'pic'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '图片-可以上传多张,图片尺寸380*380px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+			'default' 	=> '',
+			'desc' 		=> '图片',
+			'match' 	=> 'is_string',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '380',
+		),
+
+		'udate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '更新时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+		),
+
+		'text'       => array
+        (
+            'type'      => 'text-1000',
+            'name'      => '规格设置',
+            'default'   => '',
+            'desc'      => '规格设置',
+            'match'     => 'is_string',
+            'update'    => array
+            (
+                array
+                (
+                    'col'       => 'name',
+                    'name'      => '规格名称',
+                    'default'   => '',
+                    'desc'      => '规格名称',
+                    'match'     => 'is_string',
+                    'update'    => 'text',
+                ),
+
+                array
+                (
+                    'col'       => 'price',
+                    'name'      => '价格-请填写价格数字',
+                    'default'   => '',
+                    'desc'      => '价格',
+                    'match'     => 'is_string',
+                    'update'    => 'text',
+                ),
+
+                array
+                (
+                    'col'       => 'pic',
+                    'name'      => '图片-图片尺寸320*320px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式。',
+                    'default'   => '',
+                    'desc'      => '图片',
+                    'match'     => 'is_string',
+                    'update'    => 'image',
+                    'key'       => 1,
+                ),
+
+                array
+                (
+                    'col'       => 'content',
+                    'name'      => '描述内容',
+                    'default'   => '',
+                    'desc'      => '描述内容',
+                    'match'     => 'option',
+                    'update'    => 'editor',
+                    'key'      => 1
+                ),
+            ),
+        ),
+
+		'status'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '发布状态',
+			'default' 	=> '1',
+			'desc' 		=> '发布状态',
+			'match' 	=> 'is_numeric',
+			//'update'	=> 'select',
+			'option'	=> $status,
+			'search'	=> 'select',
+			'list'		=> true,
+			'edit'		=> true,
+		),
+
+		'reorder'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '排序(数值越大越靠前)',
+			'default' 	=> '1',
+			'desc' 		=> '请输入排序',
+			'match' 	=> 'option',
+			//'update'	=> 'text',
+			'search'	=> 'order',
+			'list'		=> true,
+			'order'		=> 'desc',
+			'edit'		=> true,
+		),
+
+		'state'		=> array
+		(
+			'type' 		=> 'tinyint-1',
+			'name' 		=> '状态',
+			'default' 	=> '1',
+			'desc' 		=> '请选择状态',
+			'match' 	=> 'is_numeric',
+		),
+
+		'cdate'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '录入时间',
+			'match' 	=> array('is_numeric', time()),
+			'desc' 		=> '',
+			# 只有insert时才生效
+			'insert'	=> true,
+		),
+	),
+	
+	# 管理功能
+	'manage' => array
+	(
+		
+	),
+
+	# request 请求接口定义
+	'request' => array
+	(
+		
+	),
+);