美文网首页
Ajax传多个参数,Controller接收

Ajax传多个参数,Controller接收

作者: SmallFleaGood | 来源:发表于2018-09-05 16:45 被阅读0次

    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){

        

    }

    相关文章

      网友评论

          本文标题:Ajax传多个参数,Controller接收

          本文链接:https://www.haomeiwen.com/subject/zmoawftx.html