//后端
@RestController
@RequestMapping(value = "/loan")
public class LoanApplyController extends BaseController {
@Resource
private LoanApplyService loanApplyService;
//购车申请审核模块
@RequestMapping(value = "apply/all", method = RequestMethod.GET)
public XaResult<List<LoanApplyVo>> queryAllApply(Integer pageSize, Integer currentPage) throws BusinessException {
Page<LoanApplyBo> 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);
}
})
});
1 回答
Caballarii
TA贡献1123条经验 获得超629个赞
@RequestMapping(value = "apply/all", method = RequestMethod.GET) @ResponseBody
添加回答
举报
0/150
提交
取消