Commit f8990ed5 authored by 刘小敏's avatar 刘小敏

试戴表增加试戴图字段

parent 4634fe1a
......@@ -6,6 +6,7 @@ use addons\shopro\controller\Common;
use app\admin\model\shopro\AiTryon as AiTryOnModel;
use addons\shopro\service\goods\GoodsService;
use addons\shopro\service\user\User;
use app\admin\model\shopro\goods\Goods;
class AiTryon extends Common
{
......@@ -109,6 +110,10 @@ class AiTryon extends Common
}
}
// 查询商品信息,获取 image 字段
$goods = Goods::where('id', $params['goods_id'])->find();
$goodsImage = $goods ? $goods->image : '';
// 我的试戴
$tryonModel = new AiTryOnModel();
$tryonData = [
......@@ -116,8 +121,9 @@ class AiTryon extends Common
'goods_id' => $params['goods_id'],
'goods_title' => $params['goods_title'],
'goods_subtitle' => $params['goods_subtitle'],
'goods_image' => $params['jewelry_image'],
'goods_image' => $goodsImage,
'person_image' => $params['person_image'],
'image_3d' => $params['jewelry_image'],
'ai_task_id' => '',
'ai_type' => 0,
'ai_status' => 0,
......@@ -201,6 +207,10 @@ class AiTryon extends Common
}
}
// 查询商品信息,获取 image 字段
$goods = Goods::where('id', $params['goods_id'])->find();
$goodsImage = $goods ? $goods->image : '';
// 保存一条 我的试戴
$tryonModel = new AiTryOnModel();
$tryonData = [
......@@ -208,8 +218,9 @@ class AiTryon extends Common
'goods_id' => $params['goods_id'],
'goods_title' => $params['goods_title'],
'goods_subtitle' => $params['goods_subtitle'],
'goods_image' => $params['jewelry_image'],
'goods_image' => $goodsImage,
'person_image' => $params['person_image'],
'image_3d' => $params['jewelry_image'],
'ai_type' => 1,
'ai_status' => 0,
'ai_task_id' => '',
......
......@@ -204,7 +204,7 @@ class Ai
'json' => [
"model" => "doubao-seedream-5-0-260128",
"prompt" => $prompt,
"image" => [$param['person_image'], $param['goods_image']],
"image" => [$param['person_image'], $param['image_3d']],
"sequential_image_generation" => "disabled",
"response_format" => $response_format,
"size" => "2K",
......
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