From eac027c11644920a314ec0408684fc46c00cf48f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=8E=AB=E5=94=90=E5=B0=BC?= Date: Tue, 22 Jul 2025 00:07:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=86=85=E5=AE=B9=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=98=BE=E7=A4=BA=E6=96=87=E7=AB=A0=E5=92=8C?= =?UTF-8?q?=E7=9E=AC=E9=97=B4=E3=80=81=E7=9E=AC=E9=97=B4=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/v2/all.api.js | 12 + pages.json | 15 +- pages/tabbar/moments/moments.vue | 16 +- pagesA/articles/articles.vue | 386 +++++++++++++------------ pagesA/moment-detail/moment-detail.vue | 356 +++++++++++++++++++++++ 5 files changed, 600 insertions(+), 185 deletions(-) create mode 100644 pagesA/moment-detail/moment-detail.vue diff --git a/api/v2/all.api.js b/api/v2/all.api.js index 5419a96..2720416 100644 --- a/api/v2/all.api.js +++ b/api/v2/all.api.js @@ -114,6 +114,18 @@ export default { } }) }, + + /** + * 获取瞬间详情 + * @param {String} name 瞬间id + */ + getMomentByName: (name) => { + return HttpHandler.Get(`/apis/moment.halo.run/v1alpha1/moments/${name}`, {}, { + custom: { + personalToken: getPersonalToken() + } + }) + }, /** * 查询站点统计信息 diff --git a/pages.json b/pages.json index 8c508cb..b2d997a 100644 --- a/pages.json +++ b/pages.json @@ -266,7 +266,20 @@ "navigationBarTitleText": "友链提交", "enablePullDownRefresh": false } - } + }, + { + "path": "moment-detail/moment-detail", + "style": { + "navigationBarTitleText": "瞬间详情", + "enablePullDownRefresh": true, + "app-plus": { + "pullToRefresh": { + "color": "#03a9f4", + "style": "circle" + } + } + } + } ] }, { diff --git a/pages/tabbar/moments/moments.vue b/pages/tabbar/moments/moments.vue index b6c2c3f..938c08e 100644 --- a/pages/tabbar/moments/moments.vue +++ b/pages/tabbar/moments/moments.vue @@ -30,14 +30,15 @@ - + - + @@ -250,7 +251,7 @@ } this.$nextTick(() => { - this.createVideoContexts(tempItems); + this.createVideoContexts(tempItems); }) }) @@ -262,7 +263,7 @@ .finally(() => { setTimeout(() => { uni.hideLoading(); - uni.stopPullDownRefresh(); + uni.stopPullDownRefresh(); }, 500); }); }, @@ -307,6 +308,13 @@ videoContext?.pause(); } }); + }, + handleToMomentDetail(moment) { + if (this.calcAuditModeEnabled) return; + uni.navigateTo({ + url: '/pagesA/moment-detail/moment-detail?name=' + moment.metadata.name, + animationType: 'slide-in-right' + }); } } }; diff --git a/pagesA/articles/articles.vue b/pagesA/articles/articles.vue index 7921520..2332b53 100644 --- a/pagesA/articles/articles.vue +++ b/pagesA/articles/articles.vue @@ -1,198 +1,224 @@ + .content-empty { + height: 60vh; + } + + .article-card { + display: flex; + flex-direction: column; + box-sizing: border-box; + margin: 0 24rpx; + padding: 24rpx; + border-radius: 12rpx; + background-color: #ffff; + box-shadow: 0rpx 2rpx 24rpx rgba(0, 0, 0, 0.03); + overflow: hidden; + margin-bottom: 24rpx; + } + \ No newline at end of file diff --git a/pagesA/moment-detail/moment-detail.vue b/pagesA/moment-detail/moment-detail.vue new file mode 100644 index 0000000..5093f3e --- /dev/null +++ b/pagesA/moment-detail/moment-detail.vue @@ -0,0 +1,356 @@ + + + + + \ No newline at end of file