From bb228c6705893fc2a9da6e649bee23268766a217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=8E=AB=E5=94=90=E5=B0=BC?= <1431128779@qq.com> Date: Tue, 16 Jul 2024 10:54:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=B7=BB=E5=8A=A0node=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 26 ++++++++++++++++++++++++++ pages/tabbar/home/home.vue | 21 +++++++++++++++++---- pagesA/articles/articles.vue | 2 +- 3 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 package.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..39615da --- /dev/null +++ b/package.json @@ -0,0 +1,26 @@ +{ + "name": "uni-halo", + "version": "1.0.0", + "description": "

\r \"logo\"\r

\r

uni-halo

\r

uni-halo 基于Halo一款现代化的开源博客/CMS系统API开发的可多端编译应用

", + "repository": { + "type": "git", + "url": "git+https://gitee.com/ialley-workshop-open/uni-halo.git" + }, + "keywords": [ + "uni-halo", + "小莫唐尼", + "巷子工坊" + ], + "author": "巷子工坊丨小莫唐尼", + "license": "AGPL-3.0", + "bugs": { + "url": "https://gitee.com/ialley-workshop-open/uni-halo/issues" + }, + "homepage": "https://uni-halo.925i.cn", + "devDependencies": { + "vue-i18n": "^9.1.10" + }, + "dependencies": { + "qs": "^6.12.1" + } +} diff --git a/pages/tabbar/home/home.vue b/pages/tabbar/home/home.vue index b810770..85892cc 100644 --- a/pages/tabbar/home/home.vue +++ b/pages/tabbar/home/home.vue @@ -90,6 +90,7 @@ import tmIcons from '@/tm-vuetify/components/tm-icons/tm-icons.vue'; import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue'; import eSwiper from '@/components/e-swiper/e-swiper.vue'; +import qs from 'qs' export default { components: { @@ -208,10 +209,16 @@ export default { }); }; + 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', + url: this.$baseApiUrl + '/apis/api.content.halo.run/v1alpha1/posts?'+ paramsStr, method: 'GET', - params: this.queryParams, success: (res) => { this.bannerList = _format(res.data.items); }, @@ -239,10 +246,16 @@ export default { } 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?', + url: this.$baseApiUrl + '/apis/api.content.halo.run/v1alpha1/posts?' + paramsStr, method: 'GET', - params: this.queryParams, success: (res) => { const data = res.data; this.result.hasNext = data.hasNext; diff --git a/pagesA/articles/articles.vue b/pagesA/articles/articles.vue index 13066c2..c76be6d 100644 --- a/pagesA/articles/articles.vue +++ b/pagesA/articles/articles.vue @@ -34,7 +34,7 @@ - 发布日期:{{ {d: article.publishTimestamp, f: 'yyyy年MM月dd日'} | formatTime }} + 最近更新:{{ {d: article.updateTimestamp, f: 'yyyy年MM月dd日 HH点mm分ss秒'} | formatTime }}