controller分支实现前台显示弹框,前台不需要进行什么操作, 前台请求后台的分支即可. controller层(标红的地方是(alert('账号或密码错误!请重新输入!!!!') window.location.href='/index.jsp'):弹出一个弹框,然后跳转一个页面,如果你只想弹个弹框可以把跳转的页面去掉.): @RequestMapping("/isLogin") public Object isLogin(HttpServletRequest r
//测试 请求接口 public function index(){ $arr = array('a'=>'555','b'=>56454564); $data=$this->post_json_data('http://www.test.com/public/index/api/postTest',json_encode($arr)); dump(json_decode($data['result'],true)); } //测试 接口 public function postTest