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
7283bd72
Commit
7283bd72
authored
Feb 11, 2020
by
yanju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取别人的主页
parent
dca63694
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
195 additions
and
66 deletions
+195
-66
components/common/avatar/avatar.vue
+3
-2
components/pc/pageHeader.vue
+1
-1
components/pc/socialContactCard.vue
+1
-1
components/pc/userCard.vue
+1
-1
pages/personal-center/home.vue
+15
-11
pages/personal-center/home/answer.vue
+50
-10
pages/personal-center/home/blog.vue
+34
-10
pages/personal-center/home/dynamic.vue
+36
-12
pages/personal-center/home/project.vue
+30
-9
pages/personal-center/home/topic.vue
+24
-9
No files found.
components/common/avatar/avatar.vue
View file @
7283bd72
<
template
>
<
template
>
<
div
class=
"user-avatar
"
:style=
"
{backgroundColor:randomColor,width:size,height:size,borderRadius:borderR}">
<
nuxt-link
tag=
"div"
class=
"user-avatar"
:to=
"userId?'/personal-center/home/project?user='+userId:''
"
:style=
"
{backgroundColor:randomColor,width:size,height:size,borderRadius:borderR}">
<img
:src=
"src"
v-if=
"src"
/>
<img
:src=
"src"
v-if=
"src"
/>
<p
v-if=
"!src"
>
{{
firstWord
}}
</p>
<p
v-if=
"!src"
>
{{
firstWord
}}
</p>
</
div
>
</
nuxt-link
>
</
template
>
</
template
>
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
type
:
String
,
type
:
String
,
default
:
''
default
:
''
},
},
userId
:
String
,
size
:
String
,
size
:
String
,
borderR
:
String
,
borderR
:
String
,
},
},
...
...
components/pc/pageHeader.vue
View file @
7283bd72
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
</ul>
</ul>
<ul
class=
"abs-box abs-box2"
v-if=
"showHideBox2"
@
mouseover=
"changeStateShowBox(2)"
@
mouseleave=
"changeStateHideBox(2)"
>
<ul
class=
"abs-box abs-box2"
v-if=
"showHideBox2"
@
mouseover=
"changeStateShowBox(2)"
@
mouseleave=
"changeStateHideBox(2)"
>
<li>
<li>
<nuxt-link
tag=
"span"
to=
"/personal-center/home/project
"
>
我的主页
</nuxt-link>
<nuxt-link
tag=
"span"
:to=
"'/personal-center/home/project?user='+$store.state.userProfile.userId
"
>
我的主页
</nuxt-link>
</li>
</li>
<li>
<li>
<nuxt-link
tag=
"span"
to=
"/personal-center/like/support"
>
我的喜欢
</nuxt-link>
<nuxt-link
tag=
"span"
to=
"/personal-center/like/support"
>
我的喜欢
</nuxt-link>
...
...
components/pc/socialContactCard.vue
View file @
7283bd72
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<div
class=
"social-card"
>
<div
class=
"social-card"
>
<div
class=
"card_header"
>
<div
class=
"card_header"
>
<div
class=
"header-l"
>
<div
class=
"header-l"
>
<yun-avatar
:src=
"userAvatar"
:name=
"userNick"
></yun-avatar>
<yun-avatar
:
userId=
"userId"
:
src=
"userAvatar"
:name=
"userNick"
></yun-avatar>
<div
class=
"header-l__info"
>
<div
class=
"header-l__info"
>
<div
class=
"header-l__info-top"
>
<div
class=
"header-l__info-top"
>
<p
class=
"name"
>
{{
userNick
}}
</p>
<p
class=
"name"
>
{{
userNick
}}
</p>
...
...
components/pc/userCard.vue
View file @
7283bd72
<
template
>
<
template
>
<div
class=
"user-card__wrap"
>
<div
class=
"user-card__wrap"
>
<div
class=
"user-card1"
>
<div
class=
"user-card1"
>
<yun-avatar
style=
"margin:40px auto 0;"
:src=
"userAvatar"
size=
"84px"
></yun-avatar>
<yun-avatar
:userId=
"userId"
style=
"margin:40px auto 0;"
:src=
"userAvatar"
size=
"84px"
></yun-avatar>
<div
class=
"info1"
>
<div
class=
"info1"
>
<p
class=
"name"
>
{{
nickName
}}
</p>
<p
class=
"name"
>
{{
nickName
}}
</p>
<yun-icon
name=
"sex_man"
size=
"12px"
color=
"#00AAE6"
v-if=
"gender===1"
></yun-icon>
<yun-icon
name=
"sex_man"
size=
"12px"
color=
"#00AAE6"
v-if=
"gender===1"
></yun-icon>
...
...
pages/personal-center/home.vue
View file @
7283bd72
...
@@ -8,37 +8,37 @@
...
@@ -8,37 +8,37 @@
<div
class=
"bottom-container__bg"
></div>
<div
class=
"bottom-container__bg"
></div>
<div
class=
"bottom-container"
>
<div
class=
"bottom-container"
>
<div
class=
"bottom-left"
>
<div
class=
"bottom-left"
>
<user-card
from=
"my"
:userId=
"this.$store.state.userProfile.
userId"
></user-card>
<user-card
:from=
"$store.state.userProfile.userId===userId?'my':''"
:userId=
"
userId"
></user-card>
</div>
</div>
<div
class=
"bottom-right"
>
<div
class=
"bottom-right"
>
<div
class=
"bottom-right__tab"
>
<div
class=
"bottom-right__tab"
>
<div
class=
"tab__left"
>
<div
class=
"tab__left"
>
<nuxt-link
tag=
"div"
class=
"left__item"
to=
"/personal-center/home/project
"
>
<nuxt-link
tag=
"div"
class=
"left__item"
:to=
"
{path:'/personal-center/home/project',query:{user:$route.query.user}}
">
<p
class=
"abs"
></p>
<p
class=
"abs"
></p>
<p
class=
"word"
>
项目
</p>
<p
class=
"word"
>
项目
</p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-project'"
></p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-project'"
></p>
</nuxt-link>
</nuxt-link>
<nuxt-link
tag=
"div"
class=
"left__item"
to=
"/personal-center/home/blog
"
>
<nuxt-link
tag=
"div"
class=
"left__item"
:to=
"
{path:'/personal-center/home/blog',query:{user:$route.query.user}}
">
<p
class=
"abs"
></p>
<p
class=
"abs"
></p>
<p
class=
"word"
>
博客
</p>
<p
class=
"word"
>
博客
</p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-blog'"
></p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-blog'"
></p>
</nuxt-link>
</nuxt-link>
<nuxt-link
tag=
"div"
class=
"left__item"
:to=
"
{path:'/personal-center/home/answer',query:{type:'my'}}">
<nuxt-link
tag=
"div"
class=
"left__item"
:to=
"
{path:'/personal-center/home/answer',query:{type:'my'
,user:$route.query.user
}}">
<p
class=
"abs"
></p>
<p
class=
"abs"
></p>
<p
class=
"word"
>
问答
</p>
<p
class=
"word"
>
问答
</p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-answer'"
></p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-answer'"
></p>
</nuxt-link>
</nuxt-link>
<nuxt-link
tag=
"div"
class=
"left__item"
to=
"/personal-center/home/dynamic
"
>
<nuxt-link
tag=
"div"
class=
"left__item"
:to=
"
{path:'/personal-center/home/dynamic',query:{user:$route.query.user}}
">
<p
class=
"abs"
></p>
<p
class=
"abs"
></p>
<p
class=
"word"
>
动态
</p>
<p
class=
"word"
>
动态
</p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-dynamic'"
></p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-dynamic'"
></p>
</nuxt-link>
</nuxt-link>
<nuxt-link
tag=
"div"
class=
"left__item"
:to=
"
{path:'/personal-center/home/topic',query:{type:'my'
}}">
<nuxt-link
tag=
"div"
v-if=
"$store.state.userProfile.userId===userId"
class=
"left__item"
:to=
"
{path:'/personal-center/home/topic',query:{type:'my',user:$route.query.user
}}">
<p
class=
"abs"
></p>
<p
class=
"abs"
></p>
<p
class=
"word"
>
话题
</p>
<p
class=
"word"
>
话题
</p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-topic'"
></p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-topic'"
></p>
</nuxt-link>
</nuxt-link>
<nuxt-link
tag=
"div"
class=
"left__item"
to=
"/personal-center/home/info
"
>
<nuxt-link
tag=
"div"
class=
"left__item"
:to=
"
{path:'/personal-center/home/info',query:{user:$route.query.user}}
">
<p
class=
"abs"
></p>
<p
class=
"abs"
></p>
<p
class=
"word"
>
资料
</p>
<p
class=
"word"
>
资料
</p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-info'"
></p>
<p
class=
"line"
v-if=
"selected==='personal-center-home-info'"
></p>
...
@@ -65,19 +65,16 @@
...
@@ -65,19 +65,16 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
UserCard
from
'../../components/pc/userCard'
;
import
UserCard
from
'../../components/pc/userCard'
;
import
ProjectCard
from
'../../components/pc/projectCard'
;
import
ProjectCard
from
'../../components/pc/projectCard'
;
import
CardContainer
from
'../../components/pc/cardContainer'
;
import
CardContainer
from
'../../components/pc/cardContainer'
;
import
PageFooter
from
'../../components/pc/pageFooter'
;
import
PageFooter
from
'../../components/pc/pageFooter'
;
export
default
{
export
default
{
layout
:
'only-header'
,
layout
:
'only-header'
,
data
(){
data
(){
return
{
return
{
labelList
:
[
'我的消息'
,
'私信'
],
labelList
:
[
'我的消息'
,
'私信'
],
userId
:
''
,
// selected: this.$route.name
// selected: this.$route.name
}
}
},
},
...
@@ -95,6 +92,13 @@
...
@@ -95,6 +92,13 @@
created
(){
created
(){
this
.
selected
=
this
.
$route
.
name
;
this
.
selected
=
this
.
$route
.
name
;
let
userId
=
this
.
$route
.
query
.
user
;
if
(
userId
){
this
.
userId
=
userId
;
}
else
{
this
.
router
.
replace
(
'/'
)
}
},
},
...
...
pages/personal-center/home/answer.vue
View file @
7283bd72
...
@@ -29,7 +29,22 @@
...
@@ -29,7 +29,22 @@
}
}
},
},
computed
:{
computed
:{
rightConTitle
(){
return
this
.
$route
.
query
.
type
===
"my"
?
'我创建的问题'
:
'我参与的问题'
},
rightConTitle
(){
if
(
this
.
$route
.
query
.
type
===
"my"
&&
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
){
return
'我创建的问题'
}
if
(
this
.
$route
.
query
.
type
===
"notice"
&&
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
){
return
'我回答的问题'
}
if
(
this
.
$route
.
query
.
type
===
"my"
&&
this
.
$store
.
state
.
userProfile
.
userId
!==
this
.
$route
.
query
.
user
){
return
'Ta创建的问题'
}
if
(
this
.
$route
.
query
.
type
===
"notice"
&&
this
.
$store
.
state
.
userProfile
.
userId
!==
this
.
$route
.
query
.
user
){
return
'Ta回答的问题'
}
},
},
},
components
:{
components
:{
ProjectCard
,
CardContainer
,
AnswerCard
,
Pagination
,
EmptyCard
ProjectCard
,
CardContainer
,
AnswerCard
,
Pagination
,
EmptyCard
...
@@ -37,19 +52,34 @@
...
@@ -37,19 +52,34 @@
methods
:{
methods
:{
dataGetMyAnswer
(
currentPage
){
dataGetMyAnswer
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Question
.
myCreated
,{
if
(
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
){
params
:{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Question
.
myCreated
,{
page
:
currentPage
,
params
:{
size
:
10
page
:
currentPage
,
}
size
:
10
}).
then
((
response
)
=>
{
}
}).
then
((
response
)
=>
{
this
.
rightList
=
response
.
data
.
dataList
;
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
this
.
pages
=
response
.
data
.
totalPage
;
})
})
}
else
{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Question
.
otherCreated
+
this
.
$route
.
query
.
user
+
'/questions'
,{
params
:{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
}
},
},
dataGetNoticeAnswer
(
currentPage
){
dataGetNoticeAnswer
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Question
.
myParticipated
,{
if
(
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Question
.
myParticipated
,{
params
:{
params
:{
page
:
currentPage
,
page
:
currentPage
,
size
:
10
size
:
10
...
@@ -57,7 +87,17 @@
...
@@ -57,7 +87,17 @@
}).
then
((
response
)
=>
{
}).
then
((
response
)
=>
{
this
.
rightList
=
response
.
data
.
dataList
;
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
this
.
pages
=
response
.
data
.
totalPage
;
})
})}
else
{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Question
.
otherParticipated
+
this
.
$route
.
query
.
user
+
'/question/participated'
,{
params
:{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
}
},
},
changePage
(
currentPage
){
changePage
(
currentPage
){
...
...
pages/personal-center/home/blog.vue
View file @
7283bd72
...
@@ -28,7 +28,18 @@
...
@@ -28,7 +28,18 @@
}
}
},
},
computed
:{
computed
:{
rightConTitle
(){
return
this
.
rightConType
===
1
?
'我的博客'
:
'我关注的话题'
},
rightConTitle
(){
if
(
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
){
return
'我的博客'
}
if
(
this
.
$store
.
state
.
userProfile
.
userId
!==
this
.
$route
.
query
.
user
){
return
'Ta的博客'
}
},
},
},
components
:{
components
:{
BlogCard
,
CardContainer
,
Pagination
,
EmptyCard
BlogCard
,
CardContainer
,
Pagination
,
EmptyCard
...
@@ -36,15 +47,28 @@
...
@@ -36,15 +47,28 @@
methods
:{
methods
:{
dataGetBlog
(
currentPage
){
dataGetBlog
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Blog
.
myList
,{
if
(
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
)
{
params
:{
page
:
currentPage
,
this
.
$axios
.
$get
(
config
.
api
.
get
.
Blog
.
myList
,
{
size
:
10
params
:
{
}
page
:
currentPage
,
}).
then
((
response
)
=>
{
size
:
10
this
.
rightList
=
response
.
data
.
dataList
;
}
this
.
pages
=
response
.
data
.
totalPage
;
}).
then
((
response
)
=>
{
})
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
}
else
{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Blog
.
otherList
+
this
.
$route
.
query
.
user
+
'/blogs'
,
{
params
:
{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
}
},
},
changePage
(
currentPage
){
changePage
(
currentPage
){
...
...
pages/personal-center/home/dynamic.vue
View file @
7283bd72
<
template
>
<
template
>
<div
>
<div
>
<release-card
style=
"margin-top: 16px"
@
listenReleaseState=
"dataGetDynamic(1)"
></release-card>
<release-card
v-if=
"$store.state.userProfile.userId===$route.query.user"
style=
"margin-top: 16px"
@
listenReleaseState=
"dataGetDynamic(1)"
></release-card>
<social-card
pageType=
"my"
@
listenSocialCardState=
"dataGetDynamic(1)"
v-for=
"(val,index) in rightList"
:key=
"val.postId"
:info=
"val"
></social-card>
<social-card
pageType=
"my"
@
listenSocialCardState=
"dataGetDynamic(1)"
v-for=
"(val,index) in rightList"
:key=
"val.postId"
:info=
"val"
></social-card>
<empty-card
v-if=
"rightList.length===0&&$store.state.userProfile.userId!==$route.query.user"
height=
"556px"
></empty-card>
<pagination
key=
"container5"
style=
"margin:20px auto;"
:pages=
"pages"
v-on:listenPageChange=
"changePage"
></pagination>
<pagination
key=
"container5"
style=
"margin:20px auto;"
:pages=
"pages"
v-on:listenPageChange=
"changePage"
></pagination>
</div>
</div>
</
template
>
</
template
>
...
@@ -11,6 +13,7 @@
...
@@ -11,6 +13,7 @@
import
CardContainer
from
'../../../components/pc/cardContainer'
;
import
CardContainer
from
'../../../components/pc/cardContainer'
;
import
config
from
'../../../action/config'
;
import
config
from
'../../../action/config'
;
import
Pagination
from
"../../../components/pc/pagination"
;
import
Pagination
from
"../../../components/pc/pagination"
;
import
EmptyCard
from
"../../../components/pc/emptyCard"
;
export
default
{
export
default
{
name
:
'dynamic'
,
name
:
'dynamic'
,
...
@@ -23,23 +26,44 @@
...
@@ -23,23 +26,44 @@
}
}
},
},
computed
:{
computed
:{
rightConTitle
(){
return
this
.
rightConType
===
1
?
'我的动态'
:
'我关注的话题'
},
rightConTitle
(){
if
(
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
){
return
'我的动态'
}
if
(
this
.
$store
.
state
.
userProfile
.
userId
!==
this
.
$route
.
query
.
user
){
return
'Ta的动态'
}
},
},
},
components
:{
components
:{
SocialCard
,
CardContainer
,
Pagination
,
ReleaseCard
SocialCard
,
CardContainer
,
Pagination
,
ReleaseCard
,
EmptyCard
},
},
methods
:{
methods
:{
dataGetDynamic
(
currentPage
){
dataGetDynamic
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Post
.
myList
,{
if
(
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
)
{
params
:{
page
:
currentPage
,
this
.
$axios
.
$get
(
config
.
api
.
get
.
Post
.
myList
,
{
size
:
10
params
:
{
}
page
:
currentPage
,
}).
then
((
response
)
=>
{
size
:
10
this
.
rightList
=
response
.
data
.
dataList
;
}
this
.
pages
=
response
.
data
.
totalPage
;
}).
then
((
response
)
=>
{
})
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
}
else
{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Post
.
otherList
+
this
.
$route
.
query
.
user
+
'/posts'
,
{
params
:
{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
}
},
},
changePage
(
currentPage
){
changePage
(
currentPage
){
...
...
pages/personal-center/home/project.vue
View file @
7283bd72
...
@@ -29,7 +29,15 @@
...
@@ -29,7 +29,15 @@
},
},
computed
:{
computed
:{
rightConTitle
(){
return
this
.
rightConType
===
1
?
'我的项目'
:
'我关注的话题'
},
rightConTitle
(){
if
(
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
){
return
'我的项目'
}
if
(
this
.
$store
.
state
.
userProfile
.
userId
!==
this
.
$route
.
query
.
user
){
return
'Ta的项目'
}
},
},
},
components
:{
components
:{
ProjectCard
,
CardContainer
,
Pagination
,
EmptyCard
ProjectCard
,
CardContainer
,
Pagination
,
EmptyCard
...
@@ -38,15 +46,28 @@
...
@@ -38,15 +46,28 @@
methods
:{
methods
:{
dataGetProject
(
currentPage
){
dataGetProject
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Project
.
myList
,{
if
(
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
)
{
params
:{
page
:
currentPage
,
this
.
$axios
.
$get
(
config
.
api
.
get
.
Project
.
myList
,
{
size
:
10
params
:
{
}
page
:
currentPage
,
}).
then
((
response
)
=>
{
size
:
10
}
}).
then
((
response
)
=>
{
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
}
else
{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Project
.
otherList
+
this
.
$route
.
query
.
user
+
'/projects'
,
{
params
:
{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
rightList
=
response
.
data
.
dataList
;
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
this
.
pages
=
response
.
data
.
totalPage
;
})
})
}
},
},
changePage
(
currentPage
){
changePage
(
currentPage
){
//返回页数 请求新的数据
//返回页数 请求新的数据
...
...
pages/personal-center/home/topic.vue
View file @
7283bd72
...
@@ -30,22 +30,37 @@
...
@@ -30,22 +30,37 @@
}
}
},
},
computed
:{
computed
:{
rightConTitle
(){
return
this
.
$route
.
query
.
type
===
"1"
?
'我创建的话题'
:
'我关注的话题'
},
rightConTitle
(){
},
if
(
this
.
$route
.
query
.
type
===
"my"
&&
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
){
return
'我创建的话题'
}
if
(
this
.
$route
.
query
.
type
===
"notice"
&&
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
){
return
'我参与的话题'
}
if
(
this
.
$route
.
query
.
type
===
"my"
&&
this
.
$store
.
state
.
userProfile
.
userId
!==
this
.
$route
.
query
.
user
){
return
'Ta创建的话题'
}
if
(
this
.
$route
.
query
.
type
===
"notice"
&&
this
.
$store
.
state
.
userProfile
.
userId
!==
this
.
$route
.
query
.
user
){
return
'Ta创建的话题'
}
},
},
components
:{
components
:{
ProjectCard
,
CardContainer
,
TopicCard
,
Pagination
,
EmptyCard
ProjectCard
,
CardContainer
,
TopicCard
,
Pagination
,
EmptyCard
},
},
methods
:{
methods
:{
dataGetMyTopic
(
currentPage
){
dataGetMyTopic
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
myList
,{
if
(
this
.
$store
.
state
.
userProfile
.
userId
===
this
.
$route
.
query
.
user
)
{
params
:{
page
:
currentPage
,
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
myList
,
{
size
:
10
params
:
{
}
page
:
currentPage
,
}).
then
((
response
)
=>
{
size
:
10
}
}).
then
((
response
)
=>
{
this
.
rightList
=
response
.
data
.
dataList
;
this
.
rightList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
this
.
pages
=
response
.
data
.
totalPage
;
})
})
}
},
},
dataGetNoticeTopic
(
currentPage
){
dataGetNoticeTopic
(
currentPage
){
...
...
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