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
ff656646
Commit
ff656646
authored
Jun 28, 2024
by
fangliyan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/release' into subscribe2.0
parents
c6fb0397
b9175ebb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
esf_center_api.php
center/controllers/esf_center_api.php
+27
-0
No files found.
center/controllers/esf_center_api.php
View file @
ff656646
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
Esf_center_api
extends
MY_Controller
{
var
$newrent_host
=
'http://newrent.house365.com'
;
function
__construct
()
{
...
...
@@ -17,6 +18,13 @@ class Esf_center_api extends MY_Controller {
$this
->
load
->
model
(
'rent_coupon_model'
);
$this
->
city
=
''
;
$this
->
user_id
=
0
;
//根据ip是否是127开头判断是否是测试环境
if
(
substr
(
$_SERVER
[
'REMOTE_ADDR'
],
0
,
3
)
==
'127'
)
{
$this
->
newrent_host
=
'http://newrentlocal.house365.com'
;
}
}
...
...
@@ -113,6 +121,25 @@ class Esf_center_api extends MY_Controller {
$telno
=
$this
->
input
->
get
(
'telno'
);
$uid
=
$this
->
user_model
->
yztelno
(
$telno
);
}
$url
=
$this
->
newrent_host
.
'/api/tf-app-ext/add-house-collect'
;
$postData
=
array
(
'house_id'
=>
$this
->
input
->
get
(
'rowid'
),
'tbl'
=>
$this
->
input
->
get
(
'kind'
)
==
3
?
'sell'
:
'rent'
,
'city'
=>
$this
->
input
->
get
(
'city'
),
'uid'
=>
$uid
,
);
$result
=
SendDataByCurl
(
$url
,
$postData
);
$result
=
$result
?
json_decode
(
$result
,
true
)
:
array
();
$return
=
array
(
'result'
=>
0
,
'msg'
=>
'收藏失败'
);
if
(
!
empty
(
$result
)){
$return
[
'result'
]
=
$result
[
'code'
]
==
0
?
1
:
0
;
//utf8转gbk
$msg
=
$result
[
'msg'
]
?
mb_convert_encoding
(
$result
[
'msg'
],
'gbk'
,
'utf-8'
)
:
''
;
$return
[
'msg'
]
=
$msg
?
$msg
:
(
$return
[
'result'
]
==
1
?
'收藏成功'
:
'收藏失败'
);
}
echo
serialize
(
$return
);
die
();
$flag
=
$this
->
input
->
get
(
'flag'
);
if
(
empty
(
$flag
))
{
...
...
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