111
This commit is contained in:
@@ -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) : ''
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
9
Web/src/services/Index/PubService.ts
Normal file
9
Web/src/services/Index/PubService.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class PubService {
|
||||
/**
|
||||
* 获取首页信息
|
||||
* GET /Pub/GetMain
|
||||
*/
|
||||
static async GetMain() {
|
||||
return await ApiService.Request("get", "/Pub/GetMain");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user