evaluationModel->find($this->request->input('id')); if (empty($info)) throw new ErrException('评论不存在'); $skuInfo = $this->skuModel->find($info->sku_id); if (empty($skuInfo)) throw new ErrException('该菜品信息不存在,请稍后再试'); $orderTime = $this->orderModel->where('id',$info->order_id)->value('create_time'); $adminInfo = $this->adminUserModel->find($skuInfo->chef_id); $imageIds = explode(',', $info->image_ids); $imageList = $this->getOssObjects($imageIds); $res = [ 'title' => $skuInfo->title, 'price' => $skuInfo->price, 'chef_id' => $skuInfo->chef_id, 'chef_name' => $adminInfo->chinese_name, 'image_url' => $this->getOssObjectById((int)$skuInfo->image_ids), 'content' => $info->content, 'content_image_list' => array_column($imageList, 'url'), 'score' => $info->score, 'order_time' => $orderTime, ]; return $this->return->success('success',$res); } }