dever 4 سال پیش
والد
کامیت
c2b7470b59

+ 5 - 1
app/collection/database/type.php

@@ -101,9 +101,11 @@ return array
             '"四宫格图片","content/pic_grid",188,1,' . DEVER_TIME,
 
             '"普通视频","content/video",179,1,' . DEVER_TIME,
-            '"短视频","content/video_short-list",178,1,' . DEVER_TIME,
+            '"留言视频","content/video_comment",178,1,' . DEVER_TIME,
+            '"短视频","content/video_short-getAll",177,1,' . DEVER_TIME,
 
             '"普通音频","content/audio",169,1,' . DEVER_TIME,
+            '"留言音频","content/audio_comment",168,1,' . DEVER_TIME,
 
             '"直播","content/live",159,1,' . DEVER_TIME,
 
@@ -116,6 +118,8 @@ return array
             '"直接链接","content/link",119,1,' . DEVER_TIME,
 
             '"多个链接","content/link-list",118,1,' . DEVER_TIME,
+
+            '"单页面","content/webview",117,1,' . DEVER_TIME,
         ),
     ),
 

+ 8 - 5
app/collection/lib/Content.php

@@ -38,13 +38,16 @@ class Content
 
 		$data['data'] = Dever::db($table)->$method(array('content_id' => $data['id'], 'info_id' => $data['info_id']));
 
-        if (isset($data['data']['id'])) {
-            $data['data'] = $this->getData($data['data']);
-        } else {
-            foreach ($data['data'] as $k => $v) {
-                $data['data'][$k] = $this->getData($v);
+        if ($data['data']) {
+            if (isset($data['data']['id'])) {
+                $data['data'] = $this->getData($data['data']);
+            } else {
+                foreach ($data['data'] as $k => $v) {
+                    $data['data'][$k] = $this->getData($v);
+                }
             }
         }
+        
 		return $data;
 	}
 

+ 10 - 13
app/collection/lib/Manage.php

@@ -158,6 +158,11 @@ class Manage
         if ($data) {
             foreach ($data as $k => $v) {
 
+                Dever::setInput('oper_save_table', 'content');
+                Dever::setInput('oper_save_project', 'collection');
+                Dever::setInput('oper_table', 'info');
+                Dever::setInput('oper_project', 'collection');
+
                 $data[$k]['height'] = 'height: 154px;';
                 $data[$k]['info_height'] = 'height: auto;';
 
@@ -172,11 +177,13 @@ class Manage
                 $data[$k]['editurl'] = $link;
 
                 $table = $type[$v['type']]['table'];
+
                 $list = false;
                 $method = 'edit';
-                if (strstr($table, '-list')) {
+                if (strstr($table, '-')) {
                     $list = true;
-                    $table = str_replace('-list', '', $table);
+                    $temp = explode('-', $table);
+                    $table = $temp[0];
                     $method = 'list';
                 }
 
@@ -212,20 +219,10 @@ class Manage
                     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&page_type=1&table=content&table=content&save_table=link&save_project=content&project=collection&page_type=1&oper_table=info&oper_project=collection&menu=collection&menu_id=24&search_option_state=1&search_option_info_id=1
-
-               // http://192.168.33.10/dreamland/package/manage/?l=project/database/list&project=collection&page_type=2&table=content&search_option_info_id=1&oper_table=info&page_type=1&menu=collection&menu_id=24&search_option_state=1
                 
                 $data[$k]['data_editurl'] = $database->url($method, $v['id'], $table_name, '', $project_name);
-
+                
                 $data[$k]['delete'] = $database->url('delete', $v['id']);
             }
         }

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

@@ -93,6 +93,17 @@ return array
             'key'       => '1',
         ),
 
+        'content'		=> array
+		(
+			'type' 		=> 'text-255',
+			'name' 		=> '内容介绍',
+			'default' 	=> '',
+			'desc' 		=> '请输入内容',
+			'match' 	=> 'is_string',
+			'update'	=> 'editor',
+			'key'		=> '1',
+		),
+
 		'udate'		=> array
 		(
 			'type' 		=> 'int-11',

+ 2 - 13
app/content/database/video.php

@@ -49,7 +49,7 @@ return array
 		'name'		=> array
 		(
 			'type' 		=> 'varchar-80',
-			'name' 		=> '标题-不填不显示',
+			'name' 		=> '标题-暂时无用,仅做区分用',
 			'default' 	=> '',
 			'desc' 		=> '标题',
 			'match' 	=> 'option',
@@ -59,22 +59,11 @@ return array
 			//增加预览
 			'preview'	=> true,
 		),
-
-		'desc'		=> array
-		(
-			'type' 		=> 'varchar-500',
-			'name' 		=> '摘要-不填不显示',
-			'default' 	=> '',
-			'desc' 		=> '摘要',
-			'match' 	=> 'option',
-			'update'	=> 'textarea',
-		),
-
 		
         'pic'		=> array
 		(
 			'type' 		=> 'varchar-150',
-			'name' 		=> '封面图-竖屏视频的封面图图片尺寸750*1386px或等比尺寸,横屏视频的封面图图片尺寸750*422px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+			'name' 		=> '封面图-图片尺寸750*1386px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
 			'default' 	=> '',
 			'desc' 		=> '封面图',
 			'match' 	=> 'option',

+ 178 - 0
app/content/database/video_comment.php

@@ -0,0 +1,178 @@
+<?php
+
+$status = Dever::config('base')->status;
+
+return array
+(
+	# 表名
+	'name' => 'video_comment',
+	# 显示给用户看的名称
+	'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' 	=> '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'		=> '750*422',
+		),
+
+        'video'     => array
+        (
+            'type'      => 'varchar-800',
+            'name'      => '上传视频-视频格式mp4,上传大小不能超过4G',
+            'default'   => '',
+            'desc'      => '上传点播视频',
+            'match'     => 'is_string',
+            'update'    => 'upload',
+            'key'       => '3',
+            'place'     => '150',
+            'upload'    => 'qiniu',
+            'large'     => true,
+            //不覆盖原文件,生成新文件
+            'cover'     => 2,   
+        ),
+
+        'video_info'        => array
+        (
+            'type'      => 'text-255',
+            'name'      => '视频信息',
+            'default'   => '',
+            'desc'      => '视频信息',
+            'match'     => 'is_string',
+        ),
+
+		'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
+	(
+		
+	),
+);

+ 1 - 11
app/content/database/video_short.php

@@ -75,7 +75,7 @@ return array
         'name'		=> array
 		(
 			'type' 		=> 'varchar-80',
-			'name' 		=> '标题-不填不显示',
+			'name' 		=> '标题-暂时无用处,仅做区分用',
 			'default' 	=> '',
 			'desc' 		=> '标题',
 			'match' 	=> 'option',
@@ -85,16 +85,6 @@ return array
 			//增加预览
 			'preview'	=> true,
 		),
-
-		'desc'		=> array
-		(
-			'type' 		=> 'varchar-500',
-			'name' 		=> '摘要-不填不显示',
-			'default' 	=> '',
-			'desc' 		=> '摘要',
-			'match' 	=> 'option',
-			'update'	=> 'textarea',
-		),
 		
 		'pic'		=> array
 		(

+ 151 - 0
app/content/database/webview.php

@@ -0,0 +1,151 @@
+<?php
+
+$status = Dever::config('base')->status;
+
+return array
+(
+	# 表名
+	'name' => 'webview',
+	# 显示给用户看的名称
+	'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',
+		),
+
+        '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
+	(
+		
+	),
+);