Commit 0fac941e authored by 刘小敏's avatar 刘小敏

AI试戴图片接口优化

parent ba6aee69
...@@ -107,7 +107,6 @@ class AiTryon extends Common ...@@ -107,7 +107,6 @@ class AiTryon extends Common
if (!$this->request->isPost()) { if (!$this->request->isPost()) {
$this->error(''); $this->error('');
} }
$params = $this->request->only([ $params = $this->request->only([
'person_image', 'jewelry_image','goods_id','goods_title','goods_subtitle' 'person_image', 'jewelry_image','goods_id','goods_title','goods_subtitle'
]); ]);
...@@ -146,7 +145,6 @@ class AiTryon extends Common ...@@ -146,7 +145,6 @@ class AiTryon extends Common
$tryonData['ai_status'] = 2; $tryonData['ai_status'] = 2;
$tryonData['ai_err_msg'] = $res['msg']; $tryonData['ai_err_msg'] = $res['msg'];
$tryonModel->save($tryonData); $tryonModel->save($tryonData);
$this->error($res['msg']); $this->error($res['msg']);
} else { } else {
// 保存图片到本地 // 保存图片到本地
...@@ -171,7 +169,7 @@ class AiTryon extends Common ...@@ -171,7 +169,7 @@ class AiTryon extends Common
$userService = new User(); $userService = new User();
$res = $userService->addTryTimes($user->id); $res = $userService->addTryTimes($user->id);
$this->success($res['msg'], config('shopro.api_host') . $attachment['data']); $this->success('图片生成成功', config('shopro.api_host') . $attachment['data']??'');
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment