|
@@ -21,15 +21,21 @@ onLoad(async (query: { id: string; type?: 'banner' }) => {
|
|
|
type.value = query.type
|
|
|
if (type.value === 'banner') {
|
|
|
request.value = () =>
|
|
|
- getBanner(id.value).then((res) => ({
|
|
|
- ...res,
|
|
|
- data: {
|
|
|
- title: res.data?.name,
|
|
|
- contentDetail: res.data?.bannerDetailsContent,
|
|
|
- createTime: res.data?.createTime.toString(),
|
|
|
- viewsCount: res.data?.viewCount,
|
|
|
- },
|
|
|
- }))
|
|
|
+ getBanner(id.value).then((res) => {
|
|
|
+ uni.setNavigationBarTitle({
|
|
|
+ title:res.data?.name
|
|
|
+ })
|
|
|
+ return {
|
|
|
+ ...res,
|
|
|
+ data: {
|
|
|
+ isBanner:true,
|
|
|
+ title: res.data?.name,
|
|
|
+ contentDetail: res.data?.bannerDetailsContent,
|
|
|
+ createTime: res.data?.createTime.toString(),
|
|
|
+ viewsCount: res.data?.viewCount,
|
|
|
+ },
|
|
|
+ }
|
|
|
+ })
|
|
|
} else {
|
|
|
request.value = () => getContent({ id: id.value })
|
|
|
}
|
|
@@ -45,6 +51,7 @@ onShareTimeline(() => ({
|
|
|
<template>
|
|
|
<div class="flex-grow bg-white">
|
|
|
<Article
|
|
|
+ :isBanner = "data.isBanner"
|
|
|
:title="data?.title"
|
|
|
:author="{ name: '筑巢荟' }"
|
|
|
:content="data?.contentDetail"
|