Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Cong.Zhao
/
musician-api.hikoon.com
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
865853dc
...
865853dc4a695b2070e56d8ecfe56591afd916d3
authored
2022-12-06 13:40:26 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
生成链接过期时间
1 parent
30783293
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
app/Services/PropertyTrackService.php
app/Services/PropertyTrackService.php
View file @
865853d
...
...
@@ -140,18 +140,20 @@ class PropertyTrackService extends Service
//将上一条链接删除
PropertyShare
::
query
()
->
where
([
'pf_id'
=>
$this
->
request
->
input
(
'track_id'
)])
->
orderByDesc
(
'id'
)
->
limit
(
1
)
->
delete
();
$expire_time
=
date
(
'Y-m-d H:i:s'
,
$expire_time
);
//生成新链接
PropertyShare
::
query
()
->
create
([
'pf_id'
=>
$this
->
request
->
input
(
'track_id'
),
'phone'
=>
$this
->
request
->
input
(
'phone'
),
'share_url'
=>
$share
,
'share_url_hash'
=>
$share_url_hash
,
'expire_time'
=>
date
(
'Y-m-d H:i:s'
,
$expire_time
)
,
'expire_time'
=>
$expire_time
,
'from'
=>
$this
->
request
->
input
(
'from'
),
'user_id'
=>
$this
->
request
->
input
(
'from'
)
?
$this
->
request
->
get
(
'identifier'
)
->
company_id
:
$this
->
request
->
input
(
'user_id'
),
//用户
]);
return
Response
::
success
([
'url'
=>
$share
]);
return
Response
::
success
([
'url'
=>
$share
,
'expire_time'
=>
$expire_time
]);
}
catch
(
\Throwable
$throwable
)
{
return
Response
::
error
();
}
...
...
Please
register
or
sign in
to post a comment