贴一部分代码,作为备忘,以后别再犯这种低级错误
form.on("submit(formDemo)", function(data){
//layer.msg(JSON.stringify(data.field));
//return false;
params=JSON.stringify(data.field);
data='';//data冲突了,真实日狗,调了老半天
$.ajax({
type: "POST",
url: "__MODULE__/Category/doAddCategory",
data: {postData:params},
dataType: "json",
beforeSend: function() {
var index = layer.load(0, {
shade: false
});
},
success: function(data) {
console.log(data)
},