<route lang="json5" type="page">
{
  style: {
    navigationBarTitleText: '新闻详情',
    navigationBarBackgroundColor: '#fff',
  },
}
</route>
<script setup lang="ts">
import { getNewsDetailAPI } from '@/service'

const newsDetail = ref<any>({})
onLoad(async (options) => {
  const { data } = await getNewsDetailAPI({ news_id: options.id })
  newsDetail.value = data
})
</script>
<template>
  <view class="min-h-screen pb-100 pt-30 px-15">
    <view class="text-20 text-black font-bold">{{ newsDetail.title }}</view>
    <view class="flex justify-between py-10">
      <view class="text-14 text-gray-500">{{ newsDetail.auther }}</view>
      <view class="text-14 text-gray-500">{{ newsDetail.create_time }}</view>
    </view>
    <image class="w-full mt-15" mode="widthFix" :src="newsDetail.cover_image" />
    <view class="text-14 text-gray-600 mt-15">{{ newsDetail.description }}</view>
  </view>
</template>
