mirror of
https://github.com/acepanel/acepanel.github.io.git
synced 2026-02-05 18:37:28 +08:00
fix: 版本页
This commit is contained in:
17
zh_CN/version-[version].paths.ts
Normal file
17
zh_CN/version-[version].paths.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export default {
|
||||
async paths() {
|
||||
const resp = await (await fetch('https://api.acepanel.net/versions?locale=zh_CN')).json()
|
||||
if (!resp.message || resp.message !== 'success') return []
|
||||
|
||||
return resp.data.slice(0, 10).map((item: any) => {
|
||||
return {
|
||||
params: {
|
||||
version: item.version,
|
||||
type: item.type,
|
||||
time: item.updated_at.replace('T', ' ').slice(0, 19)
|
||||
},
|
||||
content: item.description
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
17
zh_TW/version-[version].paths.ts
Normal file
17
zh_TW/version-[version].paths.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
export default {
|
||||
async paths() {
|
||||
const resp = await (await fetch('https://api.acepanel.net/versions?locale=zh_TW')).json()
|
||||
if (!resp.message || resp.message !== 'success') return []
|
||||
|
||||
return resp.data.slice(0, 10).map((item: any) => {
|
||||
return {
|
||||
params: {
|
||||
version: item.version,
|
||||
type: item.type,
|
||||
time: item.updated_at.replace('T', ' ').slice(0, 19)
|
||||
},
|
||||
content: item.description
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user