get与post请求

get请求

$('button').click(function() {
        $.ajax({
                  url:"http://192.168.3.248:18081/api/order_c/get_list",
                  async:true,
                  method:'get',
                  data:{
                      page:1,
                      scene:"view",
                      find_role:"user"
                  },
                  success:function(result){}
          });
})

 



post请求

$('button').click(function() {
                $.ajax({
                    url:"http://192.168.3.248:18081/api/order_c/get_list",
                    async:true,
                    method:'post',
                    data:{
                        page:1,
                        scene:"view",
                        find_role:"user"
                    },
                    success:function(result){}
                });
 })

 

posted @ 2017-09-08 17:33  丁少华  阅读(193)  评论(0编辑  收藏  举报