小莫唐尼 1 год назад
Родитель
Сommit
e28ea6ca08
2 измененных файлов с 1118 добавлено и 976 удалено
  1. 606 604
      pages/tabbar/about/about.vue
  2. 512 372
      pagesA/archives/archives.vue

+ 606 - 604
pages/tabbar/about/about.vue

@@ -1,611 +1,613 @@
 <template>
-    <view class="app-page pb-24">
-        <!-- 博主信息 -->
-        <view class="blogger-info" :style="[calcProfileStyle]">
-            <image class="avatar" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill"></image>
-            <view class="profile">
-                <view class="author mt-24 text-size-g text-weight-b">{{ bloggerInfo.nickname }}</view>
-                <view class="desc mt-24 text-size-m">
-                    {{ bloggerInfo.description || '这个博主很懒,竟然没写介绍~' }}
-                </view>
-            </view>
-            <image v-if="calcWaveUrl" :src="calcWaveUrl" mode="scaleToFill" class="gif-wave"></image>
-        </view>
-
-        <!-- 统计信息 -->
-        <view class="statistics-wrap bg-white">
-            <tm-more iconColor="light-blue" :open.sync="statisticsShowMore" :maxHeight="62" label=" " open-label=" ">
-                <template>
-                    <view class="statistics flex pt-24 pb-24" :class="{ 'has-solid': statisticsShowMore }">
-                        <view class="item flex-1 text-align-center">
-                            <view class="number text-size-xl text-bg-gradient-orange-accent">
-                                <tm-flop :startVal="0" :decimals="0" :endVal="statistics.post"
-                                         :duration="3000"></tm-flop>
-                            </view>
-                            <view class="mt-6 text-align-center text-size-s text-grey-darken-1">内容数量</view>
-                        </view>
-                        <view class="item flex-1 text-align-center">
-                            <view class="number text-size-xl text-bg-gradient-green-accent">
-                                <tm-flop :startVal="0" :decimals="0" :endVal="statistics.visit"
-                                         :duration="3000"></tm-flop>
-                            </view>
-                            <view class="mt-6 text-size-s text-grey-darken-1">访客数量</view>
-                        </view>
-                        <view class="item flex-1 text-align-center">
-                            <view class="number text-size-xl text-bg-gradient-blue-accent">
-                                <tm-flop :startVal="0" :decimals="0" :endVal="statistics.category"
-                                         :duration="3000"></tm-flop>
-                            </view>
-                            <view class="mt-6 text-align-center text-size-s text-grey-darken-1">分类总数</view>
-                        </view>
-                    </view>
-                    <view class="statistics solid-top has-solid flex pt-24 pb-24">
-                        <view class="item flex-1 text-align-center">
-                            <view class="number text-size-xl text-bg-gradient-orange-accent">
-                                <tm-flop :startVal="0" :decimals="0" :endVal="statistics.comment"
-                                         :duration="3000"></tm-flop>
-                            </view>
-                            <view class="mt-6 text-align-center text-size-s text-grey-darken-1">评论数量</view>
-                        </view>
-
-                        <view class="item flex-1 text-align-center">
-                            <view class="number text-size-xl text-bg-gradient-blue-accent">
-                                <tm-flop :startVal="0" :decimals="0" :endVal="statistics.upvote"
-                                         :duration="3000"></tm-flop>
-                            </view>
-                            <view class="mt-6 text-size-s text-grey-darken-1">点赞数量</view>
-                        </view>
-                    </view>
-                </template>
-            </tm-more>
-        </view>
-
-        <!-- 功能导航 -->
-        <view class="nav-wrap ma-24 round-3">
-            <tm-grouplist :shadow="0" :round="3" :margin="[0, 0]">
-                <block v-for="(nav, index) in navList" :key="index">
-                    <tm-listitem v-if="nav.show" :title="nav.title" :left-icon="nav.leftIcon" show-left-icon
-                                 :left-icon-color="nav.leftIconColor" :value="nav.rightText" @click="fnOnNav(nav)">
-                        <template slot="rightValue">
-                            <button class="right-value-btn" v-if="nav.openType" :open-type="nav.openType">
-                                {{ nav.rightText }}
-                            </button>
-                            <text v-else>{{ nav.rightText }}</text>
-                        </template>
-                    </tm-listitem>
-                </block>
-            </tm-grouplist>
-        </view>
-        <!-- 版权 -->
-        <view v-if="copyrightConfig.enabled" class="copyright mt-40 text-size-xs text-align-center">
-            <view class="">{{ copyrightConfig.content }}</view>
-        </view>
-    </view>
+	<view class="app-page pb-24">
+		<!-- 博主信息 -->
+		<view class="blogger-info" :style="[calcProfileStyle]">
+			<image class="avatar" :src="$utils.checkAvatarUrl(bloggerInfo.avatar)" mode="aspectFill"></image>
+			<view class="profile">
+				<view class="author mt-24 text-size-g text-weight-b">{{ bloggerInfo.nickname }}</view>
+				<view class="desc mt-24 text-size-m">
+					{{ bloggerInfo.description || '这个博主很懒,竟然没写介绍~' }}
+				</view>
+			</view>
+			<image v-if="calcWaveUrl" :src="calcWaveUrl" mode="scaleToFill" class="gif-wave"></image>
+		</view>
+
+		<!-- 统计信息 -->
+		<view class="statistics-wrap bg-white">
+			<tm-more iconColor="light-blue" :open.sync="statisticsShowMore" :maxHeight="62" label=" " open-label=" ">
+				<template>
+					<view class="statistics flex pt-24 pb-24" :class="{ 'has-solid': statisticsShowMore }">
+						<view class="item flex-1 text-align-center">
+							<view class="number text-size-xl text-bg-gradient-orange-accent">
+								<tm-flop :startVal="0" :decimals="0" :endVal="statistics.post"
+									:duration="3000"></tm-flop>
+							</view>
+							<view class="mt-6 text-align-center text-size-s text-grey-darken-1">内容数量</view>
+						</view>
+						<view class="item flex-1 text-align-center">
+							<view class="number text-size-xl text-bg-gradient-green-accent">
+								<tm-flop :startVal="0" :decimals="0" :endVal="statistics.visit"
+									:duration="3000"></tm-flop>
+							</view>
+							<view class="mt-6 text-size-s text-grey-darken-1">访客数量</view>
+						</view>
+						<view class="item flex-1 text-align-center">
+							<view class="number text-size-xl text-bg-gradient-blue-accent">
+								<tm-flop :startVal="0" :decimals="0" :endVal="statistics.category"
+									:duration="3000"></tm-flop>
+							</view>
+							<view class="mt-6 text-align-center text-size-s text-grey-darken-1">分类总数</view>
+						</view>
+					</view>
+					<view class="statistics solid-top has-solid flex pt-24 pb-24">
+						<view class="item flex-1 text-align-center">
+							<view class="number text-size-xl text-bg-gradient-orange-accent">
+								<tm-flop :startVal="0" :decimals="0" :endVal="statistics.comment"
+									:duration="3000"></tm-flop>
+							</view>
+							<view class="mt-6 text-align-center text-size-s text-grey-darken-1">评论数量</view>
+						</view>
+
+						<view class="item flex-1 text-align-center">
+							<view class="number text-size-xl text-bg-gradient-blue-accent">
+								<tm-flop :startVal="0" :decimals="0" :endVal="statistics.upvote"
+									:duration="3000"></tm-flop>
+							</view>
+							<view class="mt-6 text-size-s text-grey-darken-1">点赞数量</view>
+						</view>
+					</view>
+				</template>
+			</tm-more>
+		</view>
+
+		<!-- 功能导航 -->
+		<view class="nav-wrap ma-24 round-3">
+			<tm-grouplist :shadow="0" :round="3" :margin="[0, 0]">
+				<block v-for="(nav, index) in navList" :key="index">
+					<tm-listitem v-if="nav.show" :title="nav.title" :left-icon="nav.leftIcon" show-left-icon
+						:left-icon-color="nav.leftIconColor" :value="nav.rightText" @click="fnOnNav(nav)">
+						<template slot="rightValue">
+							<button class="right-value-btn" v-if="nav.openType" :open-type="nav.openType">
+								{{ nav.rightText }}
+							</button>
+							<text v-else>{{ nav.rightText }}</text>
+						</template>
+					</tm-listitem>
+				</block>
+			</tm-grouplist>
+		</view>
+		<!-- 版权 -->
+		<view v-if="copyrightConfig.enabled" class="copyright mt-40 text-size-xs text-align-center">
+			<view class="">{{ copyrightConfig.content }}</view>
+		</view>
+	</view>
 </template>
 
 <script>
