Forráskód Böngészése

首页收藏按钮,视频收藏列表

lizhen_gitee 9 hónapja
szülő
commit
71d323e729

+ 1 - 1
application/api/controller/Demo.php

@@ -61,7 +61,7 @@ class Demo extends Api
      */
     public function test1()
     {
-        $list = Db::name('video')->select();
+        $list = Db::name('video')->where('search_title','')->select();
         foreach($list as $key => $video){
             $shouzimu = $this->shouzimu($video['title']);
             Db::name('video')->where('id',$video['id'])->update(['search_title'=>$shouzimu]);

+ 26 - 0
application/api/controller/Tvindex.php

@@ -24,6 +24,7 @@ class Tvindex extends Api
         $data['index_tuiding_switch'] = config('site.index_tuiding_switch');
         $data['index_search_switch']  = config('site.index_search_switch');
         $data['index_history_switch'] = config('site.index_history_switch');
+        $data['index_shoucang_switch'] = config('site.index_shoucang_switch');
         $data['index_dinggou_switch'] = config('site.index_dinggou_switch');
         $data['index_account_switch'] = config('site.index_account_switch');
 
@@ -305,6 +306,31 @@ class Tvindex extends Api
 
         $this->success('视频', $list);
     }
+    //视频收藏列表
+    public function shoucang_list(){
+        if($this->auth->isLogin()){
+            $video_view = Db::name('video_collection')->where('user_id',$this->auth->id)->order('createtime desc')->group('video_id')->column('video_id,createtime');
+
+            if(!empty($video_view)){
+
+                $video_ids = implode(',',array_keys($video_view));
+
+                $list = Db::name('video')->field('id, title, image, is_pay')->where(['status' => 1, 'inject_status' => 2])->where('id','IN',$video_ids)->orderRaw('field(id,'.$video_ids.')')->page($this->page,$this->pagenum)->select();
+                $list = list_domain_image($list, ['image']);
+                foreach($list as $key => $val){
+                    $list[$key]['shoucang_time'] = $video_view[$val['id']];
+                }
+
+            }else{
+                $list = [];
+            }
+
+        }else{
+            $list = [];
+        }
+
+        $this->success('视频', $list);
+    }
 
     //视频收藏/取消收藏
     public function video_collection() {

+ 4 - 3
application/extra/site.php

@@ -46,7 +46,7 @@ return array (
   'paygrowth' => '1',
   'cancelorder' => '0.01',
   'invitepersonnum' => '10',
-  'special_models' => 'E9OOV22D,M1518H,CM101s,G2-40,E910,CMCC-UHDC71-590169',
+  'special_models' => 'E9OOV22D,M1518H,CM101s,G2-40,E910,CMCC-UHDC71-590169,CM311-1S,CM311-1,CM311-1-YS16',
   'hw_ip' => '183.207.249.71,183.207.248.71,zv6.ott.mobaibox.com,223.110.240.40',
   'zx_ip' => '0.0.0.0',
   'index_logo' => '/uploads/20240529/2b9d4403cfa1124b7971e0f5d5196512.png',
@@ -54,13 +54,14 @@ return array (
   'index_tuiding_switch' => '1',
   'index_search_switch' => '1',
   'index_history_switch' => '1',
+  'index_shoucang_switch' => '1',
   'index_dinggou_switch' => '1',
   'index_account_switch' => '0',
   'index_right_1' => '服务电话:13625150009',
   'index_right_2' => '服务时间:周一至周五8:00 - 18:00',
   'index_right_3' => '收视路径:首页-爱家会员-健康e家',
   'index_right_4' => '',
-  'index_top_video_id' => '500',
+  'index_top_video_id' => '562',
   'text_tuiding' => '亲爱的用户:
 如果您想退订健康e家业务,可以通过以下方式:
 1、电视屏 一 家庭专区 一 个人中心 一 我的订单,点击退订取消订购。
@@ -71,6 +72,6 @@ return array (
 6、登录中国移动网上营业厅:http://10086.cn 掌上营业厅:wap.10086.cn“已开服务 一 增值业务”进行退订。',
   'video_goback_seconds' => '20',
   'tv_videoinfo_banquan' => '内容如有侵权,请联系删除',
-  'appstart_video' => '/uploads/20240624/c033c462e728b2668c2fa71574b23660.mp4',
+  'appstart_video' => '/uploads/20240709/a46bf5d3a673a85d7d0e7abbff092c74.png',
   'index_bg_image' => '',
 );