| | |
| | | params: parameter |
| | | }) |
| | | } |
| | | |
| | | export function blogAdd(parameter) { |
| | | return axios({ |
| | | url: '/outside/blogArticle/add', |
| | | method: 'post', |
| | | data: parameter |
| | | }) |
| | | } |
| | |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export function archiveGroup(parameter) { |
| | | return axios({ |
| | | url: '/outside/blog/archiveGroup', |
| | | method: 'get', |
| | | params: parameter |
| | | }) |
| | | } |
| | |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .menu { |
| | | -moz-user-select: none; |
| | | -webkit-user-select: none; |
| | | -ms-user-select: none; |
| | | -khtml-user-select: none; |
| | | user-select: none; |
| | | a { |
| | | margin-left: 10px; |
| | | } |
| | |
| | | |
| | | <script> |
| | | import box10 from "../mini/box10-add.vue" |
| | | |
| | | import { |
| | | blogAdd |
| | | } from '../../api/blogArticle.js' |
| | | |
| | | export default { |
| | | components: { |
| | | box10 |
| | |
| | | <div> |
| | | <div class="recent-posts" id="recent-posts"> |
| | | <div class="recent-post-item"> |
| | | |
| | | <div class="miniTag" v-if="isTop==1">置顶</div> |
| | | <div class="post_cover left_radius" v-if="id%2==0"> |
| | | <router-link :to="{path:'/mdDetail',query:{id:id}}" :title="title"> |
| | | <div class="block left_radius"></div> |
| | |
| | | |
| | | <div class="recent-post-info"> |
| | | <router-link :to="{path:'/mdDetail',query:{id:id}}" class="article-title"> |
| | | <a-icon type="lock" style="color:rgba(0,0,0,.25)" v-if="authStatus==3"/> |
| | | <a-icon type="stop" style="color:rgba(0,0,0,.25)" v-if="authStatus==2"/> |
| | | <a-icon type="lock" style="color:rgba(0,0,0,.25)" v-if="authStatus==3" /> |
| | | <a-icon type="stop" style="color:rgba(0,0,0,.25)" v-if="authStatus==2" /> |
| | | {{title}} |
| | | </router-link> |
| | | <!-- <a class="article-title" href="/mdDetail" :title="title"> {{title}}</a> --> |
| | |
| | | export default { |
| | | props: { |
| | | "id": { |
| | | default: 0, |
| | | }, |
| | | "isTop": { |
| | | default: 0, |
| | | }, |
| | | "authStatus": { |
| | |
| | | @title-clolr: dimgray; |
| | | @card-hover-box-shadow: 0 0 0 rgba(0, 0, 0, 0.2), 0 0 0 rgba(255, 255, 255, 0.8), inset 9px 9px 15px rgba(0, 0, 0, 0.1), inset -9px -9px 15px rgba(255, 255, 255, 1); |
| | | |
| | | .recent-post-item { |
| | | position: relative; |
| | | } |
| | | |
| | | .miniTag { |
| | | z-index: 1; |
| | | position: absolute; |
| | | right: 8px; |
| | | top: 8px; |
| | | transform: rotate(30deg); |
| | | box-shadow: aliceblue; |
| | | } |
| | | |
| | | // #recent-posts>.recent-post-item:not(:first-child) { |
| | | // margin-top: 1rem; |
| | |
| | | </a-upload> --> |
| | | |
| | | <a-upload :customRequest="customRequest" name="file" :showUploadList="true" @change="handleChange" |
| | | :default-file-list="form.blogFileList" |
| | | :beforeUpload="beforeUpload" |
| | | > |
| | | :default-file-list="form.blogFileList" :beforeUpload="beforeUpload"> |
| | | |
| | | <a-button> |
| | | <a-icon type="upload" />限 markdown/html |
| | |
| | | </a-upload> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label="日志内容" v-show="form.online" prop="content"> |
| | | <a-form-model-item label="日志内容" v-show="form.online"> |
| | | <a-input v-model="form.content" type="textarea" placeholder="限10k字数" /> |
| | | </a-form-model-item> |
| | | |
| | |
| | | import { |
| | | sysFileInfoUpload |
| | | } from '../../api/fileManage.js'; |
| | | |
| | | import { |
| | | queryBlogArticleType |
| | | } from '../../api/blogArticleType.js' |
| | | |
| | | |
| | | export default { |
| | | beforeMount() { |
| | | queryBlogArticleType({}).then((res) => { |
| | |
| | | if (this.form.online) { |
| | | console.log("内容未填"); |
| | | this.$refs.myForm.validateField('content') |
| | | if (this.form.content == null || this.form.content == "") { |
| | | callback(new Error('内容未填')); |
| | | } |
| | | } else { |
| | | console.log("文件未传"); |
| | | this.$refs.myForm.validateField('blogFileList') |
| | | if (this.form.blogFileList == null || this.form.blogFileList.length == 0) { |
| | | callback(new Error('文件未传')); |
| | | } |
| | | } |
| | | callback(); |
| | | }; |
| | | |
| | | return { |
| | | blogArticleType: [], |
| | | // blogFileList: [], |
| | | // coverFileList: [ |
| | | // // { |
| | | // // uid: '-1', |
| | | // // name: 'xxx.png', |
| | | // // status: 'done', |
| | | // // url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', |
| | | // // thumbUrl: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', |
| | | // // } |
| | | // ], |
| | | tags: [], |
| | | inputVisible: false, |
| | | inputValue: '', |
| | |
| | | trigger: 'blur' |
| | | }, |
| | | { |
| | | min: 5, |
| | | min: 1, |
| | | max: 50, |
| | | message: '字数限制1~50', |
| | | trigger: 'blur' |
| | |
| | | validator: validateContent, |
| | | trigger: [] |
| | | }], |
| | | content: [{ |
| | | max: 10, |
| | | required: true, |
| | | message: '至少填一下上传内容', |
| | | trigger: 'blur' |
| | | }, ], |
| | | blogFileList: [{ |
| | | max: 1, |
| | | required: true, |
| | | message: '文件未上传', |
| | | }], |
| | | // content: [{ |
| | | // max: 10, |
| | | // required: true, |
| | | // message: '至少填一下上传内容', |
| | | // trigger: 'blur' |
| | | // }, ], |
| | | // blogFileList: [{ |
| | | // max: 1, |
| | | // required: true, |
| | | // message: '文件未上传', |
| | | // }], |
| | | class: [{ |
| | | required: true, |
| | | message: '至少选一个分类', |
| | | trigger: 'blur' |
| | | }, ], |
| | | // region: [{ |
| | | // required: true, |
| | | // message: 'Please select Activity zone', |
| | | // trigger: 'change' |
| | | // }], |
| | | // date1: [{ |
| | | // required: true, |
| | | // message: 'Please pick a date', |
| | | // trigger: 'change' |
| | | // }], |
| | | // type: [{ |
| | | // type: 'array', |
| | | // required: true, |
| | | // message: 'Please select at least one activity type', |
| | | // trigger: 'change', |
| | | // }, ], |
| | | // resource: [{ |
| | | // required: true, |
| | | // message: 'Please select activity resource', |
| | | // trigger: 'change' |
| | | // }, ], |
| | | // desc: [{ |
| | | // required: true, |
| | | // message: 'Please input activity form', |
| | | // trigger: 'blur' |
| | | // }], |
| | | |
| | | } |
| | | }; |
| | | }, |
| | |
| | | console.log(333); |
| | | console.log(this.blogFileList); |
| | | return new Promise((resolve, reject) => { |
| | | if(fileList.length>=2){ |
| | | if (fileList.length >= 2) { |
| | | this.$message.error('这里最多上传一个文件'); |
| | | return reject(false); |
| | | } |
| | | // var testmsg=/^image\/(jpeg|png|jpg)$/.test(file.type) |
| | | // // var testmsg=/^image\/(md|html|markdown)$/.test(file.type) |
| | | // if (!testmsg) { |
| | | // this.$message.error('上传文件格式不对!'); |
| | | // return reject(false); |
| | | // } |
| | | |
| | | const isLt2M = file.size / 1024 / 1024 <=2//图片大小不超过2MB |
| | | if(!isLt2M) { |
| | | this.$message.error('上传文件大小不能超过 2M!'); |
| | | return reject(false); |
| | | } |
| | | return resolve(true) |
| | | }); |
| | | |
| | | // var testmsg=/^image\/(jpeg|png|jpg)$/.test(file.type) |
| | | // // var testmsg=/^image\/(md|html|markdown)$/.test(file.type) |
| | | // if (!testmsg) { |
| | | // this.$message.error('上传文件格式不对!'); |
| | | // return reject(false); |
| | | // } |
| | | |
| | | const isLt2M = file.size / 1024 / 1024 <= 2 //图片大小不超过2MB |
| | | if (!isLt2M) { |
| | | this.$message.error('上传文件大小不能超过 2M!'); |
| | | return reject(false); |
| | | } |
| | | return resolve(true) |
| | | }); |
| | | |
| | | }, |
| | | handleChange(info) { |
| | | if (info.file.status !== 'uploading') { |
| | |
| | | <span>{{item.typeName}}</span> |
| | | </router-link> |
| | | |
| | | <span>{{item.count==null?'--':item.count}}</span> |
| | | <span>{{item.count==null?'--':item.count+'篇'}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="blog-log-list"> |
| | |
| | | <router-link :to="{path:'/articleList',query:{typeId:item.id}}"> |
| | | <span>{{item.typeName}}</span> |
| | | </router-link> |
| | | <span>{{item.count==null?'--':item.count}}</span> |
| | | <span>{{item.count==null?'--':item.count+'篇'}}</span> |
| | | |
| | | </div> |
| | | </div> |
| | |
| | | } from '../../api/blogArticleType.js' |
| | | export default { |
| | | beforeMount() { |
| | | this.$message.info('loading',0.3); |
| | | queryBlogArticleType({}).then((res) => { |
| | | this.list1 = res.data.slice(0, 3) |
| | | this.list2 = res.data.slice(4) |
| | |
| | | return { |
| | | list1: [], |
| | | list2: [], |
| | | // list1: [{ |
| | | // name: "日志", |
| | | // count: 10 |
| | | // }, { |
| | | // name: "分类", |
| | | // count: 12 |
| | | // }, { |
| | | // name: "标签", |
| | | // count: 14 |
| | | // }], |
| | | // list2: [{ |
| | | // name: "Tag", |
| | | // count: 133 |
| | | // }, { |
| | | // name: "专题", |
| | | // count: 10 |
| | | // }, { |
| | | // name: "偏好", |
| | | // count: 12 |
| | | // }, { |
| | | // name: "星标", |
| | | // count: 14 |
| | | // },{ |
| | | // name: "Tag", |
| | | // count: 133 |
| | | // }, { |
| | | // name: "专题", |
| | | // count: 10 |
| | | // }, { |
| | | // name: "偏好", |
| | | // count: 12 |
| | | // }, { |
| | | // name: "星标", |
| | | // count: 14 |
| | | // },{ |
| | | // name: "Tag", |
| | | // count: 133 |
| | | // }, { |
| | | // name: "专题", |
| | | // count: 10 |
| | | // }, { |
| | | // name: "偏好", |
| | | // count: 12 |
| | | // }, { |
| | | // name: "星标", |
| | | // count: 14 |
| | | // },{ |
| | | // name: "Tag", |
| | | // count: 133 |
| | | // }, { |
| | | // name: "专题", |
| | | // count: 10 |
| | | // }, { |
| | | // name: "偏好", |
| | | // count: 12 |
| | | // }, { |
| | | // name: "星标", |
| | | // count: 14 |
| | | // }] |
| | | } |
| | | } |
| | | } |
| | |
| | | <template> |
| | | <div class="blog-container archive"> |
| | | <span class="blog-pigeonhole"> |
| | | <router-link to="/tagTime?type=1"> |
| | | <router-link :to="{name:'tagTime'}"> |
| | | 归档信息 |
| | | </router-link> |
| | | </span> |
| | | <div class="blog-scroll "> |
| | | <div v-for="yearData in myData"> |
| | | <router-link to="/tagTime?type=2"> |
| | | <router-link :to="{name:'tagTime',query:{year:yearData.year}}"> |
| | | <p class="blog-pigeonhole-p">{{yearData.year}}年</p> |
| | | </router-link> |
| | | <div class="blog-pigeonhole-list"> |
| | | |
| | | <div class="blog-pigeonhole-item" v-for="item in yearData.list"> |
| | | <router-link to="/tagTime?type=3"> |
| | | <router-link :to="{name:'tagTime', |
| | | query:{year:yearData.year,month:item.month}}"> |
| | | <span>{{item.month}}月</span> |
| | | </router-link> |
| | | <span>{{item.count}}篇</span> |
| | |
| | | {{yearData.year}}年 |
| | | </a-divider> |
| | | |
| | | <a-timeline-item v-for="monthData in yearData.monthList" color="white"> |
| | | <a-timeline-item v-for="monthData in yearData.list" color="white"> |
| | | <a-icon slot="dot" type="clock-circle-o" style="font-size: 18px;" /> |
| | | <h3>{{monthData.month}}</h3> |
| | | <div v-for="article in monthData.list"> |
| | | <span>{{article.name}} </span>{{article.remark}} |
| | | <router-link :to="{path:'/mdDetail',query:{id:article.id}}" class="article-title"> |
| | | <span> |
| | | {{article.name}} |
| | | </span> |
| | | <a-icon type="lock" style="color:rgba(0,0,0,.25)" v-if="article.authStatus==3" /> |
| | | <a-icon type="stop" style="color:rgba(0,0,0,.25)" v-if="article.authStatus==2" /> |
| | | |
| | | </router-link> |
| | | </div> |
| | | </a-timeline-item> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | var tempList = [{ |
| | | "year": "2022", |
| | | "monthList": [{ |
| | | "month": "9月18日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "随笔" |
| | | }, |
| | | { |
| | | "name": "vue动态路由异步加载", |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "month": "9月08日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "111" |
| | | }] |
| | | }, |
| | | { |
| | | "month": "8月16日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "111" |
| | | }, |
| | | { |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | |
| | | }, |
| | | { |
| | | "name": "陈奕迅-Body Song 歌词2", |
| | | "remark": "22" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "month": "4月09日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "111" |
| | | }] |
| | | }, |
| | | { |
| | | "month": "3月18日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "111" |
| | | }] |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | "year": "2021", |
| | | "monthList": [{ |
| | | "month": "9月18日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "随笔" |
| | | }, |
| | | { |
| | | "name": "vue动态路由异步加载", |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "month": "9月12日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "111" |
| | | }] |
| | | }, |
| | | { |
| | | "month": "9月09日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "111" |
| | | }] |
| | | }, |
| | | { |
| | | "month": "9月08日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "111" |
| | | }] |
| | | }, |
| | | |
| | | ] |
| | | }, |
| | | { |
| | | "year": "2020", |
| | | "monthList": [{ |
| | | "month": "9月18日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "随笔" |
| | | }, |
| | | { |
| | | "name": "vue动态路由异步加载", |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "month": "9月08日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "111" |
| | | }] |
| | | }, |
| | | { |
| | | "month": "8月16日", |
| | | "list": [{ |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | "remark": "111" |
| | | }, |
| | | { |
| | | "name": "陈奕迅-Body Song 歌词1", |
| | | |
| | | }, |
| | | { |
| | | "name": "陈奕迅-Body Song 歌词2", |
| | | "remark": "22" |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | |
| | | export default { |
| | | props: { |
| | | 'type': Number, |
| | | }, |
| | | mounted() { |
| | | console.log(this.$route.query) |
| | | }, |
| | | import { |
| | | archiveGroup |
| | | } from '../../api/blogStatistics.js' |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | year: "", |
| | | month: "", |
| | | list: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.year = this.$route.query.year; |
| | | this.month = this.$route.query.month; |
| | | }, |
| | | watch: { |
| | | '$route'(to, from) { |
| | | var type = this.$route.query.type; |
| | | var list = []; |
| | | if (type == 1) { |
| | | list = tempList; |
| | | } else if (type == 2) { |
| | | list.push(tempList[0]); |
| | | } else if (type == 3) { |
| | | list.push(tempList[1]); |
| | | if ("tagTime" === to.name) { |
| | | this.year = this.$route.query.year; |
| | | this.month = this.$route.query.month; |
| | | this.$message.info('loading',0.3); |
| | | archiveGroup({ |
| | | year: this.year, |
| | | month: this.month |
| | | }).then((res) => { |
| | | this.list = res.data; |
| | | }) |
| | | } |
| | | |
| | | this.list = list |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | data() { |
| | | |
| | | |
| | | var list = []; |
| | | var type = this.$route.query.type; |
| | | if (type == 1) { |
| | | list = tempList; |
| | | } else if (type == 2) { |
| | | list.push(tempList[0]); |
| | | } else if (type == 3) { |
| | | list.push(tempList[1]); |
| | | } |
| | | |
| | | return { |
| | | list: list |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style lang="less"> |
| | | .ant-timeline-item-content { |
| | | a { |
| | | color: #555; |
| | | } |
| | | |
| | | span { |
| | | line-height: 30px; |
| | | } |
| | |
| | | .blog-cell { |
| | | opacity: 0.8; |
| | | padding: 0px 14px 10px; |
| | | -moz-user-select: none; |
| | | -webkit-user-select: none; |
| | | -ms-user-select: none; |
| | | -khtml-user-select: none; |
| | | user-select: none; |
| | | } |
| | | |
| | | /*左边部分*/ |
| | |
| | | component: box1, |
| | | }, |
| | | { |
| | | name:"tagTime", |
| | | path: '/tagTime', |
| | | component: tagTime, |
| | | props: true |
| | | }, |
| | | { |
| | | path: '/tagInfo', |