-import {checkHasAdminLogin} from '@/utils/auth.js';
-import CheckAppUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
-import {CheckWxUpdate} from '@/utils/update.js';
-
-import tmGrouplist from '@/tm-vuetify/components/tm-grouplist/tm-grouplist.vue';
-import tmListitem from '@/tm-vuetify/components/tm-listitem/tm-listitem.vue';
-import tmTranslate from '@/tm-vuetify/components/tm-translate/tm-translate.vue';
-import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue';
-import tmMore from '@/tm-vuetify/components/tm-more/tm-more.vue';
-import tmFlop from '@/tm-vuetify/components/tm-flop/tm-flop.vue';
-import tmButton from '@/tm-vuetify/components/tm-button/tm-button.vue';
-import tmIcons from '@/tm-vuetify/components/tm-icons/tm-icons.vue';
-import wave from '@/components/wave/wave.vue';
-
-export default {
-    components: {
-        tmGrouplist,
-        tmListitem,
-        tmTranslate,
-        tmPoup,
-        tmMore,
-        tmFlop,
-        tmButton,
-        tmIcons,
-        wave
-    },
-    data() {
-        return {
-            statisticsShowMore: false,
-            // 统计信息
-            statistics: {
-                post: 0, // 文章数量
-                comment: 0, // 评论数量
-                category: 0, // 分类数量
-                visit: 0, // 访客数量
-                upvote: 0 // 点赞数量
-            },
-            // 导航信息
-            navList: [],
-            miniProfileCard: {
-                show: false
-            }
-        };
-    },
-    computed: {
-        haloConfigs() {
-            return this.$tm.vx.getters().getConfigs
-        },
-        pageConfig() {
-            return this.haloConfigs.pageConfig.aboutConfig;
-        },
-        postDetailConfig() {
-            return this.haloConfigs.basicConfig.postDetailConfig;
-        },
-        bloggerInfo() {
-            return this.haloConfigs.authorConfig.blogger;
-        },
-        calcProfileStyle() {
-            const _imgUrlOr = this.pageConfig.bgImageUrl;
-            return {
-                backgroundImage: `url(${this.$utils.checkImageUrl(_imgUrlOr)})`
-            }
-        },
-        calcWaveUrl() {
-            return this.$utils.checkImageUrl(this.pageConfig.waveImageUrl);
-        },
-        copyrightConfig() {
-            return this.haloConfigs.basicConfig.copyrightConfig;
-        }
-    },
-    watch: {
-        haloConfigs: {
-            handler(val) {
-                if (!val) return;
-                this.fnGetNavList();
-            },
-            deep: true,
-            immediate: true,
-        }
-    },
-    created() {
-        this.fnGetData();
-    },
-    onPullDownRefresh() {
-        this.fnGetData();
-    },
-    methods: {
-        fnGetNavList() {
-            const systemInfo = uni.getSystemInfoSync();
-            let _isWx = false;
-            // #ifdef MP-WEIXIN
-            _isWx = true;
-            // #endif
-            this.navList = [{
-                key: 'archives',
-                title: '文章归档',
-                leftIcon: 'halocoloricon-classify',
-                leftIconColor: 'red',
-                rightText: '已归档的文章',
-                path: '/pagesA/archives/archives',
-                isAdmin: false,
-                type: 'page',
-                show: false
-            }, {
-                key: 'love',
-                title: '恋爱日记',
-                leftIcon: 'halocoloricon-attent',
-                leftIconColor: 'red',
-                rightText: '甜蜜恋人的专属',
-                path: '/pagesA/love/love',
-                isAdmin: false,
-                type: 'page',
-                show: this.haloConfigs.loveConfig.loveEnabled
-            }, {
-                key: 'disclaimers',
-                title: '友情链接',
-                leftIcon: 'icon-lianjie',
-                leftIconColor: 'blue',
-                rightText: '看看朋友们吧',
-                path: '/pagesA/friend-links/friend-links',
-                isAdmin: false,
-                type: 'page',
-                show: true
-            },
-                {
-                    key: 'disclaimers',
-                    title: '免责声明',
-                    leftIcon: 'icon-map',
-                    leftIconColor: 'red',
-                    rightText: '博客内容免责声明',
-                    path: '/pagesA/disclaimers/disclaimers',
-                    isAdmin: false,
-                    type: 'page',
-                    show: this.haloConfigs.basicConfig.disclaimers.enabled
-                },
-                {
-                    key: 'contact-blogger',
-                    title: '联系博主',
-                    leftIcon: 'icon-paper-plane',
-                    leftIconColor: 'orange',
-                    rightText: '博主常用联系方式',
-                    path: '/pagesA/contact/contact',
-                    isAdmin: false,
-                    type: 'page',
-                    show: this.haloConfigs.authorConfig.social.enabled
-                },
-                {
-                    key: 'session',
-                    title: '在线客服',
-                    leftIcon: 'icon-headset-fill',
-                    leftIconColor: 'cyan',
-                    rightText: '在线客服为您答疑',
-                    path: null,
-                    isAdmin: false,
-                    type: 'page',
-                    openType: 'contact',
-                    show: _isWx
-                },
-                {
-                    key: 'feedback',
-                    title: '意见反馈',
-                    leftIcon: 'icon-comment-dots',
-                    leftIconColor: 'light-blue',
-                    rightText: '提交系统使用反馈',
-                    path: null,
-                    isAdmin: false,
-                    type: 'page',
-                    openType: 'feedback',
-                    show: _isWx
-                },
-                {
-                    key: 'about',
-                    title: '关于项目',
-                    leftIcon: 'icon-exclamation-circle',
-                    leftIconColor: 'blue',
-                    rightText: '小莫唐尼开源项目',
-                    path: '/pagesA/about/about',
-                    isAdmin: false,
-                    type: 'page',
-                    show: this.haloConfigs.basicConfig.showAboutSystem
-                },
-                // {
-                // 	key: 'cache',
-                // 	title: '清除缓存',
-                // 	leftIcon: 'icon-delete',
-                // 	leftIconColor: 'gray',
-                // 	rightText: uni.getStorageInfoSync().currentSize + 'KB',
-                // 	path: 'clear',
-                // 	isAdmin: false,
-                // 	type: 'poup',
-                // 	show: true
-                // },
-                // {
-                // 	key: 'update',
-                // 	title: '版本更新',
-                // 	leftIcon: 'icon-clouddownload',
-                // 	leftIconColor: 'pink',
-                // 	rightText: `当前版本 v${systemInfo.appVersion}`,
-                // 	path: 'update',
-                // 	isAdmin: false,
-                // 	type: 'poup',
-                // 	show: true
-                // },
-                // {
-                //     key: 'setting',
-                //     title: '应用设置',
-                //     leftIcon: 'icon-cog',
-                //     leftIconColor: 'indigo',
-                //     rightText: `进入系统常用设置`,
-                //     path: '/pagesA/setting/setting',
-                //     isAdmin: false,
-                //     type: 'page',
-                //     show: false
-                // },
-                // {
-                //     key: 'admin',
-                //     title: '后台管理',
-                //     leftIcon: 'icon-lock',
-                //     leftIconColor: 'gray',
-                //     rightText: '博客后台系统入口',
-                //     path: '/pagesB/admin/admin',
-                //     isAdmin: true,
-                //     type: 'page',
-                //     show: false
-                // }
-            ];
-        },
-        fnGetData() {
-            this.$httpApi.v2
-                .getBlogStatistics()
-                .then(res => {
-                    this.statistics = res;
-                })
-                .catch(err => {
-                    this.$tm.toast('数据加载失败,请重试!');
-                })
-                .finally(() => {
-                    uni.stopPullDownRefresh();
-                });
-        },
-
-        fnOnNav(data) {
-            const {
-                type,
-                path,
-                isAdmin,
-                openType
-            } = data;
-            if (openType) {
-                // #ifndef MP-WEIXIN
-                return uni.$tm.toast('仅支持微信小程序打开!');
-                // #endif
-                // #ifdef MP-WEIXIN
-                return;
-                // #endif
-            }
-            if (!path) return;
-
-            // 拦截后台管理页面(插件拦截不友好,无法阻断)
-            if (isAdmin && !checkHasAdminLogin()) {
-                uni.$eShowModal({
-                    title: '提示',
-                    content: '未登录超管账号或登录状态已过期,是否立即登录?',
-                    showCancel: true,
-                    cancelText: '否',
-                    cancelColor: '#999999',
-                    confirmText: '是',
-                    confirmColor: '#03a9f4'
-                })
-                    .then(res => {
-                        uni.navigateTo({
-                            url: '/pagesB/login/login'
-                        });
-                    })
-                    .catch(err => {
-                    });
-                return;
-            }
-
-            if (type == 'poup') {
-                switch (path) {
-                    case 'clear':
-                        uni.$eShowModal({
-                            title: '提示',
-                            content: '清除后可能退出您当前的登录或已授权状态,是否确定清除缓存吗?',
-                            showCancel: true,
-                            cancelText: '否',
-                            cancelColor: '#999999',
-                            confirmText: '是',
-                            confirmColor: '#03a9f4'
-                        })
-                            .then(res => {
-                                uni.clearStorageSync();
-                                this.navList.find(x => x.key == 'cache').rightText =
-                                    uni.getStorageInfoSync().currentSize + 'KB';
-                            })
-                            .catch(err => {
-                            });
-                        break;
-                    case 'update':
-                        // #ifdef APP-PLUS
-                        CheckAppUpdate();
-                        // #endif
-
-                        // #ifdef MP-WEIXIN
-                        CheckWxUpdate(true);
-                        // #endif
-
-                        // #ifndef APP-PLUS|| MP-WEIXIN
-                        uni.showToast({
-                            icon: 'none',
-                            title: '版本无需更新!'
-                        });
-                        // #endif
-
-                        break;
-                }
-            } else if (type == 'page') {
-                uni.navigateTo({
-                    url: path
-                })
-            }
-        },
-
-        // 快捷导航页面跳转
-        fnToNavPage(item) {
-            // 判断是内置页面还是网页
-            if (this.$utils.checkIsUrl(item.path)) {
-                uni.navigateTo({
-                    url: '/pagesC/website/website?data=' +
-                        JSON.stringify({
-                            title: item.text || this.$haloConfig.title,
-                            url: item.path
-                        })
-                });
-                return;
-            }
-            switch (item.type) {
-                case 'tabbar':
-                    uni.switchTab({
-                        url: item.path
-                    });
-                    break;
-                case 'page':
-                    uni.navigateTo({
-                        url: item.path
-                    });
-                    break;
-            }
-        },
-        fnOnToAdTest(path) {
-            uni.navigateTo({
-                url: path
-            });
-        }
-    }
-};
+	import {
+		checkHasAdminLogin
+	} from '@/utils/auth.js';
+	import CheckAppUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
+	import {
+		CheckWxUpdate
+	} from '@/utils/update.js';
+
+	import tmGrouplist from '@/tm-vuetify/components/tm-grouplist/tm-grouplist.vue';
+	import tmListitem from '@/tm-vuetify/components/tm-listitem/tm-listitem.vue';
+	import tmTranslate from '@/tm-vuetify/components/tm-translate/tm-translate.vue';
+	import tmPoup from '@/tm-vuetify/components/tm-poup/tm-poup.vue';
+	import tmMore from '@/tm-vuetify/components/tm-more/tm-more.vue';
+	import tmFlop from '@/tm-vuetify/components/tm-flop/tm-flop.vue';
+	import tmButton from '@/tm-vuetify/components/tm-button/tm-button.vue';
+	import tmIcons from '@/tm-vuetify/components/tm-icons/tm-icons.vue';
+	import wave from '@/components/wave/wave.vue';
+
+	export default {
+		components: {
+			tmGrouplist,
+			tmListitem,
+			tmTranslate,
+			tmPoup,
+			tmMore,
+			tmFlop,
+			tmButton,
+			tmIcons,
+			wave
+		},
+		data() {
+			return {
+				statisticsShowMore: false,
+				// 统计信息
+				statistics: {
+					post: 0, // 文章数量
+					comment: 0, // 评论数量
+					category: 0, // 分类数量
+					visit: 0, // 访客数量
+					upvote: 0 // 点赞数量
+				},
+				// 导航信息
+				navList: [],
+				miniProfileCard: {
+					show: false
+				}
+			};
+		},
+		computed: {
+			haloConfigs() {
+				return this.$tm.vx.getters().getConfigs
+			},
+			pageConfig() {
+				return this.haloConfigs.pageConfig.aboutConfig;
+			},
+			postDetailConfig() {
+				return this.haloConfigs.basicConfig.postDetailConfig;
+			},
+			bloggerInfo() {
+				return this.haloConfigs.authorConfig.blogger;
+			},
+			calcProfileStyle() {
+				const _imgUrlOr = this.pageConfig.bgImageUrl;
+				return {
+					backgroundImage: `url(${this.$utils.checkImageUrl(_imgUrlOr)})`
+				}
+			},
+			calcWaveUrl() {
+				return this.$utils.checkImageUrl(this.pageConfig.waveImageUrl);
+			},
+			copyrightConfig() {
+				return this.haloConfigs.basicConfig.copyrightConfig;
+			}
+		},
+		watch: {
+			haloConfigs: {
+				handler(val) {
+					if (!val) return;
+					this.fnGetNavList();
+				},
+				deep: true,
+				immediate: true,
+			}
+		},
+		created() {
+			this.fnGetData();
+		},
+		onPullDownRefresh() {
+			this.fnGetData();
+		},
+		methods: {
+			fnGetNavList() {
+				const systemInfo = uni.getSystemInfoSync();
+				let _isWx = false;
+				// #ifdef MP-WEIXIN
+				_isWx = true;
+				// #endif
+				this.navList = [{
+						key: 'archives',
+						title: '文章归档',
+						leftIcon: 'halocoloricon-classify',
+						leftIconColor: 'red',
+						rightText: '已归档的文章',
+						path: '/pagesA/archives/archives',
+						isAdmin: false,
+						type: 'page',
+						show: true
+					}, {
+						key: 'love',
+						title: '恋爱日记',
+						leftIcon: 'halocoloricon-attent',
+						leftIconColor: 'red',
+						rightText: '甜蜜恋人的专属',
+						path: '/pagesA/love/love',
+						isAdmin: false,
+						type: 'page',
+						show: this.haloConfigs.loveConfig.loveEnabled
+					}, {
+						key: 'disclaimers',
+						title: '友情链接',
+						leftIcon: 'icon-lianjie',
+						leftIconColor: 'blue',
+						rightText: '看看朋友们吧',
+						path: '/pagesA/friend-links/friend-links',
+						isAdmin: false,
+						type: 'page',
+						show: true
+					},
+					{
+						key: 'disclaimers',
+						title: '免责声明',
+						leftIcon: 'icon-map',
+						leftIconColor: 'red',
+						rightText: '博客内容免责声明',
+						path: '/pagesA/disclaimers/disclaimers',
+						isAdmin: false,
+						type: 'page',
+						show: this.haloConfigs.basicConfig.disclaimers.enabled
+					},
+					{
+						key: 'contact-blogger',
+						title: '联系博主',
+						leftIcon: 'icon-paper-plane',
+						leftIconColor: 'orange',
+						rightText: '博主常用联系方式',
+						path: '/pagesA/contact/contact',
+						isAdmin: false,
+						type: 'page',
+						show: this.haloConfigs.authorConfig.social.enabled
+					},
+					{
+						key: 'session',
+						title: '在线客服',
+						leftIcon: 'icon-headset-fill',
+						leftIconColor: 'cyan',
+						rightText: '在线客服为您答疑',
+						path: null,
+						isAdmin: false,
+						type: 'page',
+						openType: 'contact',
+						show: _isWx
+					},
+					{
+						key: 'feedback',
+						title: '意见反馈',
+						leftIcon: 'icon-comment-dots',
+						leftIconColor: 'light-blue',
+						rightText: '提交系统使用反馈',
+						path: null,
+						isAdmin: false,
+						type: 'page',
+						openType: 'feedback',
+						show: _isWx
+					},
+					{
+						key: 'about',
+						title: '关于项目',
+						leftIcon: 'icon-exclamation-circle',
+						leftIconColor: 'blue',
+						rightText: '小莫唐尼开源项目',
+						path: '/pagesA/about/about',
+						isAdmin: false,
+						type: 'page',
+						show: this.haloConfigs.basicConfig.showAboutSystem
+					},
+					// {
+					// 	key: 'cache',
+					// 	title: '清除缓存',
+					// 	leftIcon: 'icon-delete',
+					// 	leftIconColor: 'gray',
+					// 	rightText: uni.getStorageInfoSync().currentSize + 'KB',
+					// 	path: 'clear',
+					// 	isAdmin: false,
+					// 	type: 'poup',
+					// 	show: true
+					// },
+					// {
+					// 	key: 'update',
+					// 	title: '版本更新',
+					// 	leftIcon: 'icon-clouddownload',
+					// 	leftIconColor: 'pink',
+					// 	rightText: `当前版本 v${systemInfo.appVersion}`,
+					// 	path: 'update',
+					// 	isAdmin: false,
+					// 	type: 'poup',
+					// 	show: true
+					// },
+					// {
+					//     key: 'setting',
+					//     title: '应用设置',
+					//     leftIcon: 'icon-cog',
+					//     leftIconColor: 'indigo',
+					//     rightText: `进入系统常用设置`,
+					//     path: '/pagesA/setting/setting',
+					//     isAdmin: false,
+					//     type: 'page',
+					//     show: false
+					// },
+					// {
+					//     key: 'admin',
+					//     title: '后台管理',
+					//     leftIcon: 'icon-lock',
+					//     leftIconColor: 'gray',
+					//     rightText: '博客后台系统入口',
+					//     path: '/pagesB/admin/admin',
+					//     isAdmin: true,
+					//     type: 'page',
+					//     show: false
+					// }
+				];
+			},
+			fnGetData() {
+				this.$httpApi.v2
+					.getBlogStatistics()
+					.then(res => {
+						this.statistics = res;
+					})
+					.catch(err => {
+						this.$tm.toast('数据加载失败,请重试!');
+					})
+					.finally(() => {
+						uni.stopPullDownRefresh();
+					});
+			},
+
+			fnOnNav(data) {
+				const {
+					type,
+					path,
+					isAdmin,
+					openType
+				} = data;
+				if (openType) {
+					// #ifndef MP-WEIXIN
+					return uni.$tm.toast('仅支持微信小程序打开!');
+					// #endif
+					// #ifdef MP-WEIXIN
+					return;
+					// #endif
+				}
+				if (!path) return;
+
+				// 拦截后台管理页面(插件拦截不友好,无法阻断)
+				if (isAdmin && !checkHasAdminLogin()) {
+					uni.$eShowModal({
+							title: '提示',
+							content: '未登录超管账号或登录状态已过期,是否立即登录?',
+							showCancel: true,
+							cancelText: '否',
+							cancelColor: '#999999',
+							confirmText: '是',
+							confirmColor: '#03a9f4'
+						})
+						.then(res => {
+							uni.navigateTo({
+								url: '/pagesB/login/login'
+							});
+						})
+						.catch(err => {});
+					return;
+				}
+
+				if (type == 'poup') {
+					switch (path) {
+						case 'clear':
+							uni.$eShowModal({
+									title: '提示',
+									content: '清除后可能退出您当前的登录或已授权状态,是否确定清除缓存吗?',
+									showCancel: true,
+									cancelText: '否',
+									cancelColor: '#999999',
+									confirmText: '是',
+									confirmColor: '#03a9f4'
+								})
+								.then(res => {
+									uni.clearStorageSync();
+									this.navList.find(x => x.key == 'cache').rightText =
+										uni.getStorageInfoSync().currentSize + 'KB';
+								})
+								.catch(err => {});
+							break;
+						case 'update':
+							// #ifdef APP-PLUS
+							CheckAppUpdate();
+							// #endif
+
+							// #ifdef MP-WEIXIN
+							CheckWxUpdate(true);
+							// #endif
+
+							// #ifndef APP-PLUS|| MP-WEIXIN
+							uni.showToast({
+								icon: 'none',
+								title: '版本无需更新!'
+							});
+							// #endif
+
+							break;
+					}
+				} else if (type == 'page') {
+					uni.navigateTo({
+						url: path
+					})
+				}
+			},
+
+			// 快捷导航页面跳转
+			fnToNavPage(item) {
+				// 判断是内置页面还是网页
+				if (this.$utils.checkIsUrl(item.path)) {
+					uni.navigateTo({
+						url: '/pagesC/website/website?data=' +
+							JSON.stringify({
+								title: item.text || this.$haloConfig.title,
+								url: item.path
+							})
+					});
+					return;
+				}
+				switch (item.type) {
+					case 'tabbar':
+						uni.switchTab({
+							url: item.path
+						});
+						break;
+					case 'page':
+						uni.navigateTo({
+							url: item.path
+						});
+						break;
+				}
+			},
+			fnOnToAdTest(path) {
+				uni.navigateTo({
+					url: path
+				});
+			}
+		}
+	};
 </script>
 
 <style scoped lang="scss">
