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
916986bf
Commit
916986bf
authored
May 12, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AI生成视频接口优化
parent
0fac941e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
AiTryon.php
addons/shopro/controller/user/AiTryon.php
+5
-4
helper.php
addons/shopro/helper/helper.php
+1
-0
No files found.
addons/shopro/controller/user/AiTryon.php
View file @
916986bf
...
...
@@ -193,6 +193,8 @@ class AiTryon extends Common
*/
public
function
genVideo
()
{
if
(
!
$this
->
request
->
isPost
())
{
$this
->
error
(
'请用post方式请求'
);
}
...
...
@@ -238,7 +240,7 @@ class AiTryon extends Common
$tryonData
[
'ai_status'
]
=
2
;
$tryonData
[
'ai_err_msg'
]
=
$res
[
'msg'
];
$tryonModel
->
save
(
$tryonData
);
$tryonModel
->
insertGetId
(
$tryonData
);
$this
->
error
(
$res
[
'msg'
]);
...
...
@@ -247,12 +249,11 @@ class AiTryon extends Common
// 保存一条 我的试戴
$tryonData
[
'ai_status'
]
=
0
;
$tryonData
[
'ai_task_id'
]
=
isset
(
$res
[
'data'
])
?
$res
[
'data'
]
:
''
;
$tryonModel
->
save
(
$tryonData
);
$id
=
$tryonModel
->
id
;
$id
=
$tryonModel
->
insertGetId
(
$tryonData
);
//试戴次数+1
$userService
=
new
User
();
$
res
=
$
userService
->
addTryTimes
(
$user
->
id
);
$userService
->
addTryTimes
(
$user
->
id
);
// 推送队列
\think\Queue
::
push
(
'\addons\shopro\job\AiVideoGen@save'
,
[
'taskid'
=>
$res
[
'data'
],
'user'
=>
$user
],
'shopro-high'
);
...
...
addons/shopro/helper/helper.php
View file @
916986bf
...
...
@@ -929,5 +929,6 @@ if (!function_exists('debug_echo')) {
function
debug_echo
(
$text
=
''
)
{
echo
PHP_EOL
.
'------'
.
$text
.
'------'
.
PHP_EOL
;
\think\Log
::
info
(
$text
);
}
}
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