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
ee99b701
Commit
ee99b701
authored
Dec 22, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除js
parent
152e9159
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
107 deletions
+2
-107
watch_list.html
application/index/view/watch_shop/watch_list.html
+2
-107
No files found.
application/index/view/watch_shop/watch_list.html
View file @
ee99b701
...
...
@@ -135,109 +135,4 @@
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</div>
<script>
// 手机检索姓名
var
ldHtml
=
$
(
'.phone_list'
);
var
stopstatus
=
true
;
var
valueCurrent
=
''
;
var
ajaxObj
;
$
(
function
()
{
// $('.phone_jia').on('input', function(e) {
$
(
document
).
on
(
'input'
,
'.phone_jia'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
next
().
css
(
"display"
,
"block"
);
valueCurrent
=
_this
.
val
();
if
(
valueCurrent
!=
''
){
resetLoad
();
loadMain
(
valueCurrent
,
_this
.
next
());
}
else
{
ldHtml
.
html
(
''
);
return
false
;
}
});
});
function
resetLoad
(){
if
(
ajaxObj
){
ajaxObj
.
abort
();
}
ldHtml
.
html
(
''
);
stopstatus
=
true
;
}
function
loadMain
(
phone
,
obj
)
{
ajaxObj
=
$
.
ajax
({
type
:
"GET"
,
url
:
'/agents/get_user_info?'
,
data
:
{
'phone'
:
phone
},
timeout
:
10000
,
dataType
:
"json"
,
beforeSend
:
function
()
{
},
success
:
function
(
data
)
{
if
(
data
.
status
===
1
){
var
_html
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
data
)
{
_html
+=
'<li onclick="addphone(this)"><span class="id">'
+
data
[
'id'
]
+
'-</span><span class="phone_name">'
+
data
[
'realname'
]
+
'</span><span class="phone_span">-</span><span class="phone-phone">'
+
data
[
'phone'
]
+
'</span> </li>'
;
});
obj
.
html
(
_html
);
}
},
error
:
function
()
{
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
"timeout"
)
{
//处理超时的逻辑
alert
(
"请求超时"
);
}
}
});
}
function
addphone
(
n
){
var
phone_name
=
$
(
n
).
find
(
".phone_name"
).
html
();
var
phone_phone
=
$
(
n
).
find
(
".phone-phone"
).
html
();
var
phone_span
=
$
(
n
).
find
(
".phone_span"
).
html
();
var
id
=
$
(
n
).
find
(
".id"
).
html
();
$
(
n
).
parent
().
prev
().
val
(
id
+
phone_name
+
phone_span
+
phone_phone
);
$
(
n
).
parent
().
hide
();
ldHtml
.
html
(
''
);
return
false
;
}
function
jiabox
()
{
boxphoto
=
'<input name="phone[]" placeholder="请输入" type="tel" style="margin-left: 10px;float: left" class="phone_add">'
+
'<ul class="phone_list1"></ul>'
+
'<img src="/mobile4.0/images/qdao-sha.png" class="jian">'
;
$
(
".jian_class"
).
append
(
boxphoto
);
//写入
jianbox
();
}
function
jiabox_data
(
id
,
name
,
phone
)
{
boxphoto
=
'<input name="phone[]" placeholder="请输入" value='
+
id
+
'-'
+
name
+
'-'
+
phone
+
' type="tel" style="margin-left: 10px;float: left" class="phone_add">'
+
'<ul class="phone_list1"></ul>'
+
'<img src="/mobile4.0/images/qdao-sha.png" class="jian" onclick="jianbox()"><input type="hidden" value="'
+
id
+
'">'
;
$
(
".jian_class"
).
append
(
boxphoto
);
//写入
jianbox
();
}
function
jianbox
()
{
$
(
".jian"
).
click
(
function
()
{
$
(
this
).
prev
().
prev
().
remove
();
$
(
this
).
prev
().
remove
();
$
(
this
).
remove
();
});
}
jianbox
();
</script>
\ No newline at end of file
</div>
\ No newline at end of file
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