iweb-tool
Version:
a build tool based gulp & webpack
53 lines (45 loc) • 1.42 kB
JavaScript
module.exports = {
init: function(){
//debugger
$("#btnW").on('click',function(){
var demo = {
"name" : $('#name').val(),
"sex" :$('#sex').val(),
"age" :$('#age').val(),
"code" :$('#code').val(),
"company" :$('#company').val(),
"department":$('#department').val(),
"email":$('#email').val()
};
$.ajax({
url: $ctx+"/cxf/jaxrs/weixin/postWebservices",
type: 'post',
dataType: 'json',
contentType: 'application/json',
data: JSON.stringify(demo) ,
success: function (json) {
alert(json.msg) ;
}
}) ;
}) ;
$('#btnS').on('click',function(){
var demo = {
"name" : $('#name').val(),
"sex" :$('#sex').val(),
"age" :$('#age').val(),
"code" :$('#code').val(),
"company" :$('#company').val(),
"department":$('#department').val(),
"email":$('#email').val()
};
$.ajax({
url: $ctx+"/weixin/winxinservlet",
type: 'post',
data: $.param(demo),
success: function (json) {
alert(json ) ;
}
});
});
}
};