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
11c35213
Commit
11c35213
authored
Feb 16, 2020
by
yanju
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of coding.yundingshuyuan.com:pigbigbig/beyond-clouds-front
parents
c6c09fa7
4d7102df
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
74 additions
and
20 deletions
+74
-20
action/config.js
+1
-1
components/pc/alertsMessage/alertsCard.vue
+2
-1
pages/news/detail/_id.vue
+1
-7
pages/topic/index.vue
+63
-8
pages/users/register.vue
+7
-3
No files found.
action/config.js
View file @
11c35213
...
@@ -78,7 +78,7 @@ export default {
...
@@ -78,7 +78,7 @@ export default {
search
:
'/api/topic/search'
,
//检索话题
search
:
'/api/topic/search'
,
//检索话题
list
:
'/api/topics'
,
//话题列表
list
:
'/api/topics'
,
//话题列表
postList
:
'/api/topic/'
,
//获取话题下的所有动态 +{topicName}/posts
postList
:
'/api/topic/'
,
//获取话题下的所有动态 +{topicName}/posts
hotList
:
'/api/topic/hots'
,
//获取热门
动态
hotList
:
'/api/topic/hots'
,
//获取热门
话题
hotSearch
:
'/api/topic/hotSearch'
,
//获取热搜话题
hotSearch
:
'/api/topic/hotSearch'
,
//获取热搜话题
recommendsPost
:
'/api/topic/'
,
//获取话题下的推荐动态 +{topicName}/post/recommends
recommendsPost
:
'/api/topic/'
,
//获取话题下的推荐动态 +{topicName}/post/recommends
contributes
:
'/api/topic/'
,
//话题贡献榜 +{topicId}/contributes
contributes
:
'/api/topic/'
,
//话题贡献榜 +{topicId}/contributes
...
...
components/pc/alertsMessage/alertsCard.vue
View file @
11c35213
...
@@ -15,7 +15,8 @@
...
@@ -15,7 +15,8 @@
v-if="reload"
v-if="reload"
>
</alerts-content>
>
</alerts-content>
</div>
</div>
<div
class=
"alerts-card__footer"
>
<div
class=
"alerts-card__footer"
>
<nuxt-link
to=
"/personal-center/message"
>
查看全部 (
{{
unread
}}
)
</nuxt-link>
<nuxt-link
to=
"/personal-center/message"
>
查看全部 (
{{
unread
}}
)
</nuxt-link>
</div>
</div>
</div>
</div>
...
...
pages/news/detail/_id.vue
View file @
11c35213
...
@@ -46,14 +46,8 @@
...
@@ -46,14 +46,8 @@
<div
class=
"article__content"
v-html=
"articleDetail.content"
>
<div
class=
"article__content"
v-html=
"articleDetail.content"
>
</div>
</div>
<div
class=
"article__like"
>
<yun-icon
name=
"like_egg"
class=
"egg"
></yun-icon>
<yun-icon
name=
"like1"
class=
"heart"
></yun-icon>
<p
class=
"num"
>
122
</p>
</div>
<div
class=
"article__footer"
>
<div
class=
"article__footer"
>
<!--
<p
class=
"link"
>
原文链接:
<a
target=
"_blank"
:href=
"articleDetail.link"
>
<span>
{{
articleDetail
.
link
}}
</span></a></p>
-->
<p
class=
"link"
>
本文编辑:
<span>
{{
articleDetail
.
author
}}
</span></p>
<p></p>
<p
class=
"report"
@
click=
"$router.push(
{path:'/web/report',query:{type:'news',id:articleDetail.contentId}})">举报
</p>
<p
class=
"report"
@
click=
"$router.push(
{path:'/web/report',query:{type:'news',id:articleDetail.contentId}})">举报
</p>
<div
class=
"project"
v-if=
"false"
>
<div
class=
"project"
v-if=
"false"
>
<p>
<p>
...
...
pages/topic/index.vue
View file @
11c35213
...
@@ -12,10 +12,12 @@
...
@@ -12,10 +12,12 @@
width=
"816px"
width=
"816px"
:title=
"labelTitle"
:title=
"labelTitle"
>
>
<!--
<empty-card
v-if=
"topicList.length === 0"
height=
"556px"
></empty-card>
-->
<topic-card
v-for=
"(val,index) in topicList"
:key=
"val.topicId"
:info=
"val"
></topic-card>
<topic-card
v-for=
"(val,index) in topicList"
:key=
"val.topicId"
:info=
"val"
></topic-card>
</card-container>
</card-container>
<div
class=
"pagination"
>
<div
class=
"pagination"
>
<pagination
style=
"margin: 0 auto;"
:pages=
"pages"
v-on:listenPageChange=
"changePage"
></pagination>
<pagination
style=
"margin: 0 auto;"
ref=
"pagination"
:pages=
"pages"
v-on:listenPageChange=
"changePage"
></pagination>
</div>
</div>
</div>
</div>
<div
class=
"topic-container__right"
>
<div
class=
"topic-container__right"
>
...
@@ -42,9 +44,10 @@ import CardContainer from "../../components/pc/cardContainer";
...
@@ -42,9 +44,10 @@ import CardContainer from "../../components/pc/cardContainer";
import
Pagination
from
"../../components/pc/pagination"
;
import
Pagination
from
"../../components/pc/pagination"
;
import
TopicCard
from
"../../components/pc/topicCard"
;
import
TopicCard
from
"../../components/pc/topicCard"
;
import
config
from
'../../action/config'
;
import
config
from
'../../action/config'
;
import
EmptyCard
from
"../../components/pc/emptyCard"
;
export
default
{
export
default
{
components
:
{
TopicCard
,
Pagination
,
CardContainer
,
NavWrap
},
components
:
{
EmptyCard
,
TopicCard
,
Pagination
,
CardContainer
,
NavWrap
},
data
(){
data
(){
return
{
return
{
list
:
[
list
:
[
...
@@ -70,7 +73,6 @@ export default {
...
@@ -70,7 +73,6 @@ export default {
}
}
],
],
topicList
:[],
topicList
:[],
currentPage
:
1
,
pages
:
1
,
pages
:
1
,
hotTopicList
:[],
hotTopicList
:[],
}
}
...
@@ -84,19 +86,20 @@ export default {
...
@@ -84,19 +86,20 @@ export default {
});
});
this
.
dataGetHotTopic
();
this
.
dataGetHotTopic
();
},
},
computed
:
{
computed
:
{
labelTitle
:
function
()
{
labelTitle
:
function
()
{
return
this
.
$route
.
query
.
type
+
'话题'
return
this
.
$route
.
query
.
type
+
'话题'
}
}
},
},
mounted
(){
watch
:
{
$route
:
function
(
val
)
{
this
.
restartPagination
();
}
},
},
methods
:{
methods
:{
// 最新的话题列表
dataGetTopicList
(
currentPage
){
dataGetTopicList
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
list
,{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
list
,{
params
:{
params
:{
page
:
currentPage
,
page
:
currentPage
,
...
@@ -108,6 +111,45 @@ export default {
...
@@ -108,6 +111,45 @@ export default {
})
})
},
},
// 推荐话题
dataGetRecommendTopicList
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
hotSearch
,{
params
:{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
topicList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
},
// 关注的话题
dataGetFollowedTopicList
(
currentPage
)
{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
myfollowedList
,{
params
:{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
topicList
=
response
.
data
.
records
;
this
.
topicList
.
forEach
(
item
=>
{
item
.
followedTopic
=
item
.
userId
!==
this
.
$store
.
state
.
userProfile
.
userId
;
});
this
.
pages
=
response
.
data
.
pages
;
})
},
// 热门话题
dataGetHotTopicList
(
currentPage
)
{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
hotList
,{
params
:{
page
:
currentPage
,
size
:
10
}
}).
then
((
response
)
=>
{
this
.
topicList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
},
dataGetHotTopic
(){
dataGetHotTopic
(){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
hotSearch
,{
this
.
$axios
.
$get
(
config
.
api
.
get
.
Topic
.
hotSearch
,{
...
@@ -119,9 +161,22 @@ export default {
...
@@ -119,9 +161,22 @@ export default {
this
.
hotTopicList
=
response
.
data
.
dataList
;
this
.
hotTopicList
=
response
.
data
.
dataList
;
})
})
},
},
restartPagination
(){
if
(
process
.
browser
){
this
.
$refs
.
pagination
.
setCurrentPage
(
1
)
}
},
changePage
(
currentPage
){
changePage
(
currentPage
){
//返回页数 请求新的数据
//返回页数 请求新的数据
this
.
dataGetTopicList
(
currentPage
);
if
(
this
.
$route
.
query
.
type
===
'最新'
)
{
this
.
dataGetTopicList
(
currentPage
);
}
else
if
(
this
.
$route
.
query
.
type
===
'热门'
)
{
this
.
dataGetHotTopicList
(
currentPage
);
}
else
if
(
this
.
$route
.
query
.
type
===
'关注'
)
{
this
.
dataGetFollowedTopicList
(
currentPage
);
}
else
if
(
this
.
$route
.
query
.
type
===
'推荐'
)
{
this
.
dataGetRecommendTopicList
(
currentPage
);
}
}
}
},
},
}
}
...
...
pages/users/register.vue
View file @
11c35213
...
@@ -195,10 +195,14 @@ export default {
...
@@ -195,10 +195,14 @@ export default {
// 注册成功
// 注册成功
if
(
registerResponse
!==
undefined
&&
registerResponse
.
code
===
0
)
{
if
(
registerResponse
!==
undefined
&&
registerResponse
.
code
===
0
)
{
this
.
success
=
true
;
if
(
this
.
isEmail
)
{
setTimeout
(()
=>
{
this
.
success
=
true
;
setTimeout
(()
=>
{
this
.
$router
.
push
(
'/users/login'
);
},
2500
)
}
else
{
this
.
$router
.
push
(
'/users/login'
);
this
.
$router
.
push
(
'/users/login'
);
}
,
2500
)
}
}
else
if
(
registerResponse
!==
undefined
)
{
}
else
if
(
registerResponse
!==
undefined
)
{
this
.
errMessage
=
registerResponse
.
msg
;
this
.
errMessage
=
registerResponse
.
msg
;
// 注册失败
// 注册失败
...
...
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