删除一些代码,开发博客模块

This commit is contained in:
zxm 2018-07-08 22:43:59 +08:00
parent c587148fe3
commit 56fad01d09
19 changed files with 535 additions and 383 deletions

View File

@ -10,7 +10,15 @@ module.exports = {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
proxyTable: {
'/api': {
target: 'http://localhost:8081',
changeOrigin: true,
pathRewrite: {
'^/api' : ''
}
}
},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST

View File

@ -587,6 +587,15 @@
"integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==",
"dev": true
},
"axios": {
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "1.5.0",
"is-buffer": "1.1.6"
}
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
@ -4887,7 +4896,6 @@
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.0.tgz",
"integrity": "sha512-fdrt472/9qQ6Kgjvb935ig6vJCuofpBUD14f9Vb+SLlm7xIe4Qva5gey8EKtv8lp7ahE1wilg3xL1znpVGtZIA==",
"dev": true,
"requires": {
"debug": "3.1.0"
},
@ -4896,7 +4904,6 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
@ -6531,8 +6538,7 @@
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
"dev": true
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-builtin-module": {
"version": "1.0.0",
@ -8743,8 +8749,7 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"multicast-dns": {
"version": "6.2.3",

View File

@ -14,6 +14,7 @@
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.18.0",
"iview": "^2.14.3",
"vue": "^2.5.2",
"vue-router": "^3.0.1"

View File

@ -11,29 +11,9 @@
<!--<Header width="auto" style="height: 5px">
</Header>-->
<blogHead></blogHead>
<Row class-name="title-row">
<Col :xs="20" :sm="4" :lg="10">
<Icon type="ios-flame" size="50" />
</Col>
<Col :xs="16" :sm="16" :lg="14">
<Menu mode="horizontal" :theme="theme1" active-name="1">
<MenuItem name="1">
<Icon type="ios-paper"></Icon>
java
</MenuItem>
<MenuItem name="2">
<Icon type="ios-people"></Icon>
架构
</MenuItem>
<MenuItem name="3">
<Icon type="ios-people"></Icon>
其他
</MenuItem>
</Menu>
</Col>
</Row>
<div class="cont">
<div class="content clearfix">
<div class="left">
@ -41,7 +21,9 @@
<li class="one">
<Card style="height: 200px">
<div @click="detail">
<h3>lenos快速开发脚手架</h3>
</div>
<p class="time">作者<span>zxm</span> 2017-10-31 10:05:47</p>
<p class="cot">lenos快速开发脚手架</p>
<div class="pic">
@ -53,7 +35,9 @@
<li class="one">
<Card style="height: 200px">
<div @click="detail">
<h3>lenos快速开发脚手架</h3>
</div>
<p class="time">作者<span>zxm</span> 2017-10-31 10:05:47</p>
<p class="cot">lenos快速开发脚手架</p>
<div class="pic">
@ -64,7 +48,9 @@
<li class="one">
<Card style="height: 200px">
<div @click="detail">
<h3>lenos快速开发脚手架</h3>
</div>
<p class="time">作者<span>zxm</span> 2017-10-31 10:05:47</p>
<p class="cot">lenos快速开发脚手架</p>
<div class="pic">
@ -76,58 +62,11 @@
</ul>
<Page :total="40" size="small" show-total></Page>
</div>
<div class="c-right">
<ul>
<li>
<Tabs value="name1">
<TabPane label="标签一" name="name1">
<Tag checkable color="blue">java</Tag>
<Tag checkable color="green">spring</Tag>
<Tag checkable color="red">vue</Tag>
<Tag checkable color="yellow">batis</Tag>
<Tag checkable color="blue">标签一</Tag>
<Tag checkable color="green">标签二</Tag>
<Tag checkable color="red">标签三</Tag>
<Tag checkable color="yellow">标签四</Tag>
<Tag checkable color="blue">标签一</Tag>
<Tag checkable color="green">标签二</Tag>
<Tag checkable color="red">标签三</Tag>
<Tag checkable color="yellow">标签四</Tag>
</TabPane>
<TabPane label="标签二" name="name2">标签二的内容</TabPane>
<TabPane label="标签三" name="name3">标签三的内容</TabPane>
</Tabs>
</li>
<li class="two">
<Tabs value="name1">
<TabPane label="最新" name="name1">
<Carousel v-model="value1" loop>
<CarouselItem>
<div class="demo-carousel">1</div>
</CarouselItem>
<CarouselItem>
<div class="demo-carousel">2</div>
</CarouselItem>
<CarouselItem>
<div class="demo-carousel">3</div>
</CarouselItem>
<CarouselItem>
<div class="demo-carousel">4</div>
</CarouselItem>
</Carousel>
</TabPane>
</Tabs>
<blogRight></blogRight>
<Button @click="start">Start</Button>
<Button @click="finish">Finish</Button>
<Button @click="error">Error</Button>
</li>
<li class="two"></li>
</ul>
</div>
</div>
</div>
<Footer style="height: 10px;border:1px solid red; color: white" width="auto"></Footer>
<blog-bottom></blog-bottom>
</Layout>
<BackTop></BackTop>
</div>
@ -136,9 +75,16 @@
<script>
import titleItem from "../components/item/titleItem"
export default {
import blogHead from "../components/header/head"
import blogRight from "../components/right/right"
import blogBottom from "../components/bottom/bottom"
export default {
components: {
titleItem
titleItem,
blogHead,
blogRight,
blogBottom
},
name: 'HelloWorld',
data (){
@ -154,7 +100,7 @@ export default {
name:'标题2'
}
],
value1:0
value1:0,
}
},
created:function(){
@ -171,10 +117,13 @@ export default {
},
methods:{
detail(){
this.$router.push('/home/11111')
},
test:function(){
this.msg='zxm111'
},
//
// `
//
name:function(){
// return 'zxm'//.split('').reverse().join('');
@ -205,10 +154,6 @@ export default {
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.title-row{
background: white;
border-bottom: 0px solid red;
}
#HelloWorld{
background: #ebebeb;
}
@ -218,18 +163,11 @@ export default {
.col{
border:1px solid black;
}
.demo-carousel {
height: 200px;
line-height: 200px;
text-align: center;
color: #fff;
font-size: 20px;
background: #5fe1ff;
}
.cont {width:100%;height:auto;background: rgba(255, 255, 255, 0.12);}
.cont .left{width:62%;height:auto;float:left;list-style: none;}
.cont .left ul li{width:100%;height:200px;background:#fff;margin-top:10px;border:0px solid red;}
.cont .left ul li{width:100%;height:200px;background:#fff;margin-top:10px;border:0px solid red;list-style: none;}
.cont .left ul li h3{font-size:20px;color:#f4645f;text-align:left;margin-left:30px;margin-top:30px;}
.cont .left ul li h3:hover{cursor:pointer;text-decoration: underline;}
.cont .left ul li p.time{text-align:left;margin-left:30px;margin-top:5px;font-size:12px;color:#333;}
@ -239,9 +177,9 @@ export default {
.cont .left ul li .pic{width:150px;height:150px;border:0px solid red;float:right;margin-top:-120px;margin-right:30px;}
.cont .left ul li .pic img{width:150px;height:auto;}
.cont .content{width:75%;height:auto;margin:30px auto;border:0px solid red;}
.cont .c-right{width:35%;height:auto;float:right;}
.cont .c-right ul li{width:100%;height:auto;min-height:200px;background:#fff;border:0px solid red;margin-top:10px;}
.clearfix:after{
/*.cont .c-right{width:35%;height:auto;float:right;}
.cont .c-right ul li{list-style: none;width:100%;height:auto;min-height:200px;background:#fff;border:0px solid red;margin-top:10px;}
*/ .clearfix:after{
content:"";
height:0;
line-height:0;
@ -252,11 +190,11 @@ export default {
.clearfix{
zoom:1;
}
@media screen and (max-width: 960px) {
.wrapper { width: 93.75%; /* 960px/1024px */ margin: 0 auto; }
/* @media screen and (max-width: 960px) {
.wrapper { width: 93.75%; !* 960px/1024px *! margin: 0 auto; }
.websiteDescription { margin-left: 0; }
}
/* for 768px or less */
!* for 768px or less *!
@media screen and (max-width: 768px) {
.mainContent { float: none; width: auto; }
.sidebar { margin: 0; }
@ -264,13 +202,13 @@ export default {
nav { float: none; }
nav li { display: block; list-style: none; padding: 1px; text-align: center; }
nav li a { display: block; }
}
}*/
/* for 480px or less */
@media screen and (max-width: 768px) {
h1#logo { float: none }
.cont {width:100%;height:auto;background:#ececec;}
.cont {width:100%;height:auto;background:rgba(255, 255, 255, 0.12);}
.cont .left{width:100%;height:auto;float:left;list-style: none;}
.cont .left ul li{width:100%;height:200px;background:#fff;border:1px solid red;}
.cont .left ul li{width:100%;height:200px;background:#fff;border:1px solid red;list-style: none;}
.cont .left ul li.two{margin-top:10px;}
.cont .left ul li h3{font-size:20px;color:#f4645f;text-align:left;margin-left:10px;margin-top:50px;}
.cont .left ul li h3:hover{cursor:pointer;text-decoration: underline;}
@ -281,12 +219,12 @@ export default {
.cont .left ul li .pic{width:110px;height:110px;border:0px solid red;float:right;margin-top:-100px;margin-right:10px;}
.cont .left ul li .pic img{width:110px;height:110px;}
.cont .content{width:100%;height:auto;margin:40px auto;border:1px solid red;}
.cont .c-right{width:100%;height:auto;float:right;}
.cont .c-right ul li{width:100%;height:300px;background:#fff;border:1px solid red;margin-top:10px;}
/*.cont .c-right{width:100%;height:auto;float:right;}
.cont .c-right ul li{width:100%;height:300px;background:#fff;border:1px solid red;margin-top:10px;}*/
/*.cont .c-right ul li.two{margin-top:10px;}*/
}
@media (min-width: 981px) {
.websiteDescription { margin-left: 400px }
/*.websiteDescription { margin-left: 400px }*/
.bloglist figure { float: left; width: 233px; margin-right: 20px; margin-bottom: 10px; }
.bloglist figure img { padding: 4px; border: #f4f2f2 1px solid; width: 225px; }
}

View File

@ -0,0 +1,19 @@
<template>
<div id="bottom">
<Footer style="height: 10px;background: black;color: white" width="auto">
<span>
Copyright © lenosp 博客 All Rights Reserved 豫ICP备18023092号
</span>
</Footer>
</div>
</template>
<script>
export default {
name: "bottom"
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,64 @@
<template>
<div id="head">
<Row class-name="title-row">
<Col :xs="24" :sm="4" :lg="10">
<Icon type="ios-flame" size="50" />
</Col>
<Col :xs="24" :sm="18" :lg="14">
<Menu mode="horizontal" :theme="theme1" active-name="1">
<MenuItem name="1">
<div @click="toIndex">
<Icon type="ios-paper"></Icon>
java
</div>
</MenuItem>
<MenuItem name="2">
<Icon type="ios-people"></Icon>
架构
</MenuItem>
<MenuItem name="3">
<Icon type="ios-people"></Icon>
Linux
</MenuItem>
<MenuItem name="4">
<Icon type="ios-people"></Icon>
其他
</MenuItem>
</Menu>
</Col>
</Row>
</div>
</template>
<script>
export default {
name: "head",
data(){
return {
a:1
}
},
methods:{
toIndex(){
this.$router.push('/');
},
init(){
this.$http.get('api/blog/header').then(response => {
// console.log(response);
}, response => {
});
}
},
mounted(){
this.init()
}
}
</script>
<style scoped>
.title-row{
background: white;
border-bottom: 0px solid red;
}
</style>

View File

@ -1,29 +1,296 @@
<template>
<div id="home">
{{route}}
<button value="" @click="index()">主页</button>
<div id="home" class="layout">
<Layout>
<!--header begin-->
<blogHead></blogHead>
<!--header end-->
<!--context begin-->
<div class="cont">
<div class="content clearfix">
<div class="left">
<!--文章详细开发-->
<div class="title-article">
<h3>
lenos开源脚手架啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊阿啊啊啊啊啊阿啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊
</h3>
</div>
<p data-v-656039f0="" class="time">作者<span data-v-656039f0="">zxm</span> 2017-10-31 10:05:47</p>
<div class="text-context">
<ul>
<li>
<h3>1查看作者</h3>
<pre>
export default new Router({
routes: [
{
path: '/',
name: 'HelloWorld',
component: HelloWorld
},
{
path:'/home/:id',
component:Home,
children:[
{
path: 'person',
component: Person
}
]
}
]
})
</pre>
</li>
<li>
<h3>2根据教程发现弄不成根据教程发现弄不成根据教程发现弄不成根据教程发现弄不成</h3>
<pre>
routes: [
{
path: '/',
name: 'HelloWorld',
component: HelloWorld
}
</pre>
</li>
<li>
<h3>3打死作者</h3>
<pre>
path:'/home/:id',
component:Home,
children:[
{
path: 'person',
component: Person
</pre>
</li>
<li class="link">
<p>
<span>上一篇</span><a href="#">作者是怎么炼成的</a>
</p>
<p>
<span>下一篇</span><a href="#">作者是怎么成仙的</a>
</p>
</li>
</ul>
</div>
<!--评论-->
<div class="comment">
<h5>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最新评论</h5>
<div class="com clearfix">
<div class="pic"></div>
<div class="tit">
<ul>
<li>作者你好:谢谢作者</li>
<li>时间2018-05-26 <a>回复</a></li>
</ul>
</div>
</div>
<div class="answer">
<textarea placeholder="这是帮助文字">
</textarea>
<input type="submit" value="提交评论"/>
</div>
</div>
<!--评论-->
</div>
<!--right begin-->
<blogRight>
</blogRight>
<!--right begin-->
</div>
</div>
<!--context end-->
<!--bottom begin-->
<blog-bottom></blog-bottom>
<!--bottom end-->
</Layout>
</div>
</template>
<script>
export default {
name: "home",
data(){
return{}
},
computed:{
route:function(){
return this.$route.params.id
}
},
methods:{
index:function () {
this.$router.push('/');
}
import blogHead from "../components/header/head"
import blogRight from "../components/right/right"
import blogBottom from "../components/bottom/bottom"
export default {
components: {
blogHead,
blogRight,
blogBottom
},
name: "home",
data() {
return {}
},
computed: {
route: function () {
return this.$route.params.id
}
},
methods: {
index: function () {
this.$router.push('/');
}
}
}
</script>
<style scoped>
.cont {width:100%;height:auto;background: rgba(255, 255, 255, 0.12);}
.cont .content{width:75%;height:auto;margin:30px auto;border:0px solid red;}
.cont .content .left{width: 62%;height: auto;float: left;list-style: none;border:0px solid red;margin-top:10px;background:#fff;}
.cont .content .left h3{font-size:28px;color:#333;font-weight:normal;margin-top:20px;}
.cont .left p.time{font-size: 14px;color: #999;}
.cont .left p.time span{color:#f4645f;}
.cont .left p.time span:hover{text-decoration: underline;cursor:pointer;}
.cont .content .left ul{margin-top:20px;list-style:none;}
.cont .content .left ul li{width:90%;margin:0 auto;height:auto;border:0px solid red;}
.cont .content .left ul li h3{font-size:24px;color:#333;text-align:left;}
.cont .content .left ul li pre{display: block;padding:20px;margin-top:10px;font-size: 16px;line-height: 1.42857143;color: #666;word-break: break-all;word-wrap: break-word;background: rgba(255, 255, 255, 0.12);border: 1px solid #ccc;border-radius: 4px;text-align:left;}
.cont .content .left ul li.link{font-size:14px;text-align:left;margin-top:20px;}
.cont .content .left ul li.link p{margin-top:10px;}
.cont .content .left ul li.link a:hover{text-decoration: underline;}
.cont .content .left .comment h5{height:50px;border-bottom:1px solid #f4645f;line-height:65px;text-align:left;font-size:16px;font-weight:normal;color:#f4645f;}
.cont .content .left .comment .com{width:90%;height:auto;border:0px solid red;margin:0px auto;margin-top:15px;}
.cont .content .left .comment .com .pic{width:60px;height:60px;float:left;background:#ececec;}
.cont .content .left .comment .com .tit ul{margin-top:0;}
.cont .content .left .comment .com .tit ul li{float:right;width:85%;font-size:14px;color:#333;text-align:left;margin-top:5px;}
.cont .content .left .comment .com .tit ul li a{color:#f4645f;text-decoration: underline;}
.cont .content .left .comment .answer{width:90%;height:auto;border:0px solid red;margin:0 auto;}
.cont .content .left .comment .answer textarea{width:100%;height:auto;padding:10px;margin-top:10px;color:#999;font-size:14px;border:1px solid #f4645f;outline:none;}
.cont .content .left .comment .answer input{width:80px;height:40px;background:#f4645f;font-size:14px;color:#fff;float:right;
outline: none;border:none;cursor:pointer;}
.title-article{
width: 95%;
font-size: 24px;
word-break: break-all;
margin:0 auto;
}
.clearfix:after{
content:"";
height:0;
line-height:0;
display:block;
clear:both;
visibility:hidden;
}
.clearfix{
zoom:1;
}
@media screen and (max-width: 768px) {
.cont {
width: 100%;
height: auto;
background: rgba(255, 255, 255, 0.12);
}
.cont .content {
width: 100%;
height: auto;
margin: 30px auto;
border: 0px solid red;
}
.cont .content .left {
width: 100%;
height: auto;
float: left;
list-style: none;
border: 0px solid red;
margin-top: 10px;
background: #fff;
}
.cont .content .left h3 {
font-size: 28px;
color: #333;
font-weight: normal;
margin-top: 20px;
}
.cont .left p.time {
font-size: 14px;
color: #999;
}
.cont .left p.time span {
color: #f4645f;
}
.cont .left p.time span:hover {
text-decoration: underline;
cursor: pointer;
}
.cont .content .left ul {
margin-top: 20px;
list-style: none;
}
.cont .content .left ul li {
width: 90%;
margin: 0 auto;
height: auto;
border: 0px solid red;
}
.cont .content .left ul li h3 {
font-size: 24px;
color: #333;
text-align: left;
}
.cont .content .left ul li pre {
display: block;
padding: 20px;
margin-top: 10px;
font-size: 16px;
line-height: 1.42857143;
color: #666;
word-break: break-all;
word-wrap: break-word;
background: rgba(255, 255, 255, 0.12);
border: 1px solid #ccc;
border-radius: 4px;
text-align: left;
}
.cont .content .left ul li.link{font-size:14px;text-align:left;margin-top:20px;}
.cont .content .left ul li.link p{margin-top:10px;}
.cont .content .left ul li.link a:hover{text-decoration: underline;}
.cont .content .left .comment h5{height:50px;border-bottom:1px solid #f4645f;line-height:65px;text-align:left;font-size:16px;font-weight:normal;color:#f4645f;}
.cont .content .left .comment .com{width:90%;height:auto;border:0px solid red;margin:0px auto;margin-top:15px;}
.cont .content .left .comment .com .pic{width:60px;height:60px;float:left;background:#ececec;}
.cont .content .left .comment .com .tit ul{margin-top:0;}
.cont .content .left .comment .com .tit ul li{float:right;width:80%;font-size:14px;color:#333;text-align:left;margin-top:5px;}
.cont .content .left .comment .com .tit ul li a{color:#f4645f;text-decoration: underline;}
.cont .content .left .comment .answer{width:90%;height:auto;border:0px solid red;margin:0 auto;}
.cont .content .left .comment .answer textarea{width:100%;height:auto;padding:10px;margin-top:10px;color:#999;font-size:14px;border:1px solid #f4645f;outline:none;}
.cont .content .left .comment .answer input{width:80px;height:40px;background:#f4645f;font-size:14px;color:#fff;float:right;
outline: none;border:none;cursor:pointer;}
}
</style>

View File

@ -0,0 +1,86 @@
<template>
<div id="right">
<div class="c-right">
<ul>
<li>
<Tabs value="name1">
<TabPane label="标签" name="name1">
<Tag checkable color="blue">java</Tag>
<Tag checkable color="green">spring</Tag>
<Tag checkable color="red">vue</Tag>
<Tag checkable color="yellow">batis</Tag>
<Tag checkable color="blue">标签一</Tag>
<Tag checkable color="green">标签二</Tag>
<Tag checkable color="red">标签三</Tag>
<Tag checkable color="yellow">标签四</Tag>
<Tag checkable color="blue">标签一</Tag>
<Tag checkable color="green">标签二</Tag>
<Tag checkable color="red">标签三</Tag>
<Tag checkable color="yellow">标签四</Tag>
</TabPane>
<TabPane label="阅读排行" name="name2">标签二的内容</TabPane>
<TabPane label="标签三" name="name3">标签三的内容</TabPane>
</Tabs>
</li>
<li class="two">
<Tabs value="name1">
<TabPane label="推荐" name="name1">
<Carousel autoplay
autoplay-speed="4000"
v-model="value1" loop>
<CarouselItem>
<div class="demo-carousel">1</div>
</CarouselItem>
<CarouselItem>
<div class="demo-carousel">2</div>
</CarouselItem>
<CarouselItem>
<div class="demo-carousel">3</div>
</CarouselItem>
<CarouselItem>
<div class="demo-carousel">4</div>
</CarouselItem>
</Carousel>
<Button @click="start">Start</Button>
<Button @click="finish">Finish</Button>
<Button @click="error">Error</Button>
</TabPane>
</Tabs>
</li>
<li class="two">
<Tabs value="name1">
<TabPane label="关于我" name="name1">
</TabPane>
</Tabs>
</li>
</ul>
</div>
</div>
</template>
<script>
export default {
name: "right"
}
</script>
<style scoped>
.demo-carousel {
height: 200px;
line-height: 200px;
text-align: center;
color: #fff;
font-size: 20px;
background: #5fe1ff;
}
.c-right{width:35%;height:auto;float:right;}
.c-right ul li{list-style: none;width:100%;height:auto;min-height:200px;background:#fff;border:0px solid red;margin-top:10px;}
@media screen and (max-width: 768px) {
.c-right{width:100%;height:auto;float:right;}
.c-right ul li{width:100%;height:300px;background:#fff;border:1px solid red;margin-top:10px;}
}
</style>

View File

@ -5,6 +5,10 @@ import App from './App'
import router from './router'
import iView from 'iview';
import 'iview/dist/styles/iview.css';
import axios from 'axios'
Vue.prototype.$http = axios
Vue.use(iView);

View File

@ -14,7 +14,7 @@ export default new Router({
component: HelloWorld
},
{
path:'/home/',
path:'/home/:id',
component:Home,
children:[
{

View File

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>len-blog</artifactId>
<build>
<!-- <build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
@ -38,5 +38,5 @@
</dependencies>
</plugin>
</plugins>
</build>
</build>-->
</project>

View File

@ -1,12 +1,11 @@
package com.len.controller;
import com.len.model.BlogArticle;
import com.len.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
/**
* 文章管理后台
@ -15,12 +14,10 @@ import org.springframework.web.bind.annotation.ResponseBody;
* @email 1146556298@qq.com
* @date 2018-05-05
*/
@Controller
@RequestMapping("/article")
@RestController
@RequestMapping("/blog")
public class ArticleController {
@Autowired
private ArticleService service;
@GetMapping("/articleList")
public String articleListPage() {
@ -30,9 +27,13 @@ public class ArticleController {
/**
* 文章列表
*/
@ResponseBody
@GetMapping("/showArticleList")
public String showArticles(BlogArticle article, String page, String limit) {
return service.show(article, Integer.valueOf(page), Integer.valueOf(limit));
@GetMapping("/header")
public List<String> showArticles() {
List<String> list = new ArrayList<>(4);
list.add("java");
list.add("架构");
list.add("Linux");
list.add("其他");
return list;
}
}

View File

@ -1,18 +0,0 @@
package com.len.mapper;
import com.len.base.BaseMapper;
import com.len.model.BlogArticle;
public interface BlogArticleMapper extends BaseMapper<BlogArticle, String> {
int deleteByPrimaryKey(String id);
int insert(BlogArticle record);
int insertSelective(BlogArticle record);
BlogArticle selectByPrimaryKey(String id);
int updateByPrimaryKeySelective(BlogArticle record);
int updateByPrimaryKey(BlogArticle record);
}

View File

@ -1,14 +0,0 @@
package com.len.service;
import com.len.base.BaseService;
import com.len.model.BlogArticle;
/**
* 博客文章业务
*
* @author JamesZBL
* @email 1146556298@qq.com
* @date 2018-05-05
*/
public interface ArticleService extends BaseService<BlogArticle, String> {
}

View File

@ -1,28 +0,0 @@
package com.len.service.impl;
import com.len.base.BaseMapper;
import com.len.base.impl.BaseServiceImpl;
import com.len.mapper.BlogArticleMapper;
import com.len.model.BlogArticle;
import com.len.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 博客文章业务实现
*
* @author JamesZBL
* @email 1146556298@qq.com
* @date 2018-05-05
*/
@Service
public class ArticleServiceImpl extends BaseServiceImpl<BlogArticle, String> implements ArticleService {
@Autowired
private BlogArticleMapper mapper;
@Override
public BaseMapper<BlogArticle, String> getMappser() {
return mapper;
}
}

View File

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!--<classPathEntry location="/Program Files/IBM/SQLLIB/java/db2java.zip" />-->
<!--<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.String">-->
<!--SELECT REPLACE(UUID(),'-','') AS ID FROM DUAL-->
<!--</selectKey>-->
<context id="MySQLTables" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/lenos"
userId="root"
password="root">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<javaModelGenerator targetPackage="com.len.model" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<javaClientGenerator type="XMLMAPPER" targetPackage="com.len.mapper" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<table tableName="blog_art" domainObjectName="BlogArticle" modelType="conditional" enableSelectByExample="false"
enableCountByExample="false" enableDeleteByExample="false" enableUpdateByExample="false">
<generatedKey column="ID" sqlStatement="MySQL" identity="true"/>
</table>
</context>
</generatorConfiguration>

View File

@ -1,136 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.len.mapper.BlogArticleMapper">
<resultMap id="BaseResultMap" type="com.len.model.BlogArticle">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="content_md" jdbcType="LONGVARCHAR" property="contentMd" />
<result column="content_html" jdbcType="LONGVARCHAR" property="contentHtml" />
<result column="read_quantity" jdbcType="INTEGER" property="readQuantity" />
<result column="gmt_created" jdbcType="TIMESTAMP" property="gmtCreated" />
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
</resultMap>
<sql id="Base_Column_List">
id, title, description, content_md, content_html, read_quantity, gmt_created, gmt_modified
</sql>
<select id="selectListByPage" parameterType="com.len.model.BlogArticle" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"/>
from blog_art
<where>
<if test="title!=null and title!=''"> and title like "%" #{title} "%"</if>
<if test="description!=null and description!=''"> and description like "%" #{description} "%"</if>
</where>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from blog_art
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from blog_art
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.len.model.BlogArticle">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.String">
SELECT REPLACE(UUID(),'-','') AS ID FROM DUAL
</selectKey>
insert into blog_art (title, description, content_md,
content_html, read_quantity, gmt_created,
gmt_modified)
values (#{title,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{contentMd,jdbcType=LONGVARCHAR},
#{contentHtml,jdbcType=LONGVARCHAR}, #{readQuantity,jdbcType=INTEGER}, #{gmtCreated,jdbcType=TIMESTAMP},
#{gmtModified,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.len.model.BlogArticle">
<selectKey keyProperty="id" order="BEFORE" resultType="java.lang.String">
SELECT REPLACE(UUID(),'-','') AS ID FROM DUAL
</selectKey>
insert into blog_art
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">
title,
</if>
<if test="description != null">
description,
</if>
<if test="contentMd != null">
content_md,
</if>
<if test="contentHtml != null">
content_html,
</if>
<if test="readQuantity != null">
read_quantity,
</if>
<if test="gmtCreated != null">
gmt_created,
</if>
<if test="gmtModified != null">
gmt_modified,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="contentMd != null">
#{contentMd,jdbcType=LONGVARCHAR},
</if>
<if test="contentHtml != null">
#{contentHtml,jdbcType=LONGVARCHAR},
</if>
<if test="readQuantity != null">
#{readQuantity,jdbcType=INTEGER},
</if>
<if test="gmtCreated != null">
#{gmtCreated,jdbcType=TIMESTAMP},
</if>
<if test="gmtModified != null">
#{gmtModified,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.len.model.BlogArticle">
update blog_art
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="contentMd != null">
content_md = #{contentMd,jdbcType=LONGVARCHAR},
</if>
<if test="contentHtml != null">
content_html = #{contentHtml,jdbcType=LONGVARCHAR},
</if>
<if test="readQuantity != null">
read_quantity = #{readQuantity,jdbcType=INTEGER},
</if>
<if test="gmtCreated != null">
gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
</if>
<if test="gmtModified != null">
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.len.model.BlogArticle">
update blog_art
set title = #{title,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
content_md = #{contentMd,jdbcType=LONGVARCHAR},
content_html = #{contentHtml,jdbcType=LONGVARCHAR},
read_quantity = #{readQuantity,jdbcType=INTEGER},
gmt_created = #{gmtCreated,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -96,6 +96,7 @@ public class ShiroConfig {
filterMap.put("/login","verCode,anon");
//filterMap.put("/login","anon");
filterMap.put("/getCode","anon");
filterMap.put("/blog/**","anon");
filterMap.put("/logout","logout");
filterMap.put("/plugin/**","anon");
filterMap.put("/user/**","per");

View File

@ -94,11 +94,11 @@
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<dependency>
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>1.5.9.RELEASE</version>
</dependency>
</dependency>-->
<!--Mysql数据库驱动-->