feat(mobile): 新增解忧商行移动端首页、详情与个人中心
This commit is contained in:
@@ -11,6 +11,27 @@ const ListingListPage = lazy(() =>
|
||||
const LoginPage = lazy(() =>
|
||||
import('@/features/auth/LoginPage').then(module => ({ default: module.LoginPage }))
|
||||
)
|
||||
const MobileLayout = lazy(() =>
|
||||
import('@/layouts/MobileLayout').then(module => ({ default: module.MobileLayout }))
|
||||
)
|
||||
const MobileHomePage = lazy(() =>
|
||||
import('@/features/mobile/MobileHomePage').then(module => ({ default: module.MobileHomePage }))
|
||||
)
|
||||
const MobileListingDetailPage = lazy(() =>
|
||||
import('@/features/mobile/MobileListingDetailPage').then(module => ({
|
||||
default: module.MobileListingDetailPage,
|
||||
}))
|
||||
)
|
||||
const MobileProfilePage = lazy(() =>
|
||||
import('@/features/mobile/MobileProfilePage').then(module => ({
|
||||
default: module.MobileProfilePage,
|
||||
}))
|
||||
)
|
||||
const MobilePlaceholderPage = lazy(() =>
|
||||
import('@/features/mobile/MobilePlaceholderPage').then(module => ({
|
||||
default: module.MobilePlaceholderPage,
|
||||
}))
|
||||
)
|
||||
const AdminLoginPage = lazy(() =>
|
||||
import('@/features/admin/AdminLoginPage').then(module => ({ default: module.AdminLoginPage }))
|
||||
)
|
||||
@@ -60,6 +81,32 @@ export function AppRouter() {
|
||||
</Route>
|
||||
|
||||
<Route path="/login" element={<LoginPage />} />
|
||||
<Route path="/m/login" element={<LoginPage />} />
|
||||
|
||||
<Route path="/m" element={<MobileLayout />}>
|
||||
<Route index element={<MobileHomePage />} />
|
||||
<Route path="listings" element={<MobileHomePage />} />
|
||||
<Route path="listings/:id" element={<MobileListingDetailPage />} />
|
||||
<Route
|
||||
path="orders"
|
||||
element={
|
||||
<MobilePlaceholderPage
|
||||
title="订单中心"
|
||||
description="订单列表、交接、归还和结账会在下一批迁移到这里。"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="messages"
|
||||
element={
|
||||
<MobilePlaceholderPage
|
||||
title="消息中心"
|
||||
description="订单群聊、客服会话和系统通知会在下一批迁移到这里。"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<Route path="profile" element={<MobileProfilePage />} />
|
||||
</Route>
|
||||
|
||||
<Route path={`${adminBase}/login`} element={<AdminLoginPage />} />
|
||||
<Route path={adminBase} element={<AdminGuard />}>
|
||||
|
||||
@@ -29,7 +29,8 @@ export function LoginPage() {
|
||||
await login(values.phone.trim(), values.password)
|
||||
message.success('登录成功')
|
||||
const redirect = searchParams.get('redirect')
|
||||
navigate(redirect && redirect.startsWith('/') ? redirect : '/', { replace: true })
|
||||
const fallbackPath = window.location.pathname.startsWith('/m') ? '/m' : '/'
|
||||
navigate(redirect && redirect.startsWith('/') ? redirect : fallbackPath, { replace: true })
|
||||
} catch (err) {
|
||||
const text =
|
||||
err instanceof Error && err.message ? err.message : '登录没有完成,请核对手机号和密码'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
|
||||
import { apiClient, unwrapData } from '@/shared/api/client'
|
||||
import type { ApiResponse, PublicListingPage } from '@/shared/api/types'
|
||||
import type { ApiResponse, Listing, PublicListingPage } from '@/shared/api/types'
|
||||
|
||||
export interface ListingQuery {
|
||||
page?: number
|
||||
@@ -30,3 +30,15 @@ export function useListings(query: ListingQuery) {
|
||||
queryFn: () => fetchListings(query),
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchListingDetail(id: number | string) {
|
||||
return unwrapData<Listing>(apiClient.get<ApiResponse<Listing>>(`/listings/${id}`))
|
||||
}
|
||||
|
||||
export function useListingDetail(id?: string) {
|
||||
return useQuery({
|
||||
queryKey: ['listing-detail', id],
|
||||
queryFn: () => fetchListingDetail(id as string),
|
||||
enabled: Boolean(id),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
import { useState } from 'react'
|
||||
import { Button, Empty, ErrorBlock, PullToRefresh, SearchBar, Skeleton, Tag } from 'antd-mobile'
|
||||
import { RightOutline, SearchOutline } from 'antd-mobile-icons'
|
||||
import { Link } from 'react-router-dom'
|
||||
|
||||
import { BrandLogo } from '@/components/BrandLogo'
|
||||
import { useListings } from '@/features/listings/api'
|
||||
import type { Listing } from '@/shared/api/types'
|
||||
|
||||
const quickFilters = [
|
||||
{ label: '全部', keyword: '' },
|
||||
{ label: '国服', keyword: '国服' },
|
||||
{ label: '高资产', keyword: '高资产' },
|
||||
{ label: '可租', keyword: '' },
|
||||
]
|
||||
|
||||
function money(cents: number) {
|
||||
return `¥${(cents / 100).toFixed(2)}`
|
||||
}
|
||||
|
||||
function MobileListingCard({ item }: { item: Listing }) {
|
||||
return (
|
||||
<Link to={`/m/listings/${item.id}`} className="mobile-listing-card">
|
||||
<div className="mobile-listing-card__cover">
|
||||
{item.cover_url ? (
|
||||
<img src={item.cover_url} alt={item.title} loading="lazy" />
|
||||
) : (
|
||||
<BrandLogo height={38} variant="seal" />
|
||||
)}
|
||||
</div>
|
||||
<div className="mobile-listing-card__body">
|
||||
<div className="mobile-listing-card__top">
|
||||
<span className="mobile-listing-card__no">{item.listing_no}</span>
|
||||
<Tag color={item.in_transaction ? 'default' : 'success'} fill="outline">
|
||||
{item.in_transaction ? '租赁中' : '可租'}
|
||||
</Tag>
|
||||
</div>
|
||||
<h3>{item.title}</h3>
|
||||
<div className="mobile-listing-card__tags">
|
||||
<span>{item.server_region || '区服待定'}</span>
|
||||
<span>{item.rank_level || '段位待定'}</span>
|
||||
<span>哈夫币 {item.haf_coin_amount.toLocaleString()}</span>
|
||||
</div>
|
||||
<div className="mobile-listing-card__bottom">
|
||||
<div>
|
||||
<strong>{money(item.price_cent)}</strong>
|
||||
<small>押金 {money(item.deposit_amount_cent)}</small>
|
||||
</div>
|
||||
<span className="mobile-listing-card__more">
|
||||
查看 <RightOutline />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
|
||||
export function MobileHomePage() {
|
||||
const [keyword, setKeyword] = useState('')
|
||||
const [searchValue, setSearchValue] = useState('')
|
||||
const { data, isPending, isError, refetch } = useListings({
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
keyword,
|
||||
})
|
||||
|
||||
const applyFilter = (value: string) => {
|
||||
setKeyword(value)
|
||||
setSearchValue(value)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mobile-home">
|
||||
<section className="mobile-hero">
|
||||
<div className="mobile-hero__eyebrow">JIEYOU TRADING HOUSE</div>
|
||||
<h1>
|
||||
租得明白,
|
||||
<br />
|
||||
还得安心。
|
||||
</h1>
|
||||
<p>实名审核 · 流程留痕 · 账单逐项列明</p>
|
||||
<SearchBar
|
||||
className="mobile-search"
|
||||
value={searchValue}
|
||||
onChange={setSearchValue}
|
||||
onSearch={value => setKeyword(value.trim())}
|
||||
placeholder="搜索区服、段位、装备或商品号"
|
||||
searchIcon={<SearchOutline />}
|
||||
/>
|
||||
<div className="mobile-chips">
|
||||
{quickFilters.map(item => (
|
||||
<button
|
||||
type="button"
|
||||
key={item.label}
|
||||
className={keyword === item.keyword && item.label !== '全部' ? 'is-active' : ''}
|
||||
onClick={() => applyFilter(item.keyword)}
|
||||
>
|
||||
{item.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="mobile-trust">
|
||||
<span>实名审核</span>
|
||||
<span>交接留痕</span>
|
||||
<span>争议可申诉</span>
|
||||
</section>
|
||||
|
||||
<section className="mobile-list-section">
|
||||
<div className="mobile-section-head">
|
||||
<div>
|
||||
<span className="mobile-eyebrow">CURATED ACCOUNTS</span>
|
||||
<h2>本周柜选</h2>
|
||||
</div>
|
||||
<span className="mobile-count">共 {data?.total ?? 0} 件</span>
|
||||
</div>
|
||||
|
||||
{isError ? (
|
||||
<div className="mobile-error">
|
||||
<ErrorBlock
|
||||
status="disconnected"
|
||||
title="商品没有加载出来"
|
||||
description="后端服务可能暂时不可用,你的账号和订单不受影响。"
|
||||
/>
|
||||
<Button color="primary" size="small" onClick={() => void refetch()}>
|
||||
重试
|
||||
</Button>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<PullToRefresh onRefresh={() => refetch().then(() => undefined)}>
|
||||
{isPending ? (
|
||||
<div className="mobile-skeleton-list">
|
||||
{Array.from({ length: 3 }).map((_, index) => (
|
||||
<div className="mobile-skeleton-card" key={index}>
|
||||
<Skeleton animated className="mobile-skeleton-cover" />
|
||||
<Skeleton.Paragraph lineCount={3} animated />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : data?.items.length ? (
|
||||
<div className="mobile-listing-list">
|
||||
{data.items.map(item => (
|
||||
<MobileListingCard item={item} key={item.id} />
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div className="mobile-empty">
|
||||
<Empty description="还没有符合条件的商品" />
|
||||
<Button size="small" color="primary" onClick={() => applyFilter('')}>
|
||||
查看全部
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</PullToRefresh>
|
||||
</section>
|
||||
|
||||
<section className="mobile-rules">
|
||||
<span className="mobile-eyebrow">RULES, IN PLAIN WORDS</span>
|
||||
<h2>先把规则说明白</h2>
|
||||
<p>押金、租金、额外消耗和退款规则都会在订单里逐项列出。结账备注不参与系统结算。</p>
|
||||
</section>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
import { Button, ErrorBlock, Skeleton, Tag, Toast } from 'antd-mobile'
|
||||
import { LeftOutline, PhoneFill } from 'antd-mobile-icons'
|
||||
import { useNavigate, useParams } from 'react-router-dom'
|
||||
|
||||
import { BrandLogo } from '@/components/BrandLogo'
|
||||
import { useListingDetail } from '@/features/listings/api'
|
||||
|
||||
function money(cents: number) {
|
||||
return `¥${(cents / 100).toFixed(2)}`
|
||||
}
|
||||
|
||||
function assetValue(value: unknown) {
|
||||
if (value && typeof value === 'object') {
|
||||
const record = value as Record<string, unknown>
|
||||
if (typeof record.start === 'string' && typeof record.end === 'string') {
|
||||
return `${record.start} – ${record.end}`
|
||||
}
|
||||
return Object.entries(record)
|
||||
.map(([key, item]) => `${key}:${String(item)}`)
|
||||
.join(',')
|
||||
}
|
||||
if (Array.isArray(value)) return value.map(String).join('、')
|
||||
return value == null || value === '' ? '未填写' : String(value)
|
||||
}
|
||||
|
||||
export function MobileListingDetailPage() {
|
||||
const navigate = useNavigate()
|
||||
const { id } = useParams()
|
||||
const { data, isPending, isError, refetch } = useListingDetail(id)
|
||||
|
||||
if (isPending) {
|
||||
return (
|
||||
<div className="mobile-detail mobile-detail--loading">
|
||||
<Skeleton animated className="mobile-detail__cover-skeleton" />
|
||||
<Skeleton.Paragraph lineCount={6} animated />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (isError || !data) {
|
||||
return (
|
||||
<div className="mobile-detail mobile-detail--error">
|
||||
<ErrorBlock status="disconnected" title="商品没有加载出来" description="请返回列表后重试。" />
|
||||
<Button color="primary" onClick={() => void refetch()}>
|
||||
重试
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const onlineTime =
|
||||
data.asset_summary && typeof data.asset_summary === 'object'
|
||||
? (data.asset_summary.online_time as unknown)
|
||||
: undefined
|
||||
const assetEntries = Object.entries(data.asset_summary || {}).filter(
|
||||
([key]) => key !== 'online_time'
|
||||
)
|
||||
|
||||
return (
|
||||
<div className="mobile-detail">
|
||||
<button type="button" className="mobile-detail__back" onClick={() => navigate(-1)}>
|
||||
<LeftOutline /> 返回
|
||||
</button>
|
||||
|
||||
<div className="mobile-detail__cover">
|
||||
{data.cover_url ? (
|
||||
<img src={data.cover_url} alt={data.title} />
|
||||
) : (
|
||||
<BrandLogo height={52} variant="seal" />
|
||||
)}
|
||||
</div>
|
||||
|
||||
<section className="mobile-detail__head">
|
||||
<div className="mobile-detail__no">{data.listing_no}</div>
|
||||
<h1>{data.title}</h1>
|
||||
<div className="mobile-detail__tags">
|
||||
<Tag color={data.in_transaction ? 'default' : 'success'} fill="outline">
|
||||
{data.in_transaction ? '租赁中' : '可租'}
|
||||
</Tag>
|
||||
<Tag fill="outline">{data.server_region || '区服待定'}</Tag>
|
||||
<Tag fill="outline">{data.login_platform || '登录方式待定'}</Tag>
|
||||
<Tag fill="outline">{data.rank_level || '段位待定'}</Tag>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="mobile-detail__price-card">
|
||||
<div>
|
||||
<span>租金</span>
|
||||
<strong>{money(data.price_cent)}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>押金</span>
|
||||
<strong>{money(data.deposit_amount_cent)}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>哈夫币</span>
|
||||
<strong>{data.haf_coin_amount.toLocaleString()}</strong>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="mobile-detail__section">
|
||||
<h2>账号说明</h2>
|
||||
<p>{data.description || '号主暂未填写补充说明。'}</p>
|
||||
</section>
|
||||
|
||||
<section className="mobile-detail__section">
|
||||
<h2>资产摘要</h2>
|
||||
<dl className="mobile-detail__assets">
|
||||
{assetEntries.length ? (
|
||||
assetEntries.map(([key, value]) => (
|
||||
<div key={key}>
|
||||
<dt>{key}</dt>
|
||||
<dd>{assetValue(value)}</dd>
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<div>
|
||||
<dt>资产</dt>
|
||||
<dd>未填写</dd>
|
||||
</div>
|
||||
)}
|
||||
<div>
|
||||
<dt>在线时间</dt>
|
||||
<dd>{assetValue(onlineTime)}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section className="mobile-detail__notice">
|
||||
<strong>先看清规则,再决定要不要租</strong>
|
||||
<p>押金、租金、额外消耗和退款规则会在下单页逐项列出;交接、归还、结账全程留痕。</p>
|
||||
</section>
|
||||
|
||||
<div className="mobile-detail__actions">
|
||||
<Button
|
||||
block
|
||||
onClick={() => {
|
||||
Toast.show({ content: '客服接入将在下一批完成' })
|
||||
}}
|
||||
>
|
||||
<PhoneFill /> 联系客服
|
||||
</Button>
|
||||
<Button
|
||||
block
|
||||
color="primary"
|
||||
onClick={() => {
|
||||
Toast.show({ content: '下单流程将在下一批接入' })
|
||||
}}
|
||||
>
|
||||
确认租赁
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Button } from 'antd-mobile'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
import { BrandLogo } from '@/components/BrandLogo'
|
||||
|
||||
export function MobilePlaceholderPage({
|
||||
title,
|
||||
description,
|
||||
}: {
|
||||
title: string
|
||||
description: string
|
||||
}) {
|
||||
const navigate = useNavigate()
|
||||
|
||||
return (
|
||||
<div className="mobile-placeholder">
|
||||
<BrandLogo height={50} variant="seal" />
|
||||
<span className="mobile-eyebrow">PHASE 1 · COMING NEXT</span>
|
||||
<h1>{title}</h1>
|
||||
<p>{description}</p>
|
||||
<Button color="primary" onClick={() => navigate('/m')}>
|
||||
回柜选看看
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
import { Button, List } from 'antd-mobile'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
import { BrandLogo } from '@/components/BrandLogo'
|
||||
import { useSessionStore } from '@/stores/session'
|
||||
|
||||
export function MobileProfilePage() {
|
||||
const navigate = useNavigate()
|
||||
const user = useSessionStore(state => state.user)
|
||||
const logout = useSessionStore(state => state.logout)
|
||||
|
||||
return (
|
||||
<div className="mobile-profile">
|
||||
<section className="mobile-profile__head">
|
||||
<BrandLogo height={42} variant="seal" />
|
||||
<div>
|
||||
<h1>{user ? user.nickname || '我的商行' : '还没登录'}</h1>
|
||||
<p>{user ? user.phone : '登录后查看订单、钱包与实名状态'}</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<List className="mobile-profile__list">
|
||||
<List.Item extra={user ? '已登录' : '未登录'}>账号状态</List.Item>
|
||||
<List.Item extra={user?.realname_status === 'verified' ? '已实名' : '未实名'}>
|
||||
实名认证
|
||||
</List.Item>
|
||||
<List.Item onClick={() => navigate('/m/orders')}>我的订单</List.Item>
|
||||
<List.Item onClick={() => navigate('/m/messages')}>消息中心</List.Item>
|
||||
</List>
|
||||
|
||||
<div className="mobile-profile__actions">
|
||||
{user ? (
|
||||
<Button
|
||||
block
|
||||
onClick={async () => {
|
||||
await logout()
|
||||
navigate('/m')
|
||||
}}
|
||||
>
|
||||
退出登录
|
||||
</Button>
|
||||
) : (
|
||||
<Button block color="primary" onClick={() => navigate('/m/login')}>
|
||||
登录 / 注册
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
import 'antd-mobile/es/global'
|
||||
|
||||
import { TabBar } from 'antd-mobile'
|
||||
import { AppOutline, MessageOutline, UnorderedListOutline, UserOutline } from 'antd-mobile-icons'
|
||||
import { Link, Outlet, useLocation, useNavigate } from 'react-router-dom'
|
||||
|
||||
import { BrandLogo } from '@/components/BrandLogo'
|
||||
import { useSessionStore } from '@/stores/session'
|
||||
|
||||
const tabs = [
|
||||
{ key: '/m', title: '首页', icon: <AppOutline /> },
|
||||
{ key: '/m/orders', title: '订单', icon: <UnorderedListOutline /> },
|
||||
{ key: '/m/messages', title: '消息', icon: <MessageOutline /> },
|
||||
{ key: '/m/profile', title: '我的', icon: <UserOutline /> },
|
||||
]
|
||||
|
||||
function activeTab(pathname: string) {
|
||||
if (pathname.startsWith('/m/orders') || pathname.startsWith('/m/chats')) return '/m/orders'
|
||||
if (pathname.startsWith('/m/messages')) return '/m/messages'
|
||||
if (pathname.startsWith('/m/profile')) return '/m/profile'
|
||||
return '/m'
|
||||
}
|
||||
|
||||
export function MobileLayout() {
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
const user = useSessionStore(state => state.user)
|
||||
const hideTabbar = /^\/m\/listings\/[^/]+$/.test(location.pathname)
|
||||
|
||||
return (
|
||||
<div className="mobile-shell">
|
||||
<header className="mobile-header">
|
||||
<Link to="/m" className="mobile-header__brand" aria-label="解忧商行移动端首页">
|
||||
<BrandLogo height={30} />
|
||||
</Link>
|
||||
<div className="mobile-header__right">
|
||||
{user ? (
|
||||
<Link to="/m/profile" className="mobile-header__user">
|
||||
{user.nickname || '我的'}
|
||||
</Link>
|
||||
) : (
|
||||
<Link to="/m/login" className="mobile-header__login">
|
||||
登录
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main className="mobile-content">
|
||||
<Outlet />
|
||||
</main>
|
||||
|
||||
<div className="mobile-tabbar" hidden={hideTabbar}>
|
||||
<TabBar
|
||||
activeKey={activeTab(location.pathname)}
|
||||
onChange={key => navigate(key)}
|
||||
safeArea
|
||||
>
|
||||
{tabs.map(tab => (
|
||||
<TabBar.Item key={tab.key} icon={tab.icon} title={tab.title} />
|
||||
))}
|
||||
</TabBar>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -1317,3 +1317,644 @@ a {
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile storefront */
|
||||
.mobile-shell {
|
||||
--adm-color-primary: #1e4d42;
|
||||
--adm-color-success: #2f7d5c;
|
||||
--adm-color-warning: #c17a2b;
|
||||
--adm-color-danger: #a64332;
|
||||
--adm-font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 560px;
|
||||
min-height: 100vh;
|
||||
margin: 0 auto;
|
||||
padding-bottom: calc(72px + env(safe-area-inset-bottom));
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.mobile-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 20;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 58px;
|
||||
padding: 0 16px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
background: rgba(255, 253, 248, 0.95);
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
|
||||
.mobile-header__brand {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mobile-header__right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.mobile-header__login,
|
||||
.mobile-header__user {
|
||||
padding: 7px 12px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 4px;
|
||||
color: var(--brand-ink);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.mobile-header__login {
|
||||
border-color: var(--brand-ink);
|
||||
background: var(--brand-ink);
|
||||
color: var(--paper-warm);
|
||||
}
|
||||
|
||||
.mobile-content {
|
||||
min-height: calc(100vh - 130px);
|
||||
}
|
||||
|
||||
.mobile-tabbar {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 30;
|
||||
width: 100%;
|
||||
max-width: 560px;
|
||||
margin: 0 auto;
|
||||
border-top: 1px solid var(--line);
|
||||
background: var(--paper-warm);
|
||||
}
|
||||
|
||||
.mobile-tabbar[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-tabbar .adm-tab-bar-item {
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
.mobile-tabbar .adm-tab-bar-item-active {
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
.mobile-tabbar .adm-tab-bar-item-title {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.mobile-home {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
|
||||
.mobile-hero {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding: 28px 18px 24px;
|
||||
background: var(--brand-ink);
|
||||
color: var(--paper-warm);
|
||||
}
|
||||
|
||||
.mobile-hero::after {
|
||||
position: absolute;
|
||||
right: -70px;
|
||||
bottom: -100px;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
border: 1px solid rgba(236, 208, 177, 0.22);
|
||||
border-radius: 50%;
|
||||
content: '';
|
||||
}
|
||||
|
||||
.mobile-hero__eyebrow {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
color: var(--brand-seal-line);
|
||||
font-size: 9px;
|
||||
letter-spacing: 0.16em;
|
||||
}
|
||||
|
||||
.mobile-hero h1 {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin: 12px 0 10px;
|
||||
font-family: 'Noto Serif SC', 'Songti SC', serif;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
line-height: 1.24;
|
||||
}
|
||||
|
||||
.mobile-hero p {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin: 0 0 18px;
|
||||
color: #d8e2dd;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
.mobile-search {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
--background: #fffdf8;
|
||||
--border-radius: 6px;
|
||||
--height: 42px;
|
||||
--padding-left: 12px;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.mobile-chips {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 14px;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.mobile-chips::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile-chips button {
|
||||
flex: 0 0 auto;
|
||||
padding: 7px 13px;
|
||||
border: 1px solid rgba(236, 208, 177, 0.38);
|
||||
border-radius: 3px;
|
||||
background: transparent;
|
||||
color: #d8e2dd;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.mobile-chips button.is-active {
|
||||
border-color: var(--brand-seal-line);
|
||||
background: var(--brand-seal-line);
|
||||
color: var(--brand-ink);
|
||||
}
|
||||
|
||||
.mobile-trust {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
border-bottom: 1px solid var(--line);
|
||||
background: var(--paper-warm);
|
||||
}
|
||||
|
||||
.mobile-trust span {
|
||||
padding: 12px 4px;
|
||||
border-right: 1px solid var(--line);
|
||||
color: var(--ink-secondary);
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mobile-trust span:last-child {
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.mobile-list-section {
|
||||
padding: 24px 16px 8px;
|
||||
}
|
||||
|
||||
.mobile-section-head {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.mobile-eyebrow {
|
||||
display: block;
|
||||
color: var(--brand-seal);
|
||||
font-size: 9px !important;
|
||||
letter-spacing: 0.16em;
|
||||
}
|
||||
|
||||
.mobile-section-head h2,
|
||||
.mobile-rules h2,
|
||||
.mobile-placeholder h1,
|
||||
.mobile-profile h1 {
|
||||
margin: 5px 0 0;
|
||||
color: var(--brand-ink);
|
||||
font-family: 'Noto Serif SC', 'Songti SC', serif;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.mobile-count {
|
||||
color: var(--ink-muted);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.mobile-listing-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.mobile-listing-card {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: var(--paper-warm);
|
||||
}
|
||||
|
||||
.mobile-listing-card__cover {
|
||||
display: flex;
|
||||
flex: 0 0 108px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
overflow: hidden;
|
||||
border-radius: 5px;
|
||||
background: #eef1ea;
|
||||
}
|
||||
|
||||
.mobile-listing-card__cover img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.mobile-listing-card__body {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mobile-listing-card__top,
|
||||
.mobile-listing-card__bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.mobile-listing-card__no {
|
||||
color: var(--ink-muted);
|
||||
font-family: 'Inter', monospace;
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.mobile-listing-card__body h3 {
|
||||
display: -webkit-box;
|
||||
margin: 7px 0 6px;
|
||||
overflow: hidden;
|
||||
color: var(--ink);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 1.45;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.mobile-listing-card__tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.mobile-listing-card__tags span {
|
||||
padding: 2px 5px;
|
||||
border-radius: 2px;
|
||||
background: #eef2ec;
|
||||
color: var(--brand-ink);
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.mobile-listing-card__bottom {
|
||||
margin-top: auto;
|
||||
padding-top: 9px;
|
||||
}
|
||||
|
||||
.mobile-listing-card__bottom strong {
|
||||
color: var(--brand-seal);
|
||||
font-family: 'Inter', 'DIN Alternate', sans-serif;
|
||||
font-size: 19px;
|
||||
}
|
||||
|
||||
.mobile-listing-card__bottom small {
|
||||
display: block;
|
||||
margin-top: 2px;
|
||||
color: var(--ink-muted);
|
||||
font-size: 9px;
|
||||
}
|
||||
|
||||
.mobile-listing-card__more {
|
||||
color: var(--ink-muted);
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.mobile-skeleton-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.mobile-skeleton-card {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: var(--paper-warm);
|
||||
}
|
||||
|
||||
.mobile-skeleton-cover {
|
||||
flex: 0 0 108px;
|
||||
width: 108px;
|
||||
height: 108px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.mobile-skeleton-card .adm-skeleton-paragraph {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.mobile-empty,
|
||||
.mobile-error {
|
||||
padding: 36px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mobile-error .adm-button {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.mobile-rules {
|
||||
margin: 22px 16px 12px;
|
||||
padding: 22px 18px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: var(--paper-warm);
|
||||
}
|
||||
|
||||
.mobile-rules p {
|
||||
margin: 10px 0 0;
|
||||
color: var(--ink-secondary);
|
||||
font-size: 12px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.mobile-detail {
|
||||
padding: 14px 16px 108px;
|
||||
}
|
||||
|
||||
.mobile-detail--loading,
|
||||
.mobile-detail--error {
|
||||
padding-top: 24px;
|
||||
}
|
||||
|
||||
.mobile-detail--error {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mobile-detail--error .adm-button {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.mobile-detail__back {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-bottom: 12px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--ink-secondary);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.mobile-detail__cover,
|
||||
.mobile-detail__cover-skeleton {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
aspect-ratio: 4 / 3;
|
||||
overflow: hidden;
|
||||
border-radius: 8px;
|
||||
background: #eef1ea;
|
||||
}
|
||||
|
||||
.mobile-detail__cover img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.mobile-detail__head {
|
||||
padding: 18px 0 14px;
|
||||
}
|
||||
|
||||
.mobile-detail__no {
|
||||
color: var(--ink-muted);
|
||||
font-family: 'Inter', monospace;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.mobile-detail__head h1 {
|
||||
margin: 6px 0 10px;
|
||||
color: var(--ink);
|
||||
font-family: 'Noto Serif SC', 'Songti SC', serif;
|
||||
font-size: 23px;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.mobile-detail__tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.mobile-detail__price-card {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 1px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: var(--line);
|
||||
}
|
||||
|
||||
.mobile-detail__price-card > div {
|
||||
padding: 14px 10px;
|
||||
background: var(--paper-warm);
|
||||
}
|
||||
|
||||
.mobile-detail__price-card span,
|
||||
.mobile-detail__price-card strong {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mobile-detail__price-card span {
|
||||
margin-bottom: 5px;
|
||||
color: var(--ink-muted);
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.mobile-detail__price-card strong {
|
||||
color: var(--brand-ink);
|
||||
font-family: 'Inter', 'DIN Alternate', sans-serif;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.mobile-detail__section {
|
||||
padding: 20px 0 0;
|
||||
}
|
||||
|
||||
.mobile-detail__section h2 {
|
||||
margin: 0 0 10px;
|
||||
color: var(--brand-ink);
|
||||
font-family: 'Noto Serif SC', 'Songti SC', serif;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.mobile-detail__section p {
|
||||
margin: 0;
|
||||
color: var(--ink-secondary);
|
||||
font-size: 13px;
|
||||
line-height: 1.85;
|
||||
}
|
||||
|
||||
.mobile-detail__assets {
|
||||
margin: 0;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.mobile-detail__assets > div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid var(--line);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.mobile-detail__assets dt {
|
||||
color: var(--ink-muted);
|
||||
}
|
||||
|
||||
.mobile-detail__assets dd {
|
||||
margin: 0;
|
||||
color: var(--ink);
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.mobile-detail__notice {
|
||||
margin-top: 22px;
|
||||
padding: 16px;
|
||||
border-left: 2px solid var(--brand-seal);
|
||||
background: #f1ece2;
|
||||
}
|
||||
|
||||
.mobile-detail__notice strong {
|
||||
color: var(--brand-ink);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.mobile-detail__notice p {
|
||||
margin: 7px 0 0;
|
||||
color: var(--ink-secondary);
|
||||
font-size: 11px;
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
.mobile-detail__actions {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 30;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
max-width: 560px;
|
||||
margin: 0 auto;
|
||||
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
||||
border-top: 1px solid var(--line);
|
||||
background: var(--paper-warm);
|
||||
}
|
||||
|
||||
.mobile-placeholder {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 70vh;
|
||||
padding: 44px 28px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mobile-placeholder .mobile-eyebrow {
|
||||
margin-top: 24px;
|
||||
}
|
||||
|
||||
.mobile-placeholder p {
|
||||
max-width: 320px;
|
||||
margin: 14px 0 22px;
|
||||
color: var(--ink-secondary);
|
||||
font-size: 13px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.mobile-profile {
|
||||
padding: 22px 16px;
|
||||
}
|
||||
|
||||
.mobile-profile__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
padding: 20px;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: var(--brand-ink);
|
||||
}
|
||||
|
||||
.mobile-profile__head h1 {
|
||||
margin: 0 0 4px;
|
||||
color: #f0f4f2;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.mobile-profile__head p {
|
||||
margin: 0;
|
||||
color: #b9cbc3;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.mobile-profile__list {
|
||||
margin-top: 14px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
background: var(--paper-warm);
|
||||
--border-inner: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.mobile-profile__actions {
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.mobile-shell {
|
||||
border-right: 1px solid var(--line);
|
||||
border-left: 1px solid var(--line);
|
||||
box-shadow: 0 0 60px rgba(29, 36, 33, 0.08);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user