inleft
2022-02-16 63af45eaa849552e4ea3ff0248c47bacb62cacdb
对接接口
8 files modified
3 files added
463 ■■■■■ changed files
es.md 2 ●●● patch | view | raw | blame | history
src/api/blogArticle.js 22 ●●●●● patch | view | raw | blame | history
src/api/blogArticleType.js 22 ●●●●● patch | view | raw | blame | history
src/api/blogStatistics.js 22 ●●●●● patch | view | raw | blame | history
src/components/group/articleListScorll.vue 69 ●●●●● patch | view | raw | blame | history
src/components/group/boxRight.vue 117 ●●●● patch | view | raw | blame | history
src/components/mini/box-new-article.vue 53 ●●●●● patch | view | raw | blame | history
src/components/mini/box10-add.vue 2 ●●● patch | view | raw | blame | history
src/components/mini/box2-class.vue 137 ●●●● patch | view | raw | blame | history
src/components/mini/box4-minibox.vue 15 ●●●● patch | view | raw | blame | history
src/utils/request.js 2 ●●● patch | view | raw | blame | history
es.md
@@ -1,7 +1,7 @@
    
# 两种分词器使用的最佳实践
# 两种分词器使用的最佳实践  🍻
    索引时用ik_max_word,在搜索时用ik_smart。
       { "arttitle": {
                "type": "text",
src/api/blogArticle.js
New file
@@ -0,0 +1,22 @@
/**
 * 系统应用
 *
 * @author yubaoshan
 * @date 2020年4月23日12:10:57
 */
import {
    axios
} from '../utils/request.js'
/**
 * 查询文章列表
 *
 */
export function queryBlogArticleList(parameter) {
    return axios({
        url: '/outside/blogArticle/queryBlogArticleList',
        method: 'get',
        params: parameter
    })
}
src/api/blogArticleType.js
New file
@@ -0,0 +1,22 @@
/**
 * 系统应用
 *
 * @author yubaoshan
 * @date 2020年4月23日12:10:57
 */
import {
    axios
} from '../utils/request.js'
/**
 * 查询文章类型列表
 *
 */
export function queryBlogArticleType(parameter) {
    return axios({
        url: '/outside/blogArticleType/queryBlogArticleType',
        method: 'get',
        params: parameter
    })
}
src/api/blogStatistics.js
New file
@@ -0,0 +1,22 @@
/**
 * 系统应用
 *
 * @author yubaoshan
 * @date 2020年4月23日12:10:57
 */
import {
    axios
} from '../utils/request.js'
/**
 * 查询文章列表
 *
 */
export function statistics(parameter) {
    return axios({
        url: '/outside/blog/statistics',
        method: 'get',
        params: parameter
    })
}
src/components/group/articleListScorll.vue
@@ -2,8 +2,8 @@
    <div>
        <div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" :infinite-scroll-distance="10">
            <div v-for="temp in data">
                <newArticle></newArticle>
                <box5 v-bind="temp"></box5>
                <newArticle v-bind="temp"></newArticle>
                <!-- <box5 v-bind="temp"></box5> -->
            </div>
            <div v-if="loading && !busy" class="demo-loading-container">
                <a-spin />
@@ -12,10 +12,10 @@
        <a-row type="flex" justify="center">
            <div style="position:fixed;bottom: 10px;" id="dddadf">
                <a-pagination @change="onChange" :showQuickJumper="true" :size="size" v-model="current"
                    :defaultPageSize="pageSize" :total="total" />
                    :defaultPageSize="10" :pageSize="pageSize" :total="total" />
            </div>
        </a-row>
    </div>
</template>
<script>
@@ -24,6 +24,9 @@
    import babyActicle from '../../assets/baby.htm'
    import newArticle from "../mini/box-new-article.vue"
    import shijie from '../../assets/shijie.htm'
    import {
        queryBlogArticleList
    } from '../../api/blogArticle.js'
    var obj1 = {
        "source": babyActicle,
@@ -60,45 +63,67 @@
        },
        data() {
            return {
                data: [],
                loading: false,
                busy: false,
                size: "small",
                total: 500,
                pageSize: 20,
                total: 1,
                pageSize: 1,
                current: 1,
            };
        },
        beforeMount() {
            this.data = [obj1, obj2,obj3,obj2];
            queryBlogArticleList({
                pageNo: this.current
            }).then((res) => {
                this.total = Number(res.data.total)
                this.pageSize = Number(res.data.size);
                this.data = res.data.records;
                return res
            })
        },
        methods: {
            onChange(current) {
                this.current = current;
                this.data = [obj2, obj3, obj1, obj2];
                queryBlogArticleList({
                    pageNo: this.current
                }).then((res) => {
                    this.busy = false;
                    this.total = Number(res.data.total)
                    this.pageSize = Number(res.data.size);
                    this.data = res.data.records;
                    return res
                })
            },
            loadMore() {
                const data = this.data;
                this.loading = true;
                this.busy = true;
                queryBlogArticleList({
                    pageNo: this.current + 1
                }).then((res) => {
                this.current += 1;
                console.log(this.current);
                console.log(this.busy);
                    this.total = Number(res.data.total)
                    this.pageSize = Number(res.data.size);
                    this.data = this.data.concat(res.data.records);
                    this.busy = false;
                    if (res.data.records.length == 0) {
                        this.$message.warning('没有更多了');
                        this.busy = true;
                        this.loading = false;
                        return;
                    } else {
                        this.current += 1;
                    }
                if (data.length > 3) {
                    this.$message.warning('没有更多了');
                    this.busy = true;
                    this.loading = false;
                    return;
                }
                    return res
                })
                setTimeout(function() {
                    this.loading = false;
                }, 1000);
                }, 100);
                this.data = data.concat(obj1, obj3, obj2, obj3, obj1);
            },
        },
