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
f058ed92
Commit
f058ed92
authored
Nov 02, 2015
by
felix
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加cache功能
parent
c87b7a79
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
63 additions
and
32 deletions
+63
-32
wp-content/plugins/tospur/Admin/House.php
+1
-0
wp-content/plugins/tospur/Admin/TCSyncView.php
+2
-0
wp-content/plugins/tospur/Admin/rentHouse.php
+1
-1
wp-content/plugins/tospur/Admin/secHandHouse.php
+1
-2
wp-content/plugins/tospur/Admin/views/houseInfo.html
+4
-4
wp-content/plugins/tospur/Admin/views/mainHouse.html
+1
-3
wp-content/plugins/tospur/Admin/views/newHouseInfo.html
+2
-2
wp-content/plugins/tospur/Admin/views/newhouse.html
+10
-7
wp-content/plugins/tospur/Admin/views/rentHouse.html
+8
-2
wp-content/plugins/tospur/Admin/views/secHandHouse.html
+8
-2
wp-content/plugins/tospur/Dao/SearchDao.php
+0
-0
wp-content/themes/tospur/index.php
+5
-5
wp-content/themes/tospur/views/detail.html
+1
-0
wp-content/themes/tospur/views/detailOther.html
+1
-0
wp-content/themes/tospur/views/index.html
+18
-4
No files found.
wp-content/plugins/tospur/Admin/House.php
View file @
f058ed92
...
...
@@ -52,6 +52,7 @@ class House extends Tospur_House{
}
else
{
$wpdb
->
query
(
"COMMIT"
);
echo
"<h4>新房房源修改成功</h4>"
;
w3tc_pgcache_flush_url
(
home_url
()
.
'/?page=detail&hid='
.
$_POST
[
'houseId'
]);
}
}
else
{
$insert_tospur_house_array
[
"status"
]
=
0
;
...
...
wp-content/plugins/tospur/Admin/TCSyncView.php
View file @
f058ed92
...
...
@@ -11,6 +11,8 @@ class TCSyncView {
TCSync
::
organization_sync
();
break
;
case
2
:
$w3_objectcache
=
w3_instance
(
'W3_ObjectCache'
);
$w3_objectcache
->
flush
();
TCSync
::
other_sync
();
break
;
}
...
...
wp-content/plugins/tospur/Admin/rentHouse.php
View file @
f058ed92
...
...
@@ -65,8 +65,8 @@ class RentHouse extends Tospur_House{
}
else
{
$wpdb
->
query
(
"COMMIT"
);
echo
"<h4>租房房源修改成功</h4>"
;
w3tc_pgcache_flush_url
(
home_url
()
.
'/?page=detail&hid='
.
$_POST
[
'houseId'
]);
}
}
else
{
$insert_tospur_house_array
[
"status"
]
=
0
;
$insert_tospur_house_array
[
"approval"
]
=
1
;
...
...
wp-content/plugins/tospur/Admin/secHandHouse.php
View file @
f058ed92
...
...
@@ -65,8 +65,8 @@ class SecHandHouse extends Tospur_House{
}
else
{
$wpdb
->
query
(
"COMMIT"
);
echo
"<h4>二手房房源修改成功</h4>"
;
w3tc_pgcache_flush_url
(
home_url
()
.
'/?page=detail&hid='
.
$_POST
[
'houseId'
]);
}
}
else
{
$insert_tospur_house_array
[
"status"
]
=
0
;
$insert_tospur_house_array
[
"approval"
]
=
1
;
...
...
@@ -104,7 +104,6 @@ class SecHandHouse extends Tospur_House{
$context
[
"photoType"
]
=
SearchDao
::
searchPhotoType
();
$context
[
"house_type"
]
=
1
;
Timber
::
render
(
"secHandHouse.html"
,
$context
);
}
public
static
function
secHouseData_insert
(
$params
)
...
...
wp-content/plugins/tospur/Admin/views/houseInfo.html
View file @
f058ed92
...
...
@@ -15,7 +15,7 @@
</select>
</span>
<span>
<select
id=
"baseAreaId"
name=
"baseAreaId"
class=
"form-control"
style=
"width:
9
0px;"
>
<select
id=
"baseAreaId"
name=
"baseAreaId"
class=
"form-control"
style=
"width:
10
0px;"
>
<option
value =
"-1"
>
区域
</option>
{% if district %}
{% for item in district %}
...
...
@@ -25,7 +25,7 @@
</select>
</span>
<span>
<select
id=
"basePlateId"
name=
"basePlateId"
class=
"form-control"
style=
"width:
9
0px;"
>
<select
id=
"basePlateId"
name=
"basePlateId"
class=
"form-control"
style=
"width:
10
0px;"
>
<option
value =
"-1"
>
板块
</option>
{% if district %}
{% for item in plate %}
...
...
@@ -281,7 +281,7 @@
{% elseif house_type== 2 %}
<div
class=
"col-xs-4"
>
<label
for=
"rent"
class=
"control-label"
>
租金:
</label>
<p
class=
"col-xs-
7
"
>
<p
class=
"col-xs-
6
"
>
<input
name=
"rent"
id=
"rent"
type=
"text"
value=
"{{result.rent}}"
class=
"form-control"
>
</p>
<p
class=
"col-xs-2"
style=
"margin-top: 10px"
>
元/月
</p>
...
...
@@ -378,7 +378,7 @@
{% if not houseId %}
<div
class=
"row form-group"
>
<div
class=
"col-xs-
"
>
<div
class=
"col-xs-
4
"
>
<label
for=
"owner_name"
class=
"control-label"
>
业主姓名:
</label>
<p
class=
"col-xs-7"
>
<input
name=
"owner_name"
id=
"owner_name"
type=
"text"
value=
""
class=
"form-control"
>
...
...
wp-content/plugins/tospur/Admin/views/mainHouse.html
View file @
f058ed92
<div
id=
"preview"
>
<div
class=
"row"
>
<div
class=
"col-md-2"
>
<label
for=
"traffic"
style=
"margin-left: 30px"
>
主力房源:
</label>
</div>
<label
style=
"float: left;margin-top: 25px;margin-left: 15px;"
>
主力房源:
</label>
<div
class=
"col-md-10"
>
{% set exists_ids = "" %}
{% for item in mainImage %}
...
...
wp-content/plugins/tospur/Admin/views/newHouseInfo.html
View file @
f058ed92
...
...
@@ -13,7 +13,7 @@
</select>
</span>
<span>
<select
id=
"baseAreaId"
name=
"baseAreaId"
class=
"form-control"
style=
"width:
9
0px;"
>
<select
id=
"baseAreaId"
name=
"baseAreaId"
class=
"form-control"
style=
"width:
10
0px;"
>
<option
value =
"-1"
>
区域
</option>
{% if district %}
{% for item in district %}
...
...
@@ -23,7 +23,7 @@
</select>
</span>
<span>
<select
id=
"basePlateId"
name=
"basePlateId"
class=
"form-control"
style=
"width:
9
0px;"
>
<select
id=
"basePlateId"
name=
"basePlateId"
class=
"form-control"
style=
"width:
10
0px;"
>
<option
value =
"-1"
>
板块
</option>
{% if district %}
{% for item in plate %}
...
...
wp-content/plugins/tospur/Admin/views/newhouse.html
View file @
f058ed92
...
...
@@ -5,13 +5,19 @@
<meta
charset=
"utf-8"
>
<title>
{{title}}
</title>
<style>
.form-horizontal
label
.control-label
{
#adminmenuwrap
{
position
:
fixed
;
}
.form-horizontal
{
width
:
1500px
;
}
.form-horizontal
label
.control-label
{
text-align
:
left
;
float
:
left
;
margin-right
:
10px
;
width
:
65px
;
}
.form-horizontal
span
select
{
.form-horizontal
span
select
{
display
:
inline
;
}
</style>
...
...
@@ -41,14 +47,12 @@
</ul>
<!-- Tab panes -->
<div
class=
"tab-content"
>
<div
role=
"tabpanel"
class=
"tab-pane active"
id=
"info"
>
{% if (house_type==1 or house_type == 2)%}
{% include 'houseInfo.html' %}
{% else %}
{% include 'newHouseInfo.html' %}
{% endif %}
</div>
<div
role=
"tabpanel"
class=
"tab-pane"
id=
"mainHouse"
>
<br/>
...
...
@@ -71,8 +75,8 @@
<input
type=
"text"
name=
"houseId"
value=
"{{houseId}}"
hidden=
"hidden"
>
{% endif %}
</div>
<div
class=
"col-xs-2
"
>
<div
class=
"row"
style=
"position: fixed
;"
>
<div
class=
"col-xs-2"
style=
"position: relative;height: 28px;
"
>
<div
class=
"row"
style=
"position: absolute
;"
>
{% if canEdit %}
{% if houseId %}
{% if canApproval %}
...
...
@@ -95,7 +99,6 @@
<input
type=
"submit"
id=
"submit"
class=
"button action"
>
{% endif %}
</div>
</div>
</div>
</form>
...
...
wp-content/plugins/tospur/Admin/views/rentHouse.html
View file @
f058ed92
...
...
@@ -5,6 +5,12 @@
<meta
charset=
"utf-8"
>
<title>
{{title}}
</title>
<style>
#adminmenuwrap
{
position
:
fixed
;
}
.form-horizontal
{
width
:
1500px
;
}
.form-horizontal
label
.control-label
{
text-align
:
left
;
float
:
left
;
...
...
@@ -60,8 +66,8 @@
<input
type=
"text"
name=
"houseId"
value=
"{{houseId}}"
hidden=
"hidden"
>
{% endif %}
</div>
<div
class=
"col-xs-2"
>
<div
class=
"row"
style=
"position:
fixed
;"
>
<div
class=
"col-xs-2"
style=
"position: relative;height: 28px;"
>
<div
class=
"row"
style=
"position:
absolute
;"
>
{% if canEdit %}
{% if (result.status != 2 and result.status != 3) %}
{% if houseId %}
...
...
wp-content/plugins/tospur/Admin/views/secHandHouse.html
View file @
f058ed92
...
...
@@ -6,6 +6,12 @@
<meta
charset=
"utf-8"
>
<title>
{{title}}
</title>
<style>
#adminmenuwrap
{
position
:
fixed
;
}
.form-horizontal
{
width
:
1500px
;
}
.form-horizontal
label
.control-label
{
text-align
:
left
;
float
:
left
;
...
...
@@ -64,8 +70,8 @@
<input
type=
"text"
name=
"houseId"
value=
"{{houseId}}"
hidden=
"hidden"
>
{% endif %}
</div>
<div
class=
"col-xs-2"
>
<div
class=
"row"
style=
"position:
fixed
;"
>
<div
class=
"col-xs-2"
style=
"position: relative;height: 28px;"
>
<div
class=
"row"
style=
"position:
absolute
;"
>
{% if canEdit %}
{% if (result.status != 2 and result.status != 3) %}
{% if houseId %}
...
...
wp-content/plugins/tospur/Dao/SearchDao.php
View file @
f058ed92
This diff is collapsed.
Click to expand it.
wp-content/themes/tospur/index.php
View file @
f058ed92
...
...
@@ -2,7 +2,6 @@
$context
=
array
();
$context
[
'theme'
]
=
get_template_directory_uri
();
require_once
(
WP_PLUGIN_DIR
.
"/tospur/Dao/SearchDao.php"
);
$default_city_id
=
get_option
(
'default_city_id'
);
$cityId
=
(
$default_city_id
)
?
$default_city_id
:
2
;
...
...
@@ -27,11 +26,12 @@ $context['select']['plate'] = json_encode($plateArray);
$context
[
'select'
][
'buildProperty'
]
=
SearchDao
::
searchBuildProperty
();
$context
[
'select'
][
'room'
]
=
json_encode
(
SearchDao
::
searchRoom
());
$context
[
'select'
][
'feature'
]
=
json_encode
(
SearchDao
::
searchTagOrFeature
(
1
));
$context
[
'select'
][
'unitPriceRange'
]
=
SearchDao
::
searchUnitPriceRange
(
$cityId
);
if
(
$houseType
==
2
)
{
$context
[
'select'
][
'rentalPrice'
]
=
SearchDao
::
searchRentalPrice
(
$cityId
);
}
else
{
if
(
$houseType
==
0
)
{
$context
[
'select'
][
'unitPrice'
]
=
SearchDao
::
searchUnitPriceRange
(
$cityId
);
}
else
if
(
$houseType
==
1
)
{
$context
[
'select'
][
'totalPrice'
]
=
SearchDao
::
searchTotalPrice
(
$cityId
);
}
else
{
$context
[
'select'
][
'rentalPrice'
]
=
SearchDao
::
searchRentalPrice
(
$cityId
);
}
$context
[
'select'
][
'area'
]
=
json_encode
(
SearchDao
::
searchArea
(
$cityId
));
...
...
wp-content/themes/tospur/views/detail.html
View file @
f058ed92
...
...
@@ -57,6 +57,7 @@
'</span></p></li>'
);
$
(
'#carousel_indicator'
).
append
(
'<li/>'
);
});
sliderTap
=
true
;
}
carousel
.
find
(
"#carousel_scroller ul li"
).
css
({
"width"
:
carouselWidth
});
...
...
wp-content/themes/tospur/views/detailOther.html
View file @
f058ed92
...
...
@@ -55,6 +55,7 @@
'</span></p></li>'
);
$
(
'#carousel_indicator'
).
append
(
'<li/>'
);
});
sliderTap
=
true
;
}
carousel
.
find
(
"#carousel_scroller ul li"
).
css
({
"width"
:
carouselWidth
});
...
...
wp-content/themes/tospur/views/index.html
View file @
f058ed92
...
...
@@ -59,21 +59,30 @@
<div
class=
"btn-group"
>
<a
class=
"btn"
>
价格
<span></span></a>
<div
id=
"price_wrapper"
class=
"dropdown-menu"
>
{% if select.totalPrice %}
{% if select.unitPrice %}
<div
type=
"unitPrice"
id=
"unitPrice_scroller"
>
<a
href=
"#"
class=
"active"
>
不限
</a>
{% for item in select.unitPrice %}
<a
data-id=
"{{item.value}}"
>
{{item.value}}
</a>
{% endfor %}
</div>
{% elseif 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>
{% endif %}
{% if select.rentalPrice %}
{% 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>
...
...
@@ -343,7 +352,11 @@
});
function
searchNameAndAddress
(){
searchData
.
index
=
0
;
searchData
.
searchText
=
$
(
'#searchText'
).
val
();
var
searchText
=
$
(
'#searchText'
).
val
();
if
(
searchText
.
trim
()
==
''
)
{
searchText
=
''
;
}
searchData
.
searchText
=
searchText
;
scroller
.
html
(
''
);
ajax_get_house
(
'{{ url }}'
,
loading
,
searchData
,
scroller
);
}
...
...
@@ -352,6 +365,7 @@
cityId
:
{{
cityId
}},
districtId
:
-
1
,
plateId
:
-
1
,
unitPrice
:
-
1
,
totalPrice
:
-
1
,
rentalPrice
:
-
1
,
buildPropertyId
:
-
1
,
...
...
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