首页 > 代码库 > easyUi 框架中的JS文件传递参数的区别

easyUi 框架中的JS文件传递参数的区别

1.情景一

//JS文件 ajax的请求
url : parent.baseUrl+"user/customer/findOne/" + id,
//后台JAVA代码接收参数 @RequestMapping(value
= "findOne/{id}") @ResponseBody public CustomerDTO customerFindOneQuery(@PathVariable("id") Long id) { }

 

 

2.情景二

//JS文件 ajax的请求
url : top.baseUrl+‘customer/bail/bailDetailsInfo?customerId=‘+customerId+‘&&bailClass=‘+bailClass+‘&&agencyId=‘+agencyId,

//后台JAVA代码接收参数
@RequestMapping(value = "/bailDetailsInfo", method = RequestMethod.GET, produces = { "application/json" }) @ResponseBody public ListWithTotalCount<BailLockDTO> bailDetailsInfo(Long customerId,int bailClass,String agencyId) { }

 

easyUi 框架中的JS文件传递参数的区别