Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
daa22e69
Commit
daa22e69
authored
Jul 19, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经纪人修改
parent
c8deaa76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
63 deletions
+12
-63
agent.html
application/index/view/agent/agent.html
+5
-4
agent.js
public/resource/js/agent.js
+4
-57
agent_template_tpl.html
public/resource/template/agent_template_tpl.html
+2
-2
phoneBinding_template_tpl.html
public/resource/template/phoneBinding_template_tpl.html
+1
-0
No files found.
application/index/view/agent/agent.html
View file @
daa22e69
...
...
@@ -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'
>
...
...
public/resource/js/agent.js
View file @
daa22e69
...
...
@@ -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
);
//获取一列的值
...
...
public/resource/template/agent_template_tpl.html
View file @
daa22e69
...
...
@@ -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>--
>
...
...
public/resource/template/phoneBinding_template_tpl.html
View file @
daa22e69
...
...
@@ -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
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment