|
@@ -1,7 +1,7 @@
|
|
|
<script lang="ts" setup>
|
|
|
import { SiteMessage } from "@/types/student-client";
|
|
|
import { store } from "@/store/store";
|
|
|
-import { useRoute } from "vue-router";
|
|
|
+import { useRoute, useRouter } from "vue-router";
|
|
|
import { onMounted, watch } from "vue";
|
|
|
import { ArrowBack } from "@vicons/ionicons5";
|
|
|
import { updateNotieReadStatusApi } from "@/api/siteMessage";
|
|
@@ -9,9 +9,10 @@ import { fetchSiteMessage } from "./siteMessageUpdate";
|
|
|
|
|
|
let notice: SiteMessage | undefined = $ref();
|
|
|
const route = useRoute();
|
|
|
+const router = useRouter();
|
|
|
|
|
|
function toBack() {
|
|
|
- window.history.go(-1);
|
|
|
+ void router.push({ name: "SiteMessage" });
|
|
|
}
|
|
|
|
|
|
async function markMessageRead(noticeId: string) {
|
|
@@ -47,12 +48,11 @@ watch(
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
- <div class="box-justify qm-mb-20">
|
|
|
- <div></div>
|
|
|
+ <div class="tw-flex tw-justify-end qm-mb-20">
|
|
|
<n-button @click="toBack">
|
|
|
- <n-icon class="qm-mr-5" :component="ArrowBack" :size="16"></n-icon>
|
|
|
- 返回列表</n-button
|
|
|
- >
|
|
|
+ <n-icon class="qm-mr-5" :component="ArrowBack" :size="16" />
|
|
|
+ 返回列表
|
|
|
+ </n-button>
|
|
|
</div>
|
|
|
<div v-if="notice" class="part-box">
|
|
|
<div class="message-title">
|