...
|
...
|
@@ -220,7 +220,7 @@ public function websiteHtml(Request $request){ |
|
|
$domain = $request->getHost();
|
|
|
$token = env("WEB_SITE_TOKEN");
|
|
|
$apiUrl = env("API_URL");
|
|
|
$requestUrl = $apiUrl."?domain=".$domain."&token=".$token;
|
|
|
$requestUrl = $apiUrl."api/get_url_verify_token/?domain=".$domain."&token=".$token;
|
|
|
@file_put_contents(storage_path('logs/notify_get_url.log'), date('Y-m-d H:i:s') . "接收到通知:". $requestUrl . PHP_EOL, FILE_APPEND);
|
|
|
|
|
|
try {
|
...
|
...
|
@@ -336,10 +336,10 @@ public function deleteDirectory($path) |
|
|
* @param $request
|
|
|
* @param string $type
|
|
|
* @param int $traffic
|
|
|
* @param array $files
|
|
|
* @return string
|
|
|
*/
|
|
|
public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRAFFICZERO){
|
|
|
|
|
|
if($request->getClientIp() == "127.0.0.1"){
|
|
|
return $this->success();
|
|
|
}
|
...
|
...
|
@@ -363,12 +363,9 @@ public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRA |
|
|
$req["type"] = $type;
|
|
|
$req["traffic"] = $traffic;
|
|
|
|
|
|
@file_put_contents(storage_path('logs/notify_send.log'), date('Y-m-d H:i:s') . "请求:". $req . PHP_EOL, FILE_APPEND);
|
|
|
//转发接口
|
|
|
$transmitUrl = env("TRANSMIT_URL");
|
|
|
$resp = $this->httpPost($transmitUrl,json_encode($req));
|
|
|
@file_put_contents(storage_path('logs/notify_send.log'), date('Y-m-d H:i:s') . "响应:". $resp . PHP_EOL, FILE_APPEND);
|
|
|
return $resp;
|
|
|
return $this->httpPost($transmitUrl."api/selfSiteApi/",json_encode($req));
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -559,6 +556,7 @@ public function inquiryQd(Request $request){ |
|
|
/**
|
|
|
* 搜索
|
|
|
* @param Request $request
|
|
|
* @return mixed|string
|
|
|
*/
|
|
|
public function search(Request $request)
|
|
|
{
|
...
|
...
|
@@ -567,17 +565,18 @@ public function search(Request $request) |
|
|
//获取搜索参数
|
|
|
$data["search_content"] = '';
|
|
|
if (isset($data['s'])) {
|
|
|
$data["search_content"] = $searchContent = $data['s'];
|
|
|
$req["search_content"] = $searchContent = $data['s'];
|
|
|
}
|
|
|
if (isset($data['search'])) {
|
|
|
$data["search_content"] = $data['search'];
|
|
|
$req["search_content"] = $data['search'];
|
|
|
}
|
|
|
|
|
|
//分页
|
|
|
$data["page"] = isset($data['page']) && (int)$data['page'] > 1 ? (int)$data['page'] : 1;
|
|
|
$req["page"] = isset($data['page']) && (int)$data['page'] > 1 ? (int)$data['page'] : 1;
|
|
|
|
|
|
//转发data
|
|
|
|
|
|
|
|
|
$transmitUrl = env("API_URL");
|
|
|
$resp = $this->httpPost($transmitUrl."api/get_search_content/",json_encode($req));
|
|
|
return $resp["html"];
|
|
|
}
|
|
|
} |
...
|
...
|
|