|
@@ -483,7 +483,7 @@ class AiController extends Controller
|
|
if (!is_dir($imageDir)) {
|
|
if (!is_dir($imageDir)) {
|
|
mkdir($imageDir, 0755, true);
|
|
mkdir($imageDir, 0755, true);
|
|
}
|
|
}
|
|
- $shell = 'wkhtmltopdf https://hb.swdz.com/api/ai/Pinyin?id=' . $task->id . ' ' . $path;
|
|
|
|
|
|
+ $shell = 'wkhtmltopdf https://hb.swdz.com/api/ai/Pinyin?id=' . $task->id . '&type=1 ' . $path;
|
|
exec($shell, $result, $status);
|
|
exec($shell, $result, $status);
|
|
if ($status) {
|
|
if ($status) {
|
|
$this->exit_out('生成PDF失败', ['生成PDF失败' => [$shell, $result, $status]]);
|
|
$this->exit_out('生成PDF失败', ['生成PDF失败' => [$shell, $result, $status]]);
|
|
@@ -523,10 +523,11 @@ class AiController extends Controller
|
|
{
|
|
{
|
|
try {
|
|
try {
|
|
$id = $request->input('id');
|
|
$id = $request->input('id');
|
|
|
|
+ $type = $request->input('type',0);
|
|
$task = TaskList::query()->find($id);
|
|
$task = TaskList::query()->find($id);
|
|
$result = $this->extracted($task);
|
|
$result = $this->extracted($task);
|
|
|
|
|
|
- return view('pdf', ['data' => $result, 'img' => $task->image,'title' => $task->title]);
|
|
|
|
|
|
+ return view('pdf', ['data' => $result, 'img' => $task->image,'title' => $task->title,'type' => $type]);
|
|
} catch (\Exception $exception) {
|
|
} catch (\Exception $exception) {
|
|
LogHelper::exceptionLog($exception, $this->code);
|
|
LogHelper::exceptionLog($exception, $this->code);
|
|
|
|
|