为了账号安全,请及时绑定邮箱和手机立即绑定

eclipse中分页问题

eclipse中分页问题

富国沪深 2018-07-30 06:10:48
这是后台控制层的分页代码@RequestMapping("/findcustomer")//实现分页查询@ResponseBodypublic MyAjaxResult findCustomer(Integer adminId,String search,Integer currentPage,Integer pageSize){PageModel pageModel;try {pageModel = cusService.findList(adminId,search,currentPage,pageSize);return MyAjaxResult.success(pageModel);} catch (Exception e) {e.printStackTrace();return MyAjaxResult.fail_300("查询失败");} }怎样在JSP页面这段代码实现分页查询getCustomerListAjax();//模糊查询和查看全部function getCustomerListAjax(cur) {$.ajax({url:"${pageContext.request.contextPath}/loginAction/get_customerList",type:"post",data:$("#seachForm").serialize(),dataType:"json",success: function(data){if(data.code==200){console.log(data);$('#courseTypeWrap').html(template('courseTypeTest', data));}else{layer.open({title: '警告!', content: data.msg ,yes: function(index, layero){//按钮【按钮一】的回调window.location.href="${pageContext.request.contextPath}/loginAction/login"}});}}});}
查看完整描述

1 回答

?
蝴蝶不菲

TA贡献1810条经验 获得超4个赞

是哪一部分不会,前端写隐藏input存页数,传到后端根据每页数据数量算出第a条数据到第几b条数据,sql中limit a,b


查看完整回答
反对 回复 2018-08-31
  • 1 回答
  • 0 关注
  • 1846 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信