dwc 7 éve
szülő
commit
7670f9a6e8
2 módosított fájl, 16 hozzáadás és 2 törlés
  1. 13 2
      content/database/news.php
  2. 3 0
      content/v1/News.php

+ 13 - 2
content/database/news.php

@@ -89,6 +89,17 @@ return array
 			'search'	=> 'fulltext',
 			'list'		=> true,
 		),
+		'reading'		=> array
+		(
+			'type' 		=> 'varchar-255',
+			'name' 		=> '导读',
+			'default' 	=> '',
+			'desc' 		=> '请输入导读',
+			'match' 	=> 'option',
+			'update'	=> 'textarea',
+			'search'	=> 'fulltext',
+			'list'		=> true,
+		),
 
 		'subname'		=> array
 		(
@@ -97,7 +108,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '子标题',
 			'match' 	=> 'option',
-			'update'	=> 'text',
+			// 'update'	=> 'text',
 			//'search'	=> 'fulltext',
 			//'list'		=> true,
 		),
@@ -306,7 +317,7 @@ return array
 			'type' => 'all',
 			'order' => array('reorder' => 'desc', 'id' => 'desc'),
 			'page' => array(10, 'list'),
-			'col' => 'id, name, subname,pic, top, cate_id, info_id, author_id, content, (num_view+num_add_view) as num_view,num_up,num_review, cdate',
+			'col' => 'id, name, reading,subname,pic, top, cate_id, info_id, author_id, content, (num_view+num_add_view) as num_view,num_up,num_review, cdate',
 		),
 		
 		# 更新浏览量

+ 3 - 0
content/v1/News.php

@@ -48,6 +48,7 @@ class News extends Base
      * @apiSuccess {Object[]} news 资讯信息
      * @apiSuccess {Number}   news.id  资讯id
      * @apiSuccess {String}   news.name  资讯标题
+     * @apiSuccess {String}   news.reading  资讯导读
      * @apiSuccess {String}   news.content  资讯内容
      * @apiSuccess {String}   news.num_view  阅读数
      * @apiSuccess {String}   news.num_review  评论数
@@ -123,6 +124,7 @@ class News extends Base
      * @apiSuccess {Object[]} news 资讯信息
      * @apiSuccess {Number}   news.id  资讯id
      * @apiSuccess {String}   news.name  资讯标题
+     * @apiSuccess {String}   news.reading  资讯导读
      * @apiSuccess {String}   news.name  资讯子标题
      * @apiSuccess {String}   news.content  资讯内容
      * @apiSuccess {String}   news.num_view  阅读数
@@ -184,6 +186,7 @@ class News extends Base
      * @apiSuccess {Object[]} news 资讯信息
      * @apiSuccess {Number}   news.id  资讯id
      * @apiSuccess {String}   news.name  资讯标题
+     * @apiSuccess {String}   news.reading 资讯导读
      * @apiSuccess {String}   news.content  资讯内容
      * @apiSuccess {String}   news.num_view  阅读数
      * @apiSuccess {String}   news.num_review  评论数