Ajax传多个参数,Controller接收

2018-09-05  本文已影响0人  SmallFleaGood

JSP页面:

var params = {

            "orderNos":orderNos,

            "cSalesPlatform":cSalesPlatform,

            "cMerchant":cMerchant

        }

$.ajax({

url:"${APP_PATH}/cancel",

data: params,

dataType: "json",

type:"POST",

success:function(result){

alert(result.msg);

//回到当前页面

to_page(currentPage);

}

});

控制器:

@ResponseBody

@RequestMapping(value="/cancel",method=RequestMethod.POST)

public BaseResponse pushOrderByCancel(@RequestParam(value = "orderNos") String orderNos,@RequestParam(value = "cSalesPlatform") String cSalesPlatform,

@RequestParam(value = "cMerchant") String cMerchant){

    

}

上一篇下一篇

猜你喜欢

热点阅读