wesmiler hace 2 años
padre
commit
1b05194760
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      app/Services/Api/VideoService.php

+ 2 - 1
app/Services/Api/VideoService.php

@@ -406,12 +406,13 @@ class VideoService extends BaseService
         $description = isset($params['description']) && $params['description']? trim($params['description']) : "{$nickname} 发布的短视频";
         $description = isset($params['description']) && $params['description']? trim($params['description']) : "{$nickname} 发布的短视频";
         $publishCheck = ConfigService::make()->getConfigByCode('video_publish_check',0);
         $publishCheck = ConfigService::make()->getConfigByCode('video_publish_check',0);
         $publishCheck = $publishCheck>0? $publishCheck : 0;
         $publishCheck = $publishCheck>0? $publishCheck : 0;
+        $tags = isset($params['tags']) && $params['tags']? $params['tags'] : '';
         $data = [
         $data = [
             'user_id'  => $userId,
             'user_id'  => $userId,
             'title'  => $title,
             'title'  => $title,
             'type'  => $type,
             'type'  => $type,
             'description'  => $description,
             'description'  => $description,
-            'tags'  =>  isset($params['tags']) && $params['tags']? implode(',', $params['tags']) : '',
+            'tags'  =>  $tags && is_array($tags)? implode(',', $tags) : $tags,
             'file_url'  => $fileUrl,
             'file_url'  => $fileUrl,
             'thumb'  => $thumb,
             'thumb'  => $thumb,
             'albums'  => $albums? json_encode($albums) : '',
             'albums'  => $albums? json_encode($albums) : '',