|
@@ -82,8 +82,18 @@ class PostRepository
|
|
|
]);
|
|
|
}
|
|
|
if(isset($request['is_point']) && $request['is_point']){
|
|
|
- $request['img'] = $this->uploadImage($request['img']);
|
|
|
- Log::debug('内容上传图片结果'.json_encode($request['img']));
|
|
|
+ $res = $this->uploadImage($request['img']);
|
|
|
+ if($res && isset($res['data']) && isset($res['data']['url'])){
|
|
|
+ $request['img'] = config('customer.chxq_oss_url').$res['data']['url'];
|
|
|
+ Log::debug('内容上传图片成功结果'.json_encode($res));
|
|
|
+ }else{
|
|
|
+ Log::debug('内容上传图片失败结果'.json_encode($res));
|
|
|
+ return Response::create([
|
|
|
+ 'message' => '图片格式有误,请重试',
|
|
|
+ 'status_code' => 500
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
//验证话题
|
|
|
$topicIdsArray = $this->topic->whereIn('id', explode(',', $request['topic_ids']))->pluck('id')->toArray();
|