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
d4f6b21b
Commit
d4f6b21b
authored
Jun 25, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add daily 3D try-on count limit config and use it
首先在配置文件中新增ai_tryon_count配置项,默认值为2,然后在用户试戴权限校验逻辑中使用该配置项替代硬编码的2,方便后续调整限制次数。
parent
dd89931f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
User.php
addons/shopro/service/user/User.php
+2
-1
config.php
application/config.php
+3
-0
No files found.
addons/shopro/service/user/User.php
View file @
d4f6b21b
...
...
@@ -45,7 +45,8 @@ class User
// 查询我的试戴列表
$res
=
userModel
::
where
(
'id'
,
$user_id
)
->
find
();
if
(
$res
->
ai_count
>
2
&&
$res
->
ai_time
>
Time
::
today
()[
0
])
{
$ai_tryon_count
=
config
(
'shopro.ai_tryon_count'
);
if
(
$res
->
ai_count
>
$ai_tryon_count
&&
$res
->
ai_time
>
Time
::
today
()[
0
])
{
return
0
;
// 不可以试戴
}
else
{
return
1
;
// 可以试戴
...
...
application/config.php
View file @
d4f6b21b
...
...
@@ -327,6 +327,9 @@ return [
'ai_clip'
=>
Env
::
get
(
'app.ai_clip'
,
''
),
'ai_mix'
=>
Env
::
get
(
'app.ai_mix'
,
''
),
'ai_hook'
=>
Env
::
get
(
'app.ai_hook'
,
''
),
// 每天3D试戴次数上限
'ai_tryon_count'
=>
Env
::
get
(
'app.ai_tryon_count'
,
2
),
// obs 配置
'obs_access_key'
=>
'HPUAWU3GPS8HEWX9JFLG'
,
...
...
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