-.app-page {
-    width: 100vw;
-    min-height: 100vh;
-}
-
-.blogger-info {
-    position: relative;
-    width: 100%;
-    height: 600rpx;
-    background-size: cover;
-    background-repeat: no-repeat;
-
-    &:before {
-        content: '';
-        width: 100%;
-        height: 100%;
-        position: absolute;
-        background-color: rgba(0, 0, 0, 0.3);
-        background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAKUlEQVQImU3IMREAIAgAwJfNkQCEsH8cijjpMf6vnXlQaIiJFx+omEBfmqIEZLe2jzcAAAAASUVORK5CYII=);
-        z-index: 0;
-    }
-
-    .avatar {
-        position: absolute;
-        top: 200rpx;
-        left: 50%;
-        transform: translateX(-50%);
-        width: 130rpx;
-        height: 130rpx;
-        border-radius: 50%;
-        border: 6rpx solid #ffffff;
-    }
-
-    .profile {
-        width: 100%;
-        position: absolute;
-        top: 340rpx;
-        left: 0;
-        z-index: 6;
-        color: #fff;
-        text-align: center;
-    }
-
-    .gif-wave {
-        position: absolute;
-        width: 100%;
-        bottom: 0;
-        left: 0;
-        z-index: 99;
-        mix-blend-mode: screen;
-        height: 100rpx;
-    }
-}
-
-.profile-card {
-    position: relative;
-    background-color: #fff;
-    overflow: hidden;
-
-    &_label {
-        width: 120rpx;
-        position: absolute;
-        top: 8rpx;
-        left: -36rpx;
-        transform: rotateZ(-45deg);
-        text-align: center;
-        color: #ffffff;
-    }
-
-    .left {
-        width: 260rpx;
-
-        .avatar {
-            width: 130rpx;
-            height: 130rpx;
-            border-radius: 50%;
-        }
-    }
-
-    .right {
-        width: 0;
-        flex-grow: 1;
-
-        .photos {
-            &-img {
-                width: 130rpx;
-                height: 130rpx;
-            }
-        }
-
-        .photos-img + .photos-img {
-            margin-left: 12rpx;
-        }
-    }
-}
-
-.statistics-wrap {
-    box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
-    border-radius: 0rpx 0rpx 24rpx 24rpx;
-    overflow: hidden;
-
-    .statistics {
-        &.has-solid {
-            .item + .item {
-                border-left: 2rpx solid #fafafa;
-            }
-        }
-
-        &.solid-top {
-            position: relative;
-
-            &:before {
-                content: '';
-                position: absolute;
-                top: 0;
-                left: 36rpx;
-                right: 36rpx;
-                height: 2rpx;
-                background-color: #fafafa;
-            }
-        }
-    }
-}
-
-.quick-nav {
-    background-color: #fff;
-    box-sizing: border-box;
-    box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
-
-    .name {
-        color: var(--main-text-color);
-    }
-
-    .icon {
-        border-radius: 50%;
-        font-size: 80rpx;
-    }
-}
-
-.nav-wrap {
-    box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
-    background-color: #fff;
-}
-
-.copyright {
-    color: #c0c4c7;
-}
-
-.right-value-btn {
-    background-color: transparent;
-    border: none;
-    padding: 0;
-    margin: 0;
-    font-size: 24rpx;
-    color: #c0c4c7;
-    border-radius: 0;
-    line-height: initial;
-
-    &::after {
-        border: none;
-        border-radius: 0;
-        transform: initial;
-    }
-}
-</style>
+	.app-page {
+		width: 100vw;
+		min-height: 100vh;
+	}
+
+	.blogger-info {
+		position: relative;
+		width: 100%;
+		height: 600rpx;
+		background-size: cover;
+		background-repeat: no-repeat;
+
+		&:before {
+			content: '';
+			width: 100%;
+			height: 100%;
+			position: absolute;
+			background-color: rgba(0, 0, 0, 0.3);
+			background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAKUlEQVQImU3IMREAIAgAwJfNkQCEsH8cijjpMf6vnXlQaIiJFx+omEBfmqIEZLe2jzcAAAAASUVORK5CYII=);
+			z-index: 0;
+		}
+
+		.avatar {
+			position: absolute;
+			top: 200rpx;
+			left: 50%;
+			transform: translateX(-50%);
+			width: 130rpx;
+			height: 130rpx;
+			border-radius: 50%;
+			border: 6rpx solid #ffffff;
+		}
+
+		.profile {
+			width: 100%;
+			position: absolute;
+			top: 340rpx;
+			left: 0;
+			z-index: 6;
+			color: #fff;
+			text-align: center;
+		}
+
+		.gif-wave {
+			position: absolute;
+			width: 100%;
+			bottom: 0;
+			left: 0;
+			z-index: 99;
+			mix-blend-mode: screen;
+			height: 100rpx;
+		}
+	}
+
+	.profile-card {
+		position: relative;
+		background-color: #fff;
+		overflow: hidden;
+
+		&_label {
+			width: 120rpx;
+			position: absolute;
+			top: 8rpx;
+			left: -36rpx;
+			transform: rotateZ(-45deg);
+			text-align: center;
+			color: #ffffff;
+		}
+
+		.left {
+			width: 260rpx;
+
+			.avatar {
+				width: 130rpx;
+				height: 130rpx;
+				border-radius: 50%;
+			}
+		}
+
+		.right {
+			width: 0;
+			flex-grow: 1;
+
+			.photos {
+				&-img {
+					width: 130rpx;
+					height: 130rpx;
+				}
+			}
+
+			.photos-img+.photos-img {
+				margin-left: 12rpx;
+			}
+		}
+	}
+
+	.statistics-wrap {
+		box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
+		border-radius: 0rpx 0rpx 24rpx 24rpx;
+		overflow: hidden;
+
+		.statistics {
+			&.has-solid {
+				.item+.item {
+					border-left: 2rpx solid #fafafa;
+				}
+			}
+
+			&.solid-top {
+				position: relative;
+
+				&:before {
+					content: '';
+					position: absolute;
+					top: 0;
+					left: 36rpx;
+					right: 36rpx;
+					height: 2rpx;
+					background-color: #fafafa;
+				}
+			}
+		}
+	}
+
+	.quick-nav {
+		background-color: #fff;
+		box-sizing: border-box;
+		box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
+
+		.name {
+			color: var(--main-text-color);
+		}
+
+		.icon {
+			border-radius: 50%;
+			font-size: 80rpx;
+		}
+	}
+
+	.nav-wrap {
+		box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03);
+		background-color: #fff;
+	}
+
+	.copyright {
+		color: #c0c4c7;
+	}
+
+	.right-value-btn {
+		background-color: transparent;
+		border: none;
+		padding: 0;
+		margin: 0;
+		font-size: 24rpx;
+		color: #c0c4c7;
+		border-radius: 0;
+		line-height: initial;
+
+		&::after {
+			border: none;
+			border-radius: 0;
+			transform: initial;
+		}
+	}
+</style>

