Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
U
User
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
zhangjun
User
Commits
bd3e8650
Commit
bd3e8650
authored
Dec 20, 2022
by
zhangjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
4c85bfa5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
user.php
center/controllers/user.php
+1
-1
constants.php
esf_core/config/constants.php
+2
-1
user_model.php
esf_core/models/user_model.php
+10
-5
No files found.
center/controllers/user.php
View file @
bd3e8650
...
...
@@ -552,7 +552,7 @@ class User extends MY_Controller
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
5
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
$data
[
'sarr'
]
=
$this
->
user_model
->
getSeachcondStr
(
$data
[
'collect'
]);
$data
[
'sarr'
]
=
$this
->
user_model
->
getSeachcondStr
(
$data
[
'collect'
]
,
'rent'
);
$data
[
'surl'
]
=
$this
->
user_model
->
getSeachcondUrl
(
$data
[
'collect'
],
5
);
//获取你可能感兴趣的租房
$data
[
'likerent'
]
=
$this
->
user_model
->
getlikehouse
(
$this
->
user_id
,
'rent'
,
4
);
...
...
esf_core/config/constants.php
View file @
bd3e8650
...
...
@@ -555,7 +555,8 @@ $conf_house['nj']= array(
//担保所用区属
"dist"
=>
array
(
'玄武区'
=>
'玄武区'
,
'鼓楼区'
=>
'鼓楼区'
,
'白下区'
=>
'白下区'
,
'建邺区'
=>
'建邺区'
,
'秦淮区'
=>
'秦淮区'
,
'下关区'
=>
'下关区'
,
'雨花台区'
=>
'雨花台区'
,
'栖霞区'
=>
'栖霞区'
,
'江宁区'
=>
'江宁区'
,
'浦口区'
=>
'浦口区'
,
'六合区'
=>
'六合区'
,
'大厂区'
=>
'大厂区'
,
'溧水县'
=>
'溧水县'
,
'高淳县'
=>
'高淳县'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40㎡以下'
,
'2'
=>
'40-60㎡'
,
'3'
=>
'60-80㎡'
,
'4'
=>
'80-100㎡'
,
'5'
=>
'100-120㎡'
,
'6'
=>
'120-140㎡'
,
'7'
=>
'140-200㎡'
,
'8'
=>
'200-400㎡'
,
'9'
=>
'400㎡以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'800元以下'
,
'2'
=>
'800-1200元'
,
'3'
=>
'1200-2000元'
,
'4'
=>
'2000-3000元'
,
'5'
=>
'3000-5000元'
,
'6'
=>
'5000-10000元'
,
'7'
=>
'10000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'1元/平米*天以下'
,
'2'
=>
'1-2元'
,
'3'
=>
' 2-3元'
,
'4'
=>
'3-4元'
,
'5'
=>
' 4-5元'
,
'6'
=>
'5-7元'
,
'7'
=>
'7-9元'
,
'8'
=>
'9-12元'
,
'9'
=>
'12元/平米*天以上'
),
...
...
esf_core/models/user_model.php
View file @
bd3e8650
...
...
@@ -1132,9 +1132,10 @@ class User_model extends MY_Model
* getSeachcondStr 转化找房条件
*
* @param array $sarr
* @param string $tab 出租/处说
* @return array
*/
function
getSeachcondStr
(
$sarr
)
function
getSeachcondStr
(
$sarr
,
$tab
=
'sell'
)
{
global
$house
;
...
...
@@ -1276,7 +1277,9 @@ class User_model extends MY_Model
if
(
isset
(
$search
[
'buildarea'
]
)
&&
$search
[
'buildarea'
]
>
0
&&
$search
[
'buildarea'
]
!=
99
)
{
$str
.=
isset
(
$house
[
'buildarea'
][
$search
[
'buildarea'
]])
?
$house
[
'buildarea'
][
$search
[
'buildarea'
]]
.
'<em class="t-line">|</em>'
:
''
;
$buildareaArr
=
$house
[
'buildarea'
];
if
(
$tab
==
'rent'
)
$buildareaArr
=
!
empty
(
$house
[
'rent_buildarea'
])
?
$house
[
'rent_buildarea'
]
:
array
()
;
$str
.=
isset
(
$buildareaArr
[
$search
[
'buildarea'
]])
?
$buildareaArr
[
$search
[
'buildarea'
]]
.
'<em class="t-line">|</em>'
:
''
;
}
else
{
...
...
@@ -1651,7 +1654,7 @@ class User_model extends MY_Model
if
(
empty
(
$housedetail
)
)
{
$wherecond
=
$this
->
getsearchcond
(
$searcharr
);
$wherecond
=
$this
->
getsearchcond
(
$searcharr
,
$tbl
);
if
(
!
empty
(
$datatime
))
{
...
...
@@ -1672,7 +1675,7 @@ class User_model extends MY_Model
if
(
isset
(
$selldetail
[
'Record'
][
0
]))
{
$housedetail
=
$selldetail
[
'Record'
][
0
];
$housedetail
[
'time'
]
=
time_tran
(
$housedetail
[
'UPDATETIME'
])
;
$housedetail
[
'time'
]
=
!
empty
(
$housedetail
[
'UPDATETIME'
]
)
?
mb_convert_encoding
(
time_tran
(
$housedetail
[
'UPDATETIME'
]),
'gbk'
,
'utf-8'
)
:
''
;
$streetname
=
$this
->
block_model
->
getstreetname
(
$housedetail
[
'STREETID'
]);
$housedetail
[
'streetname'
]
=
$streetname
[
'streetname'
];
}
...
...
@@ -1687,9 +1690,10 @@ class User_model extends MY_Model
/**
* 根据搜索条件获得sql
* @param type $searcharr
* @param string $tab
* @return string
*/
function
getsearchcond
(
$searcharr
)
function
getsearchcond
(
$searcharr
,
$tab
=
'sell'
)
{
GLOBAL
$house
;
...
...
@@ -1863,6 +1867,7 @@ class User_model extends MY_Model
{
//搜索面板条件
$where_buildarea_sell
=
empty
(
$house
[
'buildarea'
][
$searcharr
[
'buildarea'
]])
?
''
:
$house
[
'buildarea'
][
$searcharr
[
'buildarea'
]];
if
(
$tab
==
'rent'
)
$where_buildarea_sell
=
empty
(
$house
[
'rent_buildarea'
][
$searcharr
[
'buildarea'
]])
?
''
:
$house
[
'rent_buildarea'
][
$searcharr
[
'buildarea'
]];
if
(
!
empty
(
$where_buildarea_sell
))
{
...
...
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