mirror of
https://github.com/m1ngsama/FUJI.git
synced 2025-12-26 12:04:06 +00:00
fix order
This commit is contained in:
parent
4b7923c997
commit
7b12a79dfc
2 changed files with 7 additions and 4 deletions
|
|
@ -25,6 +25,7 @@ export default function JoinForm() {
|
||||||
requestBody: formData,
|
requestBody: formData,
|
||||||
})
|
})
|
||||||
alert("提交成功! 后续请加群获取!")
|
alert("提交成功! 后续请加群获取!")
|
||||||
|
window.location.href = "/about"
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.error("Error submitting form:", error)
|
console.error("Error submitting form:", error)
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,12 @@ import Tile from "../layouts/Tile.astro"
|
||||||
import MoreTile from "../layouts/MoreTile.astro"
|
import MoreTile from "../layouts/MoreTile.astro"
|
||||||
const allPosts = await Astro.glob("../pages/posts/*.md")
|
const allPosts = await Astro.glob("../pages/posts/*.md")
|
||||||
const Blogs = await Astro.glob("../pages/posts/blogs/**/*.md")
|
const Blogs = await Astro.glob("../pages/posts/blogs/**/*.md")
|
||||||
allPosts.sort(
|
allPosts.sort((a, b) => {
|
||||||
(a, b) =>
|
if ((a.frontmatter.title as string).startsWith("计算机协会入社指南")) {
|
||||||
Date.parse(b.frontmatter.pubDate) - Date.parse(a.frontmatter.pubDate),
|
return -99999999999
|
||||||
)
|
}
|
||||||
|
return Date.parse(b.frontmatter.pubDate) - Date.parse(a.frontmatter.pubDate)
|
||||||
|
})
|
||||||
|
|
||||||
Blogs.sort(
|
Blogs.sort(
|
||||||
(a, b) =>
|
(a, b) =>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue