作者 lyh

gx

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