Commit d61db0bc authored by duxinyuan's avatar duxinyuan

1

parent ca0f60e9
...@@ -182,15 +182,27 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', ' ...@@ -182,15 +182,27 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
*/ */
getList : function(no){ getList : function(no){
var that = adjustment; var that = adjustment;
that.pageNo = no;
var params = that.buildSearchParams(); var params = that.buildSearchParams();
console.log(params) ; console.log(params) ;
params.pageNo = that.pageNo;
params.pageSize = that.pageSize ;
$.get('/index/adjustment',params,function(data){ $.get('/index/adjustment',params,function(data){
that.listData = data.data.list; if(typeof data === 'object') {
console.log(data.data.list) if(data.code == 200) {
var temp = document.getElementById('adjustment_template_tpl').innerHTML; that.listData = data.data.list;
var doTtmpl = doT.template(temp); var temp = document.getElementById('adjustment_template_tpl').innerHTML;
var doTtmpl = doT.template(temp);
$("#order_list").html(doTtmpl(data.data.list)); $("#order_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total, no, that.pageSize, that.getList);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},'json'); },'json');
//功能模拟 //功能模拟
......
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