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
c2ed937e
Commit
c2ed937e
authored
Feb 20, 2020
by
yanju
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-issue#4' into 'master'
fix-issue#4 See merge request pigbigbig/beyond-clouds-front!88
parents
52e6a1f4
b8554fac
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
12 deletions
+47
-12
components/pc/answerCard.vue
+9
-1
components/pc/hotSearchTopicCard.vue
+8
-2
components/pc/projectCard.vue
+15
-3
components/pc/topicCard.vue
+5
-2
pages/index.vue
+10
-4
No files found.
components/pc/answerCard.vue
View file @
c2ed937e
<
template
>
<
template
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<transition
name=
"fade-transform"
mode=
"out-in"
>
<div
class=
"answer-card__wrap"
v-if=
"showCard"
>
<div
class=
"answer-card__wrap"
v-if=
"showCard"
>
<div
class=
"answer-card"
@
click=
"
$router.push('/answer/detail/'+
questionId)"
>
<div
class=
"answer-card"
@
click=
"
changeRoute(
questionId)"
>
<div
class=
"answer-card__left"
v-if=
"!solved"
>
<div
class=
"answer-card__left"
v-if=
"!solved"
>
<div>
<div>
<p>
{{
replyNumber
}}
</p>
<p>
{{
replyNumber
}}
</p>
...
@@ -146,6 +146,14 @@
...
@@ -146,6 +146,14 @@
})
})
},
},
changeRoute
(
r
){
let
routeUrl
=
this
.
$router
.
resolve
({
path
:
"/answer/detail/"
+
r
});
window
.
open
(
routeUrl
.
href
,
'_blank'
)
}
}
}
}
}
</
script
>
</
script
>
...
...
components/pc/hotSearchTopicCard.vue
View file @
c2ed937e
<
template
>
<
template
>
<card-container
width=
"302px"
title=
"话题热搜榜"
label=
"实时更新"
more=
"更多"
@
listenCardConMore=
"$router.push('/topic/rank')"
>
<card-container
width=
"302px"
title=
"话题热搜榜"
label=
"实时更新"
more=
"更多"
@
listenCardConMore=
"$router.push('/topic/rank')"
>
<
nuxt-link
tag=
"div"
:to=
"'/topic/detail/'+val.topicName"
class=
"topic-content__c"
v-for=
"(val,index) in topicList"
:key=
"val.topicId"
>
<
div
@
click=
"changeRoute2('/topic/detail/'+val.topicName)"
class=
"topic-content__c"
v-for=
"(val,index) in topicList"
:key=
"val.topicId"
>
<p>
#
{{
val
.
topicName
}}
#
</p>
<p>
#
{{
val
.
topicName
}}
#
</p>
<h6>
{{
val
.
degree
}}
℉
</h6>
<h6>
{{
val
.
degree
}}
℉
</h6>
</
nuxt-link
>
</
div
>
</card-container>
</card-container>
</
template
>
</
template
>
...
@@ -34,6 +34,12 @@
...
@@ -34,6 +34,12 @@
this
.
topicList
=
response
.
data
.
dataList
;
this
.
topicList
=
response
.
data
.
dataList
;
});
});
},
},
changeRoute2
(
r
){
let
routeUrl
=
this
.
$router
.
resolve
({
path
:
r
});
window
.
open
(
routeUrl
.
href
,
'_blank'
)
},
},
},
}
}
...
...
components/pc/projectCard.vue
View file @
c2ed937e
...
@@ -251,15 +251,27 @@
...
@@ -251,15 +251,27 @@
changeRoute
(
r
){
changeRoute
(
r
){
if
(
this
.
cardType
===
1
){
if
(
this
.
cardType
===
1
){
this
.
$router
.
push
(
'/project/detail/'
+
r
);
let
routeUrl
=
this
.
$router
.
resolve
({
path
:
"/project/detail/"
+
r
});
window
.
open
(
routeUrl
.
href
,
'_blank'
)
}
}
if
(
this
.
cardType
===
2
){
if
(
this
.
cardType
===
2
){
this
.
$router
.
push
(
'/blog/detail/'
+
r
);
let
routeUrl
=
this
.
$router
.
resolve
({
path
:
"/blog/detail/"
+
r
});
window
.
open
(
routeUrl
.
href
,
'_blank'
)
}
}
if
(
this
.
cardType
===
3
){
if
(
this
.
cardType
===
3
){
this
.
$router
.
push
(
'/news/detail/'
+
r
);
let
routeUrl
=
this
.
$router
.
resolve
({
path
:
"/news/detail/"
+
r
});
window
.
open
(
routeUrl
.
href
,
'_blank'
)
}
}
}
}
...
...
components/pc/topicCard.vue
View file @
c2ed937e
<
template
>
<
template
>
<div
class=
"topic-card__wrap"
v-if=
"cardId"
>
<div
class=
"topic-card__wrap"
v-if=
"cardId"
>
<div
class=
"topic-card"
@
click=
"activeRouteFunc?changeRoute(
'/topic/detail/'+
cardName):null"
>
<div
class=
"topic-card"
@
click=
"activeRouteFunc?changeRoute(cardName):null"
>
<div
class=
"topic-card-left"
>
<div
class=
"topic-card-left"
>
<div
class=
"square1"
v-if=
"!topicIcon"
></div>
<div
class=
"square1"
v-if=
"!topicIcon"
></div>
<div
class=
"square2"
v-if=
"!topicIcon"
></div>
<div
class=
"square2"
v-if=
"!topicIcon"
></div>
...
@@ -121,7 +121,10 @@
...
@@ -121,7 +121,10 @@
}
}
},
},
changeRoute
(
r
){
changeRoute
(
r
){
this
.
$router
.
push
(
r
);
let
routeUrl
=
this
.
$router
.
resolve
({
path
:
"/topic/detail/"
+
r
});
window
.
open
(
routeUrl
.
href
,
'_blank'
)
},
},
dataPostFollowTopic
(){
dataPostFollowTopic
(){
...
...
pages/index.vue
View file @
c2ed937e
...
@@ -11,10 +11,10 @@
...
@@ -11,10 +11,10 @@
</div>
</div>
<div
class=
"home-container__r"
>
<div
class=
"home-container__r"
>
<card-container
style=
"margin-top: 40px"
title=
"最新资讯"
more=
"更多"
@
listenCardConMore=
"changeRoute('/news')"
>
<card-container
style=
"margin-top: 40px"
title=
"最新资讯"
more=
"更多"
@
listenCardConMore=
"changeRoute('/news')"
>
<
nuxt-link
tag=
"div"
:to=
"'/news/detail/'+val.contentId"
class=
"information-wrap"
v-for=
"(val,index) in newsList"
:key=
"val.contentId"
>
<
div
@
click
.
stop=
"changeRoute2('/news/detail/'+val.contentId)"
class=
"information-wrap"
v-for=
"(val,index) in newsList"
:key=
"val.contentId"
>
<p
class=
"information-time"
>
{{
dateConvert
(
val
.
createTime
)
}}
</p>
<p
class=
"information-time"
>
{{
dateConvert
(
val
.
createTime
)
}}
</p>
<p
class=
"information-content"
>
{{
val
.
title
}}
</p>
<p
class=
"information-content"
>
{{
val
.
title
}}
</p>
</
nuxt-link
>
</
div
>
</card-container>
</card-container>
<hot-topic-list
style=
"margin-top: 16px"
></hot-topic-list>
<hot-topic-list
style=
"margin-top: 16px"
></hot-topic-list>
<card-container
style=
"margin-top: 16px;padding-bottom:15px"
title=
"社区精英"
>
<card-container
style=
"margin-top: 16px;padding-bottom:15px"
title=
"社区精英"
>
...
@@ -22,10 +22,10 @@
...
@@ -22,10 +22,10 @@
</card-container>
</card-container>
<card-container
style=
"margin-top: 16px"
title=
"热门问答"
more=
"更多"
@
listenCardConMore=
"changeRoute('/answer?type=all')"
>
<card-container
style=
"margin-top: 16px"
title=
"热门问答"
more=
"更多"
@
listenCardConMore=
"changeRoute('/answer?type=all')"
>
<
nuxt-link
tag=
"div"
:to=
"'/answer/detail/'+val.questionId"
class=
"topic-content__c"
v-for=
"(val,index) in answerList"
:key=
"val.questionId"
>
<
div
@
click=
"changeRoute2('/answer/detail/'+val.questionId)"
class=
"topic-content__c"
v-for=
"(val,index) in answerList"
:key=
"val.questionId"
>
<p>
{{
val
.
questionTitle
}}
</p>
<p>
{{
val
.
questionTitle
}}
</p>
<h6>
{{
val
.
replyNumber
}}
</h6>
<h6>
{{
val
.
replyNumber
}}
</h6>
</
nuxt-link
>
</
div
>
</card-container>
</card-container>
</div>
</div>
...
@@ -87,6 +87,12 @@
...
@@ -87,6 +87,12 @@
changeRoute
(
r
){
changeRoute
(
r
){
return
this
.
$router
.
push
(
r
);
return
this
.
$router
.
push
(
r
);
},
},
changeRoute2
(
r
){
let
routeUrl
=
this
.
$router
.
resolve
({
path
:
r
});
window
.
open
(
routeUrl
.
href
,
'_blank'
)
},
dateConvert
(
time
)
{
dateConvert
(
time
)
{
return
dateConvert
(
time
);
return
dateConvert
(
time
);
},
},
...
...
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