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
14297e0c
Commit
14297e0c
authored
May 08, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feed 详情
parent
0266da8e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
1 deletion
+42
-1
Feed.php
application/api_broker/controller/Feed.php
+24
-1
PushFeed.php
application/model/PushFeed.php
+17
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/Feed.php
View file @
14297e0c
...
...
@@ -29,7 +29,7 @@ class Feed extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$field
=
'id,
report_id,house_id,title,content,link,read_num,click_num,house_title,create_tim
e'
;
$field
=
'id,
house_id,title,content,link,house_titl
e'
;
$where
=
[];
$where
[
'type'
]
=
0
;
...
...
@@ -63,4 +63,26 @@ class Feed extends Basic
return
$this
->
response
(
200
,
""
);
}
/**
* feed 详情
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getFeedInfo
()
{
$push
=
new
PushFeed
();
$field
=
'id,create_time,house_title'
;
if
(
empty
(
$this
->
params
[
'id'
]))
{
return
$this
->
response
(
101
,
"Id is null!"
);
}
$where
[
'id'
]
=
$this
->
params
[
'id'
];
$where
[
'status'
]
=
0
;
$data
=
$push
->
getFeedInfo
(
$field
,
$where
);
return
$this
->
response
(
200
,
""
,
$data
);
}
}
\ No newline at end of file
application/model/PushFeed.php
View file @
14297e0c
...
...
@@ -30,4 +30,20 @@ class PushFeed extends BaseModel
}
return
$result
;
}
/**
* feed流详情
*
* @param string $field
* @param string $params
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getFeedInfo
(
$field
=
''
,
$params
=
''
)
{
return
$this
->
field
(
$field
)
->
where
(
$params
)
->
find
();
}
}
\ No newline at end of file
application/route.php
View file @
14297e0c
...
...
@@ -423,6 +423,7 @@ Route::group('broker', [
'qrCode'
=>
[
'api_broker/broker/qrCode'
,
[
'method'
=>
'get'
]
],
//生成二维码
'feedList'
=>
[
'api_broker/Feed/feedList'
,
[
'method'
=>
'get'
]
],
//首页feed喜报
'editFeedClick'
=>
[
'api_broker/Feed/editFeedClick'
,
[
'method'
=>
'post'
]
],
//feed流喜报点赞和页面浏览数量
'getFeedInfo'
=>
[
'api_broker/Feed/getFeedInfo'
,
[
'method'
=>
'get'
]
],
//feed流喜报详情
...
...
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