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
f55a3b2d
Commit
f55a3b2d
authored
Jun 11, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
24763b3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
11 deletions
+3
-11
AiVideoRetry.php
addons/shopro/job/AiVideoRetry.php
+2
-2
addons.js
public/assets/js/addons.js
+1
-9
No files found.
addons/shopro/job/AiVideoRetry.php
View file @
f55a3b2d
...
...
@@ -102,7 +102,7 @@ class AiVideoRetry extends BaseJob
// 保存远程视频到本地
$aiService
=
new
Ai
();
$video_url
=
$aiService
->
saveFile
Loc
(
isset
(
$result
[
'content'
][
'video_url'
])
?
$result
[
'content'
][
'video_url'
]
:
''
,
'.mp4'
,
'gen_ai'
,
$user_id
);
$video_url
=
$aiService
->
saveFile
Obs
(
isset
(
$result
[
'content'
][
'video_url'
])
?
$result
[
'content'
][
'video_url'
]
:
''
,
'.mp4'
,
'gen_ai'
,
$user_id
);
$this
->
debug_log
(
'['
.
$id
.
'][AI视频查询异步队列]保存本地接口返回值 video_url:'
.
$video_url
,
$user_id
);
...
...
@@ -112,7 +112,7 @@ class AiVideoRetry extends BaseJob
}
// 更新我的试戴记录
AiTryOnModel
::
where
(
'user_id'
,
$user_id
)
->
where
(
'ai_task_id'
,
$taskid
)
->
update
([
'ai_status'
=>
1
,
'ai_url'
=>
config
(
'shopro.api_host'
)
.
$video_url
,
'ai_err_msg'
=>
'视频已完成'
]);
AiTryOnModel
::
where
(
'user_id'
,
$user_id
)
->
where
(
'ai_task_id'
,
$taskid
)
->
update
([
'ai_status'
=>
1
,
'ai_url'
=>
$video_url
,
'ai_err_msg'
=>
'视频已完成'
]);
$this
->
debug_log
(
'['
.
$id
.
'][AI视频查询异步队列]保存本地视频成功 sql: '
.
db
()
->
getLastSql
(),
$user_id
);
// 发送成功消息通知
...
...
public/assets/js/addons.js
View file @
f55a3b2d
...
...
@@ -279,10 +279,6 @@ if (typeof Config.upload.storage !== 'undefined' && Config.upload.storage === 'h
delete
retParams
.
hwobstoken
;
delete
retParams
.
date
;
delete
retParams
.
md5
;
// 确保 acl 参数存在
if
(
!
retParams
.
acl
)
{
retParams
.
acl
=
'public-read'
;
}
if
(
Config
.
upload
.
uploadmode
!==
'client'
)
{
params
.
category
=
files
[
0
].
category
||
''
;
}
...
...
@@ -292,12 +288,8 @@ if (typeof Config.upload.storage !== 'undefined' && Config.upload.storage === 'h
this
.
on
(
"sending"
,
function
(
file
,
xhr
,
formData
)
{
var
that
=
this
;
var
_send
=
xhr
.
send
;
//确保 acl 参数存在
if
(
!
formData
.
get
(
'acl'
))
{
formData
.
append
(
'acl'
,
'public-read'
);
}
//仅允许部分字段
var
allowFields
=
[
'partNumber'
,
'uploadId'
,
'key'
,
'AccessKeyId'
,
'policy'
,
'signature'
,
'file'
,
'acl'
];
var
allowFields
=
[
'partNumber'
,
'uploadId'
,
'key'
,
'AccessKeyId'
,
'policy'
,
'signature'
,
'file'
,
'acl'
];
formData
.
forEach
(
function
(
value
,
key
)
{
if
(
allowFields
.
indexOf
(
key
)
<
0
)
{
formData
.
delete
(
key
);
...
...
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