這是后臺控制層的分頁代碼@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 回答
- 0 關注
- 1868 瀏覽
添加回答
舉報
0/150
提交
取消