This commit is contained in:
toom1996
2026-09-14 00:42:45 +08:00
parent d6cb616337
commit 548155625d
22 changed files with 707 additions and 454 deletions

View File

@ -66,7 +66,8 @@ const fullLoginLabel = t('go to full login')
</div>
<script>
import { getUser, login } from "@/lib/auth"
import { getUser } from "@/lib/auth"
import { login } from "@/lib/api"
document.addEventListener("alpine:init", () => {
// 全局登录 store:request(el) 返回是否放行;未登录记录 pending 并开层

View File

@ -1,6 +1,7 @@
---
import ComingSoon from "@/components/ComingSoon.astro"
import { toAbs, getSsgIndexRunway, getSsgStreetSnapPopular } from "@/lib/api"
import { getSsgIndexRunway, getSsgStreetSnapPopular } from "@/lib/api"
import { toAbs } from "@/lib/request"
import { getI18n } from "@/i18n/utils"
import { href, ROUTES } from "@/lib/routes"

View File

@ -2,7 +2,7 @@
import type { RawArticle } from "@/lib/api"
import { getI18n } from "@/i18n/utils"
import { href, ROUTES } from '@/lib/routes'
import { ssrBase } from "@/lib/api"
import { ssrBase } from "@/lib/request"
interface Props {
article: RawArticle | null
@ -585,7 +585,8 @@ const homeHref = href(locale, ROUTES.home)
</div>
<script>
import { getArticleDetailAuthed, toAbs } from "@/lib/api"
import { getArticleDetailAuthed } from "@/lib/api"
import { toAbs } from "@/lib/request"
import { getUser } from "@/lib/auth"
import { isFavorited, toggleImageFavorite } from "@/lib/favorites"

View File

@ -265,7 +265,8 @@ const seasonOptions: { value: string; label: string }[] = [
<script>
import { getArticles, getBrands, toAbs, type ArticleItem, type BrandEntry } from "@/lib/api"
import { getArticles, getBrands, type ArticleItem, type BrandEntry } from "@/lib/api"
import { toAbs } from "@/lib/request"
import { getUser } from "@/lib/auth"
import { clientHref, ROUTES } from "@/lib/routes"
import { SPIN_SVG, makeCardSlots, buildPageList } from "@/lib/looks-grid"

View File

@ -3,7 +3,7 @@ import type { RawStreetSnap } from "@/lib/api"
import Breadcrumb from "@/components/Breadcrumb.astro"
import { getI18n } from "@/i18n/utils"
import { href, ROUTES } from '@/lib/routes'
import { ssrBase } from "@/lib/api"
import { ssrBase } from "@/lib/request"
interface Props {
snap: RawStreetSnap | null
@ -351,7 +351,8 @@ const displayTitle = (snap?.title || "").replace(/\t/g, " · ")
</div>
<script>
import { getStreetSnapDetailAuthed, toAbs } from "@/lib/api"
import { getStreetSnapDetailAuthed } from "@/lib/api"
import { toAbs } from "@/lib/request"
import { getUser } from "@/lib/auth"
import { isFavorited, toggleImageFavorite } from "@/lib/favorites"

View File

@ -221,7 +221,8 @@ const cityOptions: { value: string; label: string }[] = [
<script>
import { getStreetSnaps, toAbs, type StreetSnapItem } from "@/lib/api"
import { getStreetSnaps, type StreetSnapItem } from "@/lib/api"
import { toAbs } from "@/lib/request"
import { getUser } from "@/lib/auth"
import { clientHref, ROUTES } from "@/lib/routes"
import { SPIN_SVG, makeCardSlots, buildPageList } from "@/lib/looks-grid"