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
a263c55c
Commit
a263c55c
authored
May 08, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取消点赞数
parent
bd35380f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
Feed.php
application/api_broker/controller/Feed.php
+19
-0
Basic.php
application/api_broker/extend/Basic.php
+2
-1
PushFeed.php
application/model/PushFeed.php
+2
-1
No files found.
application/api_broker/controller/Feed.php
View file @
a263c55c
...
...
@@ -68,6 +68,25 @@ class Feed extends Basic
return
$this
->
response
(
200
,
""
);
}
/**
* 取消点赞数
*
* @return \think\Response
* @throws \think\Exception
*/
public
function
editDecFeedClick
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$push
=
new
PushFeed
();
if
(
empty
(
$this
->
params
[
'id'
]))
{
return
$this
->
$this
->
response
(
101
,
'Id is null'
);
}
$push
->
editNum
(
$this
->
params
[
'id'
],
'click_num'
,
2
);
return
$this
->
response
(
200
,
""
);
}
/**
* feed 详情
*
...
...
application/api_broker/extend/Basic.php
View file @
a263c55c
...
...
@@ -47,7 +47,8 @@ class Basic extends Controller
'broker/forgetPwd'
,
'broker/getFeedInfo'
,
'broker/feedList'
,
'broker/editFeedClick'
'broker/editFeedClick'
,
'broker/editDecFeedClick'
);
...
...
application/model/PushFeed.php
View file @
a263c55c
...
...
@@ -22,8 +22,9 @@ class PushFeed extends BaseModel
* @throws \think\Exception
*/
public
function
editNum
(
$id
,
$field
,
$way
=
1
,
$step
=
1
)
{
$this
->
where
(
'id'
,
$id
);
if
(
$way
)
{
if
(
$way
==
1
)
{
$result
=
$this
->
setInc
(
$field
,
$step
);
}
else
{
$result
=
$this
->
setDec
(
$field
,
$step
);
...
...
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