当前位置:   article > 正文

短视频seo系统开发源码分享_seo短视频系统源码

seo短视频系统源码

一、视频批量生成,文字转语音部分

$breadcrumbs = [
    ['title' => 'AI视频创意', 'link' => '#'],
    ['title' => '开始创作', 'link' => ''],
];
$this->buildBreadcrumbs($breadcrumbs);
//搜索专用
$keyword_type = $this->request->getStrParam('keyword_type');
$keyword = $this->request->getStrParam('keyword');
$this->output['keyword_type'] = $keyword_type;
$this->output['keyword'] = $keyword;

$dv_id = $this->request->getIntParam('dv_id');  //视频工程ID
$this->output['dv_id'] = $dv_id;
$type = $this->request->getIntParam('type', 0);   //素材类型
$scene = $this->request->getIntParam('scene', 1);
$this->output['scene'] = $scene;
//获取视频信息
$video_model = new App_Model_Douyin_MysqlVideoStorage();
$video_info = $video_model->getRowByIdSid($dv_id, $this->sid);
if (empty($video_info)) {
    plum_redirect_with_msg('视频创意工程不存在');
}

$mixed_video_mode = $video_info['dv_video_mode'];
if (in_array($mixed_video_mode, [11])) {    //智能图片组合
    $type = in_array($type, [0, 1]) ? 3 : $type;   //默认为图片素材类型
} else {
    $type = in_array($type, [0, 3]) ? 1 : $type;  //默认为视频素材类型
}

//获取素材列表
$where = [
    ['name' => 'dvm_ds_id', 'oper' => '=', 'value' => $this->sid],
    ['name' => 'dvm_dv_id', 'oper' => '=', 'value' => $dv_id],
    ['name' => 'dvm_material_type', 'oper' => '=', 'value' => $type]
];


