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
caa436ab
Commit
caa436ab
authored
Feb 07, 2020
by
xuebiao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
8.6
parent
53a203aa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
25 deletions
+56
-25
pages/blog/release/index.vue
+56
-25
No files found.
pages/blog/release/index.vue
View file @
caa436ab
...
...
@@ -5,7 +5,12 @@
title=
"已发布的博客"
width=
"302px"
height=
"400px"
></card-container>
>
<div
class=
"blog-release_List"
v-for=
"val in blogList"
:key=
"val.blogId"
:info=
"val"
>
<div
style=
"width: 60%"
><p
@
click=
"toDetail"
>
{{
val
.
blogTitle
}}
</p></div>
<p
@
click=
"toDetail"
style=
"color: #999999"
>
{{
val
.
category
}}
</p>
</div>
</card-container>
<card-container
title=
"博客草稿箱"
width=
"302px"
...
...
@@ -28,20 +33,20 @@
<div
class=
"header-content"
>
<div
class=
"select__wrap"
>
<span>
*
</span>
<select-card
selectType=
"2"
:class-list=
"classList"
placeholder=
"请选择文章分类"
></select-card>
<select-card
selectType=
"2"
:class-list=
"classList"
placeholder=
"请选择文章分类"
></select-card>
</div>
<input
type=
"text"
placeholder=
"原文链接"
style=
"width: 461px;"
>
<input
type=
"text"
placeholder=
"原文链接"
style=
"width: 461px;"
v-model=
"originLink"
>
</div>
<div
class=
"header-content"
>
<span>
*
</span>
<input
type=
"text"
placeholder=
"请用一句话介绍该文章"
>
<input
type=
"text"
placeholder=
"请用一句话介绍该文章"
v-model=
"blogAbstract"
>
</div>
</div>
<div
class=
"blog-release__content"
>
<span>
*
</span>
<div
class=
"editor-container"
>
<mavon-editor
v-model=
"
value
"
v-model=
"
blogContent
"
:toolbars=
"markdownOption"
class=
"editor"
placeholder=
"问题详情...."
...
...
@@ -65,33 +70,33 @@
<div
class=
"input-box__wrap"
>
<span>
*
</span>
<div
class=
"input-box"
>
<input
type=
"radio"
id=
"公开"
value=
"
公开
"
v-model=
"way"
name=
"way"
>
<input
type=
"radio"
id=
"公开"
value=
"
1
"
v-model=
"way"
name=
"way"
>
<label
for=
"公开"
>
公开
</label>
</div>
<div
class=
"input-box"
>
<input
type=
"radio"
id=
"私密"
value=
"
私密
"
v-model=
"way"
name=
"way"
>
<input
type=
"radio"
id=
"私密"
value=
"
0
"
v-model=
"way"
name=
"way"
>
<label
for=
"私密"
>
私密
</label>
</div>
</div>
<div
class=
"input-box__wrap"
>
<span>
*
</span>
<div
class=
"input-box"
>
<input
type=
"radio"
id=
"开启评论"
value=
"
开启评论"
v-model=
"c
omment"
name=
"comment"
>
<input
type=
"radio"
id=
"开启评论"
value=
"
true"
v-model=
"allowC
omment"
name=
"comment"
>
<label
for=
"开启评论"
>
开启评论
</label>
</div>
<div
class=
"input-box"
>
<input
type=
"radio"
id=
"禁止评论"
value=
"
禁止评论"
v-model=
"c
omment"
name=
"comment"
>
<input
type=
"radio"
id=
"禁止评论"
value=
"
false"
v-model=
"allowC
omment"
name=
"comment"
>
<label
for=
"禁止评论"
>
禁止评论
</label>
</div>
</div>
<div
class=
"input-box__wrap"
>
<span>
*
</span>
<div
class=
"input-box"
>
<input
type=
"radio"
id=
"可以转载"
value=
"
可以转载"
v-model=
"reprint
"
name=
"reprint"
>
<input
type=
"radio"
id=
"可以转载"
value=
"
true"
v-model=
"allowForward
"
name=
"reprint"
>
<label
for=
"可以转载"
>
可以转载
</label>
</div>
<div
class=
"input-box"
>
<input
type=
"radio"
id=
"禁止转载"
value=
"
禁止转载"
v-model=
"reprint
"
name=
"reprint"
>
<input
type=
"radio"
id=
"禁止转载"
value=
"
false"
v-model=
"allowForward
"
name=
"reprint"
>
<label
for=
"禁止转载"
>
禁止转载
</label>
</div>
</div>
...
...
@@ -99,12 +104,12 @@
<div
class=
"blog-release__footer"
>
<p
class=
"footer__left"
>
上传封面
<img
:src=
"imgSrc"
alt=
""
>
<input
type=
"file"
@
change=
"e=>changeToUploadCover(e)"
placeholder=
"上传项目封面图"
>
<input
type=
"file"
@
change=
"e=>changeToUploadCover(e)"
placeholder=
"上传项目封面图"
>
</p>
<div
class=
"footer__right"
>
<p>
已自动存为草稿
</p>
<button
class=
"preview"
@
click=
"readScreen"
>
预览
</button>
<button
class=
"submit"
v-on:click=
"post
b
log"
>
提交
</button>
<button
class=
"submit"
v-on:click=
"post
B
log"
>
提交
</button>
</div>
</div>
</div>
...
...
@@ -118,6 +123,16 @@ import CardContainer from "../../../components/pc/cardContainer";
import
SelectCard
from
"../../../components/pc/select/selectCard"
;
import
config
from
"../../../action/config"
;
export
default
{
async
asyncData
({
$axios
})
{
const
blogList
=
await
$axios
.
$get
(
config
.
api
.
get
.
Blog
.
myList
,{
params
:{
page
:
1
,
size
:
8
,
}
});
return
{
blogList
:
blogList
.
data
.
dataList
}
},
components
:
{
SelectCard
,
CardContainer
},
data
()
{
return
{
...
...
@@ -158,28 +173,31 @@ export default {
reprint
:
''
,
imgSrc
:
''
,
lastSaveTime
:
new
Date
(),
classList
:
[
'web'
,
'java'
,
'javascript'
]
classList
:
[
'web'
,
'java'
,
'javascript'
]
}
},
methods
:
{
postblog
(){
toDetail
(){
this
.
$router
.
push
(
'/detail'
)
},
postBlog
(){
this
.
$axios
.
$post
(
config
.
api
.
post
.
Blog
.
release
,{
allowComment
:
t
rue
,
allowForward
:
t
rue
,
blogAbstract
:
"是你啊点"
,
blogContent
:
"无"
,
allowComment
:
t
his
.
allowComment
,
//评论权限
allowForward
:
t
his
.
allowForward
,
//转载权限
blogAbstract
:
this
.
blogAbstract
,
blogContent
:
this
.
blogContent
,
blogTitle
:
this
.
blogTitle
,
categoryId
:
1
,
categoryId
:
1
,
//文章类型
content
:
"string"
,
cover
:
"string"
,
originLink
:
"string"
,
cover
:
"string"
,
//封面图
originLink
:
this
.
originLink
,
tagIds
:
[
"Java"
"Java"
//标签
],
topicIds
:
[
"Java"
"Java"
//话题
],
viewPrivileges
:
1
viewPrivileges
:
this
.
way
//1公开,0私有
}).
then
((
response
)
=>
{
//处理response
console
.
log
(
response
)
...
...
@@ -237,6 +255,19 @@ export default {
@extend
%flex-row-spb;
align-items
:
start
;
.blog-release-container__l
{
.blog-release_List{
@extend
%flex-row-spb;
margin-top
:
5px
;
padding-left
:
18
*$
length
;
padding-right
:
18
*$
length
;
font-size
:
13
*$
length
;
p{
overflow
:
hidden
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
}
}
}
.blog-release-container__r
{
.blog-release
{
...
...
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