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
22839aa3
Commit
22839aa3
authored
Jun 25, 2024
by
fangliyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base_id 取消收藏
parent
1a59468d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
esf_center_api.php
center/controllers/esf_center_api.php
+20
-1
user_model.php
esf_core/models/user_model.php
+8
-5
No files found.
center/controllers/esf_center_api.php
View file @
22839aa3
...
@@ -874,7 +874,7 @@ class Esf_center_api extends MY_Controller {
...
@@ -874,7 +874,7 @@ class Esf_center_api extends MY_Controller {
$tbl
=
$kind
==
3
?
'sell'
:
'rent'
;
$tbl
=
$kind
==
3
?
'sell'
:
'rent'
;
$id
=
$this
->
user_model
->
getCollectHouseIdByBaseID
(
$base_id
,
$kind
,
$rowid
,
$city
);
$id
=
$this
->
user_model
->
getCollectHouseIdByBaseID
(
$base_id
,
$kind
,
$rowid
,
$city
);
if
(
$id
==
0
)
if
(
empty
(
$id
)
)
{
{
$return
=
'N_COL'
;
$return
=
'N_COL'
;
}
else
{
}
else
{
...
@@ -900,6 +900,25 @@ class Esf_center_api extends MY_Controller {
...
@@ -900,6 +900,25 @@ class Esf_center_api extends MY_Controller {
echo
serialize
(
$return_array
);
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
);
}
/**
/**
...
...
esf_core/models/user_model.php
View file @
22839aa3
...
@@ -881,15 +881,18 @@ class User_model extends MY_Model
...
@@ -881,15 +881,18 @@ class User_model extends MY_Model
/**
/**
* 通过base_id查询用户关注房源的房源id
* 通过base_id查询用户关注房源的房源id
* @param type $base_id
* @param type $base_id
* @return string
* @return string
|array
*/
*/
function
getCollectHouseIdByBaseID
(
$base_id
,
$kind
,
$houseid
,
$city
=
GB_CITY
){
function
getCollectHouseIdByBaseID
(
$base_id
,
$kind
,
$houseid
,
$city
=
GB_CITY
,
$all
=
0
){
$base_id
=
explode
(
','
,
$base_id
);
$base_id
=
explode
(
','
,
$base_id
);
$
return
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_collection'
,
'where_in'
=>
array
(
'base_id'
=>
$base_id
),
'where'
=>
array
(
'collect_id'
=>
$houseid
,
'city_name'
=>
$city
,
'kind'
=>
$kind
),
'select'
=>
array
(
'id'
)),
'esf'
);
$
data
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_collection'
,
'where_in'
=>
array
(
'base_id'
=>
$base_id
),
'where'
=>
array
(
'collect_id'
=>
$houseid
,
'city_name'
=>
$city
,
'kind'
=>
$kind
),
'select'
=>
array
(
'id'
)),
'esf'
);
if
(
!
empty
(
$
return
[
0
]))
if
(
!
empty
(
$
data
[
0
]))
{
{
return
$return
[
0
];
if
(
$all
){
return
$data
;
}
return
$data
[
0
];
}
else
{
}
else
{
return
0
;
return
0
;
}
}
...
...
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