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
28e74c55
Commit
28e74c55
authored
Feb 18, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除商学院评论
parent
0f7e914a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
10 deletions
+37
-10
News.php
application/index/controller/News.php
+25
-2
SNewsComment.php
application/model/SNewsComment.php
+10
-7
route.php
application/route.php
+2
-1
No files found.
application/index/controller/News.php
View file @
28e74c55
...
...
@@ -276,10 +276,32 @@ class News extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$comment
=
new
SNewsComment
();
$
m_
comment
=
new
SNewsComment
();
$field
=
'a.id,a.comment_content,a.create_time,b.name,c.title'
;
$data
=
$comment
->
getCommentList
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$field
,
$where
);
$data
=
$
m_
comment
->
getCommentList
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$field
,
$where
);
return
$this
->
response
(
200
,
""
,
$data
);
}
/**
* 删除商学院评论
* @return \think\Response
*/
public
function
delNewsComment
()
{
if
(
empty
(
$this
->
params
[
'id'
]))
{
return
$this
->
response
(
101
,
"Id is null."
);
}
$params_
[
'id'
]
=
$this
->
params
[
'id'
];
$params_
[
'status'
]
=
1
;
$m_comment
=
new
SNewsComment
();
$res
=
$m_comment
->
updateSite
(
$params_
);
//int(1)
if
(
$res
==
1
){
return
$this
->
response
(
"200"
,
"成功"
,[
'data'
=>
$res
]);
}
else
{
return
$this
->
response
(
"300"
,
"失败"
);
}
}
}
\ No newline at end of file
application/model/SNewsComment.php
View file @
28e74c55
...
...
@@ -69,14 +69,18 @@ class SNewsComment extends BaseModel
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
return
$data
;
}
// foreach ($data as $k=>$v) {
// if (isset($v['img'])) {
// $data[$k]['img'] = AGENTHEADERIMGURL . $v['img'];
// }
// }
/**
* 更新数据
*/
public
function
updateSite
(
$params
)
{
$result
=
$this
->
update
(
$params
);
//dump($this->getLastSql());
return
$result
;
return
$data
;
}
}
\ No newline at end of file
application/route.php
View file @
28e74c55
...
...
@@ -313,7 +313,8 @@ Route::group('index', [
'getNewsInfo'
=>
[
'index/news/getNewsInfo'
,
[
'method'
=>
'GET'
]
],
//商学院资讯详情
'getNewsLabel'
=>
[
'index/news/getNewsLabel'
,
[
'method'
=>
'GET'
]
],
//商学院资标签
'delNews'
=>
[
'index/news/delNews'
,
[
'method'
=>
'POST'
]
],
//删除商学院文章
'getCommentList'
=>
[
'index/news/getCommentList'
,
[
'method'
=>
'POST|GET'
]
],
//删除商学院文章
'getCommentList'
=>
[
'index/news/getCommentList'
,
[
'method'
=>
'POST|GET'
]
],
//商学院评论列表
'delNewsComment'
=>
[
'index/news/delNewsComment'
,
[
'method'
=>
'POST|GET'
]
],
//删除商学院评论
'new_text'
=>
[
'index/news/newText'
,
[
'method'
=>
'GET'
]
],
'delNewsFile'
=>
[
'index/news/delNewsFile'
,
[
'method'
=>
'POST'
]
],
//删除商学院附件
'agentEvaluateNumAndFraction'
=>
[
'index/broker/agentEvaluateNumAndFraction'
,
[
'method'
=>
'POST|GET'
]
],
//经纪人列表计算-评价次数和分数 朱伟 2018-07-03
...
...
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