+ 512 - 372
pagesA/archives/archives.vue

@@ -1,379 +1,519 @@
 <template>
-    <view class="app-page">
-        <view class="e-fixed">
-            <tm-tabs color="light-blue" v-model="tab.activeIndex" :list="tab.list" align="center" @change="fnOnTabChange"></tm-tabs>
-        </view>
-        <!-- 占位区域 -->
-        <view style="width: 100vw;height: 90rpx;"></view>
-
-        <!-- 骨架屏:加载区域 -->
-        <view v-if="loading != 'success'" class="loading-wrap">
-            <tm-skeleton model="listAvatr"></tm-skeleton>
-            <tm-skeleton model="listAvatr"></tm-skeleton>
-            <tm-skeleton model="listAvatr"></tm-skeleton>
-        </view>
-
-        <!-- 加载完成区域 -->
-        <block v-else>
-            <view v-if="dataList.length == 0" class="list-empty flex flex-center">
-                <tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无归档的文章"></tm-empty>
-            </view>
-            <view v-else class="e-timeline tm-timeline mt-24">
-                <block v-for="(item, index) in dataList" :key="index">
-                    <view class="tm-timeline-item tm-timeline-item--leftDir">
-                        <view style="width: 160rpx;">
-                            <view :style="{ width: '24rpx', height: '24rpx' }" :class="[black_tmeme ? 'bk' : '']"
-                                  class="flex-center rounded tm-timeline-jidian border-white-a-2 grey-lighten-2 light-blue shadow-primary-4"></view>
-                            <view :style="{ marginTop: '-24rpx' }"
-                                  :class="[index !== dataList.length - 1 ? 'tm-timeline-item-boder' : '', black_tmeme ? 'bk' : '']"
-                                  class="grey-lighten-2"></view>
-                        </view>
-                        <view class="tm-timeline-item-content relative">
-                            <view class="tm-timeline-item-left">
-                                <view class="time text-weight-b mb-24">
-                                    {{ item.year }}年
-                                    <block v-if="tab.activeIndex == 0">{{ item.month }}月</block>
-                                    <text class="text-size-s text-grey-darken-1 ml-24">(共发布 {{ item.posts.length }} 篇文章)</text>
-                                </view>
-                                <block v-if="item.posts.length != 0">
-                                    <block v-for="(post, postIndex) in item.posts" :key="post.id">
-                                        <tm-translate animation-name="fadeUp" :wait="calcAniWait(postIndex)">
-                                            <view class="flex post shadow-3 pa-24 mb-24" :class="[globalAppSettings.layout.cardType]"
-                                                  @click="fnToArticleDetail(post)">
-                                                <image class="post-thumbnail" :src="$utils.checkThumbnailUrl(post.thumbnail)"
-                                                       mode="aspectFill"></image>
-                                                <view class="post-info pl-20">
-                                                    <view class="post-info_title text-overflow">{{ post.title }}</view>
-                                                    <view class="post-info_summary text-overflow-2 mt-12 text-size-s text-grey-darken-1">
-                                                        {{ post.summary }}
-                                                    </view>
-                                                    <view class="post-info_time mt-12  text-size-s text-grey-darken-1">
-                                                        <text class="iconfont icon-clock text-size-s mr-6"></text>
-                                                        <text class="time-label">发布时间:</text>
-                                                        {{ {d: post.createTime, f: 'yyyy年MM月dd日 星期w'} | formatTime }}
-                                                    </view>
-                                                </view>
-                                            </view>
-                                        </tm-translate>
-                                    </block>
-                                </block>
-                                <view v-else class="post-empty text-size-m text-grey-darken-1">该日期下暂无归档文章!</view>
-                            </view>
-                        </view>
-                    </view>
-                </block>
-            </view>
-            <!-- 返回顶部 -->
-            <tm-flotbutton @click="fnToTopPage" size="m" color="bg-gradient-light-blue-accent" icon="icon-angle-up"></tm-flotbutton>
-        </block>
-    </view>
+	<view class="app-page">
+		<view class="e-fixed">
+			<tm-tabs color="light-blue" v-model="tab.activeIndex" :list="tab.list" align="center"
+				@change="fnOnTabChange"></tm-tabs>
+		</view>
+		<!-- 占位区域 -->
+		<view style="width: 100vw;height: 90rpx;"></view>
+
+		<!-- 骨架屏:加载区域 -->
+		<view v-if="loading != 'success'" class="loading-wrap">
+			<tm-skeleton model="listAvatr"></tm-skeleton>
+			<tm-skeleton model="listAvatr"></tm-skeleton>
+			<tm-skeleton model="listAvatr"></tm-skeleton>
+		</view>
+
+		<!-- 加载完成区域 -->
+		<block v-else>
+			<view v-if="dataList.length == 0" class="list-empty flex flex-center">
+				<tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无归档的文章"></tm-empty>
+			</view>
+			<view v-else class="e-timeline tm-timeline mt-24">
+				<block v-for="(item, index) in dataList" :key="index">
+					<view class="tm-timeline-item tm-timeline-item--leftDir">
+						<view style="width: 160rpx;">
+							<view :style="{ width: '24rpx', height: '24rpx' }" :class="[black_tmeme ? 'bk' : '']"
+								class="flex-center rounded tm-timeline-jidian border-white-a-2 grey-lighten-2 light-blue shadow-primary-4">
+							</view>
+							<view :style="{ marginTop: '-24rpx' }"
+								:class="[index !== dataList.length - 1 ? 'tm-timeline-item-boder' : '', black_tmeme ? 'bk' : '']"
+								class="grey-lighten-2"></view>
+						</view>
+						<view class="tm-timeline-item-content relative">
+							<view class="tm-timeline-item-left">
+								<view class="flex time text-weight-b mb-24">
+									<text>{{ item.year }}年</text>
+									<text v-if="tab.activeIndex == 0">{{ item.month }}月</text>
+									<view class="text-size-s text-grey-darken-1 ml-12">
+										(共 {{ item.posts.length }} 篇文章)
+									</view>
+								</view>
+								<block v-if="item.posts.length != 0">
+									<block v-for="(post, postIndex) in item.posts" :key="post.metadata.name">
+										<tm-translate animation-name="fadeUp" :wait="calcAniWait(postIndex)">
+											<view class="flex post shadow-3 pa-24 mb-24"
+												:class="[globalAppSettings.layout.cardType]"
+												@click="fnToArticleDetail(post)">
+												<image class="post-thumbnail"
+													:src="$utils.checkThumbnailUrl(post.spec.cover)" mode="aspectFill">
+												</image>
+												<view class="post-info pl-20">
+													<view class="post-info_title text-overflow">{{ post.spec.title }}
+													</view>
+													<view
+														class="post-info_summary text-overflow-2 mt-12 text-size-s text-grey-darken-1">
+														{{ post.status.excerpt }}
+													</view>
+													<view class="post-info_time mt-12  text-size-s text-grey-darken-1">
+														<text class="iconfont icon-clock text-size-s mr-6"></text>
+														<text class="time-label">发布时间:</text>
+														{{ {d: post.spec.publishTime, f: 'yyyy年MM月dd日 星期w'} | formatTime }}
+													</view>
+												</view>
+											</view>
+										</tm-translate>
+									</block>
+								</block>
+								<view v-else class="post-empty text-size-m text-grey-darken-1">该日期下暂无归档文章!</view>
+							</view>
+						</view>
+					</view>
+				</block>
+			</view>
+			<view class="load-text mt-12">{{ loadMoreText }}</view>
+			<!-- 返回顶部 -->
+			<tm-flotbutton @click="fnToTopPage" size="m" color="bg-gradient-light-blue-accent"
+				icon="icon-angle-up"></tm-flotbutton>
+		</block>
+	</view>
 </template>
 
 <script>
-import tmSkeleton from '@/tm-vuetify/components/tm-skeleton/tm-skeleton.vue';
-import tmTranslate from '@/tm-vuetify/components/tm-translate/tm-translate.vue';
-import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
-import tmTabs from '@/tm-vuetify/components/tm-tabs/tm-tabs.vue';
-import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
-
-export default {
-    components: {
-        tmSkeleton,
-        tmTranslate,
-        tmFlotbutton,
-        tmTabs,
-        tmEmpty
-    },
-    data() {
-        return {
-            loading: 'loading',
-            tab: {
-                activeIndex: 0,
-                list: ['按月份查看', '按年份查看']
-            },
-            queryParams: {
-                size: 10,
-                page: 0
-            },
-            result: null,
-            dataList: [],
-            api: 'getMonthArchives'
-        };
-    },
-    computed: {
-        black_tmeme: function () {
-            return this.$tm.vx.state().tmVuetify.black;
-        },
-        color_tmeme: function () {
-            return this.$tm.vx.state().tmVuetify.color;
-        }
-    },
-    created() {
-        this.fnGetData();
-    },
-    onPullDownRefresh() {
-        this.fnGetData();
-        this.queryParams.page = 0;
-    },
-
-    methods: {
-        fnOnTabChange(index) {
-            this.fnResetSetAniWaitIndex();
-            const _api = ['getMonthArchives', 'getYearArchives'];
-            this.api = _api[index];
-            this.queryParams.page = 0;
-            this.fnGetData();
-        },
-        fnGetData() {
-            this.loading = 'loading';
-            // uni.showLoading({
-            // 	mask: true,
-            // 	title: '加载中...'
-            // });
-            this.$httpApi[this.api](this.queryParams)
-                .then(res => {
-                    this.result = res.data;
-                    this.dataList = res.data;
-                    setTimeout(() => {
-                        this.loading = 'success';
-                    }, 500);
-                })
-                .catch(err => {
-                    console.error(err);
-                    this.loading = 'error';
-                })
-                .finally(() => {
-                    setTimeout(() => {
-                        uni.hideLoading();
-                        uni.stopPullDownRefresh();
-                    }, 500);
-                });
-        },
-        //跳转文章详情
-        fnToArticleDetail(article) {
-            uni.navigateTo({
-                url: '/pagesA/article-detail/article-detail?articleId=' + article.id,
-                animationType: 'slide-in-right'
-            });
-        }
-    }
-};
+	import tmSkeleton from '@/tm-vuetify/components/tm-skeleton/tm-skeleton.vue';
+	import tmTranslate from '@/tm-vuetify/components/tm-translate/tm-translate.vue';
+	import tmFlotbutton from '@/tm-vuetify/components/tm-flotbutton/tm-flotbutton.vue';
+	import tmTabs from '@/tm-vuetify/components/tm-tabs/tm-tabs.vue';
+	import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
+	import qs from 'qs'
+
+	export default {
+		components: {
+			tmSkeleton,
+			tmTranslate,
+			tmFlotbutton,
+			tmTabs,
+			tmEmpty
+		},
+		data() {
+			return {
+				loading: 'loading',
+				tab: {
+					activeIndex: 0,
+					list: ['按月份查看', '按年份查看']
+				},
+				queryParams: {
+					size: 10,
+					page: 1
+				},
+				result: {},
+				cacheDataList: [], // 所有请求的缓存数据
+				dataList: [], // 显示的数据
+				isLoadMore: false,
+				loadMoreText: "加载中..."
+			};
+		},
+		computed: {
+			black_tmeme: function() {
+				return this.$tm.vx.state().tmVuetify.black;
+			},
+			color_tmeme: function() {
+				return this.$tm.vx.state().tmVuetify.color;
+			}
+		},
+		created() {
+			this.fnGetData();
+		},
+		onPullDownRefresh() {
+			this.isLoadMore = false;
+			this.queryParams.page = 1;
+			this.fnGetData();
+		},
+		onReachBottom(e) {
+			if (this.result.hasNext) {
+				this.queryParams.page += 1;
+				this.isLoadMore = true;
+				this.fnGetData();
+			} else {
+				uni.showToast({
+					icon: 'none',
+					title: '没有更多数据了'
+				});
+			}
+		},
+		methods: {
+			fnOnTabChange(index) {
+				this.fnResetSetAniWaitIndex();
+				this.queryParams.page = 0;
+				this.dataList = this.handleGetShowDataList(this.handleGetPosts(this.cacheDataList))
+			},
+			fnGetData() {
+				if (this.isLoadMore) {
+					uni.showLoading({
+						title: "加载中..."
+					})
+				} else {
+					this.loading = 'loading';
+					this.loadMoreText = "加载中...";
+				}
+
+				const paramsStr = qs.stringify(this.queryParams, {
+					allowDots: true,
+					encodeValuesOnly: true,
+					skipNulls: true,
+					encode: true,
+					arrayFormat: 'repeat'
+				})
+				uni.request({
+					url: this.$baseApiUrl + '/apis/api.content.halo.run/v1alpha1/posts?' + paramsStr,
+					method: 'GET',
+					success: (res) => {
+						const data = res.data;
+						this.result = data;
+						const posts = this.handleGetPosts(data.items)
+						const showDataList = this.handleGetShowDataList(posts)
+						if (this.isLoadMore) {
+							this.cacheDataList = this.cacheDataList.concat(data.items);
+							this.handleMergeDataList2(showDataList)
+						} else {
+							this.dataList = []
+							this.cacheDataList = data.items;
+							this.dataList = showDataList
+						}
+
+						this.loading = 'success';
+						this.loadMoreText = data.hasNext ? '上拉加载更多' : '呜呜,没有更多数据啦~';
+						uni.hideLoading();
+						uni.stopPullDownRefresh();
+					},
+					fail: (err) => {
+						this.loading = 'error';
+						this.loadMoreText = '加载失败,请下拉刷新!';
+						uni.$tm.toast(err.message || '数据加载失败!');
+						uni.hideLoading();
+						uni.stopPullDownRefresh();
+					}
+				})
+			},
+			// 处理数据分类
+			handleGetPosts(dataList) {
+				const posts = {}
+				const postLabelYearKey = "content.halo.run/archive-year"
+				const postLabelMonthKey = "content.halo.run/archive-month"
+				dataList.forEach(item => {
+					let postItemKey = ""
+					if (this.tab.activeIndex == 0) {
+						postItemKey =
+							`${item.metadata.labels[postLabelYearKey]}-${item.metadata.labels[postLabelMonthKey]}`
+					} else {
+						postItemKey = `${item.metadata.labels[postLabelYearKey]}`
+					}
+					if (posts[postItemKey]) {
+						posts[postItemKey].push(item)
+					} else {
+						posts[postItemKey] = [item]
+					}
+				})
+				return posts;
+			},
+			// 根据分类的数据,处理成显示的数据
+			handleGetShowDataList(posts) {
+				const dataListResult = []
+				Object.keys(posts).forEach((key) => {
+					const postData = {
+						sort: 0,
+						key: key,
+						year: key,
+						month: "",
+						posts: posts[key]
+					}
+					if (this.tab.activeIndex == 0) {
+						const splitDate = key.split("-")
+						postData.year = splitDate[0]
+						postData.month = splitDate[1]
+						postData.sort = Number(key.replace("-", ""))
+					} else {
+						postData.sort = Number(key)
+					}
+					dataListResult.push(postData)
+				})
+				if (this.tab.activeIndex == 1) {
+					dataListResult.sort((a, b) => {
+						return Number(b.year) - Number(a.year)
+					})
+				}
+				return dataListResult;
+			},
+			handleMergeDataList(list1, list2) {
+				// 将list1转换为以key为键的对象
+				let merged = list1.reduce((acc, item) => {
+					acc[item.key] = {
+						...item
+					};
+					return acc;
+				}, {});
+
+				// 遍历list2,合并posts数组或添加新对象
+				list2.forEach(item => {
+					if (merged[item.key]) {
+						// 如果key已存在,合并posts数组
+						merged[item.key].posts = [...merged[item.key].posts, ...item.posts];
+					} else {
+						// 如果key不存在,添加新对象
+						merged[item.key] = {
+							...item
+						};
+					}
+				});
+
+				// 将对象转换回数组
+				return Object.values(merged);
+			},
+			handleMergeDataList2(list) {
+				const tempList = [...list]
+				this.dataList.forEach((item, index) => {
+					const find = this.dataList.find(x => x.key == item.key)
+					if (find) {
+						item.posts.forEach(post => {
+							if (!find.posts.some(x => x.metadata.name == post.metadata.name)) {
+								find.posts.push(post)
+							}
+						})
+						tempList.splice(index, 1)
+					}
+				})
+				tempList.forEach(post => {
+					this.dataList.push(post)
+				})
+				console.log("this.dataList", this.dataList)
+			},
+			fnToArticleDetail(article) {
+				uni.navigateTo({
+					url: '/pagesA/article-detail/article-detail?name=' + article.metadata.name,
+					animationType: 'slide-in-right'
+				});
+			}
+		}
+	};
 </script>
 
 <style lang="scss" scoped>
