This commit is contained in:
Putoo
2026-05-18 18:12:21 +08:00
parent 571877970b
commit 2037d1e577
20 changed files with 555 additions and 77 deletions

View File

@@ -27,12 +27,10 @@ const data = ref<Array<any>>([]);
const handlePageChange = async (page: number): Promise<void> => {
currentPage.value = page;
await BindData();
console.log('跳转到第', page, '页');
};
const BindData = async (): Promise<void> => {
var result = await PubService.GetNoticeData(currentPage.value, 10);
console.log(result);
const BindData = async (): Promise<void> => {
var result = await PubService.GetNoticeData(currentPage.value, 10);
if (result.code == 0) {
data.value = result.data.data;
totalPages.value = result.data.total;

View File

@@ -1 +1,51 @@
<template></template>
<template>
<div class="content">
<Abar href="/news/">官方公告</Abar>&gt;详情
</div>
<div class="content">
<div class="common">
[标题]:<strong>{{ noticeData.title }}</strong>
</div>
<div class="common">
[时间]: {{noticeData.addTime}}
</div>
<div class="common" v-html="noticeData.sign"></div>
</div>
<div class="content">
<Abar href="/news/">返回公告列表</Abar>
</div>
<Abar href="/">返回游戏首页</Abar>
</template>
<script setup lang="ts">
definePageMeta({
layout: layout.empty,
middleware: 'page-loading'
})
let noticeData = ref<any>({});
const BindData = async (): Promise<void> => {
var noticeId = PageExtend.QueryString("id");
var result = await PubService.GetNoticeInfo(noticeId);
if (result.code == 0) {
noticeData.value = result.data;
}
else {
MessageExtend.ShowDialogEvent("提示", "公告不存在!", () => {
PageExtend.Redirect("/news/");
}, "我知道了");
}
};
onMounted(async () => {
try {
await BindData();
}
finally {
PageLoading.Close();
}
})
</script>