Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-frontM
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
云深项目组
beyond-clouds-frontM
Commits
64881725
Commit
64881725
authored
Mar 25, 2020
by
yanju
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'yoona' into 'master'
Yoona See merge request
!31
parents
701e470d
83a02a8a
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
552 additions
and
55 deletions
+552
-55
pages/personal-center/home/answer.vue
+54
-2
pages/personal-center/home/blog.vue
+49
-3
pages/personal-center/home/dynamic.vue
+69
-0
pages/personal-center/home/following-topic.vue
+66
-0
pages/personal-center/home/my-topic.vue
+66
-0
pages/personal-center/home/project.vue
+55
-9
pages/personal-center/home/question.vue
+60
-8
pages/personal-center/home/topic.vue
+0
-20
pages/personal-center/index.vue
+31
-9
pages/personal-center/person/fans.vue
+51
-2
pages/personal-center/person/following.vue
+51
-2
No files found.
pages/personal-center/home/answer.vue
View file @
64881725
<
template
>
<
template
>
<yun-div>
<yun-div>
<answer-card></answer-card>
<answer-card
v-for=
"(val, index) in dataList"
:info=
"val"
:key=
"val.questionId"
></answer-card>
<!--
<empty-card
v-if=
"dataList.length === 0"
></empty-card>
-->
<scroll-loading
ref=
"pagination"
:pages=
"pages"
v-on:changePage=
"changePage"
></scroll-loading>
</yun-div>
</yun-div>
</
template
>
</
template
>
<
script
>
<
script
>
import
answerCard
from
'../../../components/moblie/answerCard'
import
answerCard
from
'../../../components/moblie/answerCard'
import
ScrollLoading
from
"../../../components/moblie/scrollLoading"
;
import
config
from
"../../../action/config"
;
import
EmptyCard
from
"../../../components/moblie/emptyCard"
;
export
default
{
export
default
{
name
:
"answer"
,
name
:
"answer"
,
components
:{
components
:{
answerCard
ScrollLoading
,
answerCard
,
EmptyCard
},
data
()
{
return
{
dataList
:
[],
pages
:
1
}
},
methods
:
{
handleResponse
(
currentPage
,
response
){
if
(
currentPage
===
1
){
this
.
dataList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
}
else
{
response
.
data
.
dataList
.
map
((
val
,
index
)
=>
{
this
.
dataList
.
push
(
val
)
});
this
.
pages
=
response
.
data
.
totalPage
;
}
},
dataGetNoticeAnswer
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Question
.
myParticipated
,{
params
:{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
handleResponse
(
currentPage
,
response
)
})
},
changePage
(
currentPage
){
//返回页数 请求新的数据
this
.
dataGetNoticeAnswer
(
currentPage
);
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/personal-center/home/blog.vue
View file @
64881725
<
template
>
<
template
>
<yun-div>
<yun-div>
<project-card></project-card>
<project-card
v-for=
"val in dataList"
:info=
"val"
:key=
"val.blogId"
:is-my=
"true"
></project-card>
<scroll-loading
ref=
"pagination"
:pages=
"pages"
v-on:changePage=
"changePage"
></scroll-loading>
</yun-div>
</yun-div>
</
template
>
</
template
>
<
script
>
<
script
>
import
projectCard
from
'../../../components/moblie/projectCard'
import
projectCard
from
'../../../components/moblie/projectCard'
import
ScrollLoading
from
"../../../components/moblie/scrollLoading"
;
import
config
from
"../../../action/config"
;
import
EmptyCard
from
"../../../components/moblie/emptyCard"
;
export
default
{
export
default
{
name
:
"blog"
,
name
:
"blog"
,
components
:{
components
:{
projectCard
EmptyCard
,
projectCard
,
ScrollLoading
},
data
()
{
return
{
dataList
:
[],
pages
:
1
}
},
methods
:
{
handleResponse
(
currentPage
,
response
){
if
(
currentPage
===
1
){
this
.
dataList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
}
else
{
response
.
data
.
dataList
.
map
((
val
,
index
)
=>
{
this
.
dataList
.
push
(
val
)
});
this
.
pages
=
response
.
data
.
totalPage
;
}
},
dataGetBlog
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Blog
.
myList
,
{
params
:
{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
handleResponse
(
currentPage
,
response
)
})
},
changePage
(
currentPage
){
//返回页数 请求新的数据
this
.
dataGetBlog
(
currentPage
);
}
}
}
}
}
</
script
>
</
script
>
...
...
pages/personal-center/home/dynamic.vue
View file @
64881725
<
template
>
<yun-div>
<dynamic-card
v-for=
"val in dataList"
:key=
"val.postId"
:info=
"val"
:is-my=
"true"
></dynamic-card>
<!--
<empty-card
v-if=
"dataList.length === 0"
></empty-card>
-->
<scroll-loading
ref=
"pagination"
:pages=
"pages"
v-on:changePage=
"changePage"
></scroll-loading>
</yun-div>
</
template
>
<
script
>
import
ScrollLoading
from
"../../../components/moblie/scrollLoading"
;
import
config
from
"../../../action/config"
;
import
EmptyCard
from
"../../../components/moblie/emptyCard"
;
import
DynamicCard
from
"../../../components/moblie/dynamicCard"
;
export
default
{
components
:
{
EmptyCard
,
DynamicCard
,
ScrollLoading
},
data
()
{
return
{
dataList
:
[],
pages
:
1
}
},
methods
:
{
handleResponse
(
currentPage
,
response
){
if
(
currentPage
===
1
){
this
.
dataList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
}
else
{
response
.
data
.
dataList
.
map
((
val
,
index
)
=>
{
this
.
dataList
.
push
(
val
)
});
this
.
pages
=
response
.
data
.
totalPage
;
}
},
dataGetDynamic
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Post
.
myList
,
{
params
:
{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
handleResponse
(
currentPage
,
response
)
})
},
changePage
(
currentPage
){
//返回页数 请求新的数据
this
.
dataGetDynamic
(
currentPage
);
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/personal-center/home/following-topic.vue
View file @
64881725
<
template
>
<yun-div>
<topic-card
v-for=
"val in dataList"
:key=
"val.topicId"
:info=
"val"
from=
"notice"
></topic-card>
<scroll-loading
ref=
"pagination"
:pages=
"pages"
v-on:changePage=
"changePage"
></scroll-loading>
</yun-div>
</
template
>
<
script
>
import
topicCard
from
'../../../components/moblie/topicCard'
import
ScrollLoading
from
"../../../components/moblie/scrollLoading"
;
import
config
from
"../../../action/config"
;
import
EmptyCard
from
"../../../components/moblie/emptyCard"
;
export
default
{
components
:{
topicCard
,
ScrollLoading
,
EmptyCard
},
data
()
{
return
{
dataList
:
[],
pages
:
1
}
},
methods
:
{
handleResponse
(
currentPage
,
response
){
if
(
currentPage
===
1
){
this
.
dataList
=
response
.
data
.
records
;
this
.
pages
=
response
.
data
.
totalPage
;
}
else
{
response
.
data
.
records
.
map
((
val
,
index
)
=>
{
this
.
dataList
.
push
(
val
)
});
this
.
pages
=
response
.
data
.
totalPage
;
}
},
dataGetMyFollowingTopic
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
myfollowedList
,
{
params
:
{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
handleResponse
(
currentPage
,
response
)
})
},
changePage
(
currentPage
){
//返回页数 请求新的数据
this
.
dataGetMyFollowingTopic
(
currentPage
);
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/personal-center/home/my-topic.vue
View file @
64881725
<
template
>
<yun-div>
<topic-card
v-for=
"val in dataList"
:key=
"val.topicId"
:info=
"val"
></topic-card>
<scroll-loading
ref=
"pagination"
:pages=
"pages"
v-on:changePage=
"changePage"
></scroll-loading>
</yun-div>
</
template
>
<
script
>
import
topicCard
from
'../../../components/moblie/topicCard'
import
ScrollLoading
from
"../../../components/moblie/scrollLoading"
;
import
config
from
"../../../action/config"
;
import
EmptyCard
from
"../../../components/moblie/emptyCard"
;
export
default
{
components
:{
topicCard
,
ScrollLoading
,
EmptyCard
},
data
()
{
return
{
dataList
:
[],
pages
:
1
}
},
methods
:
{
handleResponse
(
currentPage
,
response
){
if
(
currentPage
===
1
){
this
.
dataList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
}
else
{
response
.
data
.
dataList
.
map
((
val
,
index
)
=>
{
this
.
dataList
.
push
(
val
)
});
this
.
pages
=
response
.
data
.
totalPage
;
}
},
dataGetMyTopic
(
currentPage
){
this
.
from
=
'my'
;
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
myList
,
{
params
:
{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
handleResponse
(
currentPage
,
response
)
})
},
changePage
(
currentPage
){
//返回页数 请求新的数据
this
.
dataGetMyTopic
(
currentPage
);
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/personal-center/home/project.vue
View file @
64881725
<
template
>
<
template
>
<yun-div>
<yun-div>
<project-card></project-card>
<project-card
v-for=
"val in dataList"
</yun-div>
:key=
"val.projectId"
:info=
"val"
:is-my=
"true"
></project-card>
<!--
<empty-card
v-if=
"dataList.length === 0"
></empty-card>
-->
<scroll-loading
ref=
"pagination"
:pages=
"pages"
v-on:changePage=
"changePage"
></scroll-loading>
</yun-div>
</
template
>
</
template
>
<
script
>
<
script
>
import
projectCard
from
'../../../components/moblie/projectCard'
import
projectCard
from
'../../../components/moblie/projectCard'
export
default
{
import
ScrollLoading
from
"../../../components/moblie/scrollLoading"
;
name
:
"project"
,
import
config
from
"../../../action/config"
;
components
:{
import
EmptyCard
from
"../../../components/moblie/emptyCard"
;
projectCard
export
default
{
components
:
{
EmptyCard
,
projectCard
,
ScrollLoading
},
data
()
{
return
{
dataList
:
[],
pages
:
1
}
},
methods
:
{
handleResponse
(
currentPage
,
response
){
if
(
currentPage
===
1
){
this
.
dataList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
}
else
{
response
.
data
.
dataList
.
map
((
val
,
index
)
=>
{
this
.
dataList
.
push
(
val
)
});
this
.
pages
=
response
.
data
.
totalPage
;
}
}
},
dataGetProject
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Project
.
myList
,
{
params
:
{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
handleResponse
(
currentPage
,
response
)
})
},
changePage
(
currentPage
){
//返回页数 请求新的数据
this
.
dataGetProject
(
currentPage
);
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
pages/personal-center/home/question.vue
View file @
64881725
<
template
>
<
template
>
<yun-div>
<yun-div>
<answer-card></answer-card>
<answer-card
</yun-div>
v-for=
"(val, index) in dataList"
:info=
"val"
:key=
"val.questionId"
></answer-card>
<!--
<empty-card
v-if=
"dataList.length === 0"
></empty-card>
-->
<scroll-loading
ref=
"pagination"
:pages=
"pages"
v-on:changePage=
"changePage"
></scroll-loading>
</yun-div>
</
template
>
</
template
>
<
script
>
<
script
>
import
answerCard
from
'../../../components/moblie/answerCard'
import
answerCard
from
'../../../components/moblie/answerCard'
export
default
{
import
ScrollLoading
from
"../../../components/moblie/scrollLoading"
;
name
:
"question"
,
components
:
{
import
config
from
"../../../action/config"
;
answerCard
import
EmptyCard
from
"../../../components/moblie/emptyCard"
;
export
default
{
name
:
"answer"
,
components
:{
ScrollLoading
,
answerCard
,
EmptyCard
},
data
()
{
return
{
dataList
:
[],
pages
:
1
}
},
methods
:
{
handleResponse
(
currentPage
,
response
){
if
(
currentPage
===
1
){
this
.
dataList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
}
else
{
response
.
data
.
dataList
.
map
((
val
,
index
)
=>
{
this
.
dataList
.
push
(
val
)
});
this
.
pages
=
response
.
data
.
totalPage
;
}
},
dataGetMyAnswer
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Question
.
myCreated
,{
params
:{
page
:
currentPage
,
size
:
10
}
}
}).
then
((
response
)
=>
{
this
.
handleResponse
(
currentPage
,
response
)
})
},
changePage
(
currentPage
){
//返回页数 请求新的数据
this
.
dataGetMyAnswer
(
currentPage
);
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
pages/personal-center/home/topic.vue
deleted
100644 → 0
View file @
701e470d
<
template
>
<yun-div>
<topic-card></topic-card>
</yun-div>
</
template
>
<
script
>
import
topicCard
from
'../../../components/moblie/topicCard'
export
default
{
name
:
"topic"
,
components
:{
topicCard
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/personal-center/index.vue
View file @
64881725
...
@@ -4,15 +4,16 @@
...
@@ -4,15 +4,16 @@
:margin-v=
"[0,'auto']"
:margin-v=
"[0,'auto']"
>
>
<user-card-big
<user-card-big
:info=
"myInfo"
></user-card-big>
></user-card-big>
<yun-div
<yun-div
:margin-v=
"[15,0,0,0]"
>
:margin-v=
"[15,0,0,0]"
>
<data-card
title=
"我的消息"
:cardType=
"3"
right=
"23"
></data-card>
<data-card
title=
"我的消息"
:cardType=
"3"
right=
"23"
v-tap=
"()=> toJump('///')"
></data-card>
</yun-div>
</yun-div>
<yun-div
<yun-div
bg-color-v=
"white"
bg-color-v=
"white"
:margin-v=
"[15,0,0,0]"
>
:margin-v=
"[15,0,0,0]"
>
<data-card
title=
"我的喜欢"
right=
"23
"
></data-card>
<data-card
title=
"我的喜欢"
v-tap=
"()=> toJump('/personal-center/like')
"
></data-card>
<yun-div
<yun-div
:width-v=
"704"
:width-v=
"704"
:margin-v=
"[0,'auto']"
:margin-v=
"[0,'auto']"
...
@@ -22,32 +23,32 @@
...
@@ -22,32 +23,32 @@
<yun-div
<yun-div
bg-color-v=
"white"
bg-color-v=
"white"
:margin-v=
"[15,0,0,0]"
>
:margin-v=
"[15,0,0,0]"
>
<data-card
title=
"我的项目"
></data-card>
<data-card
title=
"我的项目"
:right=
"this.myInfo.statistics.projectNum"
v-tap=
"()=> toJump('/personal-center/home/project')"
></data-card>
<yun-div
<yun-div
:width-v=
"704"
:width-v=
"704"
:margin-v=
"[0,'auto']"
:margin-v=
"[0,'auto']"
:border-v=
"[1,'solid','#EFEFEF','bottom']"
></yun-div>
:border-v=
"[1,'solid','#EFEFEF','bottom']"
></yun-div>
<data-card
title=
"我的博客"
></data-card>
<data-card
title=
"我的博客"
:right=
"this.myInfo.statistics.blogNum"
v-tap=
"()=> toJump('/personal-center/home/blog')"
></data-card>
<yun-div
<yun-div
:width-v=
"704"
:width-v=
"704"
:margin-v=
"[0,'auto']"
:margin-v=
"[0,'auto']"
:border-v=
"[1,'solid','#EFEFEF','bottom']"
></yun-div>
:border-v=
"[1,'solid','#EFEFEF','bottom']"
></yun-div>
<data-card
title=
"我的提问"
></data-card>
<data-card
title=
"我的提问"
:right=
"this.myInfo.statistics.questionNum"
v-tap=
"()=> toJump('/personal-center/home/question')"
></data-card>
<yun-div
<yun-div
:width-v=
"704"
:width-v=
"704"
:margin-v=
"[0,'auto']"
:margin-v=
"[0,'auto']"
:border-v=
"[1,'solid','#EFEFEF','bottom']"
></yun-div>
:border-v=
"[1,'solid','#EFEFEF','bottom']"
></yun-div>
<data-card
title=
"我的回答"
></data-card>
<data-card
title=
"我的回答"
:right=
"this.myInfo.statistics.questionReplyNum"
v-tap=
"()=> toJump('/personal-center/home/answer')"
></data-card>
<yun-div
<yun-div
:width-v=
"704"
:width-v=
"704"
:margin-v=
"[0,'auto']"
:margin-v=
"[0,'auto']"
:border-v=
"[1,'solid','#EFEFEF','bottom']"
></yun-div>
:border-v=
"[1,'solid','#EFEFEF','bottom']"
v-tap=
"()=> toJump('/personal-center/home/dynamic')"
></yun-div>
<data-card
title=
"我的动态"
></data-card>
<data-card
title=
"我的动态"
v-tap=
"()=> toJump('/personal-center/home/dynamic')"
></data-card>
<yun-div
<yun-div
:width-v=
"704"
:width-v=
"704"
:margin-v=
"[0,'auto']"
:margin-v=
"[0,'auto']"
:border-v=
"[1,'solid','#EFEFEF','bottom']"
></yun-div>
:border-v=
"[1,'solid','#EFEFEF','bottom']"
></yun-div>
<data-card
title=
"我创建的话题"
></data-card>
<data-card
title=
"我创建的话题"
:right=
"this.myInfo.statistics.postNum"
v-tap=
"()=> toJump('/personal-center/home/my-topic')"
></data-card>
</yun-div>
</yun-div>
<yun-div
<yun-div
:margin-v=
"[15,0,0,0]"
:margin-v=
"[15,0,0,0]"
...
@@ -75,12 +76,29 @@
...
@@ -75,12 +76,29 @@
import
userCardBig
from
'../../components/moblie/userCardBig'
import
userCardBig
from
'../../components/moblie/userCardBig'
import
dataCard
from
'../../components/moblie/dataCard'
import
dataCard
from
'../../components/moblie/dataCard'
import
config
from
"../../action/config"
;
import
config
from
"../../action/config"
;
import
commonMixin
from
"../../components/moblie/commonMixin"
;
const
Cookie
=
process
.
client
?
require
(
'js-cookie'
)
:
null
const
Cookie
=
process
.
client
?
require
(
'js-cookie'
)
:
null
export
default
{
export
default
{
mixins
:
[
commonMixin
],
async
asyncData
({
$axios
})
{
let
res
=
await
$axios
.
$get
(
config
.
api
.
get
.
User
.
myInfo
)
return
{
myInfo
:
res
.
data
}
},
components
:{
components
:{
userCardBig
,
dataCard
userCardBig
,
dataCard
},
},
data
()
{
return
{
myInfo
:
{},
}
},
created
()
{
},
methods
:{
methods
:{
handleLogout
()
{
handleLogout
()
{
...
@@ -104,6 +122,10 @@
...
@@ -104,6 +122,10 @@
}
}
});
});
},
},
toJump
(
route
)
{
console
.
log
(
route
);
this
.
changeRoute1
(
route
)
}
}
}
}
}
...
...
pages/personal-center/person/fans.vue
View file @
64881725
<
template
>
<
template
>
<yun-div>
<yun-div>
<fans-card></fans-card>
<fans-card
v-for=
"(val,index) in fansList"
:key=
"val.userId"
></fans-card>
<!--
<empty-card
v-if=
"fansList.length === 0"
></empty-card>
-->
<scroll-loading
ref=
"pagination"
:pages=
"pages"
v-on:changePage=
"changePage"
></scroll-loading>
</yun-div>
</yun-div>
</
template
>
</
template
>
<
script
>
<
script
>
import
FansCard
from
"../../../components/moblie/fansCard"
;
import
FansCard
from
"../../../components/moblie/fansCard"
;
import
ScrollLoading
from
"../../../components/moblie/scrollLoading"
;
import
config
from
"../../../action/config"
;
import
EmptyCard
from
"../../../components/moblie/emptyCard"
;
export
default
{
export
default
{
components
:
{
Fans
Card
},
components
:
{
ScrollLoading
,
FansCard
,
Empty
Card
},
data
()
{
data
()
{
return
{
return
{
fansList
:
[],
pages
:
1
}
},
mounted
()
{
this
.
restartPagination
()
},
methods
:
{
restartPagination
(){
if
(
process
.
browser
){
this
.
fansList
=
[];
this
.
pages
=
1
;
this
.
$refs
.
pagination
.
setCurrentPage
(
1
)
}
},
handleResponse
(
currentPage
,
response
){
if
(
currentPage
===
1
){
this
.
fansList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
}
else
{
response
.
data
.
dataList
.
map
((
val
,
index
)
=>
{
this
.
fansList
.
push
(
val
)
});
this
.
pages
=
response
.
data
.
totalPage
;
}
},
dataGetPeople
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
User
.
myFans
,{
params
:{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
if
(
response
.
code
===
0
){
this
.
handleResponse
(
currentPage
,
response
)
}
})
},
changePage
(
currentPage
){
//返回页数 请求新的数据
this
.
dataGetPeople
(
currentPage
)
}
}
}
}
}
}
...
...
pages/personal-center/person/following.vue
View file @
64881725
<
template
>
<
template
>
<yun-div>
<yun-div>
<fans-card></fans-card>
<fans-card
v-for=
"(val,index) in followingList"
:key=
"val.userId"
></fans-card>
<!--
<empty-card
v-if=
"followingList.length === 0"
></empty-card>
-->
<scroll-loading
ref=
"pagination"
:pages=
"pages"
v-on:changePage=
"changePage"
></scroll-loading>
</yun-div>
</yun-div>
</
template
>
</
template
>
<
script
>
<
script
>
import
FansCard
from
"../../../components/moblie/fansCard"
;
import
FansCard
from
"../../../components/moblie/fansCard"
;
import
ScrollLoading
from
"../../../components/moblie/scrollLoading"
;
import
config
from
"../../../action/config"
;
import
EmptyCard
from
"../../../components/moblie/emptyCard"
;
export
default
{
export
default
{
components
:
{
Fans
Card
},
components
:
{
ScrollLoading
,
FansCard
,
Empty
Card
},
data
()
{
data
()
{
return
{
return
{
followingList
:
[],
pages
:
1
}
},
mounted
()
{
this
.
restartPagination
()
},
methods
:
{
restartPagination
(){
if
(
process
.
browser
){
this
.
followingList
=
[];
this
.
pages
=
1
;
this
.
$refs
.
pagination
.
setCurrentPage
(
1
)
}
},
handleResponse
(
currentPage
,
response
){
if
(
currentPage
===
1
){
this
.
followingList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
}
else
{
response
.
data
.
dataList
.
map
((
val
,
index
)
=>
{
this
.
followingList
.
push
(
val
)
});
this
.
pages
=
response
.
data
.
totalPage
;
}
},
dataGetPeople
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
User
.
myFollowing
,{
params
:{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
if
(
response
.
code
===
0
){
this
.
handleResponse
(
currentPage
,
response
)
}
})
},
changePage
(
currentPage
){
//返回页数 请求新的数据
this
.
dataGetPeople
(
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