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
b95b62a3
Commit
b95b62a3
authored
Dec 22, 2017
by
刘丹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传
parent
4fa3d97f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
101 deletions
+83
-101
Index.php
application/app/controller/Index.php
+4
-0
route.php
application/route.php
+1
-0
share_register.css
public/app/css/share_register.css
+0
-0
watch_shop.js
public/resource/js/watch_shop.js
+78
-101
No files found.
application/app/controller/Index.php
View file @
b95b62a3
...
...
@@ -26,6 +26,10 @@ class Index
{
return
view
(
'index/share_detail'
);
}
public
function
share_detail
()
{
return
view
(
'index/share_register'
);
}
public
function
agent_detail
()
{
return
view
(
'index/agent_detail'
);
...
...
application/route.php
View file @
b95b62a3
...
...
@@ -46,6 +46,7 @@ Route::group('app', [
'more_pingjia'
=>
[
'app/index/more_pingjia'
,
[
'method'
=>
'get'
]
],
'more_chengjiao'
=>
[
'app/index/more_chengjiao'
,
[
'method'
=>
'get'
]
],
'share_detail'
=>
[
'app/index/share_detail'
,
[
'method'
=>
'get'
]
],
'share_register'
=>
[
'app/index/share_register'
,
[
'method'
=>
'get'
]
],
'getShopDetails'
=>
[
'app/index/getShopDetail'
,
[
'method'
=>
'get | post'
]
],
]);
...
...
public/app/css/share_register.css
0 → 100644
View file @
b95b62a3
public/resource/js/watch_shop.js
View file @
b95b62a3
...
...
@@ -55,6 +55,84 @@ define (['doT', 'text!temp/watch_template_tpl.html', 'css!style/home.css',"datet
});
});
$
(
document
).
delegate
(
".phone_jia"
,
"click"
,
function
()
{
// 手机检索姓名
var
ldHtml
=
$
(
'.phone_list'
);
var
stopstatus
=
true
;
var
valueCurrent
=
''
;
var
ajaxObj
;
$
(
function
()
{
$
(
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
:
'/index/getBroker'
,
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
;
}
});
},
getList
:
function
(
pageNo
)
{
user
.
pageNo
=
pageNo
;
...
...
@@ -140,104 +218,3 @@ function alertFollow(obj){
});
}
// 手机检索姓名
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
();
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