Commit 89a4cdd0 by yanju

Merge branch 'xue' into 'master'

7.5and8.5

See merge request pigbigbig/beyond-clouds-front!23
parents 280c9ea6 77a572c0
......@@ -19,6 +19,7 @@
"js-cookie": "^2.2.1",
"koa": "^2.6.2",
"mavon-editor": "^2.7.7",
"node-sass": "^4.13.1",
"nuxt": "^2.0.0",
"vue-cropper": "^0.4.9"
},
......
......@@ -13,10 +13,9 @@
height="1012px"
:title="labelTitle"
>
<project-card></project-card>
<project-card></project-card>
<project-card></project-card>
<project-card></project-card>
<project-card v-for="(val,index) in blogList" :info="val"></project-card>
</card-container>
<div class="pagination">
<pagination style="margin: 0 auto;" pages="13" v-on:listenPageChange="changePage"></pagination>
......@@ -48,7 +47,20 @@ import NavWrap from "../../components/pc/nav/navWrap";
import CardContainer from "../../components/pc/cardContainer";
import ProjectCard from "../../components/pc/projectCard";
import Pagination from "../../components/pc/pagination";
import config from '../../action/config';
export default {
async asyncData ({ $axios }) {
const blogList = await $axios.$get(config.api.get.Blog.list,{
params:{
page:1,
size:6,
}
});
return {blogList:blogList.data.dataList}
},
components: {Pagination, ProjectCard, CardContainer, NavWrap},
data(){
return{
......@@ -95,6 +107,7 @@ export default {
}
},
methods: {
toRelease(){
this.$router.push('/blog/release')
},
......
......@@ -23,14 +23,14 @@
<div class="blog-release__header">
<div class="header-content">
<span>*</span>
<input type="text" placeholder="请输入文章标题">
<input type="text" placeholder="请输入文章标题" v-model="blogTitle">
</div>
<div class="header-content">
<div class="select__wrap">
<span>*</span>
<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;" >
</div>
<div class="header-content">
<span>*</span>
......@@ -104,8 +104,8 @@
<div class="footer__right">
<p>已自动存为草稿</p>
<button class="preview" @click="readScreen">预览</button>
<button class="submit">提交</button>
</div>
<button class="submit" v-on:click="postblog">提交</button>
</div>
</div>
</div>
</card-container>
......@@ -116,11 +116,12 @@
<script>
import CardContainer from "../../../components/pc/cardContainer";
import SelectCard from "../../../components/pc/select/selectCard";
import config from "../../../action/config";
export default {
components: {SelectCard, CardContainer},
data() {
return {
markdownOption: {
bold: true, // 粗体
italic: true, // 斜体
......@@ -161,6 +162,30 @@ export default {
}
},
methods: {
postblog(){
this.$axios.$post(config.api.post.Blog.release,{
allowComment: true,
allowForward: true,
blogAbstract: "是你啊点",
blogContent: "无",
blogTitle: this.blogTitle,
categoryId: 1,
content: "string",
cover: "string",
originLink: "string",
tagIds: [
"Java"
],
topicIds: [
"Java"
],
viewPrivileges: 1
}).then((response)=>{
//处理response
console.log(response)
})
},
imgAdd(pos, file) {
//添加图片,pos为位置
// 第一步.将图片上传到服务器.
......
......@@ -13,10 +13,10 @@
height="1012px"
:title="labelTitle"
>
<project-card></project-card>
<project-card></project-card>
<project-card></project-card>
<project-card></project-card>
<project-card v-for="(val,index) in projectList" :info="val"></project-card>
</card-container>
<div class="pagination">
<pagination style="margin: 0 auto;" pages="13" v-on:listenPageChange="changePage"></pagination>
......@@ -50,10 +50,24 @@ import NavWrap from "../../components/pc/nav/navWrap";
import CardContainer from "../../components/pc/cardContainer";
import ProjectCard from "../../components/pc/projectCard";
import Pagination from "../../components/pc/pagination";
import config from '../../action/config';
export default {
async asyncData ({ $axios }) {
const projectList = await $axios.$get(config.api.get.Project.list,{
params:{
page:1,
size:6,
}
});
return {projectList:projectList.data.dataList}
},
components: {Pagination, ProjectCard, CardContainer, NavWrap},
data(){
return{
list: [
......@@ -139,6 +153,7 @@ export default {
}
},
methods: {
toRelease(){
this.$router.push('/project/release')
},
......
......@@ -6395,10 +6395,10 @@ node-res@^5.0.1:
on-finished "^2.3.0"
vary "^1.1.2"
node-sass@^4.13.0:
version "4.13.0"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.13.0.tgz#b647288babdd6a1cb726de4545516b31f90da066"
integrity sha512-W1XBrvoJ1dy7VsvTAS5q1V45lREbTlZQqFbiHb3R3OTTCma0XBtuG6xZ6Z4506nR4lmHPTqVRwxT6KgtWC97CA==
node-sass@^4.13.1:
version "4.13.1"
resolved "https://registry.npm.taobao.org/node-sass/download/node-sass-4.13.1.tgz#9db5689696bb2eec2c32b98bfea4c7a2e992d0a3"
integrity sha1-nbVolpa7LuwsMrmL/qTHoumS0KM=
dependencies:
async-foreach "^0.1.3"
chalk "^1.1.1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment