Commit daa22e69 authored by agping's avatar agping

经纪人修改

parent c8deaa76
......@@ -214,7 +214,7 @@
×
</button>
<h4 class="modal-title">
绑定手机
绑定手机/电脑
</h4>
</div>
<div class="modal-body">
......@@ -223,9 +223,10 @@
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<th>绑定手机</th>
<th>请求时间</th>
<th>手机绑定状态</th>
<th class="text-center">设备类型</th>
<th class="text-center">设备型号</th>
<th class="text-center">请求时间</th>
<th class="text-center">绑定状态</th>
</tr>
</thead>
<tbody id='agent_phone_binding'>
......
......@@ -34,43 +34,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
} 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 UA = navigator.userAgent.toLowerCase();
try {
......@@ -130,7 +93,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
// //'\n\n浏览器版本='+parseInt(NV.version)+
// '\n\n浏览器外壳=' + NV.shell);
var browser_version=NV.shell+'/'+NV.version;
alert(browser_version)
// alert(browser_version)
$('#search').click(function(pageNo) {
agent.getList(1);
});
......@@ -162,7 +125,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
$(document).on("click", ".phone-bundling", function() { //点击绑定手机
agent.agent_id = $(this).attr("data-id");
agent.getPhoneBindingList();
agent.getPhoneBindingList(browser_version);
});
$(document).on("click", ".pc-bundling", function() { //点击绑定电脑
agent.agent_id = $(this).attr("data-id");
......@@ -228,7 +191,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}
agent.id = $(this).attr("data-id");
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// console.log(user_info_obj);
var params = {
};
......@@ -268,7 +230,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}
agent.id = $(this).attr("data-id");
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// console.log(user_info_obj);
var params = {
};
......@@ -448,16 +409,12 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
data: params,
dataType: 'json',
success: function(data) {
console.log(666);
console.log(data.data.list.length);
//获取对应的id
agent.idArray = new Array();
for(var m = 0; m < data.data.list.length; m++) {
agent.idArray[m] = data.data.list[m].id;
}
// console.log(agent.idArray);
//获取对应的id
var temp = document.getElementById('agent_tpl').innerHTML;
var doTempl = doT.template(temp);
$("#agentlist").html(doTempl(data.data.list));
......@@ -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 = {};
params.agent_id = agent.agent_id;
console.log(agent.agent_id);
params.model = v;
$.ajax({
url: '/index/deviceList',
type: 'GET',
......@@ -494,7 +451,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
getPcBindingList: function(pageNo) {
var params = {};
params.agent_id = agent.agent_id;
console.log(agent.agent_id);
$.ajax({
url: '/index/deviceList', //电脑绑定权限
type: 'GET',
......@@ -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>';
if(item.title == tempval) {
_tempid = item.id;
console.log(item.id);
};
});
console.log(_tempid);
$("#edit_role").html(User_add).val(_tempid);
}
......@@ -576,15 +530,9 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
});
},
getEvaluationList: function(n) {
console.log(n);
// var _data={};
// for(var i=0;i<n.length;i++){
// _data['agents_id['+i+']']=n[i];
// }
var _data = {
'agents_id': n.join(',')
}
console.log('经纪人列表加载完成');
$.ajax({
url: '/index/agentEvaluateNumAndFraction',
type: 'GET',
......@@ -593,7 +541,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
// console.log(data.data[0].agent_evaluate_num);
$("#agentlist tr").each(function(e) {
//e代表索引 从0开始 eq(0)就是第一行
$("#agentlist").find("tr").eq(e).find("td").eq(9).html(data.data[e].agent_evaluate_num); //获取一列的值
......
......@@ -48,9 +48,9 @@
<!--绑定手机权限-->
[% 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 @@
[% if(it) { %]
[% for(var item in it){ %]
<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]["create_time"] %]</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