裂变星小程序-25.03.04
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

69 lines
1.3 KiB

<template>
<view>
<navbar title="动态详情" leftClick @leftClick="$utils.navigateBack" />
<view class="content">
<view class="title">{{ detail.title || '' }}</view>
<view class="desc">{{ detail.createTime ? `发布于${detail.createTime}` : '' }}</view>
<uv-parse :content="detail.details"></uv-parse>
</view>
</view>
</template>
<script>
import popupUnlock from '../components/popupUnlock.vue'
import popupQrCode from '../components/popupQrCode.vue'
export default {
components: {
popupUnlock,
popupQrCode,
},
data() {
return {
detail: {
id: null,
title: null,
image: null,
details: null,
createTime: null,
},
isLocked: true,
}
},
async onLoad(option) {
const { id } = option
await this.fetchDetails(id)
},
methods: {
async fetchDetails(id) {
try {
this.detail = await this.$fetch('getNewsById', { id })
} catch (err) {
}
},
}
}
</script>
<style scoped lang="scss">
.content {
padding: 40rpx 20rpx;
}
.title {
color: #474747;
font-size: 36rpx;
font-weight: 700;
}
.desc {
color: #A2A2A2;
font-size: 24rpx;
margin-top: 6rpx;
}
</style>