| | |
| | | params: parameter |
| | | }) |
| | | } |
| | | |
| | | export function archive() { |
| | | return axios({ |
| | | url: '/outside/blog/archive', |
| | | method: 'get', |
| | | }) |
| | | } |
| | |
| | | |
| | | .password-animate .left-arm.show, |
| | | .password-animate .right-arm.show { |
| | | bottom: -1.7em !important; |
| | | bottom: -1.3em !important; |
| | | } |
| | | |
| | | .password-animate .left-arm, |
| | |
| | | <a-row type="flex" justify="start"> |
| | | <a-col v-bind="showSmall"> |
| | | <div class="menu"> |
| | | <router-link to="/main1">Home</router-link> |
| | | <router-link to="/">Home</router-link> |
| | | <router-link to="/main2">乐谱搜索</router-link> |
| | | <router-link to="/main3">我的网盘</router-link> |
| | | <router-link to="/main4">友人帐</router-link> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | typeId: "", |
| | | data: [], |
| | | loading: false, |
| | | busy: false, |
| | |
| | | current: 1, |
| | | }; |
| | | }, |
| | | watch: { |
| | | '$route'(to, from) { |
| | | if ("articleList" === to.name) { |
| | | this.typeId = this.$route.query.typeId; |
| | | } |
| | | }, |
| | | typeId: function(newValue, oldValue) { |
| | | this.busy = true; |
| | | this.$message.info('loading',0.3); |
| | | this.onChange(1); |
| | | } |
| | | |
| | | }, |
| | | activated() { |
| | | window.addEventListener('scroll', this); |
| | | }, |
| | | deactivated() { |
| | | window.removeEventListener('scroll', this); |
| | | }, |
| | | beforeMount() { |
| | | queryBlogArticleList({ |
| | | pageNo: this.current |
| | | pageNo: this.current, |
| | | typeId: this.typeId |
| | | }).then((res) => { |
| | | this.total = Number(res.data.total) |
| | | this.pageSize = Number(res.data.size); |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | |
| | | onChange(current) { |
| | | this.current = current; |
| | | queryBlogArticleList({ |
| | | pageNo: this.current |
| | | pageNo: current, |
| | | typeId: this.typeId |
| | | }).then((res) => { |
| | | this.busy = false; |
| | | this.total = Number(res.data.total) |
| | |
| | | loadMore() { |
| | | this.loading = true; |
| | | this.busy = true; |
| | | |
| | | |
| | | queryBlogArticleList({ |
| | | pageNo: this.current + 1 |
| | | pageNo: this.current + 1, |
| | | typeId: this.typeId |
| | | }).then((res) => { |
| | | |
| | | this.total = Number(res.data.total) |
| | |
| | | this.data = this.data.concat(res.data.records); |
| | | this.busy = false; |
| | | if (res.data.records.length == 0) { |
| | | this.$message.warning('别滑了,别滑了,到底了..'); |
| | | //this.$message.warning('别滑了,别滑了,到底了..'); |
| | | this.busy = true; |
| | | this.loading = false; |
| | | return; |
| | |
| | | <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> |
| | | <img class="post_bg" :src="coverFileURL" :onerror="img404" :alt="title"> |
| | | <img class="post_bg" :src="coverFileURL" :onerror="img404" :alt="title"> |
| | | </router-link> |
| | | </div> |
| | | |
| | | <div class="post_cover right_radius" v-else> |
| | | <router-link :to="{path:'/mdDetail',query:{id:id}}" :title="title"> |
| | | <div class="block right_radius"></div> |
| | | <img class="post_bg" :src="coverFileURL" :onerror="img404" :alt="title"> |
| | | <img class="post_bg" :src="coverFileURL" :onerror="img404" :alt="title"> |
| | | <!-- <img class="post_bg" src="https://unpkg.zhimg.com/ahzo@1.0.3/blogpic/1.jpg" onerror="this.onerror=null,this.src="/img/404.jpg"" :alt="title"> --> |
| | | </router-link> |
| | | </div> |
| | | |
| | | <div class="recent-post-info"> |
| | | <router-link :to="{path:'/mdDetail',query:{id:id}}" class="article-title"> {{title}} </router-link> |
| | | <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"/> |
| | | {{title}} |
| | | </router-link> |
| | | <!-- <a class="article-title" href="/mdDetail" :title="title"> {{title}}</a> --> |
| | | <div class="article-meta-wrap" style="display: flex;"> |
| | | <span class="post-meta-date"> |
| | |
| | | <span class="article-meta__separator" style="margin: 0px 3px ;"> | </span> |
| | | <span class="article-meta"> |
| | | <a-icon type="book" /> |
| | | <router-link :to="{path:'/mdDetail',query:{id:id}}" class="article-meta__categories"> {{articleTypeName}} |
| | | <router-link :to="{path:'/mdDetail',query:{id:id}}" class="article-meta__categories"> |
| | | {{articleTypeName}} |
| | | </router-link> |
| | | <!-- <a class="article-meta__categories" href="#"> {{tag}}</a> --> |
| | | </span> |
| | |
| | | "id": { |
| | | default: 0, |
| | | }, |
| | | "authStatus": { |
| | | default: 1, |
| | | }, |
| | | "title": { |
| | | default: "", |
| | | }, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | img404:"this.onerror='';this.src=\"https://unpkg.zhimg.com/ahzo@1.0.3/blogpic/1.jpg\"", |
| | | img404: "this.onerror='';this.src=\"https://unpkg.zhimg.com/ahzo@1.0.3/blogpic/1.jpg\"", |
| | | // "title": "使用KeyStore生成证书", |
| | | // "publishTime": "2022-01-14", |
| | | // "tag": "随手记", |
| | |
| | | |
| | | <a-form-model-item label="模式切换" prop="common"> |
| | | <a-switch v-model="form.online" /> |
| | | <span class="myTip"> |
| | | 本地文件/由系统生成文件 |
| | | <span class="myTip" v-if="form.online"> |
| | | 由系统生成文件 |
| | | </span> |
| | | <span class="myTip" v-else> |
| | | 本地文件上传 |
| | | </span> |
| | | </a-form-model-item> |
| | | |
| | |
| | | </span> |
| | | </a-form-model-item> |
| | | |
| | | <a-form-model-item label=" 文件类型"> |
| | | <a-form-model-item label=" 日志类型"> |
| | | <a-radio-group v-model="form.blogType"> |
| | | <a-radio value="Markdown"> |
| | | markdown |
| | |
| | | <template> |
| | | <div class="blog-container "> |
| | | <span class="blog-pigeonhole">分类</span> |
| | | <span class="blog-pigeonhole"> |
| | | <router-link :to="{path:'/articleList'}"> |
| | | 分类 |
| | | </router-link> |
| | | </span> |
| | | <div class="blog-scroll "> |
| | | <div class="blog-log-list"> |
| | | <div class="blog-log-item" v-for="item in list1"> |
| | | <router-link to='/main1'> |
| | | <router-link :to="{path:'/articleList',query:{typeId:item.id}}"> |
| | | <span>{{item.typeName}}</span> |
| | | </router-link> |
| | | |
| | |
| | | </div> |
| | | <div class="blog-log-list"> |
| | | <div class="blog-log-item" v-for="item in list2"> |
| | | <router-link to="/box1"> |
| | | <router-link :to="{path:'/articleList',query:{typeId:item.id}}"> |
| | | <span>{{item.typeName}}</span> |
| | | </router-link> |
| | | <span>{{item.count==null?'--':item.count}}</span> |
| | |
| | | export default { |
| | | beforeMount() { |
| | | queryBlogArticleType({}).then((res) => { |
| | | this.list1=res.data.slice(0,3) |
| | | this.list2=res.data.slice(4) |
| | | this.list1 = res.data.slice(0, 3) |
| | | this.list2 = res.data.slice(4) |
| | | }) |
| | | }, |
| | | data() { |
| | | return { |
| | | list1:[], |
| | | list2:[], |
| | | list1: [], |
| | | list2: [], |
| | | // list1: [{ |
| | | // name: "日志", |
| | | // count: 10 |
| | |
| | | </script> |
| | | |
| | | <style lang="less"> |
| | | .blog-pigeonhole { |
| | | a { |
| | | color: black; |
| | | } |
| | | } |
| | | |
| | | /*日志部分*/ |
| | | .blog-log-list { |
| | | line-height: 1.6; |
| | |
| | | <router-link to="/tagTime?type=3"> |
| | | <span>{{item.month}}月</span> |
| | | </router-link> |
| | | <span>{{item.count}}篇</span> |
| | | <span>{{item.count}}篇</span> |
| | | |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | archive |
| | | } from '../../api/blogStatistics.js' |
| | | export default { |
| | | beforeMount() { |
| | | archive({}).then((res) => { |
| | | this.myData = res.data; |
| | | }) |
| | | }, |
| | | data() { |
| | | return { |
| | | "myData": [{ |
| | | "year": "2022", |
| | | "list": [{ |
| | | "month": "12", |
| | | "count": 10 |
| | | }, |
| | | { |
| | | "month": "10", |
| | | "count": 11 |
| | | }, |
| | | { |
| | | "month": "9", |
| | | "count": 9 |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "year": "2021", |
| | | "list": [{ |
| | | "month": "12", |
| | | "count": 8 |
| | | }, |
| | | { |
| | | "month": "10", |
| | | "count": 7 |
| | | }, |
| | | { |
| | | "month": "7", |
| | | "count": 4 |
| | | }, |
| | | { |
| | | "month": "6", |
| | | "count": 3 |
| | | }, |
| | | { |
| | | "month": "5", |
| | | "count": 2 |
| | | }, |
| | | { |
| | | "month": "4", |
| | | "count": 1 |
| | | } |
| | | ] |
| | | } |
| | | "myData": [ |
| | | // { |
| | | // "year": "2022", |
| | | // "list": [{ |
| | | // "month": "12", |
| | | // "count": 10 |
| | | // }, |
| | | // { |
| | | // "month": "10", |
| | | // "count": 11 |
| | | // }, |
| | | // { |
| | | // "month": "9", |
| | | // "count": 9 |
| | | // } |
| | | // ] |
| | | // }, |
| | | // { |
| | | // "year": "2021", |
| | | // "list": [{ |
| | | // "month": "12", |
| | | // "count": 8 |
| | | // }, |
| | | // { |
| | | // "month": "10", |
| | | // "count": 7 |
| | | // }, |
| | | // { |
| | | // "month": "7", |
| | | // "count": 4 |
| | | // }, |
| | | // { |
| | | // "month": "6", |
| | | // "count": 3 |
| | | // }, |
| | | // { |
| | | // "month": "5", |
| | | // "count": 2 |
| | | // }, |
| | | // { |
| | | // "month": "4", |
| | | // "count": 1 |
| | | // } |
| | | // ] |
| | | // } |
| | | ], |
| | | } |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | queryDetail() { |
| | | this.showMsg = true; |
| | | this.errorMsg = "加载中.."; |
| | | queryBlogArticleDetail({ |
| | | id: this.acticleId, |
| | | authWord: this.secret == "" ? null : md5(this.secret) |
| | |
| | | component: main1, |
| | | children: [{ |
| | | path: '/', |
| | | name:"articleList", |
| | | component: articleList, |
| | | props: true |
| | | }, |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path: '/main1', |
| | | path: '/articleList', |
| | | component: main1, |
| | | children: [{ |
| | | path: '/', |
| | | name:"articleList", |
| | | component: articleList, |
| | | }] |
| | | }, |