feat: 接口对接完成

This commit is contained in:
anonymous
2025-01-03 16:44:05 +08:00
parent 0889d068a8
commit 2d19bbce4c
37 changed files with 1220 additions and 398 deletions
+32
View File
@@ -0,0 +1,32 @@
<route lang="json5" type="page">
{
style: {
navigationBarTitleText: '新闻详情',
navigationBarBackgroundColor: '#fff',
},
}
</route>
<script setup lang="ts">
import { getIntroductionDetailAPI } from '@/service'
import { getImageUrl } from '@/utils'
import dayjs from 'dayjs'
const newsDetail = ref<any>({})
onLoad(async (options) => {
const { data } = await getIntroductionDetailAPI({ 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.name }}</view>
<view class="flex justify-between py-10">
<view class="text-14 text-gray-500">{{ newsDetail.source }}</view>
<view class="text-14 text-gray-500">
{{ dayjs(newsDetail.createtime * 1000).format('YYYY-MM-DD HH:mm') }}
</view>
</view>
<image class="w-full mt-15" mode="widthFix" :src="getImageUrl(newsDetail.image)" />
<view class="text-14 text-gray-600 mt-15">{{ newsDetail.content }}</view>
</view>
</template>