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