|
@@ -0,0 +1,118 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="MessageDetail">
|
|
|
|
|
+ <NavBar></NavBar>
|
|
|
|
|
+ <div class="page">
|
|
|
|
|
+ <div class="title">{{ data.subject }}</div>
|
|
|
|
|
+ <div class="sub">
|
|
|
|
|
+ <div class="date">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ 开始日期:
|
|
|
|
|
+ {{ new Date(data.add_time * 1000).Format("yyyy-MM-dd hh:mm:ss") }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-if="data.expire_at * 1000 > 0">
|
|
|
|
|
+ 截止日期:
|
|
|
|
|
+ {{ new Date(data.expire_at * 1000).Format("yyyy-MM-dd hh:mm:ss") }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div :class="data.expire_at * 1000 > 0 ? 'sender_btm' : 'sender'">
|
|
|
|
|
+ {{ data.sender }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-html="data.body" class="content"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="footer bg-color-red" @click="delClick">
|
|
|
|
|
+ <div>删除</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script>
|
|
|
|
|
+import { opMails } from "@api/user";
|
|
|
|
|
+import NavBar from "@components/NavBar";
|
|
|
|
|
+
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: "MessageDetail",
|
|
|
|
|
+ components: {
|
|
|
|
|
+ NavBar
|
|
|
|
|
+ },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ data: {}
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ $route(n) {
|
|
|
|
|
+ if (n.name === "MessageDetail") {
|
|
|
|
|
+ // this.getList();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ opMails(op) {
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ opMails([that.data.id], op)
|
|
|
|
|
+ .then(res => {})
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ that.$dialog.error(err.msg);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ delClick() {
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ opMails([that.data.id], 1)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ that.$dialog.message("删除成功!");
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ that.$router.back();
|
|
|
|
|
+ }, 1);
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ that.$dialog.error(err.msg);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.data = this.$route.params.data;
|
|
|
|
|
+ this.opMails(0);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+<style>
|
|
|
|
|
+.MessageDetail .page {
|
|
|
|
|
+ margin: 0.2rem;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+}
|
|
|
|
|
+.MessageDetail .page .title {
|
|
|
|
|
+ font-size: 0.4rem;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ padding-bottom: 0.2rem;
|
|
|
|
|
+}
|
|
|
|
|
+.MessageDetail .page .sub {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ padding-bottom: 0.1rem;
|
|
|
|
|
+}
|
|
|
|
|
+.MessageDetail .page .sub .sender {
|
|
|
|
|
+ width: 30%;
|
|
|
|
|
+}
|
|
|
|
|
+.MessageDetail .page .sub .sender_btm {
|
|
|
|
|
+ width: 30%;
|
|
|
|
|
+ padding-top: 0.4rem;
|
|
|
|
|
+}
|
|
|
|
|
+.MessageDetail .page .sub .date {
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ color: gray;
|
|
|
|
|
+ padding-left: 0.3rem;
|
|
|
|
|
+ width: 70%;
|
|
|
|
|
+ padding-bottom: 0.2rem;
|
|
|
|
|
+}
|
|
|
|
|
+.MessageDetail .page .content {
|
|
|
|
|
+}
|
|
|
|
|
+.MessageDetail .footer {
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ height: 1rem;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ bottom: 0rem;
|
|
|
|
|
+ line-height: 1rem;
|
|
|
|
|
+ font-size: 0.3rem;
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|