/** * 通知信息详情 * @邠心vbe on 2023/08/17 */ import React, { Component } from 'react'; import { View, Text, StyleSheet, ScrollView } from 'react-native'; import apiNotification from '../../api/apiNotification'; import Button from '../../components/Button'; import Dialog from '../../components/Dialog'; import TextView from '../../components/TextView'; import { PageList } from '../Router'; export default class Message extends Component { constructor(props) { super(props); this.state = { id: "", messageInfo: { createTime: "", notificationText: "", notificationTitle: "", notificationType: "" } }; } componentDidMount() { if (this.props.route?.params?.id) { this.setState({ id: this.props.route?.params?.id }, () => { this.readMessage(); }) } } readMessage() { Dialog.showProgressDialog(); apiNotification.readMessage(this.state.id).then(res => { if (res.data) { this.setState({ messageInfo: res.data }); } }).catch(err => { toastShort(err); }).finally(() => { Dialog.dismissLoading(); }) } submitFeedback() { startPage(PageList.feedback); } render() { return ( {this.state.messageInfo.notificationTitle} {this.state.messageInfo.createTime} {this.state.messageInfo.notificationText} { this.state.messageInfo.notificationType == "Review" &&