-.app-page {
-    width: 100vw;
-    min-height: 100vh;
-    display: flex;
-    flex-direction: column;
-    background-color: #fafafd;
-}
-
-.loading-wrap {
-    padding: 24rpx;
-}
-
-.list-empty {
-    width: 100vw;
-    height: 100vh;
-}
-
-.statistics {
-    background-color: #ffffff;
-}
-
-.e-timeline {
-    ::v-deep {
-        .tm-timeline-item > view:first-child {
-            width: 110rpx !important;
-        }
-
-        .tm-timeline-item-left {
-            max-width: 580rpx !important;
-            width: 100% !important;
-        }
-    }
-}
-
-.tm-timeline {
-    .tm-timeline-item {
-
-        .tm-timeline-item-left,
-        .tm-timeline-item-right {
-            width: 200rpx;
-            flex-shrink: 0;
-        }
-
-        .tm-timeline-item-content {
-            display: flex;
-            justify-content: center;
-            align-items: flex-start;
-            align-content: flex-start;
-        }
-
-        .tm-timeline-jidian {
-            margin: auto;
-        }
-
-        &.tm-timeline-item--leftDir {
-            display: flex;
-            flex-flow: row;
-
-            &.endright {
-                justify-content: flex-end;
-            }
-
-            .tm-timeline-item-left,
-            .tm-timeline-item-right {
-                width: auto;
-                max-width: 400rpx;
-            }
-
-            .tm-timeline-item-boder {
-                height: 100%;
-                width: 1px;
-                margin: auto;
-            }
-
-            .tm-timeline-jidian {
-                position: relative;
-                margin: auto;
-                z-index: 2;
-            }
-
-            .tm-timeline-item-content {
-                display: flex;
-                justify-content: flex-start;
-                align-items: flex-start;
-                align-content: flex-start;
-            }
-        }
-    }
-}
-
-.post {
-    width: 560rpx;
-    border-radius: 12rpx;
-    background-color: #fff;
-
-    &.lr_image_text {
-    }
-
-    &.lr_text_image {
-        .post-thumbnail {
-            order: 2;
-        }
-
-        .post-info {
-            order: 1;
-            padding-left: 0;
-            padding-right: 24rpx;
-        }
-    }
-
-    &.tb_image_text {
-        flex-direction: column;
-
-        .post-thumbnail {
-            width: 100%;
-            height: 220rpx;
-        }
-
-        .post-info {
-            width: 100%;
-            padding-left: 0;
-
-            &_title {
-                margin-top: 12rpx;
-            }
-
-            &_time {
-                .iconfont {
-                    display: none;
-                }
-
-                .time-label {
-                    display: inline-block;
-                }
-            }
-        }
-    }
-
-    &.tb_text_image {
-        flex-direction: column;
-
-        .post-thumbnail {
-            order: 2;
-            width: 100%;
-            height: 220rpx;
-            margin-top: 12rpx;
-        }
-
-        .post-info {
-            order: 1;
-            width: 100%;
-            padding-left: 0;
-
-            &_time {
-                .iconfont {
-                    display: none;
-                }
-
-                .time-label {
-                    display: inline-block;
-                }
-            }
-        }
-    }
-
-    &.only_text {
-        .post-info {
-            padding: 6rpx;
-
-            &_time {
-                margin-top: 20rpx;
-
-                .iconfont {
-                    display: none;
-                }
-
-                .time-label {
-                    display: inline-block;
-                }
-            }
-        }
-
-        .post-thumbnail {
-            display: none;
-        }
-    }
-}
-
-.post-thumbnail {
-    border-radius: 6rpx;
-    width: 200rpx;
-    height: 170rpx;
-}
-
-.post-info {
-    width: 0;
-    flex-grow: 1;
-
-    &_title {
-        color: #303133;
-        font-size: 28rpx;
-        font-weight: bold;
-    }
-
-    &_summary {
-        display: -webkit-box;
-        line-height: 1.6;
-    }
-
-    &_time {
-        .time-label {
-            display: none;
-        }
-    }
-}
-</style>
+	.app-page {
+		width: 100vw;
+		min-height: 100vh;
+		display: flex;
+		flex-direction: column;
+		background-color: #fafafd;
+	}
+
+	.loading-wrap {
+		padding: 24rpx;
+	}
+
+	.list-empty {
+		width: 100vw;
+		height: 100vh;
+	}
+
+	.statistics {
+		background-color: #ffffff;
+	}
+
+	.e-timeline {
+		::v-deep {
+			.tm-timeline-item>view:first-child {
+				width: 110rpx !important;
+			}
+
+			.tm-timeline-item-left {
+				max-width: 580rpx !important;
+				width: 100% !important;
+			}
+		}
+	}
+
+	.tm-timeline {
+		.tm-timeline-item {
+
+			.tm-timeline-item-left,
+			.tm-timeline-item-right {
+				width: 200rpx;
+				flex-shrink: 0;
+			}
+
+			.tm-timeline-item-content {
+				display: flex;
+				justify-content: center;
+				align-items: flex-start;
+				align-content: flex-start;
+			}
+
+			.tm-timeline-jidian {
+				margin: auto;
+			}
+
+			&.tm-timeline-item--leftDir {
+				display: flex;
+				flex-flow: row;
+
+				&.endright {
+					justify-content: flex-end;
+				}
+
+				.tm-timeline-item-left,
+				.tm-timeline-item-right {
+					width: auto;
+					max-width: 400rpx;
+				}
+
+				.tm-timeline-item-boder {
+					height: 100%;
+					width: 1px;
+					margin: auto;
+				}
+
+				.tm-timeline-jidian {
+					position: relative;
+					margin: auto;
+					z-index: 2;
+				}
+
+				.tm-timeline-item-content {
+					display: flex;
+					justify-content: flex-start;
+					align-items: flex-start;
+					align-content: flex-start;
+				}
+			}
+		}
+	}
+
+	.post {
+		width: 560rpx;
+		border-radius: 12rpx;
+		background-color: #fff;
+
+		&.lr_image_text {}
+
+		&.lr_text_image {
+			.post-thumbnail {
+				order: 2;
+			}
+
+			.post-info {
+				order: 1;
+				padding-left: 0;
+				padding-right: 24rpx;
+			}
+		}
+
+		&.tb_image_text {
+			flex-direction: column;
+
+			.post-thumbnail {
+				width: 100%;
+				height: 220rpx;
+			}
+
+			.post-info {
+				width: 100%;
+				padding-left: 0;
+
+				&_title {
+					margin-top: 12rpx;
+				}
+
+				&_time {
+					.iconfont {
+						display: none;
+					}
+
+					.time-label {
+						display: inline-block;
+					}
+				}
+			}
+		}
+
+		&.tb_text_image {
+			flex-direction: column;
+
+			.post-thumbnail {
+				order: 2;
+				width: 100%;
+				height: 220rpx;
+				margin-top: 12rpx;
+			}
+
+			.post-info {
+				order: 1;
+				width: 100%;
+				padding-left: 0;
+
+				&_time {
+					.iconfont {
+						display: none;
+					}
+
+					.time-label {
+						display: inline-block;
+					}
+				}
+			}
+		}
+
+		&.only_text {
+			.post-info {
+				padding: 6rpx;
+
+				&_time {
+					margin-top: 20rpx;
+
+					.iconfont {
+						display: none;
+					}
+
+					.time-label {
+						display: inline-block;
+					}
+				}
+			}
+
+			.post-thumbnail {
+				display: none;
+			}
+		}
+	}
+
+	.post-thumbnail {
+		border-radius: 6rpx;
+		width: 200rpx;
+		height: 170rpx;
+	}
+
+	.post-info {
+		width: 0;
+		flex-grow: 1;
+
+		&_title {
+			color: #303133;
+			font-size: 28rpx;
+			font-weight: bold;
+		}
+
+		&_summary {
+			display: -webkit-box;
+			line-height: 1.6;
+		}
+
+		&_time {
+			.time-label {
+				display: none;
+			}
+		}
+	}
+
+	.time {
+		align-items: center;
+	}
+</style>