Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-front
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
Administrator
beyond-clouds-front
Commits
5e3e6e86
Commit
5e3e6e86
authored
Feb 13, 2020
by
yanju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
话题的关注
parent
bc7d62dc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
12 deletions
+73
-12
action/config.js
+4
-0
components/pc/alertsMessage/alertsCard.vue
+1
-1
components/pc/topicCard.vue
+68
-5
pages/personal-center/message.vue
+0
-5
pages/topic/detail/_name.vue
+0
-1
No files found.
action/config.js
View file @
5e3e6e86
...
@@ -195,6 +195,10 @@ export default {
...
@@ -195,6 +195,10 @@ export default {
delete
:
'/api/question/'
//删除问题 +{questionId}
delete
:
'/api/question/'
//删除问题 +{questionId}
},
},
Topic
:{
cancelFollow
:
'/api/topic/'
,
//取消关注 +{topicId}/follower
},
QuestionReply
:{
QuestionReply
:{
delete
:
'/api/question/reply/'
,
//删除问题回复 +{replyId}
delete
:
'/api/question/reply/'
,
//删除问题回复 +{replyId}
},
},
...
...
components/pc/alertsMessage/alertsCard.vue
View file @
5e3e6e86
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
>
</alerts-content>
>
</alerts-content>
</div>
</div>
<div
class=
"alerts-card__footer"
>
<div
class=
"alerts-card__footer"
>
<
p>
查看全部 (
{{
unread
}}
)
</p
>
<
nuxt-link
to=
"/personal-center/message"
>
查看全部 (
{{
unread
}}
)
</nuxt-link
>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
components/pc/topicCard.vue
View file @
5e3e6e86
...
@@ -11,10 +11,19 @@
...
@@ -11,10 +11,19 @@
<div
class=
"topic-card-right"
>
<div
class=
"topic-card-right"
>
<div
class=
"right-header"
>
<div
class=
"right-header"
>
<span
class=
"right-title"
>
#
{{
cardName
}}
#
</span>
<span
class=
"right-title"
>
#
{{
cardName
}}
#
</span>
<span
class=
"right-label"
@
click=
"handleFocus"
:style=
"
{color: fontColor}">
{{
focus
}}
</span>
<span
class=
"right-label1"
v-if=
"!followedTopic"
@
click
.
stop=
"dataPostFollowTopic"
>
<span
v-if=
"!loading"
>
+
</span>
<yun-icon
v-if=
"loading"
name=
"loading"
size=
"12"
>
</yun-icon>
关注
</span>
<span
class=
"right-label2"
v-if=
"followedTopic"
@
click
.
stop=
"dataDeleteFollowTopic"
>
<yun-icon
v-if=
"!loading"
name=
"right"
size=
"12"
></yun-icon>
<yun-icon
v-if=
"loading"
name=
"loading"
size=
"12"
>
</yun-icon>
已关注
</span>
</div>
</div>
<p
class=
"right-content"
>
{{
cardIntro
}}
</p>
<p
class=
"right-content"
>
{{
cardIntro
}}
</p>
<p
class=
"right-footer"
>
{{
cardNum1
}}
使用 · 1.45亿阅读
</p>
<p
class=
"right-footer"
>
{{
cardNum1
}}
讨论
</p>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -22,6 +31,8 @@
...
@@ -22,6 +31,8 @@
<
script
>
<
script
>
import
{
dateConvert
}
from
"../../action/utils/dataConvert"
;
import
{
dateConvert
}
from
"../../action/utils/dataConvert"
;
import
{
globalBus
}
from
"../common/globalBus"
;
import
config
from
"../../action/config"
;
export
default
{
export
default
{
...
@@ -49,7 +60,9 @@
...
@@ -49,7 +60,9 @@
cardTags
:[],
cardTags
:[],
cardTime
:
''
,
cardTime
:
''
,
cardNum1
:
''
,
cardNum1
:
''
,
topicIcon
:
''
topicIcon
:
''
,
loading
:
false
,
followedTopic
:
false
}
}
},
},
...
@@ -79,10 +92,57 @@
...
@@ -79,10 +92,57 @@
this
.
cardTags
=
info
.
tags
;
this
.
cardTags
=
info
.
tags
;
this
.
cardTime
=
dateConvert
(
info
.
createTime
);
this
.
cardTime
=
dateConvert
(
info
.
createTime
);
this
.
cardNum1
=
info
.
referenceCount
;
this
.
cardNum1
=
info
.
referenceCount
;
this
.
followedTopic
=
info
.
followedTopic
;
}
}
},
},
changeRoute
(
r
){
changeRoute
(
r
){
this
.
$router
.
push
(
r
);
this
.
$router
.
push
(
r
);
},
dataPostFollowTopic
(){
this
.
loading
=
true
;
this
.
$axios
.
$post
(
config
.
api
.
post
.
Topic
.
follow
+
this
.
cardId
+
'/follower'
).
then
((
response
)
=>
{
if
(
response
.
code
===
0
){
this
.
$message
({
type
:
'success'
,
message
:
'关注成功'
})
this
.
followedTopic
=
true
;
}
else
{
this
.
$message
({
type
:
'warning'
,
message
:
response
.
msg
})
}
this
.
loading
=
false
;
})
},
dataDeleteFollowTopic
(){
this
.
loading
=
true
;
this
.
$axios
.
$delete
(
config
.
api
.
post
.
Topic
.
follow
+
this
.
cardId
+
'/follower'
).
then
((
response
)
=>
{
this
.
loading
=
false
;
if
(
response
.
code
===
0
){
this
.
$message
({
type
:
'success'
,
message
:
'取消关注成功'
})
this
.
followedTopic
=
false
;
}
else
{
this
.
$message
({
type
:
'warning'
,
message
:
response
.
msg
})
}
})
}
}
},
},
watch
:{
watch
:{
...
@@ -144,13 +204,16 @@
...
@@ -144,13 +204,16 @@
margin-right
:
23
*$
length
;
margin-right
:
23
*$
length
;
@include
fontStyle(14,14,500,#333,left);
@include
fontStyle(14,14,500,#333,left);
}
}
.right-label
{
.right-label
1
{
@include
fontStyle(14,20,500,#55B946,left);
@include
fontStyle(14,20,500,#55B946,left);
}
}
.right-label2
{
@include
fontStyle(14,20,500,#666,left);
}
}
}
.right-content
{
.right-content
{
margin-top
:
8
*$
length
;
margin-top
:
8
*$
length
;
@include
fontStyle(12,17,500,#
666
,left);
@include
fontStyle(12,17,500,#
999
,left);
height
:
auto
;
height
:
auto
;
}
}
.right-footer
{
.right-footer
{
...
...
pages/personal-center/message.vue
View file @
5e3e6e86
...
@@ -68,11 +68,6 @@
...
@@ -68,11 +68,6 @@
label
:
'我的消息'
,
label
:
'我的消息'
,
address
:
'/personal-center/message'
,
address
:
'/personal-center/message'
,
id
:
'我的消息'
id
:
'我的消息'
},
{
label
:
'私信'
,
address
:
'/personal-center/message#'
,
id
:
'私信'
}
}
],
],
selected
:
'全部'
selected
:
'全部'
...
...
pages/topic/detail/_name.vue
View file @
5e3e6e86
...
@@ -170,7 +170,6 @@
...
@@ -170,7 +170,6 @@
methods
:{
methods
:{
dataGetTopicInfo
(
name
){
dataGetTopicInfo
(
name
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
detail
+
name
,{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
detail
+
name
,{
params
:{
params
:{
by
:
'name'
by
:
'name'
...
...
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