切换导航条
此项目
正在载入...
登录
周海龙
/
globalso-v6-c-customer
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
李小龙
11 months ago
提交
8b0e9b82cc45041eb57e51901c26a2da72fa8c63
1 个父辈
e422a2d1
搜索
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
10 行增加
和
11 行删除
app/Http/Controllers/Api/NoticeController.php
app/Http/Controllers/Api/NoticeController.php
查看文件 @
8b0e9b8
...
...
@@ -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"
];
}
}
...
...
请
注册
或
登录
后发表评论