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
c0eb0514
Commit
c0eb0514
authored
Feb 10, 2020
by
yanju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决合并冲突
parent
365af56e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
159 additions
and
0 deletions
+159
-0
pages/blog/index.vue
+159
-0
pages/blog/release/index.vue
+0
-0
No files found.
pages/blog/index.vue
0 → 100644
View file @
c0eb0514
<
template
>
<div
class=
"blog-container"
>
<div
class=
"blog-container__main"
>
<div
class=
"blog-container__left"
>
<nav-wrap
width=
"106px"
:list=
"list"
></nav-wrap>
</div>
<div
class=
"blog-container__center"
>
<card-container
width=
"816px"
height=
"1012px"
:title=
"labelTitle"
>
<blog-card
v-for=
"(val,index) in blogList"
:key=
"val.blogId"
:info=
"val"
></blog-card>
</card-container>
<div
class=
"pagination"
>
<pagination
style=
"margin: 0 auto;"
:pages=
"pages"
v-on:listenPageChange=
"changePage"
></pagination>
</div>
</div>
<div
class=
"blog-container__right"
>
<div
class=
"right__write-blog"
@
click=
"toRelease"
>
写文章
</div>
<card-container
title=
"热门博主"
label=
"换一换"
more=
"更多"
width=
"302px"
height=
"446px"
style=
"margin-top: 16px"
></card-container>
<card-container
title=
"热门标签"
width=
"302px"
height=
"446px"
style=
"margin-top: 16px"
></card-container>
</div>
</div>
</div>
</
template
>
<
script
>
import
NavWrap
from
"../../components/pc/nav/navWrap"
;
import
CardContainer
from
"../../components/pc/cardContainer"
;
import
Pagination
from
"../../components/pc/pagination"
;
import
config
from
'../../action/config'
;
import
BlogCard
from
"../../components/pc/projectCard"
;
export
default
{
components
:
{
Pagination
,
CardContainer
,
NavWrap
,
BlogCard
},
data
(){
return
{
blogList
:[],
currentPage
:
1
,
pages
:
1
,
list
:
[
{
label
:
'全部类型'
,
address
:
'/blog'
,
id
:
'全部类型'
},
{
label
:
'程序人生'
,
address
:
'/blog'
,
id
:
'程序人生'
},
{
label
:
'移动开发'
,
address
:
'/blog'
,
id
:
'移动开发'
},
{
label
:
'前端'
,
address
:
'/blog'
,
id
:
'前端'
},
{
label
:
'其他'
,
address
:
'/blog'
,
id
:
'其他'
}
]
}
},
created
()
{
this
.
$router
.
replace
({
path
:
'/blog'
,
query
:
{
id
:
'全部类型'
}
});
},
computed
:
{
labelTitle
:
function
()
{
return
this
.
$route
.
query
.
id
}
},
methods
:
{
dataGetBlogList
(
currentPage
){
this
.
$axios
.
$get
(
config
.
api
.
get
.
Blog
.
list
,{
params
:{
page
:
currentPage
,
size
:
7
,
}
}).
then
((
response
)
=>
{
this
.
blogList
=
response
.
data
.
dataList
;
this
.
pages
=
response
.
data
.
totalPage
;
})
},
toRelease
(){
this
.
$router
.
push
(
'/blog/release'
)
},
changePage
(
currentPage
){
//返回页数 请求新的数据
this
.
dataGetBlogList
(
currentPage
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.blog-container
{
>
.blog-container__main{
width
:
$
pageWidth
;
margin
:
0
auto
;
padding-top
:
16
*$
length
;
padding-bottom
:
32
*$
length
;
@extend
%flex-row-spb;
align-items
:
start
;
.blog-container__left{
}
.blog-container__center
{
.pagination{
margin
:
32
*$
length
;
}
}
.blog-container__right
{
.right__write-blog{
width
:
302
*$
length
;
background-color
:
#fff
;
@include
fontStyle(14,56,500,#00AAE6,center);
@include
border-radius(4*$length);
@extend
%animate-transition;
@extend
%cursorPointer;
&:hover
{
color
:
#fff
;
background-color
:
#00AAE6
;
}
}
}
}
}
</
style
>
pages/blog/release/index.vue
deleted
100644 → 0
View file @
365af56e
This diff is collapsed.
Click to expand it.
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