Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
court-inner
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
莫晓莉
court-inner
Commits
fa2c593d
Commit
fa2c593d
authored
Oct 18, 2021
by
莫晓莉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新闻详情页
parent
681f9c1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
12 deletions
+74
-12
src/assets/home/file.png
+0
-0
src/views/detail/index.vue
+74
-12
No files found.
src/assets/home/file.png
0 → 100644
View file @
fa2c593d
5.74 KB
src/views/detail/index.vue
View file @
fa2c593d
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<img
<img
class=
"mr-5 gong-icon"
class=
"mr-5 gong-icon"
style=
""
style=
""
src=
"../../assets/home/
gonggao
.png"
src=
"../../assets/home/
file
.png"
/>
/>
<div
class=
"file-name"
>
<div
class=
"file-name"
>
{{
item
.
attachName
}}
{{
item
.
attachName
}}
...
@@ -88,8 +88,13 @@
...
@@ -88,8 +88,13 @@
<div
class=
"ml-5"
>
{{
item
.
userId
}}
</div>
<div
class=
"ml-5"
>
{{
item
.
userId
}}
</div>
<div
class=
"mr-15"
>
{{
item
.
reTime
}}
</div>
<div
class=
"mr-15"
>
{{
item
.
reTime
}}
</div>
</div>
</div>
<div
style=
"margin-top:10px;font-size:9px;background:#eee;border-radius:5px;padding:15px;"
>
<div
class=
"mt-10"
style=
"font-size:9px;"
>
{{
item
.
content
}}
</div>
{{
item
.
content
}}
<div
v-if=
"item.subComments.length>0"
style=
"margin-top:10px;font-size:9px;background:#eee;border-radius:5px;padding:15px;"
>
<!--
{{
item
.
content
}}
-->
<div
class=
"mb-5"
v-for=
"tab in item.subComments"
:key=
"tab.id"
>
<span>
{{
tab
.
nickName
}}
</span>
<span>
{{
tab
.
content
}}
</span>
</div>
</div>
</div>
<div
@
click=
"returnEvent(item,index)"
v-if=
" user.id && !item.returnFlag"
class=
"mt-10"
style=
"font-size:10px;margin-left:10px;color:blue;"
>
回复
</div>
<div
@
click=
"returnEvent(item,index)"
v-if=
" user.id && !item.returnFlag"
class=
"mt-10"
style=
"font-size:10px;margin-left:10px;color:blue;"
>
回复
</div>
<!-- 回复开始 -->
<!-- 回复开始 -->
...
@@ -101,7 +106,7 @@
...
@@ -101,7 +106,7 @@
v-model=
"reCommentContent"
v-model=
"reCommentContent"
placeholder=
"请输入回复内容"
placeholder=
"请输入回复内容"
></el-input>
></el-input>
<el-button
class=
"ml-10 "
type=
"primary"
size=
"mini"
@
click=
"commentEvent(1,item.content,item.
newsI
d)"
>
发送
</el-button>
<el-button
class=
"ml-10 "
type=
"primary"
size=
"mini"
@
click=
"commentEvent(1,item.content,item.
i
d)"
>
发送
</el-button>
</div>
</div>
<!-- 回复结束 -->
<!-- 回复结束 -->
</div>
</div>
...
@@ -121,7 +126,7 @@
...
@@ -121,7 +126,7 @@
placeholder=
"发表评论"
placeholder=
"发表评论"
></el-input>
></el-input>
<div
v-if=
"user.id"
style=
"text-align:center;"
>
<div
v-if=
"user.id"
style=
"text-align:center;"
>
<el-button
class=
"mt-15"
s
type=
"danger"
size=
"mini"
@
click=
"commentEvent(0,'',
article.newsId
)"
>
发表
</el-button>
<el-button
class=
"mt-15"
s
type=
"danger"
size=
"mini"
@
click=
"commentEvent(0,'',
''
)"
>
发表
</el-button>
</div>
</div>
<div
<div
v-if=
"!user.id"
v-if=
"!user.id"
...
@@ -192,6 +197,21 @@
...
@@ -192,6 +197,21 @@
</div>
</div>
<div
<div
v-for=
"(item, index) in commentRankData"
:key=
"index"
class=
"k-flex k-space-between top-list"
>
<div
class=
"article-name"
>
<span
class=
"num"
style=
""
>
{{
index
+
1
}}
</span>
<span
class=
"right-line"
>
{{
item
.
boardName
}}
<span
class=
"line-div"
></span>
</span>
<span>
{{
item
.
subject
}}
</span>
</div>
<!--
<div>
{{
item
.
date
}}
</div>
-->
</div>
<!--
<div
v-for=
"(item, index) in topList"
v-for=
"(item, index) in topList"
:key=
"index"
:key=
"index"
class=
"k-flex k-space-between top-list"
class=
"k-flex k-space-between top-list"
...
@@ -204,8 +224,8 @@
...
@@ -204,8 +224,8 @@
</span>
</span>
<span>
{{
item
.
name
}}
</span>
<span>
{{
item
.
name
}}
</span>
</div>
</div>
<
!--
<div>
{{
item
.
date
}}
</div>
--
>
<
div>
{{
item
.
date
}}
</div
>
</div>
</div>
-->
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -292,7 +312,7 @@
...
@@ -292,7 +312,7 @@
import
{
newsDetail
}
from
"@/api/homePage.js"
import
{
newsDetail
}
from
"@/api/homePage.js"
import
{
messageDetail
}
from
"@/api/manage/manage"
;
import
{
messageDetail
}
from
"@/api/manage/manage"
;
import
{
removeToken
}
from
"@/utils/auth"
;
import
{
removeToken
}
from
"@/utils/auth"
;
import
{
createMessage
}
from
"@/api/detail"
;
import
{
createMessage
,
commentRaking
,
monthClickRanking
}
from
"@/api/detail"
;
// import { getUserInfo } from "@/utils/auth";
// import { getUserInfo } from "@/utils/auth";
import
{
mapGetters
,
mapMutations
}
from
"vuex"
;
import
{
mapGetters
,
mapMutations
}
from
"vuex"
;
...
@@ -301,6 +321,7 @@ export default {
...
@@ -301,6 +321,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
commentRankData
:[],
//本月评论
reCommentContent
:
''
,
//回复内容
reCommentContent
:
''
,
//回复内容
messageDetailData
:[],
//评论详情
messageDetailData
:[],
//评论详情
returnFlag
:
false
,
//回复判断
returnFlag
:
false
,
//回复判断
...
@@ -370,6 +391,35 @@ export default {
...
@@ -370,6 +391,35 @@ export default {
...
mapGetters
([
'user'
]),
...
mapGetters
([
'user'
]),
},
},
methods
:
{
methods
:
{
//本月阅读排行
monthClickRanking
(){
let
params
=
{};
var
myDate
=
new
Date
();
var
curMonth
=
myDate
.
getMonth
();
//获取当前月份(0-11,0代表1月);
params
.
fyId
=
32
;
//传法院id,固定写死32,是固定的高院内网所以传 32
params
.
byMonth
=
curMonth
;
//按月
console
.
log
(
'当前月份=='
,
curMonth
);
//当前月份
monthClickRanking
(
JSON
.
stringify
(
params
)).
then
(
res
=>
{
if
(
res
.
success
){
this
.
commentRankData
=
res
.
data
;
}
})
},
//本月评论排行
commentRaking
(){
let
params
=
{};
var
myDate
=
new
Date
();
var
curMonth
=
myDate
.
getMonth
();
//获取当前月份(0-11,0代表1月);
params
.
fyId
=
32
;
//传法院id,固定写死32,是固定的高院内网所以传 32
params
.
byMonth
=
curMonth
;
//按月
console
.
log
(
'当前月份=='
,
curMonth
);
//当前月份
commentRaking
(
JSON
.
stringify
(
params
)).
then
(
res
=>
{
if
(
res
.
success
){
this
.
commentRankData
=
res
.
data
;
}
})
},
returnEvent
(
item
,
index
){
returnEvent
(
item
,
index
){
// if(!user.id){
// if(!user.id){
// this.$message({
// this.$message({
...
@@ -407,6 +457,8 @@ export default {
...
@@ -407,6 +457,8 @@ export default {
// this.msg = this.$router.history.current.query.name;
// this.msg = this.$router.history.current.query.name;
this
.
newsDetailFun
(
this
.
$router
.
history
.
current
.
query
.
newsId
);
this
.
newsDetailFun
(
this
.
$router
.
history
.
current
.
query
.
newsId
);
this
.
messageDetail
(
this
.
$router
.
history
.
current
.
query
.
newsId
);
//获取评论详情
this
.
messageDetail
(
this
.
$router
.
history
.
current
.
query
.
newsId
);
//获取评论详情
// this.commentRaking();//获取本月评论排行
this
.
monthClickRanking
();
//获取本月阅读排行
},
},
newsDetailFun
(
val
){
newsDetailFun
(
val
){
newsDetail
({
newsId
:
val
}).
then
(
res
=>
{
newsDetail
({
newsId
:
val
}).
then
(
res
=>
{
...
@@ -432,10 +484,17 @@ export default {
...
@@ -432,10 +484,17 @@ export default {
switchBtn
(
i
)
{
switchBtn
(
i
)
{
console
.
log
(
"111==="
,
i
);
console
.
log
(
"111==="
,
i
);
this
.
activeItem
=
i
;
this
.
activeItem
=
i
;
if
(
this
.
activeItem
==
0
){
this
.
monthClickRanking
();
//本月阅读排行
}
else
{
this
.
commentRaking
();
//获取评论排行
}
},
},
//发表评论
//发表评论
commentEvent
(
type
,
content
,
news
Id
){
commentEvent
(
type
,
content
,
comment
Id
){
var
oldContent
=
content
;
var
oldContent
=
content
;
// console.log('',newsId);
// console.log('',newsId)
var
params
=
{};
var
params
=
{};
// type=1是回复,type=0是发表评论
// type=1是回复,type=0是发表评论
...
@@ -451,7 +510,7 @@ export default {
...
@@ -451,7 +510,7 @@ export default {
}
}
params
.
content
=
this
.
commentContent
;
params
.
content
=
this
.
commentContent
;
params
.
newsId
=
newsId
;
params
.
newsId
=
this
.
$router
.
history
.
current
.
query
.
newsId
;
}
}
if
(
type
==
1
){
if
(
type
==
1
){
...
@@ -463,8 +522,11 @@ export default {
...
@@ -463,8 +522,11 @@ export default {
return
;
return
;
}
}
params
.
content
=
oldContent
+
'回复:'
+
this
.
reCommentContent
+
'。'
;
// params.content=oldContent+'回复:'+this.reCommentContent+'。';
params
.
newsId
=
newsId
;
params
.
content
=
'回复:'
+
this
.
reCommentContent
+
'。'
;
params
.
newsId
=
this
.
$router
.
history
.
current
.
query
.
newsId
;
params
.
parentId
=
commentId
;
}
}
createMessage
(
JSON
.
stringify
(
params
)).
then
(
res
=>
{
createMessage
(
JSON
.
stringify
(
params
)).
then
(
res
=>
{
this
.
messageDetail
(
this
.
$router
.
history
.
current
.
query
.
newsId
);
this
.
messageDetail
(
this
.
$router
.
history
.
current
.
query
.
newsId
);
...
...
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