File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ <script setup>
2+ const router = useRouter ()
3+ const { currentRoute } = router
4+ const currentPath = currentRoute .value .fullPath
5+ const targetUrl = ` https://to.ntut.club${ currentPath} `
6+ // async function checkUrl() {
7+ // const response = await fetch(targetUrl, { method: 'GET' });
8+ // if(response.ok){
9+ // console.log(targetUrl);
10+ // window.location.href = targetUrl;
11+ // }
12+ // }
13+
14+ // onMounted(() => {
15+ // checkUrl();
16+ // })
17+ </script >
18+
19+ <template >
20+ <div class =" error-page" >
21+ <h1 >404 - 找不到頁面</h1 >
22+ <p >抱歉,<strong >小N</strong >找不到您所請求的頁面:<br ><a href =" #" >https://ntut.club{{ currentPath }}</a ></p >
23+ <NuxtLink to =" /" >
24+ 返回首頁
25+ </NuxtLink >
26+ <br >
27+ <br >
28+ <NuxtLink :to =" targetUrl" >
29+ <button >
30+ 嘗試在 <strong >Shorts 短網址</strong >尋找此路徑
31+ </button >
32+ </NuxtLink >
33+ </div >
34+ </template >
35+
36+ <style scoped>
37+ .error-page {
38+ text-align : center ;
39+ padding : 4rem ;
40+ }
41+ </style >
You can’t perform that action at this time.
0 commit comments