作者 lyh

gx

... ... @@ -27,13 +27,13 @@ class GoogleSearchController extends BaseController
*/
public function getSearchList(){
$this->request->validate([
'search' => 'required'
'type' => 'required'
],[
'search.required' => '搜索类型不能为空',
'type.required' => '搜索类型不能为空',
]);
//查询数据库查看是否有数据
$googleSearchModel = new GoogleSearch();
$searchInfo = $googleSearchModel->read(['type'=>$this->map['search'],'project_id'=>$this->user['project_id'],'date'=>['>=',date('Y-m-d', strtotime('-7 days'))]],['id']);
$searchInfo = $googleSearchModel->read(['type'=>$this->map['type'],'project_id'=>$this->user['project_id'],'date'=>['>=',date('Y-m-d', strtotime('-7 days'))]],['id']);
if($searchInfo === false){
//获取当前项目域名
$domain = parse_url($this->user['domain'], PHP_URL_HOST);
... ...