Files
2026-01-14 23:38:29 +08:00

56 lines
1.2 KiB
Vue

<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { getUserNoticeDetail } from '../../../../api/my-index'
const viewData = ref({})
const loading = ref(true)
onLoad(async e => {
const res = await getUserNoticeDetail(e.id)
viewData.value = res.data
loading.value = false
})
</script>
<template>
<view v-if="!loading" class="notice-detail">
<view class="box">
<text>{{ viewData.title }}</text>
<text>{{ viewData.content }}</text>
<text>{{ viewData.createTime }}</text>
</view>
</view>
</template>
<style lang="scss" scoped>
page {
background: #f9f9f9;
}
.notice-detail {
padding: 20rpx 32rpx;
.box {
padding: 20rpx;
background: #ffffff;
border-radius: 16rpx;
display: flex;
flex-direction: column;
text {
font-size: 32rpx;
color: #333333;
// 第二个
&:nth-child(2) {
font-size: 28rpx;
color: #353535;
margin: 10rpx 0;
}
// 最后一个
&:last-child {
font-size: 24rpx;
color: #999999;
}
}
}
}
</style>