Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tospur
Overview
Overview
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
felix
tospur
Commits
a6ba1c7d
Commit
a6ba1c7d
authored
Oct 19, 2015
by
felix
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
每日一更
parent
fc27c8f7
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1148 additions
and
60 deletions
+1148
-60
wp-content/plugins/tospur/Admin/House.php
+1
-2
wp-content/plugins/tospur/Admin/newHouseList.php
+0
-8
wp-content/plugins/tospur/Admin/rentHouse.php
+3
-2
wp-content/plugins/tospur/Admin/rentHouseList.php
+0
-16
wp-content/plugins/tospur/Admin/secHandHouse.php
+3
-2
wp-content/plugins/tospur/Admin/secHandHouseList.php
+0
-16
wp-content/plugins/tospur/Admin/views/newhouse.html
+5
-3
wp-content/plugins/tospur/Admin/views/rentHouse.html
+3
-3
wp-content/plugins/tospur/Admin/views/secHandHouse.html
+3
-3
wp-content/plugins/tospur/Dao/SearchDao.php
+17
-2
wp-content/themes/tospur/css/bookingList.css
+6
-0
wp-content/themes/tospur/css/bookingSeeHouse.css
+6
-0
wp-content/themes/tospur/css/consultantList.css
+6
-0
wp-content/themes/tospur/css/consultantShop.css
+6
-0
wp-content/themes/tospur/css/detail.css
+8
-2
wp-content/themes/tospur/css/form.css
+6
-0
wp-content/themes/tospur/css/infoFeedback.css
+6
-0
wp-content/themes/tospur/css/list.css
+6
-0
wp-content/themes/tospur/css/loan_calculator.css
+6
-0
wp-content/themes/tospur/css/loan_detail.css
+6
-0
wp-content/themes/tospur/css/myHouse.css
+6
-0
wp-content/themes/tospur/css/rent.css
+6
-0
wp-content/themes/tospur/detail.html
+336
-0
wp-content/themes/tospur/detailOther.html
+319
-0
wp-content/themes/tospur/index.html
+375
-0
wp-content/themes/tospur/js/public.js
+9
-1
No files found.
wp-content/plugins/tospur/Admin/House.php
View file @
a6ba1c7d
...
...
@@ -73,7 +73,7 @@ class House extends Tospur_House{
$context
[
"district"
]
=
SearchDao
::
searchCity
(
$context
[
'result'
]
->
city_id
);
$context
[
"plate"
]
=
SearchDao
::
searchCity
(
$context
[
'result'
]
->
city_id
,
$context
[
'result'
]
->
district_id
);
$context
[
"mark"
]
=
SearchDao
::
searchHouseTag
(
$_GET
[
'id'
]);
$context
[
"status"
]
=
searchDao
::
searchStatusType
(
1
);
$context
[
"status"
]
=
searchDao
::
searchStatusType
(
1
,
0
);
}
$context
[
'canApproval'
]
=
House
::
canApproval
();
$context
[
'canEdit'
]
=
House
::
canEdit
();
...
...
@@ -81,7 +81,6 @@ class House extends Tospur_House{
$context
[
"buildProperty"
]
=
SearchDao
::
searchBuildProperty
();
$context
[
"room"
]
=
SearchDao
::
searchRoom
();
$context
[
"photoType"
]
=
SearchDao
::
searchPhotoType
();
$context
[
"status"
]
=
searchDao
::
searchStatusType
(
1
);
Timber
::
render
(
"newhouse.html"
,
$context
);
}
...
...
wp-content/plugins/tospur/Admin/newHouseList.php
View file @
a6ba1c7d
...
...
@@ -153,7 +153,6 @@ class newHouseList extends WP_List_Table
$actions
=
array
(
'unCheck'
=>
'未审核'
,
'check'
=>
'审核'
,
'onSale'
=>
'交易中'
,
'notSale'
=>
'下架'
);
}
...
...
@@ -242,13 +241,6 @@ class newHouseList extends WP_List_Table
}
$status
=
$res
;
break
;
case
'onSale'
:
$res
=
$this
->
getCurrentStatus
(
$string
,
-
1
);
if
(
!
$res
)
{
exit
;
}
$status
=
$res
;
break
;
case
'notSale'
:
$res
=
$this
->
getCurrentStatus
(
$string
,
2
);
if
(
!
$res
)
{
...
...
wp-content/plugins/tospur/Admin/rentHouse.php
View file @
a6ba1c7d
...
...
@@ -87,7 +87,9 @@ class RentHouse extends Tospur_House{
$context
[
"district"
]
=
SearchDao
::
searchCity
(
$context
[
'result'
]
->
city_id
);
$context
[
"plate"
]
=
SearchDao
::
searchCity
(
$context
[
'result'
]
->
city_id
,
$context
[
'result'
]
->
district_id
);
$context
[
"mark"
]
=
SearchDao
::
searchHouseTag
(
$_GET
[
'id'
]);
$context
[
"status"
]
=
searchDao
::
searchStatusType
(
2
);
$currentStatus
=
$context
[
"result"
]
->
status
;
$currentApproval
=
$context
[
"result"
]
->
approval
;
$context
[
"status"
]
=
searchDao
::
searchStatusType
(
2
,
0
,
$currentStatus
,
$currentApproval
);
}
$context
[
'canApproval'
]
=
House
::
canApproval
();
$context
[
'canEdit'
]
=
House
::
canEdit
();
...
...
@@ -95,7 +97,6 @@ class RentHouse extends Tospur_House{
$context
[
"buildProperty"
]
=
SearchDao
::
searchBuildProperty
();
$context
[
"room"
]
=
SearchDao
::
searchRoom
();
$context
[
"photoType"
]
=
SearchDao
::
searchPhotoType
();
$context
[
"status"
]
=
searchDao
::
searchStatusType
(
2
);
$context
[
"house_type"
]
=
2
;
Timber
::
render
(
"rentHouse.html"
,
$context
);
...
...
wp-content/plugins/tospur/Admin/rentHouseList.php
View file @
a6ba1c7d
...
...
@@ -151,8 +151,6 @@ class rentHouseList extends WP_List_Table
$actions
=
array
(
'unCheck'
=>
'未审核'
,
'check'
=>
'审核'
,
'onSale'
=>
'交易中'
,
'selfSale'
=>
'自售'
,
'otherSale'
=>
'他售'
,
'invalid'
=>
'无效'
,
'reactivation'
=>
'重激活'
...
...
@@ -247,13 +245,6 @@ class rentHouseList extends WP_List_Table
}
$status
=
$res
;
break
;
case
'selfSale'
:
$res
=
$this
->
getCurrentStatus
(
$string
,
2
);
if
(
!
$res
)
{
exit
;
}
$status
=
$res
;
break
;
case
'otherSale'
:
$res
=
$this
->
getCurrentStatus
(
$string
,
3
);
if
(
!
$res
)
{
...
...
@@ -275,13 +266,6 @@ class rentHouseList extends WP_List_Table
}
$status
=
$res
;
break
;
case
'onSale'
:
$res
=
$this
->
getCurrentStatus
(
$string
,
-
1
);
if
(
!
$res
)
{
exit
;
}
$status
=
$res
;
break
;
}
$result
=
DBManager
::
query
(
$wpdb
->
prepare
(
'update tospur_house SET status = 0 ,approval=%d where id in '
.
$string
,
$status
));
}
...
...
wp-content/plugins/tospur/Admin/secHandHouse.php
View file @
a6ba1c7d
...
...
@@ -86,7 +86,9 @@ class SecHandHouse extends Tospur_House{
$context
=
array_merge
(
$context
,
SearchDao
::
getDetailInfo
(
$_GET
[
'id'
]));
$context
[
"district"
]
=
SearchDao
::
searchCity
(
$context
[
'result'
]
->
city_id
);
$context
[
"plate"
]
=
SearchDao
::
searchCity
(
$context
[
'result'
]
->
city_id
,
$context
[
'result'
]
->
district_id
);
$currentStatus
=
$context
[
"result"
]
->
status
;
$currentApproval
=
$context
[
"result"
]
->
approval
;
$context
[
"status"
]
=
searchDao
::
searchStatusType
(
2
,
0
,
$currentStatus
,
$currentApproval
);
}
$context
[
'canApproval'
]
=
House
::
canApproval
();
$context
[
'canEdit'
]
=
House
::
canEdit
();
...
...
@@ -94,7 +96,6 @@ class SecHandHouse extends Tospur_House{
$context
[
"buildProperty"
]
=
SearchDao
::
searchBuildProperty
();
$context
[
"room"
]
=
SearchDao
::
searchRoom
();
$context
[
"photoType"
]
=
SearchDao
::
searchPhotoType
();
$context
[
"status"
]
=
searchDao
::
searchStatusType
(
2
);
$context
[
"house_type"
]
=
1
;
Timber
::
render
(
"secHandHouse.html"
,
$context
);
...
...
wp-content/plugins/tospur/Admin/secHandHouseList.php
View file @
a6ba1c7d
...
...
@@ -150,8 +150,6 @@ class secHandHouseList extends WP_List_Table
$actions
=
array
(
'unCheck'
=>
'未审核'
,
'check'
=>
'审核'
,
'onSale'
=>
'交易中'
,
'selfSale'
=>
'自售'
,
'otherSale'
=>
'他售'
,
'invalid'
=>
'无效'
,
'reactivation'
=>
'重激活'
...
...
@@ -246,13 +244,6 @@ class secHandHouseList extends WP_List_Table
}
$status
=
$res
;
break
;
case
'selfSale'
:
$res
=
$this
->
getCurrentStatus
(
$string
,
2
);
if
(
!
$res
)
{
exit
;
}
$status
=
$res
;
break
;
case
'otherSale'
:
$res
=
$this
->
getCurrentStatus
(
$string
,
3
);
if
(
!
$res
)
{
...
...
@@ -274,13 +265,6 @@ class secHandHouseList extends WP_List_Table
}
$status
=
$res
;
break
;
case
'onSale'
:
$res
=
$this
->
getCurrentStatus
(
$string
,
-
1
);
if
(
!
$res
)
{
exit
;
}
$status
=
$res
;
break
;
}
$result
=
DBManager
::
query
(
$wpdb
->
prepare
(
'update tospur_house SET status = 0 , approval=%d where id in '
.
$string
,
$status
));
}
...
...
wp-content/plugins/tospur/Admin/views/newhouse.html
View file @
a6ba1c7d
...
...
@@ -66,7 +66,7 @@
{% if houseId %}
{% if canApproval %}
{% if result.approval != -2 %}
<select
name=
"status"
class=
"form-control"
>
<select
name=
"status"
>
<option
value=
"{{result.approval}}"
>
通过
</option>
<option
value=
"-2"
>
退回
</option>
</select>
...
...
@@ -74,14 +74,14 @@
<input
type=
"hidden"
name=
"status"
value=
"{{result.status}}"
>
{% endif %}
{% else %}
<select
name=
"status"
class=
"form-control"
>
<select
name=
"status"
>
{% for item in status %}
<option
{{
item
.
id =
=
result
.
status
?"
selected
"
:
""
}}
value=
{{item.id}}
>
{{item.value}}
</option>
{% endfor %}
</select>
{% endif %}
{% endif %}
<input
type=
"submit"
id=
"submit"
class=
"button action"
style=
"float:left"
>
<input
type=
"submit"
id=
"submit"
class=
"button action"
>
{% endif %}
</div>
...
...
@@ -109,8 +109,10 @@
$
(
"#baseAreaId"
).
change
(
function
(){
setArea
(
"baseCity"
,
"baseAreaId"
,
"basePlateId"
);
});
{
%
if
result
is
not
null
%
}
var
json
=
{
"decoration"
:
"{{result.decoration}}"
};
revertOption
(
json
);
{
%
endif
%
}
var
rulesJson
=
{
housename
:
'required'
,
average_price
:
'required'
,
...
...
wp-content/plugins/tospur/Admin/views/rentHouse.html
View file @
a6ba1c7d
...
...
@@ -56,7 +56,7 @@
{% if houseId %}
{% if canApproval %}
{% if result.approval != -2 %}
<select
name=
"status"
class=
"form-control"
>
<select
name=
"status"
>
<option
value=
"{{result.approval}}"
>
通过
</option>
<option
value=
"-2"
>
退回
</option>
</select>
...
...
@@ -64,14 +64,14 @@
<input
type=
"hidden"
name=
"status"
value=
"{{result.status}}"
>
{% endif %}
{% else %}
<select
name=
"status"
class=
"form-control"
>
<select
name=
"status"
>
{% for item in status %}
<option
{{
item
.
id =
=
result
.
status
?"
selected
"
:
""
}}
value=
{{item.id}}
>
{{item.value}}
</option>
{% endfor %}
</select>
{% endif %}
{% endif %}
<input
type=
"submit"
id=
"submit"
class=
"button action"
style=
"float:left"
>
<input
type=
"submit"
id=
"submit"
class=
"button action"
>
{% endif %}
{% endif %}
</div>
...
...
wp-content/plugins/tospur/Admin/views/secHandHouse.html
View file @
a6ba1c7d
...
...
@@ -60,7 +60,7 @@
{% if houseId %}
{% if canApproval %}
{% if result.approval != -2 %}
<select
name=
"status"
class=
"form-control"
>
<select
name=
"status"
>
<option
value=
"{{result.approval}}"
>
通过
</option>
<option
value=
"-2"
>
退回
</option>
</select>
...
...
@@ -68,7 +68,7 @@
<input
type=
"hidden"
name=
"status"
value=
"{{result.status}}"
>
{% endif %}
{% else %}
<select
name=
"status"
class=
"form-control"
>
<select
name=
"status"
>
{% for item in status %}
<option
{{
item
.
id =
=
result
.
status
?"
selected
"
:
""
}}
value=
{{item.id}}
>
{{item.value}}
</option>
{% endfor %}
...
...
@@ -76,7 +76,7 @@
<input
type=
"hidden"
name=
"userType"
value=
"{{houseId}}"
>
{% endif %}
{% endif %}
<input
type=
"submit"
id=
"submit"
class=
"button action"
style=
"float:left"
>
<input
type=
"submit"
id=
"submit"
class=
"button action"
>
{% endif %}
{% endif %}
</div>
...
...
wp-content/plugins/tospur/Dao/SearchDao.php
View file @
a6ba1c7d
...
...
@@ -445,9 +445,24 @@ class SearchDao
return
implode
(
","
,
$tags
);
}
public
static
function
searchStatusType
(
$statusType
){
public
static
function
searchStatusType
(
$statusType
,
$canShow
=
null
,
$currentStatus
=
null
,
$currentApproval
=
null
){
global
$wpdb
;
$sql
=
"select status_id as id,status_name as value from "
.
Config
::
TOSPUR_STATUS_TABLE
.
" where status_type = %d"
;
$sql
=
"select status_id as id,status_name as value from "
.
Config
::
TOSPUR_STATUS_TABLE
.
" where status_type = %d "
;
//控制进入详细后可选的状态
if
(
isset
(
$canShow
)){
$sql
.=
" and canShow = "
.
$canShow
;
}
if
(
isset
(
$currentStatus
)){
//房源为无效时当置业顾问提交后,status变为未审核,approval为重激活,要使此类房源进去后状态仍只有重激活
if
(
$currentApproval
==
5
&&
$currentStatus
==
0
){
$sql
.=
" and status_id = 5"
;
}
//无效只显示重激活
if
(
$currentStatus
==
4
){
$sql
.=
" and status_id = 5"
;
}
}
$results
=
DBManager
::
get_results
(
$wpdb
->
prepare
(
$sql
,
$statusType
));
return
$results
;
...
...
wp-content/themes/tospur/css/bookingList.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/css/bookingSeeHouse.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/css/consultantList.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/css/consultantShop.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/css/detail.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
@@ -375,7 +381,7 @@ body {
background
:
url("../img/white_collect_icon.png")
no-repeat
;
background-size
:
30px
30px
;
-webkit-background-size
:
30px
30px
;
background-position
:
5px
center
;
background-position
:
center
center
;
background-color
:
#f37021
;
}
.iconList
{
...
...
@@ -392,7 +398,7 @@ body {
-webkit-background-size
:
30px
30px
;
background-repeat
:
no-repeat
;
background-color
:
#008cd7
;
background-position
:
12px
center
;
background-position
:
center
center
;
margin-bottom
:
10px
;
border-top-right-radius
:
5px
;
border-bottom-right-radius
:
5px
;
...
...
wp-content/themes/tospur/css/form.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/css/infoFeedback.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/css/list.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/css/loan_calculator.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/css/loan_detail.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/css/myHouse.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/css/rent.css
View file @
a6ba1c7d
...
...
@@ -85,6 +85,12 @@
color
:
#000000
;
font-size
:
19px
;
font-weight
:
bold
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
width
:
85%
;
margin-right
:
0
;
display
:
inline-block
;
}
.row
ul
li
:last-child
{
position
:
absolute
;
...
...
wp-content/themes/tospur/detail.html
0 → 100644
View file @
a6ba1c7d
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=360, user-scalable=0"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
/>
<meta
name=
"format-detection"
content=
"telephone=no"
/>
<title>
{{result.community_name}}
</title>
<!--CSS-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ theme }}/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ theme }}/css/detail.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ theme }}/css/star-rating.min.css"
>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/iscroll.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/swipe.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/jquery.mobile.custom.min.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/star-rating.min.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
>
var
myScroll
;
var
carouselScroll
;
$
(
document
).
ready
(
function
(){
window
.
addEventListener
(
"load"
,
function
(){
var
bullets
=
document
.
getElementById
(
'indicator'
).
getElementsByTagName
(
'li'
);
window
.
mySwipe
=
new
Swipe
(
document
.
getElementById
(
'slider'
),
{
auto
:
3000
,
callback
:
function
(
pos
)
{
var
i
=
bullets
.
length
;
while
(
i
--
)
{
bullets
[
i
].
className
=
' '
;
}
bullets
[
pos
].
className
=
'active'
;
}
});
myScroll
=
new
IScroll
(
'#wrapper'
,
{
eventPassthrough
:
true
,
scrollX
:
true
,
scrollY
:
false
,
preventDefault
:
false
,
click
:
true
});
},
false
);
var
sliderTap
=
false
;
$
(
"#slider"
).
bind
(
"tap"
,
function
(){
$
(
"#carouselModal"
).
modal
(
'show'
);
var
carousel
=
$
(
"#carousel_wrapper"
);
var
carouselWidth
=
carousel
.
width
();
if
(
!
sliderTap
)
{
$
.
each
(
JSON
.
parse
(
'{{ images|json_encode() }}'
),
function
(
index
,
item
)
{
carousel
.
find
(
'#carousel_scroller ul'
).
append
(
'<li><p><span>'
+
'<img src="{{ siteUrl }}'
+
item
.
path
+
'">'
+
'</span></p></li>'
);
$
(
'#carousel_indicator'
).
append
(
'<li/>'
);
});
sliderTap
=
true
;
}
carousel
.
find
(
"#carousel_scroller ul li"
).
css
({
"width"
:
carouselWidth
});
carousel
.
find
(
"#carousel_indicator li"
).
removeClass
(
"carousel_active"
);
carousel
.
find
(
"#carousel_indicator li:first"
).
addClass
(
"carousel_active"
);
carouselScroll
=
new
IScroll
(
'#carousel_wrapper'
,
{
bounce
:
false
,
scrollX
:
true
,
scrollY
:
false
,
momentum
:
false
,
snap
:
true
,
snapSpeed
:
400
,
click
:
true
});
carouselScroll
.
on
(
'scrollEnd'
,
function
(){
$
(
"#carousel_indicator li"
).
removeClass
(
"carousel_active"
);
$
(
"#carousel_indicator li"
).
eq
(
this
.
currentPage
.
pageX
).
addClass
(
"carousel_active"
);
});
return
false
;
});
$
(
"#carouselModal,#photoModal"
).
bind
(
"click"
,
function
(){
$
(
this
).
modal
(
'hide'
);
return
false
;
});
$
(
".collect"
).
bind
(
"tap"
,
function
(){
$
.
ajax
({
type
:
'POST'
,
url
:
'{{ siteUrl }}/wp-admin/admin-ajax.php/'
,
data
:
'action=add_collect&hid={{hid}}'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
2000
)
{
alert
(
'收藏成功'
);
}
else
{
alert
(
'收藏失败'
);
}
}
});
});
$
(
'#calculator'
).
bind
(
'tap'
,
function
(){
window
.
location
.
href
=
'{{ siteUrl }}/?page=loan_calculator'
;
});
$
(
".map"
).
bind
(
"tap"
,
function
(){
location
.
href
=
"{{ siteUrl }}/?page=map&a={{result.address}}&c={{cityName}}&hn={{result.community_name}}<br>{{result.address}}&p={{result.location}}"
;
});
$
(
".recommendCont"
).
on
(
"tap"
,
".row"
,
function
(){
window
.
location
.
href
=
'{{ siteUrl }}/?page=detail&hid='
+
$
(
this
).
attr
(
"data-id"
);
});
$
(
"#scroller"
).
on
(
"tap"
,
"*[data-image-url]"
,
function
(){
$
(
"#photoModal"
).
find
(
"img"
).
eq
(
0
).
attr
(
"src"
,
$
(
this
).
attr
(
"data-image-url"
));
$
(
"#photoModal"
).
modal
(
"show"
);
return
false
;
});
});
</script>
</head>
<body>
<p
class=
"collect"
></p>
<!-- 图片滚动 -->
<div
class=
"addWrap"
>
<div
id=
"slider"
class=
"swipe"
>
<div
class=
"swipe-wrap"
>
{% for item in normalImages %}
<div>
<img
src=
"{{siteUrl}}{{item.path}}"
>
</div>
{% endfor %}
</div>
</div>
<ul
id=
"indicator"
class=
"list-inline text-center"
>
{% for i in 1..normalImages|length %}
<li
{%
if
loop
.
index0 =
=
0
%}
class=
"active"
{%
endif
%}
></li>
{% endfor %}
</ul>
</div>
<!-- /图片滚动 -->
<div
class=
"detail_row priceCont"
>
<p
class=
"detail_title"
>
{{result.name}}
</p>
<ul
class=
"list-unstyled"
>
<li
class=
"col-xs-7 price"
>
均价:
<span>
<em>
{% if result.average_price>=10000 %}
{{(result.average_price/10000)|round(2, 'floor')}}万
{% else %}
{{result.average_price}}
{% endif %}
</em>
/m
<em>
2
</em></span>
</li>
<li
class=
"col-xs-5"
>
<button
type=
"button"
class=
"btn btn-xs"
id=
"calculator"
>
房贷计算器
</button>
</li>
</ul>
</div>
<div
class=
"detail_row"
>
<p
class=
"detail_title"
>
最新动态
</p>
<p
class=
"single_omit"
>
{{result.latest_news}}
</p>
</div>
<div
class=
"detail_row"
>
<p
class=
"detail_title"
>
主力户型
</p>
<div
id=
"wrapper"
>
<div
id=
"scroller"
>
<ul
class=
"list-inline text-nowrap"
>
{% for item in mainImage %}
<li
data-image-url=
"{{siteUrl}}{{ item.path }}"
>
<p><img
src=
"{{siteUrl}}{{ item.smallPath }}"
></p>
<p>
{{item.type}}
</p>
<p>
{{item.area}}m
<em>
2
</em></p>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
<div
class=
"detail_row"
>
<a
class=
"collapsed"
data-toggle=
"collapse"
href=
"#collapseExample"
>
<p
class=
"detail_title"
>
位置及周边
<span
class=
"pull-right"
></span></p>
</a>
<ul
class=
"list-unstyled collapse"
id=
"collapseExample"
style=
"min-height:60px;display:block;overflow:hidden;height:0;"
>
<li>
地址:{{result.address}}
</li>
<li>
交通线路:{{result.traffic}}
</li>
<li>
周边配套:{{result.periphery}}
</li>
</ul>
<p
class=
"map"
>
</p>
</div>
<div
class=
"detail_row"
>
<a
class=
"collapsed"
data-toggle=
"collapse"
href=
"#collapseInfoCont"
>
<p
class=
"detail_title"
>
基本信息
<span
class=
"pull-right"
></span></p>
</a>
<ul
class=
"list-unstyled collapse infoCont"
id=
"collapseInfoCont"
style=
"min-height:60px;display:block;overflow:hidden;height:0;"
>
<li>
开发商:
<span>
{{result.developer}}
</span></li>
<li>
建筑类型:{{result.room}}
</li>
<li>
装修状况:{{result.decoration}}
</li>
<li>
容积率:{{result.volume_rate}}
</li>
<li>
规划户数:{{result.households}}
</li>
<li>
物业公司:{{result.property_management}}
</li>
<li>
入住时间:
<span>
{{result.check_in_time}}
</span></li>
<li>
产权年限:{{result.property_age}}
</li>
<li>
建筑面积:{{result.covered_area}}
</li>
<li>
绿化率:{{result.greening_rate}}
</li>
<li>
车位数:{{result.parking_spaces}}
</li>
<li>
物业费:{{result.property_money}}
</li>
</ul>
</div>
<div
class=
"detail_row"
>
<a
class=
"collapsed"
data-toggle=
"collapse"
href=
"#collapseSummary"
>
<p
class=
"detail_title"
>
楼盘概述
<span
class=
"pull-right"
></span></p>
</a>
<p
class=
"collapse"
id=
"collapseSummary"
style=
"min-height:60px;display:block;overflow:hidden;height:0;"
>
{{result.overview}}
</p>
</div>
{% if recommends %}
<div
class=
"detail_row recommend"
>
<p
class=
"detail_title"
>
推荐房源
</p>
<div
class=
"recommendCont"
>
{% for item in recommends %}
<div
data-id=
"{{item.id}}"
class=
"row"
>
<p>
{% if item.path %}
<img
src=
"{{siteUrl}}{{item.path}}"
>
{% else %}
<img
src=
"{{siteUrl}}/wp-content/themes/tospur/img/img.jpg"
>
{% endif %}
</p>
<ul
class=
"list-unstyled"
>
<li
class=
"address"
>
<span>
{{item.name}}
</span>
<span
class=
"pull-right"
>
{{item.literal}}
</span>
</li>
<li>
{{item.address}}
</li>
<li>
{{item.latest_news}}
</li>
<li>
{% for tag in item.tags|split(',') %}
<span
class=
"label"
>
{{tag}}
</span>
{% endfor %}
<span
class=
"pull-right"
>
<em>
{% if item.average_price>=10000 %}
{{(item.average_price/10000)|round(2, 'floor')}}万
{% else %}
{{item.average_price}}元
{% endif %}
</em>
/m
<em>
2
</em>
</span>
</li>
</ul>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if consultant %}
<div
class=
"detail_row"
id=
"consultantDiv"
>
<p
class=
"detail_title"
>
置业顾问
</p>
<ul
class=
"list-unstyled peopleCont"
>
{% for item in consultant %}
<a
href=
"{{siteUrl}}?page=consultant_info&consultant_id={{ item.id }}"
>
<li>
<ol
class=
"col-xs-2 text-center"
>
{% if item.imageUrl %}
<img
src=
"{{ item.imageUrl }}"
>
{% else %}
<img
src=
"{{ theme }}/img/head.png"
>
{% endif %}
</ol>
<ol
class=
"col-xs-4"
>
<p>
{{item.name}}
</p>
<div
class=
"star-rating rating-xs rating-disabled"
style=
"font-size:15px;height:25px;"
>
<div
class=
"rating-container rating-gly-star"
data-content=
""
>
<div
class=
"rating-stars"
data-content=
""
style=
"width: {{item.average_score*2*10}}%;"
></div>
</div>
</div>
</ol>
<ol
class=
"col-xs-6"
>
{% if not item.mobile %}
<a
class=
"btn btn-xs btn-phone"
disabled=
"disabled"
>
{% else %}
<a
href=
"tel:{{item.mobile}}"
class=
"btn btn-xs btn-phone"
>
{% endif %}
<span></span>
电话
</a>
<a
href=
"{{siteUrl}}?page=view&house_id={{hid}}&consultant_id={{item.id}}"
class=
"btn btn-xs btn-booking"
>
<span></span>
预约
</a>
</ol>
</li>
</a>
{% endfor %}
</ul>
</div>
{% endif %}
<footer
class=
"footer navbar-fixed-bottom"
>
<a
href=
"#consultantDiv"
class=
"btn"
>
置业顾问
</a>
<a
href=
"{{siteUrl}}?page=view&house_id={{hid}}"
class=
"btn"
>
预约看房
</a>
<!-- 二手房详细 -->
<!-- <ul class="list-inline text-right">
<li class="text-center phone">
<p></p>
<p>电话联系</p>
</li>
<li class="text-center wechat">
<p></p>
<p>微信联系</p>
</li>
</ul> -->
<!-- 二手房详细 -->
</footer>
<div
class=
"modal"
id=
"carouselModal"
>
<div
id=
"carousel_wrapper"
>
<div
id=
"carousel_scroller"
>
<ul
class=
"list-inline text-nowrap"
>
</ul>
</div>
<ul
id=
"carousel_indicator"
class=
"list-inline text-center indicators"
>
</ul>
</div>
</div>
<div
class=
"modal"
id=
"photoModal"
>
<p>
<span><img></span>
</p>
</div>
</body>
</html>
\ No newline at end of file
wp-content/themes/tospur/detailOther.html
0 → 100644
View file @
a6ba1c7d
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=360, user-scalable=0"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
/>
<title>
{{result.community_name}}
</title>
<!--CSS-->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ theme }}/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ theme }}/css/detail.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ theme }}/css/star-rating.min.css"
>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/iscroll.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/swipe.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/jquery.mobile.custom.min.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/star-rating.min.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
>
var
myScroll
;
var
carouselScroll
;
$
(
document
).
ready
(
function
(){
window
.
addEventListener
(
"load"
,
function
(){
var
bullets
=
document
.
getElementById
(
'indicator'
).
getElementsByTagName
(
'li'
);
window
.
mySwipe
=
new
Swipe
(
document
.
getElementById
(
'slider'
),
{
auto
:
3000
,
callback
:
function
(
pos
)
{
var
i
=
bullets
.
length
;
while
(
i
--
)
{
bullets
[
i
].
className
=
' '
;
}
bullets
[
pos
].
className
=
'active'
;
}
});
myScroll
=
new
IScroll
(
'#wrapper'
,
{
eventPassthrough
:
true
,
scrollX
:
true
,
scrollY
:
false
,
preventDefault
:
false
,
click
:
true
});
},
false
);
var
sliderTap
=
false
;
$
(
"#slider"
).
bind
(
"tap"
,
function
(){
$
(
"#carouselModal"
).
modal
(
"show"
);
var
carousel
=
$
(
"#carousel_wrapper"
);
var
carouselWidth
=
carousel
.
width
();
if
(
!
sliderTap
)
{
$
.
each
(
JSON
.
parse
(
'{{ images|json_encode() }}'
),
function
(
index
,
item
)
{
carousel
.
find
(
'#carousel_scroller ul'
).
append
(
'<li><p><span>'
+
'<img src="{{ siteUrl }}'
+
item
.
path
+
'">'
+
'</span></p></li>'
);
$
(
'#carousel_indicator'
).
append
(
'<li/>'
);
});
sliderTap
=
true
;
}
carousel
.
find
(
"#carousel_scroller ul li"
).
css
({
"width"
:
carouselWidth
});
carousel
.
find
(
"#carousel_indicator li"
).
removeClass
(
"carousel_active"
);
carousel
.
find
(
"#carousel_indicator li:first"
).
addClass
(
"carousel_active"
);
carouselScroll
=
new
IScroll
(
'#carousel_wrapper'
,
{
bounce
:
false
,
scrollX
:
true
,
scrollY
:
false
,
momentum
:
false
,
snap
:
true
,
snapSpeed
:
400
,
click
:
true
});
carouselScroll
.
on
(
'scrollEnd'
,
function
(){
$
(
"#carousel_indicator li"
).
removeClass
(
"carousel_active"
);
$
(
"#carousel_indicator li"
).
eq
(
this
.
currentPage
.
pageX
).
addClass
(
"carousel_active"
);
});
return
false
;
});
$
(
"#carouselModal"
).
bind
(
"click"
,
function
(){
$
(
"#carouselModal"
).
modal
(
"hide"
);
return
false
;
});
$
(
".collect"
).
bind
(
"tap"
,
function
(){
$
.
ajax
({
type
:
'POST'
,
url
:
'{{ siteUrl }}/wp-admin/admin-ajax.php/'
,
data
:
'action=add_collect&hid={{hid}}'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
2000
)
{
alert
(
'收藏成功'
);
}
else
{
alert
(
'收藏失败'
);
}
}
});
});
$
(
".map"
).
bind
(
"tap"
,
function
(){
location
.
href
=
"{{ siteUrl }}/?page=map&a={{result.address}}&c={{cityName}}&hn={{result.community_name}}<br>{{result.address}}&p={{result.location}}"
;
});
$
(
'#calculator'
).
bind
(
'tap'
,
function
(){
window
.
location
.
href
=
'{{ siteUrl }}/?page=loan_calculator'
;
});
$
(
".col-xs-2"
).
bind
(
"tap"
,
function
(){
location
.
href
=
"{{siteUrl}}?page=consultant_info&consultant_id={{ consultant[0].id }}"
;
});
$
(
".recommendCont"
).
on
(
"tap"
,
".row"
,
function
(){
window
.
location
.
href
=
'{{ siteUrl }}/?page=detail&hid='
+
$
(
this
).
attr
(
"data-id"
);
});
});
</script>
</head>
<body>
<p
class=
"collect"
>
<i
class=
"iconfont"
></i>
</p>
<!-- 图片滚动 -->
<div
class=
"addWrap"
>
<div
id=
"slider"
class=
"swipe"
>
<div
class=
"swipe-wrap"
>
{% for item in normalImages %}
<div>
<img
src=
"{{siteUrl}}{{item.path}}"
>
</div>
{% endfor %}
</div>
</div>
<ul
id=
"indicator"
class=
"list-inline text-center"
>
{% for i in 1..normalImages|length %}
<li
{%
if
loop
.
index0 =
=
0
%}
class=
"active"
{%
endif
%}
></li>
{% endfor %}
</ul>
</div>
<!-- /图片滚动 -->
<div
class=
"detail_row priceCont"
>
<p
class=
"detail_title"
>
{{result.name}}
</p>
<!-- <ul class="list-unstyled">
<li class="col-xs-7 price">
均价:<span><em>2.35万</em>/m<em>2</em></span>
</li>
<li class="col-xs-5">
<button type="button" class="btn btn-xs">房贷计算器</button>
</li>
</ul>-->
<!-- 二手房详细 -->
<ul
class=
"list-unstyled"
>
<li
class=
"col-xs-7"
>
房源编号:{{result.house_number}}
</li>
{% if result.house_type == 1%}
<li
class=
"col-xs-5"
>
<button
type=
"button"
class=
"btn btn-xs"
id=
"calculator"
>
房贷计算器
</button>
</li>
<li
class=
"col-xs-7 price"
>
售价:
<span><em>
{{(result.total_price/10000)|round(2, 'floor')}}万
</em></span>
</li>
<li
class=
"col-xs-5"
>
单价:
{% if result.average_price>=10000 %}
{{(result.average_price/10000)|round(2, 'floor')}}万
{% else %}
{{result.average_price}}
{% endif %}
</li>
{% else %}
<li
class=
"col-xs-5"
>
</li>
<li
class=
"col-xs-7 price"
>
租金:
<span><em>
{{result.rent}}/月
</em></span>
</li>
{% endif %}
</ul>
<!-- 二手房详细 -->
</div>
<div
class=
"detail_row"
>
<a
class=
"collapsed"
data-toggle=
"collapse"
href=
"#collapseExample"
>
<p
class=
"detail_title"
>
基本信息
<span
class=
"pull-right"
></span></p>
</a>
<ul
class=
"list-unstyled collapse infoCont"
id=
"collapseExample"
style=
"min-height:60px;display:block;overflow:hidden;height:0;"
>
<li>
户型:{{result.buildproperty}}
</li>
<li>
面积:{{result.covered_area}}
</li>
<li>
楼层:{{result.floor}}
</li>
<li>
朝向:{{result.faceto}}
</li>
<li>
装修:{{result.decoration}}
</li>
<li>
年代:{{result.age}}
</li>
</ul>
</div>
<div
class=
"detail_row"
>
<a
class=
"collapsed"
data-toggle=
"collapse"
href=
"#collapseSummary"
aria-expanded=
"false"
>
<p
class=
"detail_title"
>
房源点评
<span
class=
"pull-right"
></span></p>
</a>
<p
class=
"collapse"
id=
"collapseSummary"
style=
"min-height: 60px; display: block; overflow: hidden; height: 0px;"
aria-expanded=
"false"
>
{{result.overview}}
</p>
</div>
<div
class=
"detail_row"
>
<a
class=
"collapsed"
data-toggle=
"collapse"
href=
"#collapseAddress"
>
<p
class=
"detail_title"
>
位置及周边
<span
class=
"pull-right"
></span></p>
</a>
<ul
class=
"list-unstyled collapse"
id=
"collapseAddress"
style=
"min-height:60px;display:block;overflow:hidden;height:0;"
>
<li>
地址:{{result.address}}
</li>
<li>
交通线路:{{result.traffic}}
</li>
<li>
周边配套:{{result.periphery}}
</li>
</ul>
<p
class=
"map"
></p>
</div>
{% if recommends %}
<div
class=
"detail_row recommend"
>
<p
class=
"detail_title"
>
推荐房源
</p>
<div
class=
"recommendCont"
>
{% for item in recommends %}
<div
data-id=
"{{item.id}}"
class=
"row"
>
<p>
{% if item.path %}
<img
src=
"{{siteUrl}}{{item.path}}"
>
{% else %}
<img
src=
"{{siteUrl}}/wp-content/themes/tospur/img/img.jpg"
>
{% endif %}
</p>
<ul
class=
"list-unstyled"
>
<li
class=
"multiLine_omit"
>
{{item.name}}
</li>
<li>
{{item.community_name}}
</li>
<li>
<span>
{{item.value}}
</span>
{% if result.house_type == 2 %}
<span>
{{item.decoration}}
</span>
{% endif %}
<span>
{{item.covered_area}}平米
</span>
</li>
<li>
{% for tag in item.tags|split(',') %}
{% if loop.index
<
=
3
%}
<
span
class=
"label"
>
{{tag}}
</span>
{% endif %}
{% endfor %}
<span
class=
"pull-right"
>
{% if result.house_type == 1 %}
<em>
{{(item.total_price/10000)|round(2, 'floor')}}万
</em>
{% elseif result.house_type == 2 %}
<em>
{% if item.rent>=10000 %}
{{(item.rent/10000)|round(2, 'floor')}}万
{% else %}
{{item.rent}}
{% endif %}
/月
</em>
{% endif %}
</span>
</li>
</ul>
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if consultant[0] %}
<footer
class=
"footer navbar-fixed-bottom"
>
<ul
class=
"list-unstyled"
>
<li
class=
"col-xs-2"
>
{% if item.imageUrl %}
<img
src=
"{{ consultant[0].imageUrl }}"
>
{% else %}
<img
src=
"{{ theme }}/img/head.png"
>
{% endif %}
</li>
<li
class=
"col-xs-5"
>
<div>
<span
class=
"pull-left"
>
{{consultant[0].name}}
</span>
<div
class=
"star-rating rating-xs rating-disabled"
style=
"font-size:14px;height:25px;"
>
<div
class=
"rating-container rating-gly-star"
data-content=
""
>
<div
class=
"rating-stars"
data-content=
""
style=
"width: {{consultant[0].average_score*2*10}}%;"
></div>
</div>
</div>
</div>
<div>
置业顾问
</div>
</li>
<li
class=
"col-xs-5 text-right"
>
{% if consultant[0].mobile %}
<a
href=
"tel:{{consultant[0].mobile}}"
class=
"btn btn-phone"
>
<span></span>
<span>
电话联系
</span>
</a>
{% endif %}
<a
href=
"{{siteUrl}}?page=view&house_id={{hid}}&consultant_id={{consultant[0].id}}"
class=
"btn btn-wechat"
>
<span></span>
<span>
一键预约
</span>
</a>
</li>
</ul>
<!-- 二手房详细 -->
</footer>
{% endif %}
<div
class=
"modal"
id=
"carouselModal"
>
<div
id=
"carousel_wrapper"
>
<div
id=
"carousel_scroller"
>
<ul
class=
"list-inline text-nowrap"
>
</ul>
</div>
<ul
id=
"carousel_indicator"
class=
"list-inline text-center indicators"
>
</ul>
</div>
</div>
</body>
</html>
\ No newline at end of file
wp-content/themes/tospur/index.html
0 → 100644
View file @
a6ba1c7d
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=360, user-scalable=0"
/>
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
/>
<meta
name=
"format-detection"
content=
"telephone=no"
/>
<title>
{% if houseType == 0%}新房列表{% elseif houseType == 1 %}二手房列表{% elseif houseType == 2 %}租房列表{% endif %}
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ theme }}/css/bootstrap.min.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{{ theme }}/css/list.css"
>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/iscroll.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/bootstrap.min.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/jquery.mobile.custom.min.js"
></script>
<script
type=
"text/javascript"
src=
"{{ theme }}/js/public.js"
></script>
</head>
<body>
<div
class=
"search"
>
<div
class=
"btn-group pull-left"
>
<a
class=
"btn"
>
{{cityName}}
<span></span></a>
<div
id=
"city_wrapper"
class=
"dropdown-menu"
>
<div
id=
"city_scroller"
>
{% for item in select.city %}
<a
href=
"{{ url }}?houseType={{ houseType }}&cityId={{ item.id }}"
{%
if
(
item
.
id =
=
cityId
)
%}
class=
"active"
{%
endif
%}
>
{{ item.value }}
</a>
{% endfor %}
</div>
</div>
</div>
<div
class=
"has-feedback pull-right"
>
<form
id=
"searchForm"
method=
"post"
>
<input
type=
"text"
class=
"form-control"
placeholder=
"输入楼盘名/地段名搜索"
id=
"searchText"
>
<span
class=
"glyphicon glyphicon-search form-control-feedback"
id=
"searchBtn"
></span>
</form>
</div>
</div>
<div
class=
"btn-group-justified"
>
<div
class=
"btn-group"
>
<a
href=
"#"
class=
"btn"
>
区域
<span></span></a>
<div
class=
"dropdown-menu"
>
<div
id=
"area_wrapper"
class=
"col-xs-5 left-menu"
>
<div
type=
"districtId"
id=
"district_scroller"
>
<a
data-action=
"open"
class=
"active-bg"
>
不限
</a>
{% for item in select.district %}
<a
data-action=
"open"
data-id=
"{{item.id}}"
>
{{item.value}}
</a>
{% endfor %}
</div>
</div>
<div
id=
"urbanArea_wrapper"
class=
"col-xs-7 right-menu"
>
<div
type=
"plateId"
id=
"urbanArea_scroller"
>
<a
href=
"#"
class=
"active"
>
不限
</a>
</div>
</div>
</div>
</div>
<div
class=
"btn-group"
>
<a
class=
"btn"
>
价格
<span></span></a>
<div
id=
"price_wrapper"
class=
"dropdown-menu"
>
{% if select.totalPrice %}
<div
type=
"totalPrice"
id=
"totalPrice_scroller"
>
<a
href=
"#"
class=
"active"
>
不限
</a>
{% for item in select.totalPrice %}
<a
data-id=
"{{item.value}}"
>
{{item.value}}
</a>
{% endfor %}
</div>
{% elseif select.rentalPrice %}
<div
type=
"rentalPrice"
id=
"rentalPrice_scroller"
>
<a
href=
"#"
class=
"active"
>
不限
</a>
{% for item in select.rentalPrice %}
<a
data-id=
"{{item.value}}"
>
{{item.value}}
</a>
{% endfor %}
</div>
{% else %}
<div
id=
"price_scroller"
>
</div>
{% endif %}
</div>
</div>
<div
class=
"btn-group"
>
<a
href=
"#"
class=
"btn"
>
房型
<span></span></a>
<div
id=
"buildProperty_wrapper"
class=
"dropdown-menu"
>
<div
type=
"buildPropertyId"
id=
"buildProperty_scroller"
>
<a
href=
"#"
class=
"active"
>
不限
</a>
{% for item in select.buildProperty %}
<a
data-id=
"{{item.id}}"
>
{{item.value}}
</a>
{% endfor %}
</div>
</div>
</div>
{% if houseType == 2 %}
<div
class=
"btn-group"
>
<a
href=
"#"
class=
"btn"
>
面积
<span></span></a>
<div
id=
"other_wrapper"
class=
"dropdown-menu"
>
<div
id=
"other_scroller"
>
<a
href=
"#"
class=
"active"
>
不限
</a>
{% for item in select.area %}
<a
data-id=
"{{item.id}}"
>
{{item.value}}
</a>
{% endfor %}
</div>
</div>
</div>
{% else %}
<div
class=
"btn-group"
>
<a
href=
"#"
class=
"btn"
>
更多
<span></span></a>
<div
class=
"dropdown-menu"
>
<div
class=
"col-xs-5 left-menu"
>
<div>
<a
id=
"acreage"
class=
"active-bg"
>
面积
</a>
{% if houseType == 0 %}
<a
id=
"roomId"
>
类型
</a>
{% else %}
<a
id=
"feature"
>
特色
</a>
{% endif %}
</div>
</div>
<div
id=
"other_wrapper"
class=
"col-xs-7 right-menu"
>
<div
id=
"other_scroller"
>
<a
href=
"#"
class=
"active"
>
不限
</a>
</div>
</div>
</div>
</div>
{% endif %}
</div>
<div
id=
"wrapper"
>
<div
id=
"scroller"
>
</div>
</div>
<footer
class=
"footer text-center navbar-fixed-bottom"
>
<a
href=
"tel:400-828-5556"
>
400-828-5556
</a>
</footer>
<div
class=
"loading"
id=
"loading"
style=
"display: none;"
>
<ul
class=
"list-unstyled"
>
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
<li>
<p></p>
<p></p>
<p></p>
<p></p>
</li>
</ul>
</div>
<div
id=
"template_0"
style=
"display: none"
>
<p>
<img
src=
""
data-attr=
"image"
>
</p>
<ul
class=
"list-unstyled"
>
<li
class=
"address"
>
<span
data-attr=
"name"
></span>
<span
class=
"pull-right"
data-attr=
"type"
></span>
</li>
<li
data-attr=
"address"
></li>
<li
data-attr=
"latest_news"
></li>
<li
data-attr=
"tags"
>
<span
class=
"pull-right"
data-attr=
"price"
></span>
</li>
</ul>
</div>
<div
id=
"template_1"
style=
"display: none"
>
<p>
<img
src=
""
data-attr=
"image"
>
</p>
<ul
class=
"list-unstyled"
>
<li
class=
"multiLine_omit"
data-attr=
"name"
></li>
<li
data-attr=
"community"
></li>
<li>
<span
data-attr=
"apartment"
></span>
<span
data-attr=
"covered_area"
></span>
</li>
<li
data-attr=
"tags"
>
<span
class=
"pull-right"
data-attr=
"price"
></span>
</li>
</ul>
</div>
<div
id=
"template_2"
style=
"display: none"
>
<p>
<img
src=
""
data-attr=
"image"
>
</p>
<ul
class=
"list-unstyled"
>
<li
class=
"multiLine_omit"
data-attr=
"name"
></li>
<li
data-attr=
"community"
></li>
<li>
<span
data-attr=
"apartment"
></span>
<span
data-attr=
"decoration"
></span>
<span
data-attr=
"covered_area"
></span>
</li>
<li
data-attr=
"tags"
>
<span
class=
"pull-right"
data-attr=
"price"
></span>
</li>
</ul>
</div>
<script
type=
"text/javascript"
>
var
myScroll
;
var
cityScroll
;
var
areaScroll
;
var
urbanAreaScroll
;
var
buildPropertyScroll
;
var
acreageScroll
;
var
priceScroll
;
var
otherScroll
;
var
scrollList
=
[];
var
houseType
=
{{
houseType
}};
window
.
addEventListener
(
"load"
,
function
(){
myScroll
=
scrollPullToRefresh
(
function
(){
ajax_get_house
(
'{{ url }}'
,
loading
,
searchData
,
scroller
);
});
scrollList
.
push
(
myScroll
);
cityScroll
=
new
IScroll
(
'#city_wrapper'
,{
click
:
true
});
scrollList
.
push
(
cityScroll
);
areaScroll
=
new
IScroll
(
'#area_wrapper'
,{
click
:
true
});
scrollList
.
push
(
areaScroll
);
urbanAreaScroll
=
new
IScroll
(
'#urbanArea_wrapper'
,{
click
:
true
});
scrollList
.
push
(
urbanAreaScroll
);
buildPropertyScroll
=
new
IScroll
(
'#buildProperty_wrapper'
,{
click
:
true
});
scrollList
.
push
(
buildPropertyScroll
);
priceScroll
=
new
IScroll
(
'#price_wrapper'
,{
click
:
true
});
scrollList
.
push
(
priceScroll
);
otherScroll
=
new
IScroll
(
'#other_wrapper'
,{
click
:
true
});
scrollList
.
push
(
otherScroll
);
},
false
);
document
.
addEventListener
(
'touchmove'
,
function
(
e
){
e
.
preventDefault
();
});
var
plate
=
{{
select
.
plate
}};
var
room
=
{{
select
.
room
}};
var
area
=
{{
select
.
area
}};
var
feature
=
{{
select
.
feature
}};
var
scroller
;
var
loading
;
$
(
document
).
ready
(
function
(){
scroller
=
$
(
'#scroller'
);
loading
=
$
(
'#loading'
);
$
(
".btn-group > a"
).
bind
(
'tap'
,
function
(){
var
parent
=
$
(
this
).
parent
();
if
(
parent
.
hasClass
(
"open"
)){
$
(
".btn-group"
).
removeClass
(
"open"
);
}
else
{
$
(
".btn-group"
).
removeClass
(
"open"
);
parent
.
addClass
(
"open"
);
}
$
.
each
(
scrollList
,
function
(
i
,
item
){
item
.
refresh
();
});
});
$
(
"#district_scroller > a"
).
bind
(
'tap'
,
function
(){
$
(
"#district_scroller > a"
).
removeClass
(
"active-bg"
);
$
(
this
).
addClass
(
"active-bg"
);
$
(
"#urbanArea_scroller"
).
children
(
":not(:first)"
).
remove
();
if
(
$
(
this
).
attr
(
"data-id"
)
!=
undefined
){
$
.
each
(
plate
[
$
(
this
).
attr
(
"data-id"
)],
function
(
i
,
item
){
if
(
item
.
value
){
$
(
"#urbanArea_scroller"
).
append
(
'<a data-id="'
+
item
.
id
+
'">'
+
item
.
value
+
'</a>'
);
}
});
}
urbanAreaScroll
.
refresh
();
});
var
other
=
$
(
"#other_scroller"
);
var
other_item
=
area
;
var
roomAndAcreageKey
=
"value"
;
$
.
each
(
other_item
,
function
(
i
,
item
){
other
.
append
(
'<a data-id="'
+
item
[
roomAndAcreageKey
]
+
'">'
+
item
.
value
+
'</a>'
);
});
other
.
attr
(
"type"
,
"acreage"
);
$
(
"#roomId,#acreage,#feature"
).
bind
(
'tap'
,
function
(){
$
(
this
).
parent
().
children
().
removeClass
(
'active-bg'
);
$
(
this
).
addClass
(
'active-bg'
);
var
id
=
$
(
this
).
attr
(
'id'
);
other
.
children
(
":not(:first)"
).
remove
();
if
(
id
==
'roomId'
){
other_item
=
room
;
other
.
attr
(
"type"
,
"roomId"
);
roomAndAcreageKey
=
"id"
;
}
else
if
(
id
==
'acreage'
){
other_item
=
area
;
other
.
attr
(
"type"
,
"acreage"
);
roomAndAcreageKey
=
"value"
;
}
else
if
(
id
==
'feature'
){
other_item
=
feature
;
other
.
attr
(
"type"
,
"feature"
);
roomAndAcreageKey
=
"id"
;
}
if
(
searchData
[
id
]
!=
-
1
){
other
.
children
(
":first"
).
removeClass
(
'active'
);
}
else
{
other
.
children
(
":first"
).
addClass
(
'active'
);
}
$
.
each
(
other_item
,
function
(
i
,
item
){
var
active
=
searchData
[
id
]
==
item
[
roomAndAcreageKey
]?
' class="active"'
:
''
;
other
.
append
(
'<a data-id="'
+
item
[
roomAndAcreageKey
]
+
'"'
+
active
+
'>'
+
item
.
value
+
'</a>'
);
});
otherScroll
.
refresh
();
});
$
(
".btn-group"
).
on
(
'tap'
,
'.dropdown-menu a'
,
function
(){
searchData
.
index
=
0
;
if
(
$
(
this
).
parent
().
attr
(
"type"
)
!=
undefined
){
searchData
[
$
(
this
).
parent
().
attr
(
"type"
)]
=
$
(
this
).
attr
(
"data-id"
)
!=
undefined
?
$
(
this
).
attr
(
"data-id"
):
-
1
;
if
(
$
(
this
).
attr
(
"data-action"
)
!=
"open"
){
//do somthing
$
(
this
).
parent
().
find
(
'a'
).
removeClass
(
'active'
);
$
(
this
).
addClass
(
'active'
);
$
(
".btn-group"
).
removeClass
(
"open"
);
scroller
.
html
(
''
);
ajax_get_house
(
'{{ url }}'
,
loading
,
searchData
,
scroller
);
}
}
});
$
(
'#searchBtn'
).
bind
(
'tap'
,
function
(){
searchNameAndAddress
();
});
$
(
'#searchForm'
).
submit
(
function
(){
searchNameAndAddress
();
return
false
;
});
ajax_get_house
(
'{{ url }}'
,
loading
,
searchData
,
scroller
);
});
function
searchNameAndAddress
(){
searchData
.
index
=
0
;
var
searchText
=
$
(
'#searchText'
).
val
();
if
(
searchText
.
trim
()
==
''
)
{
searchText
=
''
;
}
searchData
.
searchText
=
searchText
;
scroller
.
html
(
''
);
ajax_get_house
(
'{{ url }}'
,
loading
,
searchData
,
scroller
);
}
var
searchData
=
{
action
:
'search_house'
,
cityId
:
{{
cityId
}},
districtId
:
-
1
,
plateId
:
-
1
,
totalPrice
:
-
1
,
rentalPrice
:
-
1
,
buildPropertyId
:
-
1
,
roomId
:
-
1
,
acreage
:
-
1
,
searchText
:
''
,
feature
:
-
1
,
houseType
:
houseType
,
index
:
0
};
</script>
</body>
</html>
\ No newline at end of file
wp-content/themes/tospur/js/public.js
View file @
a6ba1c7d
...
...
@@ -113,6 +113,7 @@ function ajax_get_house(url, loading, ajax_data, context) {
type
:
'POST'
,
url
:
url
+
'/wp-admin/admin-ajax.php/'
,
data
:
ajax_data
,
timeout
:
3000
,
success
:
function
(
data
)
{
loading
.
hide
();
if
(
data
.
code
==
2000
)
{
...
...
@@ -128,12 +129,15 @@ function ajax_get_house(url, loading, ajax_data, context) {
div
.
find
(
'[data-attr=address]'
).
text
(
value
.
address
);
div
.
find
(
'[data-attr=latest_news]'
).
text
(
value
.
latest_news
);
var
price
=
value
.
average_price
;
if
(
price
.
length
>
4
)
{
price
=
(
price
/
10000
).
toFixed
(
2
)
+
'万'
;
}
div
.
find
(
'[data-attr=price]'
).
html
(
'<em>'
+
price
+
'</em>/m<em>2</em>'
);
}
else
if
(
houseType
==
1
)
{
div
.
find
(
'[data-attr=community]'
).
text
(
value
.
community_name
);
div
.
find
(
'[data-attr=apartment]'
).
text
(
value
.
bp_literal
||
'未知'
);
div
.
find
(
'[data-attr=covered_area]'
).
text
(
value
.
covered_area
+
'平米'
);
div
.
find
(
'[data-attr=price]'
).
html
(
'<em>'
+
value
.
total_price
+
'万</em>'
);
div
.
find
(
'[data-attr=price]'
).
html
(
'<em>'
+
(
value
.
total_price
/
10000
).
toFixed
(
0
)
+
'万</em>'
);
}
else
if
(
houseType
==
2
)
{
div
.
find
(
'[data-attr=community]'
).
text
(
value
.
community_name
);
div
.
find
(
'[data-attr=apartment]'
).
text
(
value
.
bp_literal
||
'未知'
);
...
...
@@ -168,6 +172,9 @@ function ajax_get_house(url, loading, ajax_data, context) {
ajax_data
.
index
+=
10
;
myScroll
.
refresh
();
}
},
error
:
function
()
{
loading
.
hide
();
}
});
}
\ 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