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
5e32b837
Commit
5e32b837
authored
Jun 28, 2024
by
fangliyan
Browse files
Options
Browse Files
Download
Plain Diff
合并分支 'subscribe2.0' 到 'release'
Subscribe2.0 查看合并请求
!30
parents
2e0d36c7
f2b00bc3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
242 additions
and
9 deletions
+242
-9
esf_center_api.php
center/controllers/esf_center_api.php
+237
-4
left.php
center/views/left.php
+5
-5
user_model.php
esf_core/models/user_model.php
+0
-0
No files found.
center/controllers/esf_center_api.php
View file @
5e32b837
...
...
@@ -289,6 +289,109 @@ class Esf_center_api extends MY_Controller {
echo
serialize
(
$return_array
);
}
/**
* 关注房源操作接口,base_id版本
* @author fly
*/
public
function
save_house_focus_by_baseId
()
{
$return
=
''
;
$passport_uid
=
$this
->
input
->
get
(
'passport_uid'
);
$uid
=
0
;
$flag
=
$this
->
input
->
get
(
'flag'
);
if
(
$passport_uid
){
//根据passport_uid获取uid
$uid
=
$this
->
user_model
->
getUidByPassportId
(
$passport_uid
);
if
(
empty
(
$flag
))
{
$flag
=
2
;
}
if
(
$uid
==
0
)
{
$return
=
'N_USER'
;
}
}
$kind
=
$this
->
input
->
get
(
'kind'
);
$rowid
=
$this
->
input
->
get
(
'rowid'
);
$city
=
$this
->
input
->
get
(
'city'
);
$phone
=
$this
->
input
->
get
(
'phone'
);
$base_id
=
$this
->
input
->
get
(
'base_id'
);
$city
=
$city
?
$city
:
'nj'
;
$tbl
=
$kind
==
3
?
'sell'
:
'rent'
;
$result
=
$this
->
user_model
->
getCollectHouseIdByBaseID
(
$base_id
,
$kind
,
$rowid
,
$city
);
//已关注此房源
if
(
$result
[
'id'
]
>
0
)
{
$return
=
'N_COL'
;
}
if
(
$tbl
==
'sell'
){
$houseinfo
=
$this
->
house_model
->
get_data
(
array
(
'form_name'
=>
$tbl
,
'where'
=>
array
(
'id'
=>
$rowid
,
'esta'
=>
'1'
),
'select'
=>
array
(
'infotype'
,
'infofrom'
,
'id'
,
'district'
,
'address'
,
'streetid'
,
'blockshowname'
,
'room'
,
'hall'
,
'buildarea'
,
'forward'
,
'fitment'
,
'buildyear'
,
'floor'
,
'totalfloor'
,
'subfloor'
,
'price'
,
'uid'
,
'telno'
,
'pic1'
,
'contactor'
,
'uid'
),
'limit'
=>
1
),
'esfhousebak'
);
}
else
{
$houseinfo
=
$this
->
house_model
->
get_data
(
array
(
'form_name'
=>
$tbl
,
'where'
=>
array
(
'id'
=>
$rowid
,
'esta'
=>
'1'
),
'select'
=>
array
(
'infotype'
,
'infofrom'
,
'id'
,
'district'
,
'address'
,
'streetid'
,
'blockshowname'
,
'room'
,
'hall'
,
'buildarea'
,
'forward'
,
'fitment'
,
'buildyear'
,
'floor'
,
'totalfloor'
,
'subfloor'
,
'price'
,
'uid'
,
'telno'
,
'pic1'
,
'contactor'
,
'uid'
,
'priceunit'
,
'renttype'
),
'limit'
=>
1
),
'esfhousebak'
);
}
if
(
empty
(
$houseinfo
[
0
])
&&
$city
==
'nj'
)
{
$return
=
'N_HOU'
;
}
elseif
(
$return
!=
'N_COL'
){
if
(
!
empty
(
$houseinfo
[
0
]))
{
$searchcond
=
serialize
(
$houseinfo
[
0
]);
}
else
{
$searchcond
=
''
;
}
$return
=
$this
->
user_model
->
addcollectByBaseID
(
$base_id
,
$rowid
,
$kind
,
$searchcond
,
$city
,
$flag
,
$passport_uid
,
$uid
);
}
if
(
$return
==
'N_COL'
){
$result
=
2
;
$msg
=
'已收藏此房源'
;
}
elseif
(
$return
==
'N_HOU'
){
$result
=
3
;
$msg
=
'无此房源'
;
}
elseif
(
$return
==
'N_USER'
){
$result
=
4
;
$msg
=
'无此用户'
;
}
elseif
(
$return
>
0
){
$result
=
1
;
$msg
=
'收藏成功'
;
$house_type
=
$houseinfo
[
0
][
'room'
]
.
"室"
.
$houseinfo
[
0
][
'hall'
]
.
"厅"
;
$houseinfo
[
0
][
'floor'
]
=
iconv
(
'gbk'
,
'utf-8'
,
$houseinfo
[
0
][
'floor'
]);
$houseinfo
[
0
][
'blockshowname'
]
=
iconv
(
'gbk'
,
'utf-8'
,
$houseinfo
[
0
][
'blockshowname'
]);
$houseinfo
[
0
][
'forward'
]
=
iconv
(
'gbk'
,
'utf-8'
,
$houseinfo
[
0
][
'forward'
]);
$house_type
=
iconv
(
'gbk'
,
'utf-8'
,
$house_type
);
if
(
$kind
==
3
){
$url
=
"http://crm.house365.com/index.php/Simulate/sea_utf8?mobile=
{
$phone
}
&city=
{
$city
}
&activefrom=485&my_floor=
{
$houseinfo
[
0
][
'floor'
]
}
&total_floor=
{
$houseinfo
[
0
][
'totalfloor'
]
}
&block_name=
{
$houseinfo
[
0
][
'blockshowname'
]
}
&area=
{
$houseinfo
[
0
][
'buildarea'
]
}
&forward=
{
$houseinfo
[
0
][
'forward'
]
}
&buy_old_property=
{
$houseinfo
[
0
][
'infotype'
]
}
&house_type=
{
$house_type
}
"
;
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_TIMEOUT
,
1
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$ch
,
CURLOPT_HEADER
,
0
);
$rs
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
}
//验证不在白名单,不在推送库,不在推送历史库
$result2
=
$this
->
push_model
->
yzpush
(
$telno
);
if
(
$result2
<=
0
&&
$city
==
'nj'
){
//加入备选库
//$this->push_model->addalternatives($uid,$telno);
}
}
elseif
(
$return
==
0
){
$result
=
0
;
$msg
=
'收藏失败'
;
}
$return_array
=
array
(
'result'
=>
$result
,
'msg'
=>
$msg
);
echo
serialize
(
$return_array
);
}
...
...
@@ -758,6 +861,66 @@ class Esf_center_api extends MY_Controller {
echo
serialize
(
$return_array
);
}
/**
* 根据用户中心base_id取消关注房源操作接口
* @author cxf
*/
public
function
api_cancel_focus_by_baseId
()
{
$base_id
=
$this
->
input
->
get
(
'base_id'
);
$kind
=
$this
->
input
->
get
(
'kind'
);
$rowid
=
$this
->
input
->
get
(
'rowid'
);
$city
=
$this
->
input
->
get
(
'city'
);
$tbl
=
$kind
==
3
?
'sell'
:
'rent'
;
$id
=
$this
->
user_model
->
getCollectHouseIdByBaseID
(
$base_id
,
$kind
,
$rowid
,
$city
,
1
);
if
(
empty
(
$id
))
{
$return
=
'N_COL'
;
}
else
{
$return
=
$this
->
user_model
->
delcollect
(
$id
);
}
$result
=
0
;
$msg
=
'取消失败'
;
if
(
$return
==
'N_COL'
){
//$result = 2;
//$msg = '无此收藏';
$result
=
1
;
$msg
=
'删除成功'
;
}
elseif
(
$return
==
'N_USER'
){
$result
=
3
;
$msg
=
'无此用户'
;
}
elseif
(
$return
>
0
){
$result
=
1
;
$msg
=
'删除成功'
;
}
elseif
(
$return
==
0
){
$result
=
0
;
$msg
=
'取消失败'
;
}
$return_array
=
array
(
'result'
=>
$result
,
'msg'
=>
$msg
);
echo
serialize
(
$return_array
);
}
/**
* 根据base_id获取收藏状态
* @author fly
*/
public
function
get_focus_status_by_baseId
()
{
$base_id
=
$this
->
input
->
get
(
'base_id'
);
$kind
=
$this
->
input
->
get
(
'kind'
);
$rowid
=
$this
->
input
->
get
(
'rowid'
);
$city
=
$this
->
input
->
get
(
'city'
);
$city
=
$city
?
$city
:
'nj'
;
$result
=
$this
->
user_model
->
getCollectHouseIdByBaseID
(
$base_id
,
$kind
,
$rowid
,
$city
);
$return_array
=
array
(
'result'
=>
0
,
'msg'
=>
'未收藏'
);
if
(
!
empty
(
$result
))
{
$return_array
=
array
(
'result'
=>
1
,
'msg'
=>
'已收藏'
);
}
echo
serialize
(
$return_array
);
}
/**
...
...
@@ -805,9 +968,8 @@ class Esf_center_api extends MY_Controller {
public
function
api_getsaveblock
()
{
$telno
=
$this
->
input
->
get
(
'telno'
);
$uid
=
$this
->
user_model
->
yztelno
(
$telno
);
if
(
$uid
==
0
)
$base_id
=
$this
->
input
->
get
(
'base_id'
);
if
(
!
$base_id
)
{
echo
serialize
(
array
());
exit
;
}
...
...
@@ -819,8 +981,8 @@ class Esf_center_api extends MY_Controller {
$page
=
$page
?
$page
:
1
;
$pagesize
=
$pagesize
?
$pagesize
:
20
;
$offset
=
$pagesize
*
(
$page
-
1
);
$collect_array
=
$this
->
user_model
->
getcollectByBaseId
(
$kind
,
$base_id
,
$offset
,
$pagesize
,
$city
);
$collect_array
=
$this
->
user_model
->
getcollect
(
$kind
,
$uid
,
$offset
,
$pagesize
,
$city
);
if
(
!
empty
(
$collect_array
)
&&
is_array
(
$collect_array
))
{
foreach
(
$collect_array
as
$key
=>
$value
)
...
...
@@ -926,6 +1088,49 @@ class Esf_center_api extends MY_Controller {
echo
serialize
(
$arr
);
}
/**
* 获取用户关注房源操作接口
* @author cxf
*/
public
function
get_focus_house_list
()
{
$base_id
=
$this
->
input
->
get
(
'base_id'
);
if
(
!
$base_id
)
{
echo
serialize
(
array
());
exit
;
}
$kind
=
$this
->
input
->
get
(
'kind'
);
$page
=
$this
->
input
->
get
(
'page'
);
$pagesize
=
$this
->
input
->
get
(
'pagesize'
);
$city
=
$this
->
input
->
get
(
'city'
);
$page
=
$page
?
$page
:
1
;
$pagesize
=
$pagesize
?
$pagesize
:
20
;
$offset
=
$pagesize
*
(
$page
-
1
);
$this
->
load
->
model
(
"userTest_model"
);
$collect_array
=
$this
->
user_model
->
getcollectByBaseId
(
$kind
,
$base_id
,
$offset
,
$pagesize
,
$city
);
if
(
!
empty
(
$collect_array
)
&&
is_array
(
$collect_array
))
{
foreach
(
$collect_array
as
$key
=>
$value
)
{
$collect_value
=
unserialize
(
$value
[
'collect_value'
]);
$collect_value
[
'collect_time'
]
=
$value
[
'collect_time'
];
$arr
[
$key
][
'value'
]
=
serialize
(
$collect_value
);
}
}
else
{
$arr
=
array
();
}
echo
serialize
(
$arr
);
}
/**
* 获得用户id接口
...
...
@@ -1014,6 +1219,34 @@ class Esf_center_api extends MY_Controller {
exit
;
}
/**
* 关注小区操作接口
* @author cxf
*/
public
function
api_saveblock_baseid
()
{
$base_id
=
$this
->
input
->
get
(
'base_id'
);
$kind
=
2
;
$blockid
=
$this
->
input
->
get
(
'id'
);
$city
=
$this
->
input
->
get
(
'city'
);
$city
=
$city
?
$city
:
'nj'
;
$result
=
$this
->
user_model
->
getCollectHouseIdByBaseID
(
$base_id
,
$kind
,
$blockid
,
$city
);
//已关注此
if
(
$result
[
'id'
]
>
0
)
{
echo
"2"
;
exit
;
}
$blockinfo
=
$this
->
user_model
->
get_data
(
array
(
'form_name'
=>
'block'
,
'where'
=>
array
(
'id'
=>
$blockid
,
'esta'
=>
'2'
),
'limit'
=>
1
),
'esfhousebak'
);
$searchcond
=
serialize
(
$blockinfo
[
0
]);
$this
->
user_model
->
addcollectByBaseID
(
$base_id
,
$blockid
,
$kind
,
$searchcond
,
$city
);
echo
"1"
;
exit
;
}
/**
* app关注小区操作接口
* @author cxf
...
...
center/views/left.php
View file @
5e32b837
...
...
@@ -9,20 +9,20 @@
<!---->
<div
class=
"user-nav-mod user-nav-mod-auto"
>
<div
class=
"user-nav-mod"
>
<a
href=
"javascript:void(0)"
class=
"nav0 js_show_nav"
><span
class=
"tex"
><strong
class=
"s_h js_s_h
<?php
if
(
$conf_where
==
'selllist'
||
$conf_where
==
'blocklist'
||
$conf_where
==
'sell_condition'
)
echo
's_h_on'
;
?>
"
>
我的
关注
</strong></span></a>
</div>
<div
class=
"user-nav-mod"
>
<a
href=
"javascript:void(0)"
class=
"nav0 js_show_nav"
><span
class=
"tex"
><strong
class=
"s_h js_s_h
<?php
if
(
$conf_where
==
'selllist'
||
$conf_where
==
'blocklist'
||
$conf_where
==
'sell_condition'
)
echo
's_h_on'
;
?>
"
>
我的
收藏
</strong></span></a>
</div>
<div
class=
"show_nav_mod js_show_nav_mod"
<?php
if
(
$conf_where
==
'selllist'
||
$conf_where
==
'blocklist'
||
$conf_where
==
'schoollist'
||
$conf_where
==
'sell_condition'
||
$conf_where
==
'officelist'
||
$conf_where
==
'brandlist'
)
echo
'style="display: block;"'
;
?>
>
<div
class=
"user-nav-mod
<?php
if
(
$conf_where
==
'selllist'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/selllist'
;
?>
"
class=
"innerLink"
>
关注
的房源
</a>
</div>
<div
class=
"user-nav-mod
<?php
if
(
$conf_where
==
'blocklist'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/blocklist'
;
?>
"
class=
"innerLink"
>
关注
的小区
</a>
</div>
<div
class=
"user-nav-mod
<?php
if
(
$conf_where
==
'selllist'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/selllist'
;
?>
"
class=
"innerLink"
>
收藏
的房源
</a>
</div>
<div
class=
"user-nav-mod
<?php
if
(
$conf_where
==
'blocklist'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/blocklist'
;
?>
"
class=
"innerLink"
>
收藏
的小区
</a>
</div>
<?php
if
(
GB_CITY
==
'nj'
){
?>
<div
class=
"user-nav-mod
<?php
if
(
$conf_where
==
'officelist'
||
$conf_where
==
'brandlist'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/officelist'
;
?>
"
class=
"innerLink"
>
关注的楼盘
</a>
</div>
<div
class=
"user-nav-mod
<?php
if
(
$conf_where
==
'officelist'
||
$conf_where
==
'brandlist'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/officelist'
;
?>
"
class=
"innerLink"
>
收藏的写字楼
</a>
</div>
<?php
}
?>
<?php
if
(
GB_CITY
==
'nj'
||
GB_CITY
==
'hf'
||
GB_CITY
==
'wh'
){
?>
<div
class=
"user-nav-mod
<?php
if
(
$conf_where
==
'schoollist'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/schoollist'
;
?>
"
class=
"innerLink"
>
关注的学校
</a>
</div>
<?php
}
?>
<div
class=
"user-nav-mod user-nav-mod-last
<?php
if
(
$conf_where
==
'sell_condition'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/sell_condition'
;
?>
"
class=
"innerLink"
>
关注的找房条件
</a>
</div>
<div
class=
"user-nav-mod "
>
<a
href=
"
<?php
echo
GB_NEW_HOUSE_COLLECT_URL
;
?>
"
class=
"innerLink"
>
楼盘收藏
</a>
</div>
<div
class=
"user-nav-mod "
>
<a
href=
"
<?php
echo
GB_NEW_HOUSE_COLLECT_URL
;
?>
"
class=
"innerLink"
>
收藏的楼盘
</a>
</div>
</div>
</div>
...
...
esf_core/models/user_model.php
View file @
5e32b837
This diff is collapsed.
Click to expand it.
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