Commit aa24f135 by 肖康

Merge branch 'dev/ver/1.0.0' of http://git.ichunt.net/semour/semour_web into dev/ver/1.0.0

parents b4824bf6 f7488c94
......@@ -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="4916000" />
<workItem from="1668150640953" duration="13452000" />
</task>
<servers />
</component>
......
......@@ -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');
}
......
......@@ -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,
];
}
......@@ -9,12 +9,12 @@ class Authenticate extends Middleware
/**
* Get the path the user should be redirected to when they are not authenticated.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Request $request
* @return string|null
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
if (!$request->expectsJson()) {
return route('login');
}
}
......
......@@ -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();
......
......@@ -67,7 +67,7 @@ return [
|
*/
'timezone' => 'UTC',
'timezone' => 'Asia/Shanghai',
/*
|--------------------------------------------------------------------------
......
......@@ -6,11 +6,13 @@
<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>
</div>
</div>
</div>
\ No newline at end of file
</div>
......@@ -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');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment