Commit daa22e69 authored by agping's avatar agping

经纪人修改

parent c8deaa76
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
× ×
</button> </button>
<h4 class="modal-title"> <h4 class="modal-title">
绑定手机 绑定手机/电脑
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
...@@ -223,9 +223,10 @@ ...@@ -223,9 +223,10 @@
<table class="table table-striped table-bordered table-hover table-condensed"> <table class="table table-striped table-bordered table-hover table-condensed">
<thead> <thead>
<tr> <tr>
<th>绑定手机</th> <th class="text-center">设备类型</th>
<th>请求时间</th> <th class="text-center">设备型号</th>
<th>手机绑定状态</th> <th class="text-center">请求时间</th>
<th class="text-center">绑定状态</th>
</tr> </tr>
</thead> </thead>
<tbody id='agent_phone_binding'> <tbody id='agent_phone_binding'>
......
...@@ -34,43 +34,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -34,43 +34,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
} else {}; } else {};
}); });
}); });
// 判断浏览器型号判断内核的 区分不了 浏览器 像搜狗 360
// function getBrowserInfo()
// {
// var agent = navigator.userAgent.toLowerCase() ;
//
// var regStr_ie = /msie [\d.]+;/gi ;
// var regStr_ff = /firefox\/[\d.]+/gi
// var regStr_chrome = /chrome\/[\d.]+/gi ;
// var regStr_saf = /safari\/[\d.]+/gi ;
// //IE
// if(agent.indexOf("msie") > 0)
// {
// return agent.match(regStr_ie) ;
// }
//
// //firefox
// if(agent.indexOf("firefox") > 0)
// {
// return agent.match(regStr_ff) ;
// }
//
// //Chrome
// if(agent.indexOf("chrome") > 0)
// {
// return agent.match(regStr_chrome) ;
// }
//
// //Safari
// if(agent.indexOf("safari") > 0 && agent.indexOf("chrome") < 0)
// {
// return agent.match(regStr_saf) ;
// }
//
// }
// var browser = getBrowserInfo() ;
// alert(browser);
// 判断浏览器型号判断内核的 区分 浏览器 像搜狗 360
var NV = {}; var NV = {};
var UA = navigator.userAgent.toLowerCase(); var UA = navigator.userAgent.toLowerCase();
try { try {
...@@ -130,7 +93,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -130,7 +93,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
// //'\n\n浏览器版本='+parseInt(NV.version)+ // //'\n\n浏览器版本='+parseInt(NV.version)+
// '\n\n浏览器外壳=' + NV.shell); // '\n\n浏览器外壳=' + NV.shell);
var browser_version=NV.shell+'/'+NV.version; var browser_version=NV.shell+'/'+NV.version;
alert(browser_version) // alert(browser_version)
$('#search').click(function(pageNo) { $('#search').click(function(pageNo) {
agent.getList(1); agent.getList(1);
}); });
...@@ -162,7 +125,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -162,7 +125,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
$(document).on("click", ".phone-bundling", function() { //点击绑定手机 $(document).on("click", ".phone-bundling", function() { //点击绑定手机
agent.agent_id = $(this).attr("data-id"); agent.agent_id = $(this).attr("data-id");
agent.getPhoneBindingList(); agent.getPhoneBindingList(browser_version);
}); });
$(document).on("click", ".pc-bundling", function() { //点击绑定电脑 $(document).on("click", ".pc-bundling", function() { //点击绑定电脑
agent.agent_id = $(this).attr("data-id"); agent.agent_id = $(this).attr("data-id");
...@@ -228,7 +191,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -228,7 +191,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
} }
agent.id = $(this).attr("data-id"); agent.id = $(this).attr("data-id");
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// console.log(user_info_obj);
var params = { var params = {
}; };
...@@ -268,7 +230,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -268,7 +230,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
} }
agent.id = $(this).attr("data-id"); agent.id = $(this).attr("data-id");
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// console.log(user_info_obj);
var params = { var params = {
}; };
...@@ -448,16 +409,12 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -448,16 +409,12 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
data: params, data: params,
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
console.log(666);
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);
//获取对应的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));
...@@ -470,10 +427,10 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -470,10 +427,10 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}); });
}, },
//手机绑定权限 //手机绑定权限
getPhoneBindingList: function(pageNo) { getPhoneBindingList: function(v,pageNo) {
var params = {}; var params = {};
params.agent_id = agent.agent_id; params.agent_id = agent.agent_id;
console.log(agent.agent_id); params.model = v;
$.ajax({ $.ajax({
url: '/index/deviceList', url: '/index/deviceList',
type: 'GET', type: 'GET',
...@@ -494,7 +451,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -494,7 +451,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
getPcBindingList: function(pageNo) { getPcBindingList: function(pageNo) {
var params = {}; var params = {};
params.agent_id = agent.agent_id; params.agent_id = agent.agent_id;
console.log(agent.agent_id);
$.ajax({ $.ajax({
url: '/index/deviceList', //电脑绑定权限 url: '/index/deviceList', //电脑绑定权限
type: 'GET', type: 'GET',
...@@ -526,10 +482,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -526,10 +482,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
User_add += '<option value="' + item.id + '">' + item.title + '</option>'; User_add += '<option value="' + item.id + '">' + item.title + '</option>';
if(item.title == tempval) { if(item.title == tempval) {
_tempid = item.id; _tempid = item.id;
console.log(item.id);
}; };
}); });
console.log(_tempid);
$("#edit_role").html(User_add).val(_tempid); $("#edit_role").html(User_add).val(_tempid);
} }
...@@ -576,15 +530,9 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -576,15 +530,9 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}); });
}, },
getEvaluationList: function(n) { getEvaluationList: function(n) {
console.log(n);
// var _data={};
// for(var i=0;i<n.length;i++){
// _data['agents_id['+i+']']=n[i];
// }
var _data = { var _data = {
'agents_id': n.join(',') 'agents_id': n.join(',')
} }
console.log('经纪人列表加载完成');
$.ajax({ $.ajax({
url: '/index/agentEvaluateNumAndFraction', url: '/index/agentEvaluateNumAndFraction',
type: 'GET', type: 'GET',
...@@ -593,7 +541,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -593,7 +541,6 @@ 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) {
// console.log(data.data[0].agent_evaluate_num);
$("#agentlist tr").each(function(e) { $("#agentlist tr").each(function(e) {
//e代表索引 从0开始 eq(0)就是第一行 //e代表索引 从0开始 eq(0)就是第一行
$("#agentlist").find("tr").eq(e).find("td").eq(9).html(data.data[e].agent_evaluate_num); //获取一列的值 $("#agentlist").find("tr").eq(e).find("td").eq(9).html(data.data[e].agent_evaluate_num); //获取一列的值
......
...@@ -48,9 +48,9 @@ ...@@ -48,9 +48,9 @@
<!--绑定手机权限--> <!--绑定手机权限-->
[% if(check_auth('index/updateDevice')) {%] [% if(check_auth('index/updateDevice')) {%]
<a class="btn1 btn-success phone-bundling" href="#modal-phonebundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定手机</a> <a class="btn1 btn-success phone-bundling" href="#modal-phonebundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定手机/电脑</a>
[% } %] [% } %]
<a class="btn1 btn-success pc-bundling" href="#modal-pcbundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定电脑</a> <!--<a class="btn1 btn-success pc-bundling" href="#modal-pcbundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定电脑</a>-->
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
[% if(it) { %] [% if(it) { %]
[% for(var item in it){ %] [% for(var item in it){ %]
<tr class="text-center"> <tr class="text-center">
<td>[% if(it[item]["is_pc"] == 1) { %] 电脑端 [% }else if(it[item]["is_pc"] == 0) { %] 手机端 [% }else{ %] 无效 [% } %]</td>
<td>[%= it[item]["model"] %]</td> <td>[%= it[item]["model"] %]</td>
<td>[%= it[item]["create_time"] %]</td> <td>[%= it[item]["create_time"] %]</td>
<td> <td>
......
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