1 1 //编写类方法用$this->ajaxReturn()返回数据 2 2 public function index(){ 3 3 $user = M('User'); 4 5 $data = $user->where($map)->field('name,data')->select(); 5 6 $this->ajaxReturn($data,'JSON'); 6 7 }
1 1 //编写类方法用$this->ajaxReturn()返回数据 2 2 public function index(){ 3 3 $user = M('User'); 4 5 $data = $user->where($map)->field('name,data')->select(); 5 6 $this->ajaxReturn($data,'JSON'); 6 7 }