Commit 65bb25ae authored by agping's avatar agping

经纪人评价修改

parent 215c69b9
...@@ -3,7 +3,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -3,7 +3,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
pageNo: 1, pageNo: 1,
pageSize: 15, pageSize: 15,
agent_id: 0, agent_id: 0,
idArray:'', idArray: '',
init: function() { init: function() {
//初始化dot //初始化dot
$("body").append(template + template_binding); $("body").append(template + template_binding);
...@@ -311,13 +311,13 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -311,13 +311,13 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
console.log(666); console.log(666);
console.log(data.data.list.length); console.log(data.data.list.length);
//获取对应的id //获取对应的id
agent.idArray = new Array(); agent.idArray = new Array();
for(var m = 0; m < data.data.list.length; m++) { for(var m = 0; m < data.data.list.length; m++) {
agent.idArray[m] = data.data.list[m].id; agent.idArray[m] = data.data.list[m].id;
} }
// console.log(agent.idArray); // console.log(agent.idArray);
//获取对应的id //获取对应的id
var temp = document.getElementById('agent_tpl').innerHTML; var temp = document.getElementById('agent_tpl').innerHTML;
var doTempl = doT.template(temp); var doTempl = doT.template(temp);
$("#agentlist").html(doTempl(data.data.list)); $("#agentlist").html(doTempl(data.data.list));
...@@ -414,12 +414,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -414,12 +414,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}, },
getEvaluationList: function(n) { getEvaluationList: function(n) {
console.log(n); console.log(n);
// var _data={}; // var _data={};
// for(var i=0;i<n.length;i++){ // for(var i=0;i<n.length;i++){
// _data['agents_id['+i+']']=n[i]; // _data['agents_id['+i+']']=n[i];
// } // }
var _data = var _data = {
{
'agents_id': n.join(',') 'agents_id': n.join(',')
} }
console.log('经纪人列表加载完成'); console.log('经纪人列表加载完成');
...@@ -431,16 +430,15 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -431,16 +430,15 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200 && data.data != null) { if(data.code == 200 && data.data != null) {
// var str = ''; // console.log(data.data[0].agent_evaluate_num);
// $.each(data.data, function(i, item) { $("#agentlist tr").each(function(e) {
// str += '<option value="' + item.id + '">' + item.district_name + '</option>'; //e代表索引 从0开始 eq(0)就是第一行
// }); $("#agentlist").find("tr").eq(e).find("td").eq(6).html(data.data[e].agent_evaluate_num); //获取一列的值
// $('[name=district_id]').append(str); $("#agentlist").find("tr").eq(e).find("td").eq(7).html(data.data[e].agent_evaluate_fraction);
// fn && fn(); })
}
} }
}
}); });
} }
}; };
return agent; return agent;
......
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