src/components/group/boxRight.vue
@@ -20,48 +20,31 @@
<script>
    import box4 from "../mini/box4-minibox.vue"
    import {
        statistics
    } from '../../api/blogStatistics.js'
    export default {
        components: {
            box4,
        },
        beforeMount() {
            statistics({}).then((res) => {
                this.vo4 = res.data;
                return res;
            })
        },
        data() {
            return {
                vo1: {
                    title: "最近热读",
                    list: [{
                        name: "Baby Song- 陈奕迅 ",
                    }, {
                        name: "Baby Song- 陈奕迅 超超超超超超超超超超超超超超长的标题",
                    }, {
                        name: "Baby Song- 陈奕迅 超超超超超超超长的标题",
                    }, {
                        name: "Baby Song- 陈奕迅 超超超超超超超超超超超超超超长的标题",
                    }, {
                        name: "Baby Song- 陈奕迅 ",
                    }]
                },
                vo2: {
                    title: "最多点赞",
                    list: [{
                        name: "Baby Song- 陈奕迅 ",
                    }, {
                        name: "Baby Song- 陈奕迅 超 超超超超超超长的标题",
                    }, {
                        name: "Baby Song- 陈奕迅 超超超超 标题",
                    }, {
                        name: "Baby Song- 陈奕迅 超超 标题",
                    }, {
                        name: "Baby Song ",
                    }]
                },
                vo3: {
                    "link":"/main4",
                    "link": "/main4",
                    title: "友情链接",
                    isShowRemark:true,
                    isShowRemark: true,
                    list: [{
                        name: "https://gofor.live",
                    }, {
                        name: "blog.inleft.com",
                        name: "http://blog.inleft.com",
                    }, {
                        name: "https://blog.ahzoo.cn/",
                    }, {
@@ -69,70 +52,22 @@
                    }, {
                        name: "https://musenxi.com/",
                    }, {
                        name: "alenc.cn",
                        name: "http://alenc.cn",
                    }, {
                        name: "howshow.tech",
                    }, {
                        name: "b.inleft.com",
                    }, {
                        name: "Baby Song- 陈奕迅 超超超超 标题",
                    }, {
                        name: "Baby Song- 陈奕迅 超超 标题",
                    }, {
                        name: "Baby Song ",
                    }, {
                        name: "inleft.com",
                    }, {
                        name: "b.inleft.com",
                    }, {
                        name: "Baby Song- 陈奕迅 超超超超 标题",
                    }, {
                        name: "Baby Song- 陈奕迅 超超 标题",
                    }, {
                        name: "Baby Song ",
                    }, {
                        name: "inleft.com",
                    }, {
                        name: "b.inleft.com",
                    }, {
                        name: "Baby Song- 陈奕迅 超超超超 标题",
                    }, {
                        name: "Baby Song- 陈奕迅 超超 标题",
                    }, {
                        name: "Baby Song ",
                    }, {
                        name: "inleft.com",
                    }, {
                        name: "b.inleft.com",
                    }, {
                        name: "Baby Song- 陈奕迅 超超超超 标题",
                    }, {
                        name: "Baby Song- 陈奕迅 超超 标题",
                    }, {
                        name: "Baby Song ",
                    }, {
                        name: "inleft.com",
                    }, {
                        name: "b.inleft.com",
                    }, {
                        name: "Baby Song- 陈奕迅 超超超超 标题",
                    }, {
                        name: "Baby Song- 陈奕迅 超超 标题",
                    }, {
                        name: "Baby Song ",
                        name: "http://howshow.tech",
                    }]
                },
                vo4: {
                    title: "统计信息",
                    list: [{
                        name: "已稳定运行:101天",
                    }, {
                        name: "上次更新:2020-05-27",
                    }, {
                        name: "累计访问:10000次",
                    }, {
                        name: "累计访客:1001名",
                    }]
                    // title: "统计信息",
                    // list: [{
                    //     name: "已稳定运行:101天",
                    // }, {
                    //     name: "上次更新:2020-05-27",
                    // }, {
                    //     name: "累计访问:10000次",
                    // }, {
                    //     name: "累计访客:1001名",
                    // }]
                }
            }
        }
src/components/mini/box-new-article.vue
@@ -1,43 +1,43 @@
<template>
    <div>
        <div class="recent-posts" id="recent-posts" v-for="(item ,index) in [1,1,1]">
        <div class="recent-posts" id="recent-posts">
            <div class="recent-post-item">
                <div class="post_cover left_radius" v-if="index%2==0">
                <div class="post_cover left_radius" v-if="id%2==0">
                    <router-link to="/mdDetail" :title="title">
                        <div class="block left_radius"></div>
                        <img class="post_bg" src="https://unpkg.zhimg.com/ahzo@1.0.3/blogpic/1.jpg"
                            onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" :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="/mdDetail" :title="title">
                        <div class="block right_radius"></div>
                        <img class="post_bg" src="https://unpkg.zhimg.com/ahzo@1.0.3/blogpic/1.jpg"
                            onerror="this.onerror=null,this.src=&quot;/img/404.jpg&quot;" :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=&quot;/img/404.jpg&quot;" :alt="title"> -->
                    </router-link>
                </div>
                <div class="recent-post-info">
                    <router-link to="/mdDetail"  class="article-title"> {{title}} </router-link>
                    <router-link to="/mdDetail" class="article-title"> {{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">
                            <a-icon type="calendar" />
                            <span class="article-meta-label"></span>
                            <time datetime="2022-01-13T06:25:00.000Z"
                                title=" 2022-01-13 14:25:00">{{publishTime}}</time>
                                title=" 2022-01-13 14:25:00">{{publishDate}}</time>
                        </span>
                        <span class="article-meta__separator" style="margin: 0px 3px ;"> | </span>
                        <span class="article-meta">
                            <a-icon type="book" />
                            <router-link to="/mdDetail"  class="article-meta__categories"> {{tag}} </router-link>
                            <router-link to="/mdDetail" class="article-meta__categories"> {{articleTypeName}}
                            </router-link>
                            <!-- <a class="article-meta__categories" href="#"> {{tag}}</a> -->
                        </span>
                    </div>
                    <div class="content">
                        {{content}}
                        {{introduce}}
                    </div>
                </div>
            </div>
@@ -47,12 +47,33 @@
<script>
    export default {
        props: {
            "id": {
                default: 0,
            },
            "title": {
                default: "",
            },
            "articleTypeName": {
                default: "",
            },
            "introduce": {
                default: "",
            },
            "publishDate": {
                default: "",
            },
            "coverFileURL": {
                default: "",
            }
        },
        data() {
            return {
                "title": "使用KeyStore生成证书",
                "publishTime": "2022-01-14",
                "tag": "随手记",
                "content": "前言Keytool是一个Java数据证书的管理工具 , 在keystore里,包含两种数据: 密钥实体(Key entity):即密钥(secret key)又或者是私钥和配对公钥(采用非对称加密) 可信任的证书实体(trusted certificate entries):即证书(包含公钥) keytool常用命令: genkey 在用户主目录中创建一个默认文件”.keystore” alias 产生别名 keystore 指定密钥库的名称(产生的各类信息将不在.keystore文件中) keyalg 指定密钥的算法 (如 RSA DSA(如果不指定默认采用DSA)) validity 指定创建的证书有效期多少天 keysize 指定密钥长度 storepass 指定密钥库的密码(获取keystore信息所需的密码) keypass 指定别名条目的密码(私钥的密码) dname 指定证书拥有者信息 例如: “CN=名字与姓氏,OU=组织单位名称,O=组织名称,L=城市或区域名称,ST=州或省份名称,C=单位的两字母国家代码” list 显示密钥库中的证书信息 keytool - ..."
                img404:"this.onerror='';this.src=\"https://unpkg.zhimg.com/ahzo@1.0.3/blogpic/1.jpg\"",
                //     "title": "使用KeyStore生成证书",
                //     "publishTime": "2022-01-14",
                //     "tag": "随手记",
                //     "content": "前言Keytool是一个Java数据证书的管理工具 , 在keystore里,包含两种数据: 密钥实体(Key entity):即密钥(secret key)又或者是私钥和配对公钥(采用非对称加密) 可信任的证书实体(trusted certificate entries):即证书(包含公钥) keytool常用命令: genkey 在用户主目录中创建一个默认文件”.keystore” alias 产生别名 keystore 指定密钥库的名称(产生的各类信息将不在.keystore文件中) keyalg 指定密钥的算法 (如 RSA DSA(如果不指定默认采用DSA)) validity 指定创建的证书有效期多少天 keysize 指定密钥长度 storepass 指定密钥库的密码(获取keystore信息所需的密码) keypass 指定别名条目的密码(私钥的密码) dname 指定证书拥有者信息 例如: “CN=名字与姓氏,OU=组织单位名称,O=组织名称,L=城市或区域名称,ST=州或省份名称,C=单位的两字母国家代码 list 显示密钥库中的证书信息 keytool - ..."
            }
        }
    }
src/components/mini/box10-add.vue
@@ -110,7 +110,7 @@
                    <a-slider v-model="form.sliderValue" :default-value="20" :step="5"
                        :getTooltipPopupContainer="getCalendarContainer()" />
                    <span class="myTip">
                        越大越靠前
                        越小越靠前
                    </span>
                </a-form-model-item>
src/components/mini/box2-class.vue
@@ -5,18 +5,18 @@
            <div class="blog-log-list">
                <div class="blog-log-item" v-for="item in list1">
                    <router-link to='/main1'>
                        <span>{{item.name}}</span>
                        <span>{{item.typeName}}</span>
                    </router-link>
                    <span>{{item.count}}</span>
                    <span>{{item.count==null?'--':item.count}}</span>
                </div>
            </div>
            <div class="blog-log-list">
                <div class="blog-log-item" v-for="item in list2">
                    <router-link to="/box1">
                        <span>{{item.name}}</span>
                        <span>{{item.typeName}}</span>
                    </router-link>
                    <span>{{item.count}}</span>
                    <span>{{item.count==null?'--':item.count}}</span>
                </div>
            </div>
@@ -26,68 +26,79 @@
</template>
<script>
    import {
        queryBlogArticleType
    } from '../../api/blogArticleType.js'
    export default {
        beforeMount() {
            queryBlogArticleType({}).then((res) => {
                 this.list1=res.data.slice(0,3)
                 this.list2=res.data.slice(4)
            })
        },
        data() {
            return {
                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
                }]
                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
                // }]
            }
        }
    }
src/components/mini/box4-minibox.vue
@@ -2,9 +2,15 @@
    <div class="blog-container ">
        <div>
            <span class="blog-right-side-portion-title " v-bind:class="{'title-remark':isShowRemark}">
                <router-link :to="link">
                <span v-if="isShowLink">
                    <router-link :to="link">
                        {{title}}
                    </router-link>
                </span>
                <span v-else>
                    {{title}}
                </router-link>
                </span>
            </span>
        </div>
        <div class="blog-scroll show-line ">
@@ -24,11 +30,12 @@
    export default {
        props: {
            link: {
                default:"#"
                default: "#"
            },
            title: "",
            list: "",
            isShowRemark: false
            isShowRemark: false,
            isShowLink: false
        },
        data() {
            return {
src/utils/request.js
@@ -68,7 +68,7 @@
    // if (token) {
    //   config.headers['Authorization'] = 'Bearer ' + token
    // }
    config.headers['Authorization'] = 'Bearer ';
    // config.headers['Authorization'] = 'Bearer ';
    return config
}, err)