@ -212,7 +212,7 @@ const cityOptions: { value: string; label: string }[] = [
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<nav class="snappager" x-show="lastPage > 1" aria-label="Pagination">
|
||||
<nav class="snappager" x-show="isAuthed && lastPage > 1" aria-label="Pagination">
|
||||
<button class="pg pg-prev" type="button" :disabled="page <= 1 || loading" @click="prevPage()">‹ Prev</button>
|
||||
<template x-for="(p, i) in pageList" :key="i">
|
||||
<span class="pg-wrap">
|
||||
@ -263,7 +263,6 @@ const cityOptions: { value: string; label: string }[] = [
|
||||
import { SPIN_SVG, makeCardSlots, buildPageList } from "@/lib/looks-grid"
|
||||
import { toggleFavorite, checkFavorited, getFavorites } from "@/lib/favorites"
|
||||
|
||||
|
||||
const DEFAULT_SORT = "image_count"
|
||||
|
||||
document.addEventListener("alpine:init", () => {
|
||||
@ -288,6 +287,7 @@ const cityOptions: { value: string; label: string }[] = [
|
||||
loading: false,
|
||||
page: 1,
|
||||
lastPage: 1,
|
||||
isAuthed: false,
|
||||
reqToken: 0,
|
||||
|
||||
// 登录门禁弹窗状态(硬门禁:未登录点筛选/翻页时弹出内联登录表单)
|
||||
@ -301,6 +301,7 @@ const cityOptions: { value: string; label: string }[] = [
|
||||
favMap: {} as Record<string, boolean>,
|
||||
|
||||
init() {
|
||||
this.isAuthed = !!getUser()
|
||||
this.locale = this.$el.dataset.locale || 'en'
|
||||
// 支持从 header 下拉深链 ?city=xxx 直接进入对应地区(与侧栏 City 筛选一致)
|
||||
const city = new URLSearchParams(window.location.search).get('city')
|
||||
|
||||
Reference in New Issue
Block a user