Commit da8a9c13 authored by duxinyuan's avatar duxinyuan

1

parent a3bad4e7
...@@ -180,6 +180,8 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', ' ...@@ -180,6 +180,8 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
}); });
$('#commit_home').append(str); $('#commit_home').append(str);
fn && fn(); fn && fn();
} eles {
alert(data.msg)
} }
} }
}); });
...@@ -198,6 +200,8 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', ' ...@@ -198,6 +200,8 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
success: function(data) { success: function(data) {
if(data.code == 200 && data.data != null) { if(data.code == 200 && data.data != null) {
fn && fn(data.data); fn && fn(data.data);
} else {
alert(data.msg)
} }
} }
}); });
...@@ -218,8 +222,12 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', ' ...@@ -218,8 +222,12 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
getAdjustmentDetail : function(id){ getAdjustmentDetail : function(id){
var that = adjustment ; var that = adjustment ;
$.get('/index/getAdjustmentDetail',{'id' : id},function(data){ $.get('/index/getAdjustmentDetail',{'id' : id},function(data){
console.log(data.data); if(data.code == 200) {
that.setValue(data.data); console.log(data.data);
that.setValue(data.data);
} else {
alert(data.msg);
}
},'json'); },'json');
}, },
...@@ -315,7 +323,10 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', ' ...@@ -315,7 +323,10 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
var that = adjustment; var that = adjustment;
var params = that.buildSearchParams(); var params = that.buildSearchParams();
$.post('',params, function(data){ $.post('',params, function(data){
console.log(data); if(data.code == 200) {
} else {
alert(data.msg);
}
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment