dever 6 anos atrás
pai
commit
662c18c2c5

+ 1 - 1
content/database/article.php

@@ -49,7 +49,7 @@ $share = array
 );
 );
 
 
 # 常用的col
 # 常用的col
-$col = 'id,cate_id,name,pic_cover,pdate,num_add_view,num_view,num_up,num_add_up,num_comment,share_yes,share_title,share_pic,share_content,function,content';
+$col = 'id,cate_id,name,pic_cover,pdate,num_add_view+num_view as num_view,num_up+num_add_up as num_up,num_comment,share_yes,share_title,share_pic,share_content,function,content';
 
 
 return array
 return array
 (
 (

+ 12 - 11
doc/apidoc.php

@@ -280,7 +280,7 @@
  * @apiSuccess {String}   news.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   news.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   news.pdate 时间
  * @apiSuccess {String}   news.pdate 时间
  * @apiSuccess {String}   news.num_view 浏览量
  * @apiSuccess {String}   news.num_view 浏览量
- * @apiSuccess {String}   news.num_up 点赞
+ * @apiSuccess {String}   news.num_up 喜欢
  * @apiSuccess {String}   news.num_comment 评论量
  * @apiSuccess {String}   news.num_comment 评论量
  * @apiSuccess {String}   news.num_ding 订阅量
  * @apiSuccess {String}   news.num_ding 订阅量
  * @apiSuccess {String}   news.num_user 在线人数
  * @apiSuccess {String}   news.num_user 在线人数
@@ -331,7 +331,7 @@
  * @apiSuccess {String}   news.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   news.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   news.pdate 时间
  * @apiSuccess {String}   news.pdate 时间
  * @apiSuccess {String}   news.num_view 浏览量
  * @apiSuccess {String}   news.num_view 浏览量
- * @apiSuccess {String}   news.num_up 点赞
+ * @apiSuccess {String}   news.num_up 喜欢
  * @apiSuccess {String}   news.num_comment 评论量
  * @apiSuccess {String}   news.num_comment 评论量
  * @apiSuccess {String}   news.num_ding 订阅量
  * @apiSuccess {String}   news.num_ding 订阅量
  * @apiSuccess {String}   news.num_user 在线人数
  * @apiSuccess {String}   news.num_user 在线人数
@@ -379,7 +379,7 @@
  * @apiSuccess {String}   info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   info.pdate 时间
  * @apiSuccess {String}   info.pdate 时间
  * @apiSuccess {String}   info.num_view 浏览量
  * @apiSuccess {String}   info.num_view 浏览量
- * @apiSuccess {String}   info.num_up 点赞
+ * @apiSuccess {String}   info.num_up 喜欢
  * @apiSuccess {String}   info.num_comment 评论量
  * @apiSuccess {String}   info.num_comment 评论量
  * @apiSuccess {String}   info.share_yes 是否显示分享按钮 1显示 2不显示
  * @apiSuccess {String}   info.share_yes 是否显示分享按钮 1显示 2不显示
  * @apiSuccess {String}   info.share_title 分享标题
  * @apiSuccess {String}   info.share_title 分享标题
@@ -399,7 +399,7 @@
  *
  *
  * @apiSuccess {Object[]} user_act 用户行为 当用户登录时有效
  * @apiSuccess {Object[]} user_act 用户行为 当用户登录时有效
  * @apiSuccess {String}   user_act.share 用户分享数 
  * @apiSuccess {String}   user_act.share 用户分享数 
- * @apiSuccess {String}   user_act.up 是否点赞1为点赞,2为未点赞
+ * @apiSuccess {String}   user_act.up 是否喜欢1为喜欢,2为未喜欢
  */
  */
 
 
 /**
 /**
@@ -420,7 +420,7 @@
  * @apiSuccess {String}   info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   info.pdate 时间
  * @apiSuccess {String}   info.pdate 时间
  * @apiSuccess {String}   info.num_view 浏览量
  * @apiSuccess {String}   info.num_view 浏览量
- * @apiSuccess {String}   info.num_up 点赞
+ * @apiSuccess {String}   info.num_up 喜欢
  * @apiSuccess {String}   info.num_comment 评论量
  * @apiSuccess {String}   info.num_comment 评论量
  * @apiSuccess {String}   info.share_yes 是否显示分享按钮 1显示 2不显示
  * @apiSuccess {String}   info.share_yes 是否显示分享按钮 1显示 2不显示
  * @apiSuccess {String}   info.share_title 分享标题
  * @apiSuccess {String}   info.share_title 分享标题
@@ -440,7 +440,7 @@
  *
  *
  * @apiSuccess {Object[]} user_act 用户行为 当用户登录时有效
  * @apiSuccess {Object[]} user_act 用户行为 当用户登录时有效
  * @apiSuccess {String}   user_act.share 用户分享数 
  * @apiSuccess {String}   user_act.share 用户分享数 
- * @apiSuccess {String}   user_act.up 是否点赞1为点赞,2为未点赞
+ * @apiSuccess {String}   user_act.up 是否喜欢1为喜欢,2为未喜欢
  */
  */
 
 
 /**
 /**
@@ -460,15 +460,16 @@
  * @apiSuccess {String}   info.pic_cover 图片
  * @apiSuccess {String}   info.pic_cover 图片
  * @apiSuccess {String}   info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   info.type 类型,参考公共参数中的类型设置说明中的type说明,根据它生成path
  * @apiSuccess {String}   info.pdate 时间
  * @apiSuccess {String}   info.pdate 时间
+ * @apiSuccess {String}   info.num_user 在线人数
  * @apiSuccess {String}   info.num_view 浏览量
  * @apiSuccess {String}   info.num_view 浏览量
- * @apiSuccess {String}   info.num_up 点赞
+ * @apiSuccess {String}   info.num_up 喜欢
  * @apiSuccess {String}   info.num_comment 评论量
  * @apiSuccess {String}   info.num_comment 评论量
  * @apiSuccess {String}   info.share_yes 是否显示分享按钮 1显示 2不显示
  * @apiSuccess {String}   info.share_yes 是否显示分享按钮 1显示 2不显示
  * @apiSuccess {String}   info.share_title 分享标题
  * @apiSuccess {String}   info.share_title 分享标题
  * @apiSuccess {String}   info.share_pic 分享图片
  * @apiSuccess {String}   info.share_pic 分享图片
  * @apiSuccess {String}   info.share_content 分享内容
  * @apiSuccess {String}   info.share_content 分享内容
  * @apiSuccess {String}   info.function 开启的功能,这是一个字符串,用逗号隔开的,1代表显示浏览量,2代表显示评论,3代表显示喜欢,4代表显示邀请阅读,如值为1,2,3,则显示浏览量、评论、喜欢,不显示邀请阅读
  * @apiSuccess {String}   info.function 开启的功能,这是一个字符串,用逗号隔开的,1代表显示浏览量,2代表显示评论,3代表显示喜欢,4代表显示邀请阅读,如值为1,2,3,则显示浏览量、评论、喜欢,不显示邀请阅读
- * @apiSuccess {String}   info.content 内容
+ * @apiSuccess {String}   info.content 直播介绍
  * @apiSuccess {String}   info.stream 直播推流地址
  * @apiSuccess {String}   info.stream 直播推流地址
  * @apiSuccess {String}   info.url_mp4 回访播放地址
  * @apiSuccess {String}   info.url_mp4 回访播放地址
  * @apiSuccess {String}   info.status 直播状态1为未开始2为直播中3为已结束
  * @apiSuccess {String}   info.status 直播状态1为未开始2为直播中3为已结束
@@ -484,18 +485,18 @@
  *
  *
  * @apiSuccess {Object[]} user_act 用户行为 当用户登录时有效
  * @apiSuccess {Object[]} user_act 用户行为 当用户登录时有效
  * @apiSuccess {String}   user_act.share 用户分享数 
  * @apiSuccess {String}   user_act.share 用户分享数 
- * @apiSuccess {String}   user_act.up 是否点赞1为点赞,2为未点赞
+ * @apiSuccess {String}   user_act.up 是否喜欢1为喜欢,2为未喜欢
  * @apiSuccess {String}   user_act.note 是否预约提醒1为已预约,2为未预约
  * @apiSuccess {String}   user_act.note 是否预约提醒1为已预约,2为未预约
  */
  */
 
 
 
 
 /**
 /**
- * @api {get} wonderful/main/?l=user.submit_up 点赞
+ * @api {get} wonderful/main/?l=user.submit_up 喜欢
  * @apiVersion 1.0.0
  * @apiVersion 1.0.0
  * @apiName user.submit_up
  * @apiName user.submit_up
  * @apiGroup UserAction
  * @apiGroup UserAction
  *
  *
- * @apiDescription 点赞
+ * @apiDescription 喜欢
  *
  *
  * @apiParam {String} signature signature
  * @apiParam {String} signature signature
  * @apiParam {Number} type type类型
  * @apiParam {Number} type type类型

+ 17 - 0
main/src/User.php

@@ -13,6 +13,23 @@ class User extends Core
     public function my()
     public function my()
     {}
     {}
 
 
+    # 获取海报
+    public function poster()
+    {
+        $id = Dever::input('id');
+        if (!$id) {
+            Dever::alert('错误的ID');
+        }
+        $type = Dever::input('type');
+        if (!$type) {
+            Dever::alert('错误的类型');
+        }
+
+        Dever::load('act/lib/share')->submit($this->data['uid'], $id, $type);
+
+        return array('id' => $id, 'type' => $type);
+    }
+
     # 分享
     # 分享
     public function submit_share()
     public function submit_share()
     {
     {

+ 1 - 1
video/database/live.php

@@ -44,7 +44,7 @@ $share = array
 	2 => '不显示',
 	2 => '不显示',
 );
 );
 
 
-$col = 'id,name,pic_cover,pdate,num_add_user,num_user,num_add_view,num_view,num_up,num_add_up,num_comment,share_yes,share_title,share_pic,share_content,function,content,url_m3u8,url_mp4,cate_id,stream_id';
+$col = 'id,name,pic_cover,pdate,num_add_user+num_user as num_user,num_add_view+num_view as num_view,num_up+num_add_up as num_up,num_comment,share_yes,share_title,share_pic,share_content,function,content,url_m3u8,url_mp4,cate_id,stream_id,sdate,edate';
 
 
 return array
 return array
 (
 (

+ 1 - 1
video/database/vod.php

@@ -42,7 +42,7 @@ $share = array
 	2 => '不显示',
 	2 => '不显示',
 );
 );
 
 
-$col = 'id,name,pic_cover,pdate,num_add_view,num_view,num_up,num_add_up,num_comment,share_yes,share_title,share_pic,share_content,function,content,cate_id';
+$col = 'id,name,pic_cover,pdate,num_add_view+num_view as num_view,num_up+num_add_up as num_up,num_comment,share_yes,share_title,share_pic,share_content,function,content,cate_id';
 
 
 return array
 return array
 (
 (

+ 1 - 1
video/lib/Live.php

@@ -9,7 +9,7 @@ class Live
     public function get($data)
     public function get($data)
     {
     {
         if (!is_array($data)) {
         if (!is_array($data)) {
-            $data = Dever::db('video/live')->one($data);
+            $data = Dever::db('video/live')->getOne($data);
         }
         }
         
         
         if (!$data) {
         if (!$data) {

+ 1 - 1
video/lib/Vod.php

@@ -9,7 +9,7 @@ class Vod
     public function get($data)
     public function get($data)
     {
     {
         if (!is_array($data)) {
         if (!is_array($data)) {
-            $data = Dever::db('video/vod')->one($data);
+            $data = Dever::db('video/vod')->getOne($data);
         }
         }
         
         
         if (!$data) {
         if (!$data) {