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
b11ab630
Commit
b11ab630
authored
Feb 14, 2020
by
yanju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善粉丝卡片, 个人中心我关注的话题
parent
d48cebfd
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
121 additions
and
77 deletions
+121
-77
components/pc/cardContainer.vue
+1
-0
components/pc/fanCard.vue
+6
-2
components/pc/nav/navCard.vue
+2
-2
components/pc/releaseCard.vue
+5
-3
pages/dynamic/index.vue
+9
-23
pages/personal-center/home.vue
+75
-15
pages/personal-center/home/answer.vue
+1
-1
pages/personal-center/home/blog.vue
+1
-1
pages/personal-center/home/project.vue
+1
-1
pages/personal-center/home/topic.vue
+2
-5
pages/topic/detail/_name.vue
+10
-16
pages/topic/index.vue
+6
-6
pages/u/_id/_select.vue
+2
-2
No files found.
components/pc/cardContainer.vue
View file @
b11ab630
...
...
@@ -42,6 +42,7 @@ export default {
this
.
$emit
(
config
.
event
.
listenCardConLabel
,
1
)
},
moreFunc
(){
this
.
$emit
(
config
.
event
.
listenCardConMore
,
1
)
},
...
...
components/pc/fanCard.vue
View file @
b11ab630
...
...
@@ -25,7 +25,7 @@
</div>
</div>
<div
class=
"fan-card__right"
v-if=
"!isBlacklist"
>
<yun-icon
class=
"icon-menu"
v-if=
"
info.userId===$store.state.userProfile.userId
"
name=
"down_arrow"
size=
"8px"
@
mouseover
.
native=
"changeStateMenu1"
@
mouseleave
.
native=
"changeStateMenu2"
></yun-icon>
<yun-icon
class=
"icon-menu"
v-if=
"
!from
"
name=
"down_arrow"
size=
"8px"
@
mouseover
.
native=
"changeStateMenu1"
@
mouseleave
.
native=
"changeStateMenu2"
></yun-icon>
<transition
name=
"fade"
>
<div
class=
"fan-card__right-menu"
@
mouseover=
"changeStateMenu1"
@
mouseleave=
"changeStateMenu2"
v-if=
"showMenu"
>
<ul
>
...
...
@@ -66,7 +66,11 @@ export default {
props
:{
info
:
Object
,
cardType
:
String
cardType
:
String
,
from
:{
type
:
String
,
default
:
''
}
},
created
(){
...
...
components/pc/nav/navCard.vue
View file @
b11ab630
...
...
@@ -46,7 +46,7 @@
if
(
this
.
$route
.
query
.
type
)
{
this
.
isBlue
=
this
.
$route
.
query
.
type
===
this
.
labelId
;
}
else
{
// this.isBlue = this.$route.path.indexOf(this.navAddress
) !== -1;
this
.
isBlue
=
this
.
$route
.
path
.
indexOf
(
this
.
navAddress
)
!==
-
1
&&
this
.
$route
.
path
.
indexOf
(
'personal-center'
)
!==
-
1
;
}
},
watch
:{
...
...
@@ -54,7 +54,7 @@
if
(
this
.
$route
.
query
.
type
)
{
this
.
isBlue
=
this
.
$route
.
query
.
type
===
this
.
labelId
;
}
else
{
// this.isBlue = this.$route.path.indexOf(this.navAddress
) !== -1;
this
.
isBlue
=
this
.
$route
.
path
.
indexOf
(
this
.
navAddress
)
!==
-
1
&&
this
.
$route
.
path
.
indexOf
(
'personal-center'
)
!==
-
1
;
}
}
},
...
...
components/pc/releaseCard.vue
View file @
b11ab630
...
...
@@ -184,9 +184,7 @@
},
created
(){
if
(
this
.
initWord
){
this
.
releaseWord
=
'#'
+
this
.
initWord
+
'#'
;
}
if
(
process
.
browser
){
document
.
addEventListener
(
'click'
,(
e
)
=>
{
if
(
this
.
$refs
.
topicCard
){
...
...
@@ -388,10 +386,14 @@
})
},
dataPostContent
(){
if
(
this
.
initWord
){
this
.
releaseWord
=
'#'
+
this
.
initWord
+
'#'
+
this
.
releaseWord
;
}
let
postFrom
=
{
"content"
:
this
.
releaseWord
,
};
if
(
this
.
imgArr
.
length
>
0
){
postFrom
.
pictures
=
this
.
imgArr
;
}
...
...
pages/dynamic/index.vue
View file @
b11ab630
...
...
@@ -44,57 +44,43 @@
{
label
:
'推荐'
,
address
:
'/dynamic'
,
id
:
'推荐'
type
:
'推荐'
},
{
label
:
'热门'
,
address
:
'/dynamic'
,
id
:
'热门'
type
:
'热门'
},
{
label
:
'关注'
,
address
:
'/dynamic'
,
id
:
'关注'
type
:
'关注'
},
{
label
:
'我的'
,
address
:
'/dynamic'
,
id
:
'我的'
type
:
'我的'
},
{
label
:
'文字'
,
address
:
'/dynamic'
,
id
:
'文字'
type
:
'文字'
},
{
label
:
'视频'
,
address
:
'/dynamic'
,
id
:
'视频'
type
:
'视频'
},
{
label
:
'图片'
,
address
:
'/dynamic'
,
id
:
'图片'
},
{
label
:
'项目'
,
address
:
'/dynamic'
,
id
:
'项目'
},
{
label
:
'代码'
,
address
:
'/dynamic'
,
id
:
'代码'
},
type
:
'图片'
}
],
postList
:[],
pages
:
1
,
...
...
@@ -111,7 +97,7 @@
this
.
$router
.
replace
({
path
:
'/dynamic'
,
query
:
{
id
:
'推荐'
type
:
'推荐'
}
});
...
...
pages/personal-center/home.vue
View file @
b11ab630
...
...
@@ -9,6 +9,19 @@
<div
class=
"bottom-container"
>
<div
class=
"bottom-left"
>
<user-card
from=
"my"
:userId=
"this.$store.state.userProfile.userId"
></user-card>
<card-container
v-if=
"myTopicList.length>0"
style=
"margin-top: 16px"
title=
"我创建的话题"
@
listenCardConMore=
"$router.push(
{path:'/personal-center/home/topic',query:{type:'my'}})" more="更多">
<nuxt-link
tag=
"div"
:to=
"'/topic/detail/'+val.topicName"
class=
"topic-content__c"
v-for=
"(val,index) in myTopicList"
:key=
"val.topicId"
>
<p>
#
{{
val
.
topicName
}}
#
</p>
<h6>
{{
val
.
referenceCount
}}
</h6>
</nuxt-link>
</card-container>
<card-container
v-if=
"noticeTopicList.length>0"
style=
"margin-top: 16px"
title=
"我关注的话题"
@
listenCardConMore=
"$router.push(
{path:'/personal-center/home/topic',query:{type:'notice'}})" more="更多">
<nuxt-link
tag=
"div"
:to=
"'/topic/detail/'+val.topicName"
class=
"topic-content__c"
v-for=
"(val,index) in noticeTopicList"
:key=
"val.topicId"
>
<p>
#
{{
val
.
topicName
}}
#
</p>
<h6>
{{
val
.
referenceCount
}}
</h6>
</nuxt-link>
</card-container>
</div>
<div
class=
"bottom-right"
>
<div
class=
"bottom-right__tab"
>
...
...
@@ -71,12 +84,14 @@
import
ProjectCard
from
'../../components/pc/projectCard'
;
import
CardContainer
from
'../../components/pc/cardContainer'
;
import
PageFooter
from
'../../components/pc/pageFooter'
;
import
config
from
"../../action/config"
;
export
default
{
layout
:
'only-header'
,
data
(){
return
{
labelList
:
[
'我的消息'
,
'私信'
],
userId
:
''
,
myTopicList
:[],
noticeTopicList
:[],
// selected: this.$route.name
}
},
...
...
@@ -86,32 +101,54 @@
watch
:{
$route
(
to
,
from
){
this
.
myTopicList
=
[];
this
.
noticeTopicList
=
[];
if
(
this
.
$route
.
name
){
this
.
selected
=
this
.
$route
.
name
this
.
selected
=
this
.
$route
.
name
;
if
(
this
.
$route
.
name
===
'personal-center-home-topic'
&&
this
.
$route
.
query
.
type
===
'my'
){
this
.
dataGetNoticeTopic
();
}
if
(
this
.
$route
.
name
===
'personal-center-home-topic'
&&
this
.
$route
.
query
.
type
===
'notice'
){
this
.
dataGetMyTopic
();
}
}
}
},
created
(){
this
.
selected
=
this
.
$route
.
name
;
if
(
this
.
$route
.
name
===
'personal-center-home-topic'
&&
this
.
$route
.
query
.
type
===
'my'
){
this
.
dataGetNoticeTopic
();
}
if
(
this
.
$route
.
name
===
'personal-center-home-topic'
&&
this
.
$route
.
query
.
type
===
'notice'
){
this
.
dataGetMyTopic
();
}
},
methods
:{
showAlert
(){
// $alert 使用方法
this
.
$alert
(
'确认清空消息列表?'
,
''
,
{
confirmButtonText
:
'确定'
,
// callback: action => {
// this.$message({
// type: 'info',
// message: `action: ${ action }`,
// confirmButtonPosition: 'left',
// });
// }
});
dataGetMyTopic
(){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
myList
,
{
params
:
{
page
:
1
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
myTopicList
=
response
.
data
.
dataList
;
})
},
dataGetNoticeTopic
(){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
myfollowedList
,{
params
:{
page
:
1
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
noticeTopicList
=
response
.
data
.
records
;
})
},
...
...
@@ -174,6 +211,29 @@
.bottom-left{
width
:
302
*$
length
;
.topic-content__c{
@extend
%flex-row-spb;
@extend
%cursorPointer;
padding
:
0
16
*$
length
;
box-sizing
:
border-box
;
margin-top
:
20
*$
length
;
p{
width
:
190
*$
length
;
@include
fontStyle(12,16,500,#333,left);
@extend
%nowrap;
@extend
%animate-transition;
&:hover{
color
:
#00AAE6
}
}
h6
{
@include
fontStyle(12,16,500,#ccc,left);
@extend
%nowrap;
}
}
}
.bottom-right
{
width
:
938
*$
length
;
...
...
pages/personal-center/home/answer.vue
View file @
b11ab630
<
template
>
<div>
<card-container
key=
"container3"
style=
"margin-top: 16px"
:title=
"rightConTitle"
label=
"换一换"
>
<card-container
key=
"container3"
style=
"margin-top: 16px"
:title=
"rightConTitle"
>
<answer-card
v-if=
"rightList.length>0"
:isMy=
"true"
v-for=
"(val,index) in rightList"
:key=
"val.questionId"
:info=
"val"
></answer-card>
<empty-card
v-if=
"rightList.length===0"
height=
"556px"
></empty-card>
...
...
pages/personal-center/home/blog.vue
View file @
b11ab630
<
template
>
<div>
<card-container
key=
"container3"
style=
"margin-top: 16px"
:title=
"rightConTitle"
label=
"换一换"
>
<card-container
key=
"container3"
style=
"margin-top: 16px"
:title=
"rightConTitle"
>
<blog-card
:isMy=
"true"
v-if=
"rightList.length>0"
v-for=
"(val,index) in rightList"
:key=
"val.blogId"
:info=
"val"
></blog-card>
<empty-card
v-if=
"rightList.length===0"
height=
"556px"
></empty-card>
...
...
pages/personal-center/home/project.vue
View file @
b11ab630
<
template
>
<div>
<card-container
key=
"container3"
style=
"margin-top: 16px"
:title=
"rightConTitle"
label=
"换一换"
>
<card-container
key=
"container3"
style=
"margin-top: 16px"
:title=
"rightConTitle"
>
<project-card
@
listenProjectCardUpdate=
"dataGetProject(1)"
:isMy=
"true"
v-if=
"rightList.length>0"
v-for=
"(val,index) in rightList"
:key=
"val.projectId"
:info=
"val"
></project-card>
<empty-card
v-if=
"rightList.length===0"
height=
"556px"
></empty-card>
...
...
pages/personal-center/home/topic.vue
View file @
b11ab630
<
template
>
<div>
<div>
<card-container
key=
"container3"
style=
"margin-top: 16px"
:title=
"rightConTitle"
label=
"换一换"
>
<card-container
key=
"container3"
style=
"margin-top: 16px"
:title=
"rightConTitle"
>
<topic-card
v-if=
"rightList.length>0"
v-for=
"(val,index) in rightList"
:key=
"val.topicId"
:info=
"val"
></topic-card>
<empty-card
v-if=
"rightList.length===0"
height=
"556px"
></empty-card>
...
...
@@ -35,7 +35,7 @@
return
'我创建的话题'
}
if
(
this
.
$route
.
query
.
type
===
"notice"
){
return
'我
参与
的话题'
return
'我
关注
的话题'
}
},
},
components
:{
...
...
@@ -43,8 +43,6 @@
},
methods
:{
dataGetMyTopic
(
currentPage
){
if
(
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
)
{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
myList
,
{
params
:
{
page
:
currentPage
,
...
...
@@ -54,7 +52,6 @@
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
}
},
dataGetNoticeTopic
(
currentPage
){
...
...
pages/topic/detail/_name.vue
View file @
b11ab630
...
...
@@ -11,7 +11,7 @@
<p
style=
"color:#6d61bee8"
>
找不到该话题
</p>
</div>
</div>
<input
ref=
"searchInput"
type=
"text"
v-model=
"searchWord"
/>
<input
ref=
"searchInput"
placeholder=
"请输入话题名称"
type=
"text"
v-model=
"searchWord"
/>
<div
class=
"icon-box"
>
<yun-icon
name=
"search"
></yun-icon>
</div>
...
...
@@ -82,45 +82,44 @@
list
:
[
{
label
:
'推荐'
,
address
:
'/topic/detail'
,
address
:
this
.
$route
.
path
,
type
:
'推荐'
},
{
label
:
'热门'
,
address
:
'/topic/detail'
,
address
:
this
.
$route
.
path
,
type
:
'热门'
},
{
label
:
'关注'
,
address
:
'/topic/detail'
,
address
:
this
.
$route
.
path
,
type
:
'关注'
},
{
label
:
'我的'
,
address
:
'/topic/detail'
,
address
:
this
.
$route
.
path
,
type
:
'我的'
},
{
label
:
'文字'
,
address
:
'/topic/detail'
,
address
:
this
.
$route
.
path
,
type
:
'文字'
},
{
label
:
'视频'
,
address
:
'/topic/detail'
,
address
:
this
.
$route
.
path
,
type
:
'视频'
},
{
label
:
'图片'
,
address
:
'/topic/detail'
,
address
:
this
.
$route
.
path
,
type
:
'图片'
},
}
],
topicCardInfo
:{},
postList
:[],
...
...
@@ -140,7 +139,7 @@
this
.
$router
.
replace
({
path
:
this
.
$route
.
path
,
query
:
{
id
:
'推荐'
type
:
'推荐'
}
});
...
...
@@ -210,11 +209,6 @@
this
.
dataGetDynamic
(
currentPage
);
},
dataGetOwner
(
id
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
User
.
otherInfo
+
id
+
'/baseinfo'
).
then
((
response
)
=>
{
this
.
ownerInfo
=
response
.
data
;
})
},
dataGetUsers
(
id
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
topicFollowerList
+
id
+
'/follower'
,{
...
...
pages/topic/index.vue
View file @
b11ab630
...
...
@@ -50,22 +50,22 @@ export default {
{
label
:
'推荐'
,
address
:
'/topic'
,
id
:
'推荐'
type
:
'推荐'
},
{
label
:
'热门'
,
address
:
'/topic'
,
id
:
'热门'
type
:
'热门'
},
{
label
:
'关注'
,
address
:
'/topic'
,
id
:
'关注'
type
:
'关注'
},
{
label
:
'最新'
,
address
:
'/topic'
,
id
:
'最新'
type
:
'最新'
}
],
topicList
:[],
...
...
@@ -78,7 +78,7 @@ export default {
this
.
$router
.
replace
({
path
:
'/topic'
,
query
:
{
id
:
'推荐'
type
:
'推荐'
}
});
...
...
@@ -87,7 +87,7 @@ export default {
},
computed
:
{
labelTitle
:
function
()
{
return
this
.
$route
.
query
.
id
+
'话题'
return
this
.
$route
.
query
.
type
+
'话题'
}
},
mounted
(){
...
...
pages/u/_id/_select.vue
View file @
b11ab630
...
...
@@ -89,7 +89,7 @@
<transition
name=
"fade-transform"
mode=
"out-in"
>
<div
v-if=
"selected==='fans'"
style=
"margin-top:16px"
>
<card-container
key=
"container3"
style=
"margin-top: 16px"
:title=
"rightConTitle"
>
<fan-card
v-for=
"(val,index) in rightList"
:key=
"val.userId"
:info=
"val"
></fan-card>
<fan-card
from=
"other"
v-for=
"(val,index) in rightList"
:key=
"val.userId"
:info=
"val"
></fan-card>
<empty-card
v-if=
"rightList.length===0"
height=
"556px"
></empty-card>
<pagination
key=
"container5"
style=
"margin:20px auto;"
:pages=
"pages"
v-on:listenPageChange=
"changePage"
></pagination>
</card-container>
...
...
@@ -100,7 +100,7 @@
<div
v-if=
"selected==='following'"
style=
"margin-top:16px"
>
<card-container
key=
"container3"
style=
"margin-top: 16px"
:title=
"rightConTitle"
>
<fan-card
v-for=
"(val,index) in rightList"
:key=
"val.userId"
:info=
"val"
></fan-card>
<fan-card
from=
"other"
v-for=
"(val,index) in rightList"
:key=
"val.userId"
:info=
"val"
></fan-card>
<empty-card
v-if=
"rightList.length===0"
height=
"556px"
></empty-card>
<pagination
key=
"container5"
style=
"margin:20px auto;"
:pages=
"pages"
v-on:listenPageChange=
"changePage"
></pagination>
</card-container>
...
...
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