You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
798 B
PHTML

5 years ago
<?php
namespace Mobile\Controller;
use Think\Controller;
class SearchController extends BaseController {
public function index($t='tag',$w='',$p=1) {
header("Content-type: text/html;charset=utf-8");
$lists = A("Search","Event")->search_lists($t,$w,$p,true);
$this->assign('lists',$lists);
$this->assign('page',1);
$this->display();
}
public function ajaxlists($t='',$w='',$p=2) {
$lists = A("Search","Event")->search_lists($t,$w,$p);
$status = 0;
if (!empty($lists) && is_array($lists)) {
$status = 1;
}
echo json_encode(array('status'=>$status,'page'=>$p,'lists'=>$lists));
}
}