"4"] 第一行到第四行合并为一列 * @return Response * @throws Exception 请求接口返回异常 */ public function json(array $row, array $list, string $fileName = '记录', string $createFormat = null, array $mergeColumn = [], array $mergeRow = []) :Response { $request['type'] = 'base'; $data = ['row'=>$row,'list'=>$list]; if ($createFormat){ $data["mergeColumn"] = $mergeColumn; if($mergeRow)$data["mergeRow"] = $mergeRow; $request["createFormat"] = "merge"; } $request["data"] = json_encode($data,JSON_UNESCAPED_UNICODE); $post=Http::post(config('go.export.url'),$request); if ($post->status() == 500){ throw new Exception($post->header("Msg")); } return response($post,200, [ "Content-type"=>"application/octet-stream", "Content-Disposition"=>"attachment; filename=".$fileName."-".date('ymdHis').'.xlsx', ]); } }