SearchAction::searchTag PHP Method

searchTag() public method

模糊搜索标签
public searchTag ( ) : mix
return mix 标签列表
    public function searchTag()
    {
        $tagid = intval($_REQUEST['tagid']);
        $map['app'] = 'public';
        $map['table'] = 'user';
        $map['tag_id'] = $tagid;
        $userlist = D('app_tag')->where($map)->field('row_id')->order('row_id')->findpage(10);
        $where[] = "name LIKE '{$q}%'";
        $where = implode(' AND ', $where);
        $list = model('Tag')->getTagList($where, 'tag_id,tag_id as short,name,name as cn', null, $limit);
        if (!$list['data']) {
            $list['data'] = '';
        }
        exit(json_encode($list['data']));
    }