Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
aa24f135
authored
Nov 12, 2022
by
肖康
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'dev/ver/1.0.0' of
http://git.ichunt.net/semour/semour_web
into dev/ver/1.0.0
parents
b4824bf6
f7488c94
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
20 deletions
.idea/workspace.xml
app/Http/Controllers/Api/AuthApiController.php
app/Http/Kernel.php
app/Http/Middleware/Authenticate.php
app/Http/Services/InquiryService.php
config/app.php
resources/views/common/mallUserHeaderNav.blade.php
routes/web.php
.idea/workspace.xml
View file @
aa24f135
...
...
@@ -4,9 +4,14 @@
<list
default=
"true"
id=
"fb90add0-1393-48c2-9f26-72365d42cd03"
name=
"变更"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/Http/Controllers/Api/AuthApiController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/Http/Controllers/Api/AuthApiController.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/Http/Middleware/CheckApiLogin.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/Http/Middleware/CheckApiLogin.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/Http/Kernel.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/Http/Kernel.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/Http/Middleware/Authenticate.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/Http/Middleware/Authenticate.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/app/Http/Services/InquiryService.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/app/Http/Services/InquiryService.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/bootstrap/app.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/bootstrap/app.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/bootstrap/cache/.gitignore"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/bootstrap/cache/.gitignore"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/config/app.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/config/app.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/resources/views/common/mallUserHeaderNav.blade.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/resources/views/common/mallUserHeaderNav.blade.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/routes/web.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/routes/web.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/storage/app/.gitignore"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/storage/app/.gitignore"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/storage/app/public/.gitignore"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/storage/app/public/.gitignore"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/storage/framework/.gitignore"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/storage/framework/.gitignore"
afterDir=
"false"
/>
...
...
@@ -189,7 +194,7 @@
<workItem
from=
"1667266026118"
duration=
"40321000"
/>
<workItem
from=
"1667959054458"
duration=
"183000"
/>
<workItem
from=
"1667986756173"
duration=
"14315000"
/>
<workItem
from=
"1668150640953"
duration=
"
4916
000"
/>
<workItem
from=
"1668150640953"
duration=
"
13452
000"
/>
</task>
<servers
/>
</component>
...
...
app/Http/Controllers/Api/AuthApiController.php
View file @
aa24f135
...
...
@@ -18,7 +18,7 @@ use Illuminate\Support\Facades\Validator;
class
AuthApiController
extends
Controller
{
use
ThrottlesLogins
,
RegistersUsers
;
use
RegistersUsers
;
public
function
register
(
UserRegister
$request
)
{
...
...
@@ -63,10 +63,10 @@ class AuthApiController extends Controller
$cookie
=
Cookie
::
make
(
'sem_email'
,
Auth
::
user
()
->
email
,
config
(
'session.lifetime'
),
null
,
null
,
false
,
false
);
Cookie
::
queue
(
$cookie
);
return
$this
->
setSuccess
(
'Login success'
);
}
$this
->
incrementLoginAttempts
(
$request
);
return
$this
->
setError
(
'Login failure'
);
}
...
...
app/Http/Kernel.php
View file @
aa24f135
...
...
@@ -15,7 +15,6 @@ class Kernel extends HttpKernel
* @var array
*/
protected
$middleware
=
[
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies
::
class
,
\Fruitcake\Cors\HandleCors
::
class
,
\App\Http\Middleware\CheckForMaintenanceMode
::
class
,
...
...
@@ -34,7 +33,7 @@ class Kernel extends HttpKernel
\App\Http\Middleware\EncryptCookies
::
class
,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse
::
class
,
\Illuminate\Session\Middleware\StartSession
::
class
,
//
\Illuminate\Session\Middleware\AuthenticateSession::class,
//
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession
::
class
,
\App\Http\Middleware\VerifyCsrfToken
::
class
,
\Illuminate\Routing\Middleware\SubstituteBindings
::
class
,
...
...
@@ -42,7 +41,7 @@ class Kernel extends HttpKernel
],
'api'
=>
[
'throttle:60,1'
,
//
'throttle:60,1',
\App\Http\Middleware\EncryptCookies
::
class
,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse
::
class
,
\Illuminate\Session\Middleware\StartSession
::
class
,
...
...
@@ -59,7 +58,6 @@ class Kernel extends HttpKernel
* @var array
*/
protected
$routeMiddleware
=
[
'api.check'
=>
CheckApiLogin
::
class
,
'auth'
=>
\App\Http\Middleware\Authenticate
::
class
,
'auth.basic'
=>
\Illuminate\Auth\Middleware\AuthenticateWithBasicAuth
::
class
,
'bindings'
=>
\Illuminate\Routing\Middleware\SubstituteBindings
::
class
,
...
...
@@ -70,5 +68,6 @@ class Kernel extends HttpKernel
'signed'
=>
\Illuminate\Routing\Middleware\ValidateSignature
::
class
,
'throttle'
=>
\Illuminate\Routing\Middleware\ThrottleRequests
::
class
,
'verified'
=>
\Illuminate\Auth\Middleware\EnsureEmailIsVerified
::
class
,
'api.check'
=>
CheckApiLogin
::
class
,
];
}
app/Http/Middleware/Authenticate.php
View file @
aa24f135
...
...
@@ -14,7 +14,7 @@ class Authenticate extends Middleware
*/
protected
function
redirectTo
(
$request
)
{
if
(
!
$request
->
expectsJson
())
{
if
(
!
$request
->
expectsJson
())
{
return
route
(
'login'
);
}
}
...
...
app/Http/Services/InquiryService.php
View file @
aa24f135
...
...
@@ -66,7 +66,7 @@ class InquiryService
$q
->
where
(
'goods_name'
,
$searchKeyWord
);
});
}
if
(
!
empty
(
$status
))
{
if
(
!
is_null
(
$status
))
{
$query
->
where
(
'status'
,
$status
);
}
$result
=
$query
->
paginate
(
10
)
->
toArray
();
...
...
config/app.php
View file @
aa24f135
...
...
@@ -67,7 +67,7 @@ return [
|
*/
'timezone'
=>
'
UTC
'
,
'timezone'
=>
'
Asia/Shanghai
'
,
/*
|--------------------------------------------------------------------------
...
...
resources/views/common/mallUserHeaderNav.blade.php
View file @
aa24f135
...
...
@@ -6,7 +6,9 @@
<div
class=
"login-head-box yesLogin"
>
<a
href=
"/user/order"
class=
"row"
>
<span><i
class=
"icon iconfont icon-touxiang"
></i></span>
@if(!empty($_COOKIE['sem_email']))
<div
class=
"username"
>
{{$_COOKIE['sem_email']}}
</div>
@endif
</a>
</div>
<a
href=
"/about/company"
class=
"about-link"
>
Contact Us
</a>
...
...
routes/web.php
View file @
aa24f135
...
...
@@ -14,19 +14,20 @@ use Illuminate\Support\Facades\Route;
|
*/
Auth
::
routes
([
'verify'
=>
true
]);
//
Auth::routes(['verify' => true]);
Route
::
middleware
([
'auth'
])
->
group
(
function
()
{
Route
::
get
(
'/test'
,
function
()
{
return
'Test Page'
;
});
Route
::
get
(
'/user/order'
,
'UserController@order'
)
->
name
(
'user.order'
);
Route
::
get
(
'/user/orderDetail'
,
'UserController@orderDetail'
)
->
name
(
'user.orderDetail'
);
Route
::
get
(
'/user/inquiry'
,
'UserController@inquiry'
)
->
name
(
'user.inquiry'
);
Route
::
get
(
'/user/account'
,
'UserController@account'
)
->
name
(
'user.account'
);
Route
::
get
(
'/change'
,
'AuthController@change'
)
->
name
(
'change'
);
});
Route
::
get
(
'/'
,
'HomeController@index'
)
->
name
(
'home'
);
Route
::
get
(
'/login'
,
'AuthController@login'
)
->
name
(
'login'
);
Route
::
get
(
'/forget'
,
'AuthController@forget'
)
->
name
(
'forget'
);
Route
::
get
(
'/change'
,
'AuthController@change'
)
->
name
(
'change'
);
Route
::
get
(
'/reg'
,
'AuthController@register'
)
->
name
(
'register'
);
...
...
@@ -49,10 +50,7 @@ Route::get('/search', 'SearchController@index')->name('search.index');
Route
::
get
(
'/car'
,
'CarController@car'
)
->
name
(
'car.car'
);
Route
::
get
(
'/confirm'
,
'CarController@confirm'
)
->
name
(
'car.confirm'
);
Route
::
get
(
'/user/order'
,
'UserController@order'
)
->
name
(
'user.order'
);
Route
::
get
(
'/user/orderDetail'
,
'UserController@orderDetail'
)
->
name
(
'user.orderDetail'
);
Route
::
get
(
'/user/inquiry'
,
'UserController@inquiry'
)
->
name
(
'user.inquiry'
);
Route
::
get
(
'/user/account'
,
'UserController@account'
)
->
name
(
'user.account'
);
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