//视频类型,区分混剪模式
if ($type == 1) {
    $where[] = ['name' => 'dvm_video_mixed_mode', 'oper' => '=', 'value' => $video_info['dv_video_mode']];
}
if (!empty($keyword_type)) {
    $where[] = ['name' => $keyword_type, 'oper' => 'like', 'value' => "%{$keyword}%"];
}
//智能场景组合,视频素材加场景值筛选
if ($type == 1 && $mixed_video_mode == 4) {
    $scene_model = new App_Model_Douyin_MysqlVideoSceneStorage();
    $scene_count = $scene_model->getCountByDvid($dv_id);
    if ($scene_count == 0 && $video_info['dv_video_use'] > 0) {
        for ($i = 1; $i <= $video_info['dv_video_use']; $i++) {
            $indata = [
                'dvs_ds_id' => $this->sid,
                'dvs_dv_id' => $dv_id,
                'dvs_name' => "场景" . $i,
                'dvs_duration' => $video_info['dv_video_shot'] * 1000,
                'dvs_

二、同城拓客,扫码发视频关键词投稿布局

  1. $platform = $this->request->getStrParam('platform','douyin'); //平台类型:douyin、kuaishou
  2. //携带状态
  3. $state = ['active_id' => $id];
  4. /************生成活动推广url************/
  5. //抖音开放平台二维码
  6. if($platform == 'douyin'){
  7. $plugin = new App_Plugin_Douyin_OpenPlugin($this->manager['ds_agent_id']);
  8. $app_info = $plugin->getAppInfo();
  9. $redirect_uri = $app_info['douyin_domain'].'/dydqtclient/user/userLogin';
  10. $scope = $app_info['publish_scope'];
  11. $url = $plugin->getOauthCode($redirect_uri, $scope, json_encode($state));
  12. }
  13. //快手开放平台二维码
  14. if($platform == 'kuaishou'){
  15. $plugin = new App_Plugin_Kuaishou_OpenPlugin($this->manager['ds_agent_id']);
  16. $app_info = $plugin->getAppInfo();
  17. $redirect_uri = $app_info['kuaishou_domain'].'/dydqtclient/user/kuaishouUserLogin';
  18. $scope = 'user_info,user_base,user_video_publish,user_video_info';
  19. $url = $plugin->getWebOauthCode($redirect_uri, $scope, json_encode($state));
  20. }
  21. //输出二维码图片
  22. $outfile_arr = $this->makeQrcodePath($id,$platform);
  23. $uri = self::GATEWAY.'/platform/oauth/connect/';
  24. $scope = trim($scope, ',');
  25. $params = [
  26. 'client_key' => $this->client_key,
  27. 'response_type' => 'code',
  28. 'scope' => $scope,
  29. 'redirect_uri' => $redirect_uri,
  30. ];
  31. if (!is_null($state))
  32. $params['state'] = $state;
  33. $code = $uri."?".http_build_query($params);
  34. return $code;

 三、 企业号私信管理/群聊管理/意向客户管理

  1. $daid = $this->request->getIntParam('daid', 0);
  2. //应用类型输出
  3. $where = [
  4. ['name' => 'cl_ds_id', 'oper' => '=', 'value' => $this->sid],
  5. ];
  6. if (!empty($daid)) {
  7. $where[] = ['name' => 'dl_qyh_uid', 'oper' => '=', 'value' => $daid];
  8. }
  9. $this->output['enter_id'] = $daid;
  10. $sort = ['cl_create_time' => 'DESC'];
  11. $chat_list_model = new App_Model_Douyin_MysqlChatListStorage();
  12. $chat_result = $chat_list_model->getList($where, $this->index, $this->count, $sort);
  13. $intent_model = new App_Model_Douyin_MysqlIntentUserStorage();
  14. #$account_model = new App_Model_Douyin_MysqlDyAccountStorage();
  15. $chat_list = [];
  16. foreach ($chat_result as $item) {
  17. #$account = $account_model->getRowByIdSid($item['cl_qyh_uid'], $this->sid);
  18. $intention = $intent_model->getUserByOpenId($this->sid, $item['cl_from_openid']);
  19. $each = [
  20. 'user_nickname' => empty($intention) ? '匿名' : $intention['iu_nickname'],
  21. 'user_avatar' => empty($intention) ? parent::TEMPLATE_PLACEHOLDER_IMAGE : $intention['iu_avatar'],
  22. 'user_newmsg' => $item['cl_new_text'],
  23. 'user_newtime' => date('Y-m-d H:i:s', $item['cl_new_time']),
  24. 'user_openid' => $item['cl_from_openid'],
  25. 'qyh_uid' => $item['cl_qyh_uid'],
  26. 'undo_count' => $item['cl_undo_count'],
  27. ];
  28. array_push($chat_list, $each);
  29. }
  30. $this->displayJson($chat_list);
  31. $from_openid = $this->request->getStrParam('from_openid');
  32. $qyh_uid = $this->request->getIntParam('qyh_uid');
  33. $letter_model = new App_Model_Douyin_MysqlLetterStorage();
  34. $detail_result = $letter_model->getChatListOrder($from_openid, $qyh_uid, $this->sid, $this->index, $this->count);
  35. $chat_detail = [];
  36. foreach ($detail_result as $item) {
  37. $each = [
  38. 'msg_type' => $item['dl_msg_type'],
  39. 'msg_content' => $item['dl_msg_content'],
  40. 'msg_time' => date('Y-m-d H:i:s', $item['dl_create_time']),
  41. 'send_receive' => intval($item['dl_send_receive']), //1收到的消息,2发送的消息
  42. ];
  43. array_push($chat_detail, $each);
  44. }
  45. $account_model = new App_Model_Douyin_MysqlDyAccountStorage();
  46. $qyh_account = $account_model->getRowByIdSid($qyh_uid, $this->sid);
  47. $intent_model = new App_Model_Douyin_MysqlIntentUserStorage();
  48. $from_account = $intent_model->getUserByOpenId($this->sid, $from_openid, $qyh_uid);
  49. $return_data = [
  50. 'from_user' => [
  51. 'nickname' => empty($from_account) ? '匿名' : $from_account['iu_nickname'],
  52. 'avatar' => empty($from_account) ? parent::TEMPLATE_PLACEHOLDER_IMAGE : $from_account['iu_avatar'],
  53. 'openid' => $from_openid,
  54. ],
  55. 'to_user' => [
  56. 'nickname' => $qyh_account['da_nickname'],
  57. 'avatar' => $qyh_account['da_avatar'],
  58. 'qyh_uid' => $qyh_uid,
  59. ],
  60. 'chat_detail' => $chat_detail
  61. ];
  62. $chat_list_model = new App_Model_Douyin_MysqlChatListStorage();
  63. $cl_where = [
  64. ['name' => 'cl_ds_id', 'oper' => '=', 'value' => $this->sid],
  65. ['name' => 'cl_qyh_uid', 'oper' => '=', 'value' => $qyh_uid],
  66. ['name' => 'cl_from_openid', 'oper' => '=', 'value' => $from_openid],
  67. ];
  68. $chat_list_model->updateValue(['cl_undo_count' => 0], $cl_where);
  69. $this->displayJson($return_data);

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Guff_9hys/article/detail/820485
推荐阅读
相关标签
  

闽ICP备14008679号