Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
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
hujun
tl_estate
Commits
ea8dc32c
Commit
ea8dc32c
authored
Apr 11, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
700c9398
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
SquareService.php
application/api_broker/service/SquareService.php
+12
-0
No files found.
application/api_broker/service/SquareService.php
View file @
ea8dc32c
...
...
@@ -12,6 +12,7 @@ class SquareService
private
$m_coment
;
private
$m_coment_ext
;
private
$redis
;
private
$internet_path
;
public
function
__construct
()
{
...
...
@@ -19,6 +20,12 @@ class SquareService
$this
->
m_coment
=
new
BComment
();
$this
->
m_coment_ext
=
new
BCommentExt
();
$this
->
redis
=
new
RedisCacheService
();
if
(
CURRENT_URL
==
'https://api.tonglianjituan.com/'
)
{
$this
->
internet_path
=
IMAGES_URL
.
'resource/lib/Attachments/images/'
;
}
else
{
$this
->
internet_path
=
'http://pre2.tonglianjituan.com/resource/lib/Attachments/images/'
;
}
}
/**
...
...
@@ -74,6 +81,7 @@ class SquareService
* @return array
*/
public
function
getSquareList
(
$params
){
// big_log(json_encode($params));
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
...
...
@@ -117,12 +125,16 @@ class SquareService
//评论数
$res
[
$key
][
'comment_num'
]
=
$this
->
getCommenNum
(
$val
[
'id'
]);
$res
[
$key
][
'cover_img_path'
]
=
$val
[
'cover_img'
]
?
$this
->
internet_path
.
$val
[
'cover_img'
]
:
''
;
}
return
[
'data'
=>
$res
,
'total'
=>
$res_total
];
}
public
function
getSquareCommentList
(
$params
){
big_log
(
json_encode
(
$params
));
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
...
...
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