|
@@ -1,8 +1,10 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { useRoute } from 'vue-router'
|
|
import { useRoute } from 'vue-router'
|
|
|
import EventCard from '@/components/NotificationMessageCard/src/components/EventCard.vue'
|
|
import EventCard from '@/components/NotificationMessageCard/src/components/EventCard.vue'
|
|
|
|
|
+import { useNotificationMessage } from '@/stores/modules/notificationMessage'
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
|
|
|
+const notificationMsgStore = useNotificationMessage()
|
|
|
const notificationData = ref({
|
|
const notificationData = ref({
|
|
|
title: '',
|
|
title: '',
|
|
|
type: 'delay',
|
|
type: 'delay',
|
|
@@ -13,6 +15,9 @@ const notificationData = ref({
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
|
|
|
+if (route.query.type === 'feature') {
|
|
|
|
|
+ loading.value = true
|
|
|
|
|
+}
|
|
|
const getNotificationList = () => {
|
|
const getNotificationList = () => {
|
|
|
loading.value = true
|
|
loading.value = true
|
|
|
$api
|
|
$api
|
|
@@ -24,6 +29,7 @@ const getNotificationList = () => {
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
|
notificationData.value = res.data
|
|
notificationData.value = res.data
|
|
|
|
|
+ notificationMsgStore.hasUnreadMessages()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
.finally(() => {
|
|
.finally(() => {
|
|
@@ -42,9 +48,9 @@ onMounted(() => {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const iframeRef = ref(null)
|
|
const iframeRef = ref(null)
|
|
|
-const errorAA = (e) => {
|
|
|
|
|
|
|
+const handleIframeLoaded = () => {
|
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
- console.dir(iframeRef.value, 'iframeRef')
|
|
|
|
|
|
|
+ loading.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -53,7 +59,7 @@ const iframeUrl = `${import.meta.env.VITE_API_HOST}/main_new_version.php?action=
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|
|
|
<div class="system-message-detail" v-vloading="loading">
|
|
<div class="system-message-detail" v-vloading="loading">
|
|
|
- <!-- <el-button @click="errorAA">测试</el-button> -->
|
|
|
|
|
|
|
+ <!-- <el-button @click="handleIframeLoaded">测试</el-button> -->
|
|
|
<div class="content" v-if="route.query.type !== 'feature'">
|
|
<div class="content" v-if="route.query.type !== 'feature'">
|
|
|
<div class="header" v-if="notificationData.title">
|
|
<div class="header" v-if="notificationData.title">
|
|
|
<div class="status-icon"></div>
|
|
<div class="status-icon"></div>
|
|
@@ -99,7 +105,7 @@ const iframeUrl = `${import.meta.env.VITE_API_HOST}/main_new_version.php?action=
|
|
|
:src="iframeUrl"
|
|
:src="iframeUrl"
|
|
|
width="100%"
|
|
width="100%"
|
|
|
height="100%"
|
|
height="100%"
|
|
|
- @load="errorAA"
|
|
|
|
|
|
|
+ @load="handleIframeLoaded"
|
|
|
></iframe>
|
|
></iframe>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|