vue实现页面滚动到底部刷新(判断div)

h5页面 

 

后台控制器

public function search()
    {
        $parm = array('act' => 'search');
        if (!empty($_POST['catId'])) $parm['catId'] = $_POST['catId'];
        if (!empty($_POST['keyword'])) $parm['keyword'] = $_POST['keyword'];
        if (!empty($_POST['intro'])) $parm['intro'] = $_POST['intro'];
        if (!empty($_POST['order'])) $parm['order'] = $_POST['order'];
        if (!empty($_POST['sort'])) $parm['sort'] = $_POST['sort'];
        if (!empty($_POST['page'])) $parm['page'] =1;
        //获取前台传过来的size值如果不为空就设置请求接口时多一个size参数
        if (!empty($_POST['size'])) $parm['size'] = $_POST['size'];
        //调用接口
        $data = $this->http('service/article.php', $parm);
        echo json_encode($data);
    }

 

 

你可能感兴趣的:(vue实现页面滚动到底部刷新(判断div))