//后端
@RestController
@RequestMapping(value?=?"/loan")
public?class?LoanApplyController?extends?BaseController?{
@Resource
private?LoanApplyService?loanApplyService;
//購車申請審核模塊
@RequestMapping(value?=?"apply/all",?method?=?RequestMethod.GET)
public?XaResult>?queryAllApply(Integer?pageSize,?Integer?currentPage)?throws?BusinessException?{
Page?page?=?this.loanApplyService.selectAllApply(pageSize,?currentPage);
return?XaResult.success(page,?LoanApplyVo.convert(page.getRows()));
}
//前端
$(".item?li").click(function(){
console.log($(this).val());
var?id=$(this).val();
$.ajax({
url:"/loan/apply/all",//寫自己的后臺地址
data:{id:id},
dataType:'json',
type:'get',
success:function(data){//接受json數據
console.log(data.dataList[0].id);
}
})
});