This commit is contained in:
Putoo
2026-04-27 17:53:43 +08:00
parent c55a104573
commit a219fbec32
10 changed files with 168 additions and 4 deletions

View File

@@ -1,5 +1,11 @@
export class PageExtend {
public static Redirect(route: string) {
navigateTo(route, { replace: true })
public static Redirect(route: string) {
navigateTo(route, { replace: true })
}
public static QueryString(params: string): string {
const route = useRoute()
const value = route.query[params]
return value ? String(value) : ''
}
}

View File

@@ -87,7 +87,7 @@
小G报时(18:33)
</div>
</div>
<div v-for="(item, index) in areaData" :key="index">
<div v-for="(item, index) in areaData" :key="index">
{{ index }} - {{ item.name }}
</div>
</template>
@@ -102,7 +102,7 @@ definePageMeta({
const areaData = ref<any>([]);
const Initialize = async (): Promise<void> => {
var result = await PubService.GetMain();
@@ -120,6 +120,10 @@ const Initialize = async (): Promise<void> => {
// await navigateTo('/auth/login', { replace: true })
onMounted(async () => {
const id = PageExtend.QueryString("id");
MessageExtend.Notify("success", id);
await Initialize();
//alert(1);

View File

@@ -0,0 +1,9 @@
export class PubService {
/**
* 获取首页信息
* GET /Pub/GetMain
*/
static async GetMain() {
return await ApiService.Request("get", "/Pub/GetMain");
}
}