Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-Server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李帅
2022-04-14 17:47:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
aa8efe35cb4c1be344ec744b4a1ac1c1c0677c66
aa8efe35
1 parent
ae924322
1.首页接口实现。
2.支持用户端上传。
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
app/Http/Controllers/V1/HomeController.php
app/Http/Controllers/V1/OrderController.php
app/Http/Controllers/V1/HomeController.php
View file @
aa8efe3
...
...
@@ -19,7 +19,7 @@ class HomeController extends Controller
public
function
index
()
{
// admin video
$lists
=
Immerse
::
query
()
->
get
(
);
$lists
=
Immerse
::
query
()
->
simplePaginate
(
10
);
// user video
return
Response
::
success
(
$lists
);
...
...
app/Http/Controllers/V1/OrderController.php
View file @
aa8efe3
...
...
@@ -19,8 +19,7 @@ class OrderController extends Controller
{
public
function
index
(
Request
$request
)
{
// $user_id = Auth::user()->getAuthIdentifier(); todo
$user_id
=
1
;
$user_id
=
Auth
::
user
()
->
getAuthIdentifier
();
$orders
=
Order
::
query
()
->
where
(
'user_id'
,
$user_id
)
->
simplePaginate
(
10
);
...
...
@@ -37,8 +36,7 @@ class OrderController extends Controller
if
(
$validator
->
fails
())
return
Response
::
fail
(
'缺少参数'
,
500
,
$validator
->
errors
());
// $user_id = Auth::user()->getAuthIdentifier(); todo
$user_id
=
1
;
$user_id
=
Auth
::
user
()
->
getAuthIdentifier
();
$order
=
$this
->
build
(
$user_id
,
$data
[
'goods_id'
],
$this
->
getClientTerminal
());
...
...
@@ -49,8 +47,7 @@ class OrderController extends Controller
public
function
show
(
$id
)
{
// $user_id = Auth::user()->getAuthIdentifier(); todo
$user_id
=
1
;
$user_id
=
Auth
::
user
()
->
getAuthIdentifier
();
$order
=
Order
::
query
()
->
where
(
'order_sn'
,
$id
)
->
where
(
'user_id'
,
$user_id
)
->
first
();
...
...
Please
register
or
login
to post a comment