|
|
|
@ -176,7 +176,7 @@ class Posts extends BaseController |
|
|
|
$privacy = $this->request->param('privacy', ''); |
|
|
|
$location = $this->request->param('location', ''); |
|
|
|
$address = $this->request->param('address', ''); |
|
|
|
$video_file = $this->request->param('video_file', ''); |
|
|
|
$video_file = $this->request->param('video_file', []); |
|
|
|
$imgArr = $this->request->param('img_arr', []); |
|
|
|
$posts_id = $this->request->param('posts_id', ''); |
|
|
|
$user_ids = $this->request->param('user_ids', []); |
|
|
|
@ -249,16 +249,18 @@ class Posts extends BaseController |
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($video_file)) { |
|
|
|
$videoUrl = str_replace($this->url, '', $video_file); |
|
|
|
$whereFile = ['src' => $videoUrl, 'user_id' => $this->uid, 'delete_time' => 0]; |
|
|
|
$video_file_id = File::where($whereFile)->value('file_id'); |
|
|
|
if ($video_file_id) { |
|
|
|
$fileSaveArr[] = [ |
|
|
|
'posts_id' => $posts_id, |
|
|
|
'type' => 2, |
|
|
|
'file_id' => $video_file_id, |
|
|
|
'sort' => 1 |
|
|
|
]; |
|
|
|
foreach ($video_file as $v_file) { |
|
|
|
$videoUrl = str_replace($this->url, '', $v_file); |
|
|
|
$whereFile = ['src' => $videoUrl, 'user_id' => $this->uid, 'delete_time' => 0]; |
|
|
|
$video_file_id = File::where($whereFile)->value('file_id'); |
|
|
|
if ($video_file_id) { |
|
|
|
$fileSaveArr[] = [ |
|
|
|
'posts_id' => $posts_id, |
|
|
|
'type' => 2, |
|
|
|
'file_id' => $video_file_id, |
|
|
|
'sort' => 1 |
|
|
|
]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|