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
245f1a7a
Commit
245f1a7a
authored
Dec 20, 2022
by
zhangjun
Browse files
Options
Browse Files
Download
Plain Diff
合并分支 'zj_edit_2' 到 'release'
修改 查看合并请求
!15
parents
de631078
b6e87d18
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
user.php
center/controllers/user.php
+6
-1
constants.php
esf_core/config/constants.php
+0
-0
user_model.php
esf_core/models/user_model.php
+10
-5
No files found.
center/controllers/user.php
View file @
245f1a7a
...
...
@@ -544,6 +544,11 @@ class User extends MY_Controller
echo
$result
;
exit
;
}
if
(
isset
(
$_GET
[
'zj'
])
&&
$_GET
[
'zj'
]
==
1
)
{
var_dump
(
$house
);
die
();
}
//分页开始
$data
[
'collect_num'
]
=
$this
->
num_5
;
$data
[
'pagesize'
]
=
5
;
//设定每一页显示的记录数
...
...
@@ -552,7 +557,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 @
245f1a7a
This diff is collapsed.
Click to expand it.
esf_core/models/user_model.php
View file @
245f1a7a
...
...
@@ -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