Skip to content

Commit b86acf9

Browse files
author
zhangyida
committed
首页重构
1 parent b9ff22a commit b86acf9

13 files changed

Lines changed: 173 additions & 9405 deletions

File tree

app/Http/Controllers/Api/ToolController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ToolController extends ApiController
2828
public function qq(Request $request)
2929
{
3030
if (!$request->domain || !DomainUtil::checkFormat($request->domain)) {
31-
throw new ApiException('域名格式不合法');
31+
throw new ApiException("域名【{$request->domain}】格式不合法");
3232
}
3333
$service = new QQService();
3434
$intercept = $service->check($request->domain);
@@ -50,7 +50,7 @@ public function qq(Request $request)
5050
public function wechat(Request $request)
5151
{
5252
if (!$request->domain || !DomainUtil::checkFormat($request->domain)) {
53-
throw new ApiException('域名格式不合法');
53+
throw new ApiException("域名【{$request->domain}】格式不合法");
5454
}
5555
$service = new WeChatService();
5656
$intercept = $service->check($request->domain);
@@ -72,7 +72,7 @@ public function wechat(Request $request)
7272
public function whois(Request $request)
7373
{
7474
if (!$request->domain || !DomainUtil::checkFormat($request->domain)) {
75-
throw new ApiException('域名格式不合法');
75+
throw new ApiException("域名【{$request->domain}】格式不合法");
7676
}
7777
$service = new WhoisService();
7878
$data = $service->check($request->domain, $request->fresh);

app/Http/Controllers/Web/IndexController.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,8 @@
66

77
class IndexController extends Controller
88
{
9-
const TYPE_QQ = 'qq';
10-
const TYPE_WECHAT = 'wechat';
11-
12-
public function index($type = self::TYPE_WECHAT)
9+
public function index()
1310
{
14-
$timestamp = time();
15-
$key = config('tool.token_key');
16-
$token = sha1(md5($key . $timestamp));
17-
return view('index', compact('type', 'timestamp', 'token'));
11+
return view('index');
1812
}
1913
}

0 commit comments

Comments
 (0)