Skip to content

Commit b39c5dd

Browse files
committed
代码结构优化
1 parent c8de580 commit b39c5dd

8 files changed

Lines changed: 15 additions & 15 deletions

File tree

app/Http/Controllers/Api/LoginController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function login(Request $request)
3434
$password = trim($request->get('password'));
3535
$cacheKey = 'request_times_' . md5(getClientIp());
3636

37-
// 连续请求失败10次,则封IP一小时
37+
// 连续请求失败15次,则封IP一小时
3838
if (Cache::has($cacheKey)) {
3939
if (Cache::get($cacheKey) >= 15) {
4040
return Response::json(['status' => 'fail', 'data' => [], 'message' => '请求失败超限,禁止访问1小时']);
@@ -79,7 +79,7 @@ public function login(Request $request)
7979
$this->log($subscribe->id, getClientIp(), 'API访问');
8080

8181
// 处理用户信息
82-
unset($user->password, $user->remember_token);
82+
unset($user->password, $user->reg_ip, $user->remark, $user->usage, $user->remember_token, $user->created_at, $user->updated_at);
8383
$data['user'] = $user;
8484

8585
// 订阅链接

app/Http/Controllers/AuthController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function login(Request $request)
116116
}
117117
}
118118

119-
return Response::view('auth/login');
119+
return Response::view('auth.login');
120120
}
121121
}
122122

resources/views/auth/active.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<body class="login">
3333
<!-- BEGIN LOGO -->
3434
<div class="logo">
35-
@if(\App\Components\Helpers::systemConfig()['website_logo'])
36-
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
35+
@if(\App\Components\Helpers::systemConfig()['website_home_logo'])
36+
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_home_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
3737
@else
3838
<a href="{{url('/')}}"> <img src="/assets/images/home_logo.png" alt="" /> </a>
3939
@endif

resources/views/auth/activeUser.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<body class=" login">
3333
<!-- BEGIN LOGO -->
3434
<div class="logo">
35-
@if(\App\Components\Helpers::systemConfig()['website_logo'])
36-
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
35+
@if(\App\Components\Helpers::systemConfig()['website_home_logo'])
36+
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_home_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
3737
@else
3838
<a href="{{url('/')}}"> <img src="/assets/images/home_logo.png" alt="" /> </a>
3939
@endif

resources/views/auth/login.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<body class=" login">
3333
<!-- BEGIN LOGO -->
3434
<div class="logo">
35-
@if(\App\Components\Helpers::systemConfig()['website_logo'])
36-
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
35+
@if(\App\Components\Helpers::systemConfig()['website_home_logo'])
36+
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_home_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
3737
@else
3838
<a href="{{url('/')}}"> <img src="/assets/images/home_logo.png" alt="" /> </a>
3939
@endif

resources/views/auth/register.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<body class=" login">
3333
<!-- BEGIN LOGO -->
3434
<div class="logo">
35-
@if(\App\Components\Helpers::systemConfig()['website_logo'])
36-
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
35+
@if(\App\Components\Helpers::systemConfig()['website_home_logo'])
36+
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_home_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
3737
@else
3838
<a href="{{url('/')}}"> <img src="/assets/images/home_logo.png" alt="" /> </a>
3939
@endif

resources/views/auth/reset.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<body class=" login">
3333
<!-- BEGIN LOGO -->
3434
<div class="logo">
35-
@if(\App\Components\Helpers::systemConfig()['website_logo'])
36-
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
35+
@if(\App\Components\Helpers::systemConfig()['website_home_logo'])
36+
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_home_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
3737
@else
3838
<a href="{{url('/')}}"> <img src="/assets/images/home_logo.png" alt="" /> </a>
3939
@endif

resources/views/auth/resetPassword.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<body class=" login">
3333
<!-- BEGIN LOGO -->
3434
<div class="logo">
35-
@if(\App\Components\Helpers::systemConfig()['website_logo'])
36-
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
35+
@if(\App\Components\Helpers::systemConfig()['website_home_logo'])
36+
<a href="{{url('/')}}"> <img src="{{\App\Components\Helpers::systemConfig()['website_home_logo']}}" alt="" style="width:300px; height:90px;"/> </a>
3737
@else
3838
<a href="{{url('/')}}"> <img src="/assets/images/home_logo.png" alt="" /> </a>
3939
@endif

0 commit comments

Comments
 (0)