Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loveisland
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘小敏
loveisland
Commits
f5efc586
Commit
f5efc586
authored
May 06, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AI试戴生成视频队列程序优化
parent
056d3466
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
32 deletions
+11
-32
AiTryon.php
addons/shopro/controller/user/AiTryon.php
+3
-31
helper.php
addons/shopro/helper/helper.php
+7
-0
AiVideoGen.php
addons/shopro/job/AiVideoGen.php
+0
-0
Ai.php
addons/shopro/service/user/Ai.php
+1
-1
manifest.json
addons/shopro/uniapp/manifest.json
+0
-0
No files found.
addons/shopro/controller/user/AiTryon.php
View file @
f5efc586
...
@@ -172,9 +172,8 @@ class AiTryon extends Common
...
@@ -172,9 +172,8 @@ class AiTryon extends Common
*/
*/
public
function
genVideo
()
public
function
genVideo
()
{
{
if
(
!
$this
->
request
->
isPost
())
{
if
(
!
$this
->
request
->
isPost
())
{
$this
->
error
(
''
);
$this
->
error
(
'
请用post方式请求
'
);
}
}
$params
=
$this
->
request
->
only
([
$params
=
$this
->
request
->
only
([
...
@@ -184,7 +183,8 @@ class AiTryon extends Common
...
@@ -184,7 +183,8 @@ class AiTryon extends Common
$user
=
auth_user
();
$user
=
auth_user
();
\think\Queue
::
push
(
'\addons\shopro\job\AiVideoGen@save'
,
[
'taskid'
=>
'cgt-20260430190444-vmb4q'
,
'user'
=>
$user
],
'shopro-high'
);
\think\Queue
::
push
(
'\addons\shopro\job\AiVideoGen@save'
,
[
'taskid'
=>
'cgt-20260506113558-x6wtq'
,
'user'
=>
$user
],
'shopro-high'
);
$this
->
success
(
'推送队列成功'
);
exit
;
exit
;
$userService
=
new
User
();
$userService
=
new
User
();
...
@@ -232,32 +232,4 @@ class AiTryon extends Common
...
@@ -232,32 +232,4 @@ class AiTryon extends Common
}
}
}
}
/**
* AI试戴 查询视频生成状态
*/
public
function
getGenVideoTask
()
{
// curl -X GET https://ark.cn-beijing.volces.com/api/v3/contents/generations/tasks/{id} \
// -H "Content-Type: application/json" \
// -H "Authorization: Bearer $ARK_API_KEY"
}
/**
* AI试戴视频回调函数
* 更新 AI试戴视频结果状态
*/
public
function
updateAiTryonStatus
()
{
// 记录日志
// Log::info('TASKS ID:'. $taskId .' AI生成视频回调函数接口返回:'.json_encode($result));
// // 更新表状态
// $aiTryonModel = new AiTryOnModel();
// $aiTryonModel::where('ai_task_id' , $taskId)->update(['ai_status' => 1]);
}
}
}
addons/shopro/helper/helper.php
View file @
f5efc586
...
@@ -924,3 +924,10 @@ if (!function_exists('operate_disabled')) {
...
@@ -924,3 +924,10 @@ if (!function_exists('operate_disabled')) {
}
}
}
}
// 调试输出
if
(
!
function_exists
(
'debug_echo'
))
{
function
debug_echo
(
$text
=
''
)
{
echo
PHP_EOL
.
'------'
.
$text
.
'------'
.
PHP_EOL
;
}
}
addons/shopro/job/AiVideoGen.php
View file @
f5efc586
This diff is collapsed.
Click to expand it.
addons/shopro/service/user/Ai.php
View file @
f5efc586
...
@@ -112,7 +112,7 @@ class Ai
...
@@ -112,7 +112,7 @@ class Ai
try
{
try
{
// 合成AI图片
// 合成AI图片
$resGenImg
=
$this
->
generateImage
(
$params
,
$userId
,
$response_format
=
'url'
);
$resGenImg
=
$this
->
generateImage
(
$params
,
$userId
,
'url'
);
if
(
$resGenImg
[
'code'
]
==
0
)
{
if
(
$resGenImg
[
'code'
]
==
0
)
{
return
$resGenImg
;
return
$resGenImg
;
}
}
...
...
addons/shopro/uniapp/manifest.json
View file @
f5efc586
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment