短视频矩阵源码--MySQL数据库

短视频矩阵源码--MySQL数据库,这是一个基于MySQL数据库的短视频矩阵源码,可以帮助开发者快速构建一个完整的短视频平台。该源码包含用户注册、登录、发布视频、浏览、评论等核心功能,具有可扩展性和高性能,适合初学者学习和高级开发者定制。

 

   $count_data['video_remain'] = $collect_data['cs_surplus'];
        $count_data['video_create'] = $collect_data['cs_rest_num'];
        $count_data['video_release']= $collect_data['cs_scan_count'];
        $count_data['video_download']   = $collect_data['cs_download_num'];
        $count_data['video_total']  = $video_total;
        $this->output['count_data'] = $count_data;
        if ($this->front_module == 'eui') {
            $this->displaySmarty('dspui/video/index.html');
        } else {
            $this->displaySmarty('dydqtshoppc/video/index.tpl');
        }
    }
    public function itemListAction() {
        //面包屑
        $breadcrumbs = [
            ['title' => 'AI视频创意', 'link' => '#'],
            ['title' => '创意工程', 'link' => '#'],
        ];
        $this->buildBreadcrumbs($breadcrumbs);

        $mode   = $this->request->getIntParam('mode', 0);
        $this->output['mode']   = $mode;
        $time_range     = $this->request->getStrParam('time_range');
        $keyword_type   = $this->request->getStrParam('keyword_type');
        $keyword        = $this->request->getStrParam('keyword');

        $where = [
            ['name' => 'dv_s_id', 'oper' => '=', 'value' => $this->sid]
        ];
        if(!empty($time_range)){
            $add_time_range_arr = explode('~',$time_range);

            $where[]    = ['name' => 'dv_create_time', 'oper' => '>=', 'value' => strtotime($add_time_range_arr[0])];
            $where[]    = ['name' => 'dv_create_time', 'oper' => '<', 'value' => strtotime($add_time_range_arr[1]) + 86400];
        }
        if(!empty($keyword_type)){
            $where[]    = ['name' => $keyword_type, 'oper' => 'like', 'value' => "%{$keyword}%"];
        }
        if ($mode > 0) {
            $where[]    = ['name' => 'dv_video_mode', 'oper' => '=', 'value' => $mode];
        }

        $sort = ['dv_create_time' => 'DESC'];
        //获取视频列表
        $Video_model = new App_Model_Douyin_MysqlVideoStorage();
        $video_list = $Video_model->getList($where,$this->index,$this->count,$sort);
        $temp_video_model   = new App_Model_Douyin_MysqlVideoTempVideoStorage($this->sid);
        $pailie_video_model = new App_Model_Douyin_MysqlVideoMaterialPailieStorage();
        foreach ($video_list as &$item) {
            $item['cache_num']  = $temp_video_model->getTempVideoCountByItem($item['dv_id']);
            $item['pailie']     = $pailie_video_model->getRowByDvid($item['dv_id']);

            $progerss   = 40;
            if ($item['video_num'] > 0 || $item['image_num'] > 0) {
                $progerss += 10;
            }
            if ($item['audio_num'] > 0 || $item['write_num'] > 0) {
                $progerss += 10;
            }
            if ($item['pailie']['dvmp_is_zuhe']) {
                $progerss += 20;
            }
            if ($item['cache_num'] > 0) {
                $progerss += 20;
            }

            $item['progress']   = $progerss;
        }

        //计算分页
        $active_list_all = $Video_model->getCount($where);
        $page_libs = new Libs_Pagination_Paginator($active_list_all,$this->count,'jquery',true)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值