volunteer-secondary/src/pages-sub/information/middleDetail.vue

39 lines
1.3 KiB
Vue

<script lang="ts" setup>
import { getNewsDetail } from "@/service"
const newsDetail = ref({ title: '', publishTime: "", remark: "",content:"" })
onLoad(options => {
if (options.id) {
getNewsDetail({ query: { id: options.id } }).then(resp => {
if (resp.code == 200) {
newsDetail.value = resp.result
}
})
} else {
uni.showModal({ title: "没有获取到新闻ID" })
}
})
const navigateToCustom = () => {
uni.navigateTo({url:"/pages-sub/about/onlineCustom"})
}
</script>
<template>
<view class="pt-[30rpx] px-[30rpx] pb-safe">
<view class="text-[40rpx] font-600 text-[#000]">{{ newsDetail.title }}</view>
<view class="text-[#999] text-[28rpx] mt-[8rpx]">发布时间: {{ newsDetail.publishTime }}</view>
<view class="border-b-[2rpx] border-b-dashed border-b-[#D8D8D8] mt-[20rpx] mb-[30rpx]"></view>
<view class="pt-[30rpx]">
<view v-html="newsDetail.content"></view>
</view>
<view class="fixed right-[20rpx] bottom-[120rpx] w-[160rpx] h-[160rpx]" @click="navigateToCustom">
<image src="https://lwzk.ycymedu.com/img/qt/qt_more.png" mode="scaleToFill"
class="w-[160rpx] h-[160rpx]" />
</view>
</view>
</template>
<style lang="scss" scoped></style>