<template>
	<page-meta :page-font-size="fontValue+'px'" :root-font-size="fontValue+'px'"></page-meta>
  <view class="notice-detail">
    <!-- 标题区域 -->
    <view class="notice-title">
      <text class="title">通知</text>
      <text class="time">{{ noticeData.noticeTitle }}</text>
    </view>

    <!-- 内容区域 -->
    <view class="notice-content">
		<view class="content-text">{{noticeData.noticeContent}}</view>
    </view>
  </view>
</template>

<script>
import UReadMore from '../../../uni_modules/uview-ui/components/u-read-more/u-read-more.vue'
import { updateNoticeStatusApi } from '@/api/mine/index'

export default {
  name: 'NoticeDetail',
  components: { UReadMore },
  data() {
    return {
		fontValue:uni.getStorageSync('fontSize') || 8,
		paramsData:{},
		noticeData: {},
    }
  },
  onLoad(opt) {
  	opt = JSON.parse(opt.params)
	console.log(opt)
	this.paramsData = opt
	this.fetchNoticeDetail();
	// setTimeout(()=>{
	// 	this.getNoticeDetail()
	// },1000)  
  },
  methods: {
    fetchNoticeDetail() {
		this.noticeData = this.paramsData
    },
	//获取通知消息
	async getNoticeDetail() {
		let param = {
			"informhisId": this.paramsData.informhisId,
			"userId": uni.getStorageSync('userId'),
		}
		const res = await updateNoticeStatusApi(param)
		console.log(res, '通知消息--')
	},
  },
}
</script>

<style scoped>
.notice-detail {
  padding: 16px;
  background-color: #fff;
  min-height: 94vh;
}

.notice-title {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.title {
  font-size: 36rpx;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.time {
  font-size: 28rpx;
  color: #999;
}

.notice-content {
  line-height: 1.6;
}

.content-text {
  font-size: 28rpx;
  color: #666;
}
</style>