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
6d140818
Commit
6d140818
authored
Jan 23, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增商铺暂存
parent
afa11a18
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
572 additions
and
84 deletions
+572
-84
edit.html
application/index/view/houses/edit.html
+291
-82
jia2@2x.png
public/resource/image/jia2@2x.png
+0
-0
jz2.gif
public/resource/image/jz2.gif
+0
-0
search_gb.png
public/resource/image/search_gb.png
+0
-0
search_ic.png
public/resource/image/search_ic.png
+0
-0
edit.js
public/resource/js/edit.js
+281
-2
No files found.
application/index/view/houses/edit.html
View file @
6d140818
...
...
@@ -2,29 +2,195 @@
<input
type=
"hidden"
class=
"page-load"
id=
"edit"
/>
<div
id=
"page-content-wrapper"
>
<style
type=
"text/css"
>
.form-group
{
margin
:
10px
;
}
.input-100-width
{
width
:
100px
!important
;
}
.input-360-width
{
width
:
360px
!important
;
}
.textarea-500-width
{
width
:
500px
!important
;
}
.list-group-item
>
.full-width-100
+
.full-width-100
{
padding-top
:
10px
;
}
.list-group-item
>
.full-width-100
>
label
{
width
:
60px
;
}
.list-group-item
>
.full-pic-area
>
label
{
width
:
120px
;
}
</style>
<style
type=
"text/css"
>
.form-group
{
margin
:
10px
;
}
.input-100-width
{
width
:
100px
!important
;
}
.input-360-width
{
width
:
360px
!important
;
}
.textarea-500-width
{
width
:
500px
!important
;
}
.list-group-item
>
.full-width-100
+
.full-width-100
{
padding-top
:
10px
;
}
.list-group-item
>
.full-width-100
>
label
{
width
:
60px
;
}
.list-group-item
>
.full-pic-area
>
label
{
width
:
120px
;
}
.input-add-tel
{
margin-top
:
16px
;
height
:
20px
;
}
.phone-list-container
{
overflow
:
hidden
;
width
:
196px
;
vertical-align
:
top
!important
;
position
:
relative
;
}
.phone-list-container
>
label
{
line-height
:
30px
;
}
.phone-list-container
>
input
{
float
:
left
;
}
.phone-list-container
>
ul
{
width
:
196px
;
list-style
:
none
;
padding-left
:
0
;
float
:
right
;
border
:
1px
solid
#ccc
;
border-top
:
none
;
background-color
:
white
;
}
.phone-list-container
>
ul
>
li
:hover
{
background-color
:
#e0e0e0
;
}
.phone-list-container
>
img
{
position
:
absolute
;
right
:
5px
;
top
:
7px
;
width
:
20px
;
}
/*获取百度经纬度样式*/
/*********************************************************百度定位页面iframe引入*************************************/
#position_box
{
height
:
750px
;
background-color
:
#f0f0f0
;
overflow
:
scroll
;
position
:
relative
;
}
div
.address-header-bar
{
overflow
:
hidden
;
float
:
left
;
}
#address_city_title
{
float
:
left
;
width
:
150px
;
line-height
:
60px
;
font-size
:
30px
;
color
:
#333
;
text-align
:
center
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.crile
{
float
:
left
;
width
:
480px
;
overflow
:
hidden
;
position
:
relative
;
}
.crile
>
input
{
line-height
:
60px
;
box-sizing
:
border-box
;
padding
:
0
;
border-width
:
1px
;
width
:
100%
;
display
:
block
;
border-radius
:
30px
;
background
:
#f5f5f5
url('/resource/image/search_ic.png')
no-repeat
30px
center
;
background-size
:
28px
;
text-indent
:
60px
;
font-size
:
28px
;
outline
:
none
;
}
.crile
>
input
::-webkit-search-cancel-button
{
-webkit-appearance
:
none
;
}
img
.cancel-pic
{
width
:
28px
;
height
:
28px
;
position
:
absolute
;
right
:
0
;
top
:
0
;
box-sizing
:
content-box
;
padding
:
15px
;
}
#main_ul
{
padding
:
0
30px
;
background-color
:
white
;
font-size
:
30px
;
}
#main_ul
>
ul
{
padding-left
:
0
;
}
#main_ul
>
ul
>
li
{
cursor
:
pointer
;
list-style
:
none
;
}
#main_ul
>
ul
>
li
+
li
{
border-top
:
1px
solid
#e0e0e0
;
}
#main_ul
>
ul
>
li
>
p
:nth-of-type
(
1
)
{
color
:
#333
;
padding
:
20px
0
10px
;
margin
:
0
;
}
#main_ul
>
ul
>
li
>
p
:nth-of-type
(
2
)
{
color
:
#999
;
padding-bottom
:
20px
;
margin
:
0
;
}
/*************************分页加载相关样式loading*********************************/
.loading_pic
{
font-size
:
20px
;
text-align
:
center
;
width
:
100%
;
position
:
absolute
;
top
:
150px
;
display
:
none
;
}
.loading_pic
>
img
{
width
:
120px
;
display
:
block
;
margin
:
0
auto
;
}
.loading_pic
>
p
{
font-size
:
20px
;
color
:
#333
;
text-align
:
center
;
margin-top
:
10px
;
color
:
rgb
(
51
,
51
,
51
);
}
.no_more
{
font-size
:
30px
;
height
:
50px
;
line-height
:
50px
;
text-align
:
center
;
display
:
none
;
}
</style>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-10 col-lg-offset-0"
>
...
...
@@ -57,20 +223,39 @@
</div>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<div
class=
"form-group
phone-list-container"
style=
"width: 70px;
"
>
<label
for=
""
>
案场人电话
</label>
<input
type=
"tel"
class=
"form-control phone_jia"
placeholder=
"请输入"
>
</div>
<div
class=
"form-group phone-list-container"
>
<input
type=
"tel"
class=
"form-control acqx_phone_jia"
placeholder=
"请输入"
>
<ul></ul>
</div>
<!--<div class="form-group phone-list-container">
<input type="tel" class="form-control acqx_phone_jia" placeholder="请输入">
<ul></ul>
<img src="/resource/image/search_gb.png" class="input-cancel-pic" />
</div>-->
<img
src=
"/resource/image/jia2@2x.png"
class=
"input-add-tel"
id=
"acr_tel_jia"
/>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<div
class=
"form-group
phone-list-container"
style=
"width: 70px;
"
>
<label
for=
""
>
盘方
</label>
<input
type=
"text"
class=
"form-control"
placeholder=
"请输入"
>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group phone-list-container"
>
<input
type=
"tel"
class=
"form-control acqx_phone_jia"
placeholder=
"请输入"
>
<ul></ul>
</div>
<img
src=
"/resource/image/jia2@2x.png"
class=
"input-add-tel"
id=
"pf_tel_jia"
/>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group phone-list-container"
style=
"width: 70px;"
>
<label
for=
""
>
案场权限人
</label>
<input
type=
"text"
class=
"form-control"
placeholder=
"请输入"
>
</div>
<div
class=
"form-group phone-list-container"
>
<input
type=
"tel"
class=
"form-control acqx_phone_jia"
placeholder=
"请输入"
>
<ul></ul>
</div>
<img
src=
"/resource/image/jia2@2x.png"
class=
"input-add-tel"
id=
"acqx_tel_jia"
/>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
...
...
@@ -92,25 +277,25 @@
</select>
</div>
<div
class=
"form-group"
>
<label
class=
""
for=
"price"
>
月租均价
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
name=
"price"
id=
"price"
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
元/月
</div>
</div>
<label
class=
""
for=
"price"
>
月租均价
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
name=
"price"
id=
"price"
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
元/月
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"management_fee"
>
物业管理费
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
name=
"management_fee"
id=
"management_fee"
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
元/月
</div>
</div>
<input
type=
"number"
class=
"form-control input-100-width"
name=
"management_fee"
id=
"management_fee"
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
元/月
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
进场费
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
id=
""
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
元/月
</div>
</div>
<input
type=
"number"
class=
"form-control input-100-width"
id=
""
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
元/月
</div>
</div>
</div>
</li>
<li
class=
"list-group-item"
>
...
...
@@ -125,18 +310,18 @@
<div
class=
"form-group"
>
<label
for=
""
>
商铺面积
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
id=
""
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
至
</div>
<input
type=
"number"
class=
"form-control input-100-width"
id=
""
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
m²
</div>
</div>
<input
type=
"number"
class=
"form-control input-100-width"
id=
""
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
至
</div>
<input
type=
"number"
class=
"form-control input-100-width"
id=
""
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
m²
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
商业面积
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
id=
""
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
m²
</div>
</div>
<input
type=
"number"
class=
"form-control input-100-width"
id=
""
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
m²
</div>
</div>
</div>
</li>
<li
class=
"list-group-item"
>
...
...
@@ -157,37 +342,28 @@
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<label
for=
""
>
对内地址
</label>
<select
class=
"form-control"
>
<option
value=
"上海市"
selected=
"selected"
>
上海市
</option>
<option
value=
"杭州市"
>
杭州市
</option>
</select>
<select
class=
"form-control"
>
<option
value=
"黄浦区"
selected=
"selected"
>
黄浦区
</option>
<option
value=
"静安区"
>
静安区
</option>
</select>
<select
class=
"form-control"
id=
"province_internal"
name=
"province_internal"
></select>
<select
class=
"form-control"
id=
"city_internal"
name=
"city_internal"
></select>
<select
class=
"form-control"
id=
"disc_internal"
name=
"disc_internal"
></select>
<input
type=
"text"
class=
"form-control"
placeholder=
"请输入详细地址"
>
<button
type=
"button"
class=
"btn btn-primary"
id=
"insert_sublet"
>
选择地址定位
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
id=
"position_btn"
>
选择地址定位
</button>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
经度
</label>
<input
type=
"text"
class=
"form-control input-100-width"
readonly=
"readonly"
>
<label
for=
"
longitude
"
>
经度
</label>
<input
type=
"text"
class=
"form-control input-100-width"
readonly=
"readonly"
id=
"longitude"
name=
"longitude"
>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
纬度
</label>
<input
type=
"text"
class=
"form-control input-100-width"
readonly=
"readonly"
>
<input
type=
"text"
class=
"form-control input-100-width"
readonly=
"readonly"
id=
"latitude"
name=
"latitude"
>
</div>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<label
for=
""
>
对外地址
</label>
<select
class=
"form-control"
>
<option
value=
"上海市"
selected=
"selected"
>
上海市
</option>
<option
value=
"杭州市"
>
杭州市
</option>
</select>
<select
class=
"form-control"
>
<option
value=
"黄浦区"
selected=
"selected"
>
黄浦区
</option>
<option
value=
"静安区"
>
静安区
</option>
</select>
<select
class=
"form-control"
id=
"province_external"
name=
"province_external"
></select>
<select
class=
"form-control"
id=
"city_external"
name=
"city_external"
></select>
<select
class=
"form-control"
id=
"disc_external"
name=
"disc_external"
></select>
<input
type=
"text"
class=
"form-control"
placeholder=
"请输入详细地址"
>
</div>
</li>
...
...
@@ -226,19 +402,19 @@
<div
class=
"form-group"
>
<label
for=
""
>
微楼书
</label>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control input-360-width"
id=
""
placeholder=
"请填入微楼书网页链接"
>
<div
class=
"input-group-addon"
>
如(https://www.fujuhaofang.com)
</div>
</div>
<input
type=
"text"
class=
"form-control input-360-width"
id=
""
placeholder=
"请填入微楼书网页链接"
>
<div
class=
"input-group-addon"
>
如(https://www.fujuhaofang.com)
</div>
</div>
</div>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
style=
"width: 100%;"
>
<label
for=
""
style=
"width: 100%;"
>
大讲堂
</label>
<div
class=
"input-group"
style=
"width: 100%;"
>
<?php
<?php
create_editor('describe');
?>
</div>
</div>
</div>
</li>
<li
class=
"list-group-item"
>
...
...
@@ -317,32 +493,32 @@
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
列表页封面图(1张)
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"liebiao_pic_pre"
class=
"form-control"
style=
"width: 150px !important;display: inline-block"
id=
"liebiao_pic_pre"
placeholder=
"请选择图片"
>
<button
class=
"btn btn-default"
id=
"liebiao_pic_btn"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
></span>
<button
class=
"btn btn-default"
id=
"liebiao_pic_btn"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
></span>
</div>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
详情页轮播图(至少6张)
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"xiangqing_pic_pre"
class=
"form-control"
style=
"width: 150px !important;display: inline-block"
id=
"xiangqing_pic_pre"
placeholder=
"请选择图片"
>
<button
class=
"btn btn-default"
id=
"xiangqing_pic_btn"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
></span>
<button
class=
"btn btn-default"
id=
"xiangqing_pic_btn"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
></span>
</div>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
楼层平面图(选填)
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"louceng_pic_pre"
class=
"form-control"
style=
"width: 150px !important;display: inline-block"
id=
"louceng_pic_pre"
placeholder=
"请选择图片"
>
<button
class=
"btn btn-default"
id=
"louceng_pic_btn"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
></span>
<button
class=
"btn btn-default"
id=
"louceng_pic_btn"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
></span>
</div>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
附件上传(PDF格式)
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"fujian_pre"
class=
"form-control"
style=
"width: 150px !important;display: inline-block"
id=
"fujian_pre"
placeholder=
"请选择图片"
>
<button
class=
"btn btn-default"
id=
"fujian_btn"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
></span>
<button
class=
"btn btn-default"
id=
"fujian_btn"
type=
"button"
>
选择图片
</button>
<span
class=
"tip"
></span>
</div>
</li>
<li
class=
"list-group-item"
><button
type=
"submit"
class=
"btn btn-default"
>
保存
</button></li>
...
...
@@ -353,4 +529,36 @@
</div>
</div>
</div>
</div>
<!--百度定位的弹出框更改-->
<div
class=
"modal fade bs-example-modal-lg"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myLargeModalLabel"
>
<div
class=
"modal-dialog modal-lg"
role=
"document"
>
<div
class=
"modal-content"
style=
"width: 780px;"
>
<div
class=
"modal-header"
style=
"height: 88px;overflow: hidden;"
>
<div
class=
"address-header-bar"
>
<div
id=
"address_city_title"
>
上海市
</div>
<div
class=
"crile"
>
<input
class=
"main-input"
id=
"search_input"
type=
"search"
placeholder=
"请输入地址"
/>
<img
src=
"/resource/image/search_gb.png"
class=
"cancel-pic"
/>
</div>
</div>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
style=
"font-size: 42px;"
><span
aria-hidden=
"true"
>
×
</span></button>
</div>
<div
class=
"modal-body"
style=
"height: 780px;"
>
<div
id=
"position_box"
>
<div
id=
"main_ul"
>
<ul></ul>
</div>
<div
id=
"loading_pic"
class=
"loading_pic"
>
<img
src=
"/resource/image/jz2.gif"
/>
<p>
正在加载...
</p>
</div>
<div
id=
"no_more"
class=
"no_more"
>
没有更多了
</div>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
src=
"https://api.map.baidu.com/api?v=2.0&ak=RTimRTxtj23AYTCkSsPvNDuQkGpR2fPX"
></script>
</div>
\ No newline at end of file
public/resource/image/jia2@2x.png
0 → 100644
View file @
6d140818
1.14 KB
public/resource/image/jz2.gif
0 → 100644
View file @
6d140818
33.6 KB
public/resource/image/search_gb.png
0 → 100644
View file @
6d140818
857 Bytes
public/resource/image/search_ic.png
0 → 100644
View file @
6d140818
1.8 KB
public/resource/js/edit.js
View file @
6d140818
define
([
'c
kfinder'
,
'ckfinderStart
'
],
function
()
{
define
([
'c
ss!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
'bootstrapJs
'
],
function
()
{
var
user
=
{
init
:
function
()
{
//初始化dot
user
.
event
();
},
event
:
function
()
{
var
_doc
=
$
(
document
);
$
(
'#liebiao_pic_btn'
).
click
(
function
()
{
BrowseServer
(
'liebiao_pic_pre'
);
});
/************************************************百度地址定位相关*************************************************************/
//字符串格式化,参数为对象的形式 by xishifeng 2017-07-14
String
.
prototype
.
stringFormatObj
=
function
(){
var
formatted
=
this
;
for
(
var
i
in
arguments
[
0
]){
formatted
=
formatted
.
replace
(
new
RegExp
(
'
\\
{'
+
i
+
'
\\
}'
,
'gi'
),
arguments
[
0
][
i
]);
};
return
formatted
;
};
//从baidu-position.js移过来
var
ulHtml
=
$
(
'#main_ul>ul'
),
loadItem
=
$
(
"#loading_pic"
),
noMoreItem
=
$
(
"#no_more"
),
cityLimitItem
=
$
(
'#address_city_title'
),
_cityInputObj
=
$
(
'#city_internal'
),
_inputObj
=
$
(
'#search_input'
),
valueCurrent
=
''
;
//初始化,百度地图相关对象
var
LocalSearch
=
new
BMap
.
LocalSearch
(),
myGeo
=
new
BMap
.
Geocoder
();
$
(
'#position_btn'
).
click
(
function
(){
$
.
each
(
_cityInputObj
.
find
(
'option'
),
function
(
i
,
item
)
{
var
_item
=
$
(
item
);
if
(
_item
.
val
()
==
_cityInputObj
.
val
()){
cityLimitItem
.
html
(
_item
.
html
());
return
false
;
//jq跳出当前循环
};
});
});
//搜索地址的回调
LocalSearch
.
setSearchCompleteCallback
(
function
(
data
)
{
if
(
LocalSearch
.
getStatus
()
==
BMAP_STATUS_SUCCESS
)
{
console
.
log
(
data
);
var
_html
=
""
;
for
(
var
i
=
0
;
i
<
data
.
getCurrentNumPois
();
i
++
){
_html
+=
'<li data-city="{2}" data-lat="{3}" data-lng="{4}" data-dismiss="modal"><p>{0}</p><p>{1}</p></li>'
.
stringFormatObj
({
'0'
:
data
.
getPoi
(
i
)[
"title"
],
'1'
:
data
.
getPoi
(
i
)[
"address"
],
'2'
:
data
.
getPoi
(
i
)[
"city"
],
'3'
:
data
.
getPoi
(
i
)[
"point"
][
"lat"
],
'4'
:
data
.
getPoi
(
i
)[
"point"
][
"lng"
]
});
};
ulHtml
.
html
(
_html
);
loadItem
.
hide
();
noMoreItem
.
show
();
}
});
_inputObj
.
on
(
'input'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
valueCurrent
=
$
(
this
).
val
();
if
(
valueCurrent
!=
''
)
{
resetLoad
();
loadMain
(
valueCurrent
);
}
else
{
ulHtml
.
html
(
''
);
loadItem
.
hide
();
noMoreItem
.
show
();
return
false
;
}
});
//key搜索
$
(
document
).
keydown
(
function
(
event
)
{
if
(
event
.
keyCode
==
'13'
)
{
resetLoad
();
loadMain
(
valueCurrent
);
return
false
;
};
});
//输入框的取消图标点击事件
$
(
'.cancel-pic'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
_inputObj
.
val
(
''
).
focus
();
resetLoad
();
});
$
(
document
).
on
(
'click'
,
'#main_ul>ul>li'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
$
(
'#longitude'
).
val
(
Number
(
_this
.
data
(
'lng'
)));
$
(
'#latitude'
).
val
(
Number
(
_this
.
data
(
'lat'
)));
});
function
resetLoad
()
{
ulHtml
.
html
(
''
);
loadItem
.
hide
();
noMoreItem
.
show
();
};
function
loadMain
(
keyword
)
{
loadItem
.
show
();
noMoreItem
.
hide
();
LocalSearch
.
setLocation
(
cityLimitItem
.
html
());
LocalSearch
.
search
(
keyword
);
};
/************************************************百度地址定位相关*************************************************************/
//自动获取省列表,并追加后面的市和区
getCityDisc
({
'isGetProvince'
:
true
},
function
(
_data
){
var
_htmlTemp
=
''
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_htmlTemp
+=
'<option value="{0}">{1}</option>'
.
stringFormatObj
({
'0'
:
item
[
'code'
],
'1'
:
item
[
'name'
]
});
});
$
.
each
(
$
(
'#province_internal, #province_external'
),
function
()
{
var
_this
=
$
(
this
);
_this
.
html
(
_htmlTemp
).
val
(
'310000'
);
getCityDisc
({
'dom'
:
_this
,
'isGetProvince'
:
false
},
function
(){
getCityDisc
({
'dom'
:
_this
.
next
(),
'isGetProvince'
:
false
});
});
});
});
//获取省市区事件封装
function
getCityDisc
(
_obj
,
fn
){
var
_data
=
{};
if
(
!
_obj
[
'isGetProvince'
]){
if
(
!!
_obj
[
'dom'
].
val
()){
_data
[
'parent_code'
]
=
Number
(
_obj
[
'dom'
].
val
())
}
else
{
//处理没有市选项,区选项的内容
_obj
[
'dom'
].
next
().
html
(
''
);
fn
&&
fn
();
return
false
;
};
};
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/regions.html'
,
timeout
:
30000
,
data
:
_data
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
//如果是获取的省列表,直接直接返回数组
if
(
_obj
[
'isGetProvince'
]){
fn
(
data
[
'data'
]);
return
false
;
};
var
_htmlTemp
=
''
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
_htmlTemp
+=
'<option value="{0}">{1}</option>'
.
stringFormatObj
({
'0'
:
item
[
'code'
],
'1'
:
item
[
'name'
]
});
});
_obj
[
'dom'
].
next
().
html
(
_htmlTemp
);
fn
&&
fn
();
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
alert
(
'请求超时'
);
};
}
});
};
//省选择框事件添加
$
(
'#province_internal, #province_external'
).
change
(
function
(){
var
_this
=
$
(
this
);
getCityDisc
({
'dom'
:
_this
,
'isGetProvince'
:
false
},
function
(){
getCityDisc
({
'dom'
:
_this
.
next
(),
'isGetProvince'
:
false
});
});
});
//市选择框事件添加
$
(
'#city_internal, #city_external'
).
change
(
function
(){
var
_this
=
$
(
this
);
getCityDisc
({
'dom'
:
_this
,
'isGetProvince'
:
false
});
});
$
(
'#acr_tel_jia'
).
click
(
function
(){
var
_this
=
$
(
this
);
console
.
log
(
_this
.
parent
().
find
(
'.acqx_phone_jia'
).
length
);
if
(
_this
.
parent
().
find
(
'.acqx_phone_jia'
).
length
<
5
){
_this
.
before
(
'<div class="form-group phone-list-container"><input type="tel" class="form-control acqx_phone_jia" placeholder="请输入"><ul></ul><img src="/resource/image/search_gb.png" class="input-cancel-pic" /></div>'
);
}
else
{
alert
(
'最多添加5个'
);
};
});
_doc
.
on
(
'click'
,
'.input-cancel-pic'
,
function
(){
$
(
this
).
parent
().
remove
();
});
_doc
.
on
(
'click'
,
'.phone-list-container>ul>li'
,
function
(){
var
_this
=
$
(
this
);
_this
.
parent
().
prev
().
val
(
_this
.
html
());
_this
.
parent
().
html
(
''
);
});
var
_ajaxObjAcr
=
null
;
_doc
.
on
(
'input'
,
'.acqx_phone_jia'
,
function
(){
var
_this
=
$
(
this
);
var
_thisVal
=
$
.
trim
(
_this
.
val
());
console
.
log
(
_thisVal
);
if
(
_thisVal
!=
''
){
_ajaxObjAcr
&&
_ajaxObjAcr
.
abort
();
_ajaxObjAcr
=
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/getBroker_new'
,
data
:
{
'phone'
:
$
.
trim
(
_this
.
val
())
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
[
'data'
].
length
>
0
){
var
_htmlTemp
=
''
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
_htmlTemp
+=
'<li>{0}-{1}<li>'
.
stringFormatObj
({
'0'
:
item
[
'name'
],
'1'
:
item
[
'phone'
]
});
});
_this
.
next
().
html
(
_htmlTemp
);
}
else
{
_this
.
next
().
html
(
''
);
};
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
//alert('error');
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
alert
(
'请求超时'
);
};
}
});
};
});
}
};
return
user
;
...
...
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