账户登录
This commit is contained in:
1 parent
d8e17fce1d
commit
7dea19f2db
12 files changed
+331
-14
No files matched your search
@@ -0,0 +1,159 @@
|
||||
import { ArrowLeft, ChevronRight, Menu, Pencil, Plus, Save, Trash2 } from "lucide-react";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import { apiPost } from "./api";
|
||||
|
||||
const SITE_CODE = "SIT0000000000001";
|
||||
|
||||
type NavigationSummary = {
|
||||
navigationCode: string;
|
||||
navigationName: string;
|
||||
position: "HEADER" | "FOOTER";
|
||||
status: "DRAFT" | "PUBLISHED" | "OFFLINE";
|
||||
items: NavigationItemResponse[];
|
||||
};
|
||||
|
||||
type NavigationItemResponse = {
|
||||
itemCode: string;
|
||||
parentItemCode?: string;
|
||||
itemType: string;
|
||||
title: string;
|
||||
targetCode?: string;
|
||||
url: string;
|
||||
openType: "CURRENT" | "NEW";
|
||||
visible: boolean;
|
||||
sortNo: number;
|
||||
};
|
||||
|
||||
type NavigationItemForm = {
|
||||
clientKey: string;
|
||||
parentClientKey: string;
|
||||
itemType: string;
|
||||
title: string;
|
||||
targetCode: string;
|
||||
url: string;
|
||||
openType: "CURRENT" | "NEW";
|
||||
visible: boolean;
|
||||
sortNo: number;
|
||||
};
|
||||
|
||||
type TargetOption = {
|
||||
group: string;
|
||||
type: string;
|
||||
code: string;
|
||||
label: string;
|
||||
url: string;
|
||||
};
|
||||
|
||||
/** 生成仅用于当前编辑会话的菜单项临时键。 */
|
||||
function createClientKey(): string {
|
||||
return `menu-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
||||
}
|
||||
|
||||
/** 新建一个空白菜单项。 */
|
||||
function createItem(parentClientKey = "", sortNo = 0): NavigationItemForm {
|
||||
return { clientKey: createClientKey(), parentClientKey, itemType: "HOME", title: "", targetCode: "", url: "/", openType: "CURRENT", visible: true, sortNo };
|
||||
}
|
||||
|
||||
/** 菜单导航列表与独立编辑页。 */
|
||||
export default function NavigationManager() {
|
||||
const [list, setList] = useState<NavigationSummary[]>([]);
|
||||
const [editing, setEditing] = useState(false);
|
||||
const [navigationCode, setNavigationCode] = useState("");
|
||||
const [navigationName, setNavigationName] = useState("");
|
||||
const [position, setPosition] = useState<"HEADER" | "FOOTER">("HEADER");
|
||||
const [status, setStatus] = useState<"DRAFT" | "PUBLISHED" | "OFFLINE">("DRAFT");
|
||||
const [items, setItems] = useState<NavigationItemForm[]>([]);
|
||||
const [targets, setTargets] = useState<TargetOption[]>([]);
|
||||
const [message, setMessage] = useState("");
|
||||
const [saving, setSaving] = useState(false);
|
||||
|
||||
/** 读取导航列表。 */
|
||||
const loadList = async () => {
|
||||
try {
|
||||
const result = await apiPost<{ items: NavigationSummary[] }>("/navigations/list", { siteCode: SITE_CODE });
|
||||
setList(result.items || []);
|
||||
setMessage("");
|
||||
} catch (error) {
|
||||
setMessage(error instanceof Error ? error.message : "导航加载失败");
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => { void loadList(); }, []);
|
||||
|
||||
/** 汇总导航可以跳转的固定页面和业务内容。 */
|
||||
const loadTargets = async () => {
|
||||
const options: TargetOption[] = [
|
||||
{ group: "固定页面", type: "HOME", code: "", label: "首页", url: "/" },
|
||||
{ group: "固定页面", type: "PRODUCT_LIST", code: "", label: "产品列表页", url: "/products" },
|
||||
{ group: "固定页面", type: "NEWS_LIST", code: "", label: "新闻列表页", url: "/news" },
|
||||
{ group: "固定页面", type: "CASE_LIST", code: "", label: "案例列表页", url: "/cases" },
|
||||
{ group: "固定页面", type: "HELP_LIST", code: "", label: "帮助列表页", url: "/help" },
|
||||
];
|
||||
const settled = await Promise.allSettled([
|
||||
apiPost<any>("/pages/list", { siteCode: SITE_CODE }),
|
||||
apiPost<any>("/products/categories/list", { siteCode: SITE_CODE }),
|
||||
apiPost<any>("/products/list", { siteCode: SITE_CODE }),
|
||||
...(["NEWS", "CASE", "HELP"] as const).flatMap((contentType) => [
|
||||
apiPost<any>("/contents/categories/list", { siteCode: SITE_CODE, contentType }),
|
||||
apiPost<any>("/contents/list", { siteCode: SITE_CODE, contentType }),
|
||||
]),
|
||||
]);
|
||||
const value = (index: number) => settled[index].status === "fulfilled" ? (settled[index] as PromiseFulfilledResult<any>).value.items || [] : [];
|
||||
value(0).forEach((page: any) => options.push({ group: page.pageType === "CUSTOM_PAGE" ? "自定义页面" : "系统页面", type: page.pageType === "CUSTOM_PAGE" ? "CUSTOM_PAGE" : "SYSTEM_PAGE", code: page.pageCode, label: page.pageName, url: `/${page.slug}` }));
|
||||
value(1).forEach((category: any) => options.push({ group: "产品分类", type: "PRODUCT_CATEGORY", code: category.categoryCode, label: category.categoryName, url: `/products/category/${category.slug}` }));
|
||||
value(2).forEach((product: any) => options.push({ group: "产品", type: "PRODUCT", code: product.productCode, label: product.productName, url: `/products/${product.slug}` }));
|
||||
const contentMeta = [{ name: "新闻", prefix: "news", categoryType: "NEWS_CATEGORY", itemType: "NEWS" }, { name: "案例", prefix: "cases", categoryType: "CASE_CATEGORY", itemType: "CASE" }, { name: "帮助", prefix: "help", categoryType: "HELP_CATEGORY", itemType: "HELP" }];
|
||||
contentMeta.forEach((meta, offset) => {
|
||||
value(3 + offset * 2).forEach((category: any) => options.push({ group: `${meta.name}分类`, type: meta.categoryType, code: category.categoryCode, label: category.categoryName, url: `/${meta.prefix}/category/${category.slug}` }));
|
||||
value(4 + offset * 2).forEach((content: any) => options.push({ group: meta.name, type: meta.itemType, code: content.contentCode, label: content.title, url: `/${meta.prefix}/${content.slug}` }));
|
||||
});
|
||||
setTargets(options);
|
||||
};
|
||||
|
||||
/** 打开新增导航页面。 */
|
||||
const createNavigation = () => {
|
||||
setNavigationCode(""); setNavigationName(""); setPosition("HEADER"); setStatus("DRAFT"); setItems([createItem()]); setEditing(true); setMessage("");
|
||||
void loadTargets();
|
||||
};
|
||||
|
||||
/** 打开既有导航编辑页面。 */
|
||||
const editNavigation = (navigation: NavigationSummary) => {
|
||||
setNavigationCode(navigation.navigationCode); setNavigationName(navigation.navigationName); setPosition(navigation.position); setStatus(navigation.status);
|
||||
setItems(navigation.items.map((item) => ({ clientKey: item.itemCode, parentClientKey: item.parentItemCode || "", itemType: item.itemType, title: item.title, targetCode: item.targetCode || "", url: item.url, openType: item.openType, visible: item.visible, sortNo: item.sortNo })));
|
||||
setEditing(true); setMessage(""); void loadTargets();
|
||||
};
|
||||
|
||||
/** 更新指定菜单项。 */
|
||||
const updateItem = (key: string, patch: Partial<NavigationItemForm>) => setItems((current) => current.map((item) => item.clientKey === key ? { ...item, ...patch } : item));
|
||||
|
||||
/** 选择内部页面或内容作为菜单目标。 */
|
||||
const selectTarget = (key: string, encoded: string) => {
|
||||
const option = targets.find((item) => `${item.type}|${item.code}|${item.url}` === encoded);
|
||||
if (option) updateItem(key, { itemType: option.type, targetCode: option.code, url: option.url, title: items.find((item) => item.clientKey === key)?.title || option.label });
|
||||
};
|
||||
|
||||
/** 删除菜单项及其直接子项。 */
|
||||
const deleteItem = (key: string) => setItems((current) => current.filter((item) => item.clientKey !== key && item.parentClientKey !== key));
|
||||
|
||||
/** 保存完整导航菜单树。 */
|
||||
const save = async () => {
|
||||
if (!navigationName.trim() || items.length === 0 || items.some((item) => !item.title.trim() || !item.url.trim())) { setMessage("请填写导航名称及全部菜单项的标题和目标"); return; }
|
||||
try {
|
||||
setSaving(true); setMessage("");
|
||||
await apiPost("/navigations/save", { navigationCode: navigationCode || null, siteCode: SITE_CODE, navigationName, position, status, items: items.map((item, index) => ({ ...item, sortNo: index })) });
|
||||
setEditing(false); await loadList();
|
||||
} catch (error) { setMessage(error instanceof Error ? error.message : "导航保存失败"); } finally { setSaving(false); }
|
||||
};
|
||||
|
||||
/** 删除导航。 */
|
||||
const remove = async (navigation: NavigationSummary) => {
|
||||
if (!window.confirm(`确认删除导航“${navigation.navigationName}”吗?`)) return;
|
||||
try { await apiPost("/navigations/delete", { siteCode: SITE_CODE, navigationCode: navigation.navigationCode }); await loadList(); } catch (error) { setMessage(error instanceof Error ? error.message : "导航删除失败"); }
|
||||
};
|
||||
|
||||
const groupedTargets = useMemo(() => Array.from(new Set(targets.map((item) => item.group))), [targets]);
|
||||
|
||||
if (!editing) return <div className="navigation-manager"><header><div><h1>菜单导航</h1><p>配置前台站页头与页脚显示的菜单结构。</p></div><button className="primary" onClick={createNavigation}><Plus size={17}/>添加导航</button></header>{message && <div className="notice">{message}</div>}<section className="navigation-list"><div className="navigation-list-head"><span>导航</span><span>菜单项</span><span>位置 / 状态</span><span>操作</span></div>{list.length === 0 ? <div className="empty"><Menu size={34}/><strong>暂无导航配置</strong><p>点击“添加导航”创建前台菜单。</p></div> : list.map((navigation) => <div className="navigation-list-row" key={navigation.navigationCode}><strong>{navigation.navigationName}</strong><span>{navigation.items.filter((item) => !item.parentItemCode).map((item) => item.title).join("、") || "--"}</span><span>{navigation.position === "HEADER" ? "页头" : "页脚"} · {navigation.status === "PUBLISHED" ? "已发布" : navigation.status === "OFFLINE" ? "已下线" : "草稿"}</span><div><button title="编辑导航" onClick={() => editNavigation(navigation)}><Pencil size={17}/></button><button className="danger" title="删除导航" onClick={() => void remove(navigation)}><Trash2 size={17}/></button></div></div>)}</section></div>;
|
||||
|
||||
return <div className="navigation-editor"><header><div className="navigation-editor-title"><button className="icon-button" onClick={() => setEditing(false)}><ArrowLeft size={18}/></button><div><h1>{navigationCode ? "编辑导航" : "新增导航"}</h1><p>设置菜单层级、跳转目标和打开方式。</p></div></div><div className="header-actions"><button className="secondary" onClick={() => setEditing(false)}>取消</button><button className="primary" disabled={saving} onClick={() => void save()}><Save size={17}/>{saving ? "保存中" : "保存"}</button></div></header>{message && <div className="notice">{message}</div>}<section className="navigation-base"><label><span>导航标题 *</span><input maxLength={100} value={navigationName} onChange={(event) => setNavigationName(event.target.value)} placeholder="例如:主导航"/></label><label><span>展示位置</span><select value={position} onChange={(event) => setPosition(event.target.value as "HEADER" | "FOOTER")}><option value="HEADER">页头导航</option><option value="FOOTER">页脚导航</option></select></label><label><span>发布状态</span><select value={status} onChange={(event) => setStatus(event.target.value as typeof status)}><option value="DRAFT">草稿</option><option value="PUBLISHED">发布</option><option value="OFFLINE">下线</option></select></label></section><section className="navigation-items"><div className="navigation-items-heading"><div><h2>菜单项</h2><p>菜单项可以指向固定页面、分类、具体内容或自定义地址。</p></div><button className="secondary" onClick={() => setItems((current) => [...current, createItem("", current.length)])}><Plus size={16}/>添加菜单项</button></div><div className="navigation-item-head"><span>菜单标题</span><span>页面打开方式</span><span>跳转目标</span><span>显示</span><span>操作</span></div>{items.map((item) => <div className={`navigation-item-row ${item.parentClientKey ? "child" : ""}`} key={item.clientKey}>{item.parentClientKey && <ChevronRight className="child-marker" size={16}/>}<input value={item.title} onChange={(event) => updateItem(item.clientKey, { title: event.target.value })} placeholder="菜单标题"/><select value={item.openType} onChange={(event) => updateItem(item.clientKey, { openType: event.target.value as NavigationItemForm["openType"] })}><option value="CURRENT">当前页面打开</option><option value="NEW">新窗口打开</option></select><select value={`${item.itemType}|${item.targetCode}|${item.url}`} onChange={(event) => selectTarget(item.clientKey, event.target.value)}><option value={`${item.itemType}|${item.targetCode}|${item.url}`}>{targets.length ? "请选择页面或内容" : "正在加载目标..."}</option>{groupedTargets.map((group) => <optgroup label={group} key={group}>{targets.filter((target) => target.group === group).map((target) => <option key={`${target.type}-${target.code}-${target.url}`} value={`${target.type}|${target.code}|${target.url}`}>{target.label}</option>)}</optgroup>)}</select><label className="switch"><input type="checkbox" checked={item.visible} onChange={(event) => updateItem(item.clientKey, { visible: event.target.checked })}/><span/></label><div className="navigation-row-actions">{!item.parentClientKey && <button title="添加子菜单" onClick={() => setItems((current) => [...current, createItem(item.clientKey, current.length)])}><Plus size={17}/></button>}<button className="danger" title="删除菜单项" onClick={() => deleteItem(item.clientKey)}><Trash2 size={17}/></button></div></div>)}{items.length === 0 && <div className="empty"><strong>暂无菜单项</strong><p>添加至少一个菜单项后才能保存。</p></div>}</section></div>;
|
||||
}
|
||||
@@ -125,7 +125,6 @@ export default function SeoSettingsPage() {
|
||||
</nav>
|
||||
{notice && <div className="notice">{notice}</div>}
|
||||
<section className="seo-settings-card">
|
||||
<div className="seo-card-head"><h2>搜索引擎优化</h2><p>系统提供默认内容,发布前请根据当前站点业务进行确认和修改。</p></div>
|
||||
<div className="seo-settings-form">
|
||||
<label className="wide"><span>SEO 标题 *</span><input maxLength={70} value={form.title} onChange={(event) => setForm({ ...form, title: event.target.value })}/><small>{form.title.length} / 70</small></label>
|
||||
<label className="wide"><span>SEO 描述 *</span><textarea rows={4} maxLength={160} value={form.description} onChange={(event) => setForm({ ...form, description: event.target.value })}/><small>{form.description.length} / 160</small></label>
|
||||
|
||||
+18
-5
@@ -6,9 +6,11 @@ import {
|
||||
ChevronDown,
|
||||
FileText,
|
||||
FolderTree,
|
||||
Globe2,
|
||||
HelpCircle,
|
||||
Image,
|
||||
Mail,
|
||||
Menu,
|
||||
Newspaper,
|
||||
PanelsTopLeft,
|
||||
Paintbrush,
|
||||
@@ -30,11 +32,12 @@ import MediaCenter from "./MediaCenter";
|
||||
import LoginPage, { type Account } from "./LoginPage";
|
||||
import SettingsPage from "./SettingsPage";
|
||||
import SeoSettingsPage from "./SeoSettingsPage";
|
||||
import NavigationManager from "./NavigationManager";
|
||||
import { apiPost } from "./api";
|
||||
|
||||
const SITE_WEB = window.location.hostname === "admin.steliro.com" ? "https://site.steliro.com" : "http://localhost:5174";
|
||||
const SITE = "SIT0000000000001";
|
||||
type Section = "products" | "product-categories" | "NEWS" | "NEWS-categories" | "CASE" | "CASE-categories" | "HELP" | "HELP-categories" | "pages" | "seo-settings" | "decoration" | "custom-code" | "media" | "inquiries" | "inquiry-settings" | "settings";
|
||||
type Section = "products" | "product-categories" | "NEWS" | "NEWS-categories" | "CASE" | "CASE-categories" | "HELP" | "HELP-categories" | "pages" | "navigation" | "seo-settings" | "decoration" | "custom-code" | "media" | "inquiries" | "inquiry-settings" | "settings";
|
||||
type EditorialSection = "NEWS" | "CASE" | "HELP";
|
||||
type ContentEditorState = { contentType: EditorialSection; contentCode: string };
|
||||
type Item = {
|
||||
@@ -76,17 +79,21 @@ async function post(path: string, body: unknown) {
|
||||
return apiPost(path, body);
|
||||
}
|
||||
|
||||
const menus = [
|
||||
const frontSiteMenus = [
|
||||
{ key: "pages" as Section, label: "页面", icon: FileText },
|
||||
{ key: "navigation" as Section, label: "菜单导航", icon: Menu },
|
||||
{ key: "decoration" as Section, label: "店铺装修", icon: Paintbrush },
|
||||
{ key: "custom-code" as Section, label: "自定义代码", icon: Code2 },
|
||||
{ key: "seo-settings" as Section, label: "页面 SEO", icon: Search },
|
||||
];
|
||||
const menus = [
|
||||
{ key: "media" as Section, label: "素材中心", icon: Image },
|
||||
{ key: "inquiries" as Section, label: "询盘", icon: Mail },
|
||||
];
|
||||
const sectionLabels: Record<Section, string> = {
|
||||
products: "产品", "product-categories": "产品分类", NEWS: "新闻", "NEWS-categories": "新闻分类",
|
||||
CASE: "案例", "CASE-categories": "案例分类", HELP: "帮助", "HELP-categories": "帮助分类",
|
||||
pages: "页面", decoration: "店铺装修", "custom-code": "自定义代码", media: "素材中心", inquiries: "询盘", "inquiry-settings": "询盘设置",
|
||||
pages: "页面", navigation: "菜单导航", decoration: "店铺装修", "custom-code": "自定义代码", media: "素材中心", inquiries: "询盘", "inquiry-settings": "询盘设置",
|
||||
"seo-settings": "页面 SEO",
|
||||
settings: "系统设置",
|
||||
};
|
||||
@@ -122,6 +129,7 @@ function App({ account, onAccount, onLogout }: { account: Account; onAccount: (v
|
||||
const [editingPage, setEditingPage] = useState<string | null>(resolvePageRoute);
|
||||
const [productMenuOpen, setProductMenuOpen] = useState(true);
|
||||
const [contentMenuOpen, setContentMenuOpen] = useState(true);
|
||||
const [frontSiteMenuOpen, setFrontSiteMenuOpen] = useState(true);
|
||||
const navigateSection = (next: Section) => {
|
||||
setEditingProduct(null);
|
||||
setEditingContent(null);
|
||||
@@ -145,6 +153,8 @@ function App({ account, onAccount, onLogout }: { account: Account; onAccount: (v
|
||||
? { items: [] }
|
||||
: section === "settings"
|
||||
? { items: [] }
|
||||
: section === "navigation"
|
||||
? { items: [] }
|
||||
: section === "products"
|
||||
? await post("/products/list", { siteCode: SITE })
|
||||
: section === "pages"
|
||||
@@ -310,6 +320,10 @@ function App({ account, onAccount, onLogout }: { account: Account; onAccount: (v
|
||||
<button className={["NEWS", "NEWS-categories", "CASE", "CASE-categories", "HELP", "HELP-categories"].includes(section) ? "group-active" : ""} onClick={() => setContentMenuOpen(!contentMenuOpen)}><FolderTree size={18}/>内容<ChevronDown className={contentMenuOpen ? "expanded" : ""} size={16}/></button>
|
||||
{contentMenuOpen && <div className="nav-children content-children"><button className={["NEWS", "NEWS-categories"].includes(section) ? "active" : ""} onClick={() => navigateSection("NEWS")}><Newspaper size={15}/>新闻</button><button className={["CASE", "CASE-categories"].includes(section) ? "active" : ""} onClick={() => navigateSection("CASE")}><PanelsTopLeft size={15}/>案例</button><button className={["HELP", "HELP-categories"].includes(section) ? "active" : ""} onClick={() => navigateSection("HELP")}><HelpCircle size={15}/>帮助</button></div>}
|
||||
</div>
|
||||
<div className="nav-group">
|
||||
<button className={frontSiteMenus.some((item) => item.key === section) ? "group-active" : ""} onClick={() => setFrontSiteMenuOpen(!frontSiteMenuOpen)}><Globe2 size={18}/>前台站<ChevronDown className={frontSiteMenuOpen ? "expanded" : ""} size={16}/></button>
|
||||
{frontSiteMenuOpen && <div className="nav-children front-site-children">{frontSiteMenus.map((item) => <button key={item.key} className={section === item.key ? "active" : ""} onClick={() => navigateSection(item.key)}><item.icon size={15}/>{item.label}</button>)}</div>}
|
||||
</div>
|
||||
{menus.map((m) => (
|
||||
<button
|
||||
key={m.key}
|
||||
@@ -320,7 +334,6 @@ function App({ account, onAccount, onLogout }: { account: Account; onAccount: (v
|
||||
{m.label}
|
||||
</button>
|
||||
))}
|
||||
<button className={section === "seo-settings" ? "active" : ""} onClick={() => navigateSection("seo-settings")}><Search size={18}/>页面 SEO</button>
|
||||
</nav>
|
||||
<div className="aside-bottom">
|
||||
<button>
|
||||
@@ -338,7 +351,7 @@ function App({ account, onAccount, onLogout }: { account: Account; onAccount: (v
|
||||
</div>
|
||||
</aside>
|
||||
<main>
|
||||
{section === "settings" ? <SettingsPage account={account} onAccount={onAccount} onLogout={onLogout}/> : section === "seo-settings" ? <SeoSettingsPage/> : section === "decoration" ? <DecorationEditor onBack={() => navigateSection("pages")}/> : section === "custom-code" ? <CustomCodeManager/> : section === "media" ? <MediaCenter/> : editingProduct !== null ? <ProductEditor productCode={editingProduct || undefined} onBack={closeProductEditor} /> : editingContent !== null ? <ContentEditor contentType={editingContent.contentType} contentCode={editingContent.contentCode || undefined} onBack={closeContentEditor} /> : editingPage !== null ? <PageEditor pageCode={editingPage || undefined} onBack={closePageEditor}/> : <>
|
||||
{section === "settings" ? <SettingsPage account={account} onAccount={onAccount} onLogout={onLogout}/> : section === "seo-settings" ? <SeoSettingsPage/> : section === "navigation" ? <NavigationManager/> : section === "decoration" ? <DecorationEditor onBack={() => navigateSection("pages")}/> : section === "custom-code" ? <CustomCodeManager/> : section === "media" ? <MediaCenter/> : editingProduct !== null ? <ProductEditor productCode={editingProduct || undefined} onBack={closeProductEditor} /> : editingContent !== null ? <ContentEditor contentType={editingContent.contentType} contentCode={editingContent.contentCode || undefined} onBack={closeContentEditor} /> : editingPage !== null ? <PageEditor pageCode={editingPage || undefined} onBack={closePageEditor}/> : <>
|
||||
{section.endsWith("-categories") ? <CategoryManager contentType={section === "NEWS-categories" ? "NEWS" : section === "CASE-categories" ? "CASE" : section === "HELP-categories" ? "HELP" : undefined}/> : <>
|
||||
<header>
|
||||
<div>
|
||||
|
||||
@@ -30,7 +30,8 @@ select {
|
||||
.shell {
|
||||
display: grid;
|
||||
grid-template-columns: 230px 1fr;
|
||||
min-height: 100vh;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
.shell > aside {
|
||||
background: #17212b;
|
||||
@@ -38,6 +39,8 @@ select {
|
||||
padding: 22px 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.brand {
|
||||
display: flex;
|
||||
@@ -102,6 +105,8 @@ nav {
|
||||
main {
|
||||
padding: 28px 34px;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
header {
|
||||
display: flex;
|
||||
@@ -414,8 +419,11 @@ header p {
|
||||
.inquiry-editor-layout{grid-template-columns:1fr}.form-list-row{grid-template-columns:1fr}.forms-heading{align-items:flex-start;gap:12px}.form-field-table{overflow-x:auto}.form-field-head,.form-field-item{min-width:760px}.field-dialog .form-grid{grid-template-columns:1fr}.field-dialog .form-grid .wide{grid-column:auto}
|
||||
}
|
||||
.inquiry-table{overflow-x:auto}.inquiry-table .thead,.inquiry-table .row{min-width:1120px;grid-template-columns:1.25fr 1.7fr 1.35fr 1fr 1fr .8fr .65fr}.inquiry-table .row>span{min-width:0}.inquiry-table .row>span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
.seo-settings-page{max-width:1500px;margin:0 auto}.seo-settings-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:20px}.seo-settings-heading h1{font-size:25px;font-weight:500;margin:0 0 6px}.seo-settings-heading p{margin:0;color:#72808d;font-size:13px}.seo-settings-heading .primary{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}.seo-page-tabs{display:flex;gap:28px;overflow-x:auto;border-bottom:1px solid #dfe5e9;margin-bottom:20px;background:#fff;padding:0 20px}.seo-page-tabs button{flex:none;border:0;border-bottom:2px solid transparent;background:transparent;padding:15px 2px 13px;color:#68757f;font:inherit;cursor:pointer}.seo-page-tabs button.active{color:#176b5b;border-bottom-color:#176b5b;font-weight:500}.seo-settings-card{background:#fff;border:1px solid #dfe5e9;border-radius:6px;overflow:hidden}.seo-card-head{padding:20px 24px;border-bottom:1px solid #e6e9ed}.seo-card-head h2{font-size:17px;font-weight:500;margin:0 0 7px}.seo-card-head p{font-size:13px;color:#77838d;margin:0}.seo-settings-form{display:grid;grid-template-columns:1fr 1fr;gap:19px 22px;padding:24px}.seo-settings-form label{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center;min-width:0}.seo-settings-form label>span{grid-column:1/-1;font-size:13px;font-weight:500}.seo-settings-form input,.seo-settings-form textarea,.seo-settings-form select{grid-column:1/-1;box-sizing:border-box;width:100%;min-width:0;border:1px solid #d8dee3;border-radius:5px;padding:10px 12px;font:inherit;resize:vertical}.seo-settings-form label>small{grid-column:2;grid-row:1;color:#89949c;font-size:11px}.seo-settings-form .wide{grid-column:1/-1}.seo-settings-form .code-input{font-family:Consolas,"Courier New",monospace;font-size:13px}.seo-settings-page .notice{margin-bottom:18px}@media(max-width:900px){.seo-settings-heading{align-items:stretch;flex-direction:column}.seo-settings-heading .primary{justify-content:center}.seo-page-tabs{gap:20px}.seo-settings-form{grid-template-columns:1fr;padding:18px}.seo-settings-form .wide{grid-column:auto}}
|
||||
.seo-settings-page{max-width:1500px;margin:0 auto}.seo-settings-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:20px}.seo-settings-heading h1{font-size:25px;font-weight:500;margin:0 0 6px}.seo-settings-heading p{margin:0;color:#72808d;font-size:13px}.seo-settings-heading .primary{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}.seo-page-tabs{display:flex;gap:28px;overflow-x:auto;border-bottom:1px solid #dfe5e9;margin-bottom:20px;background:#fff;padding:0 20px}.seo-page-tabs button{flex:none;border:0;border-bottom:2px solid transparent;background:transparent;padding:15px 2px 13px;color:#68757f;font:inherit;cursor:pointer}.seo-page-tabs button.active{color:#176b5b;border-bottom-color:#176b5b;font-weight:500}.seo-settings-card{background:#fff;border:1px solid #dfe5e9;border-radius:6px;overflow:hidden}.seo-settings-form{display:grid;grid-template-columns:1fr 1fr;gap:19px 22px;padding:24px}.seo-settings-form label{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center;min-width:0}.seo-settings-form label>span{grid-column:1/-1;font-size:13px;font-weight:500}.seo-settings-form input,.seo-settings-form textarea,.seo-settings-form select{grid-column:1/-1;box-sizing:border-box;width:100%;min-width:0;border:1px solid #d8dee3;border-radius:5px;padding:10px 12px;font:inherit;resize:vertical}.seo-settings-form label>small{grid-column:2;grid-row:1;color:#89949c;font-size:11px}.seo-settings-form .wide{grid-column:1/-1}.seo-settings-form .code-input{font-family:Consolas,"Courier New",monospace;font-size:13px}.seo-settings-page .notice{margin-bottom:18px}@media(max-width:900px){.seo-settings-heading{align-items:stretch;flex-direction:column}.seo-settings-heading .primary{justify-content:center}.seo-page-tabs{gap:20px}.seo-settings-form{grid-template-columns:1fr;padding:18px}.seo-settings-form .wide{grid-column:auto}}
|
||||
|
||||
.auth-loading{min-height:100vh;display:flex;align-items:center;justify-content:center;gap:12px;color:#66737d;background:#f4f6f8}.auth-spinner{width:24px;height:24px;border:2px solid #d4ddda;border-top-color:#176b5b;border-radius:50%;animation:auth-spin .8s linear infinite}@keyframes auth-spin{to{transform:rotate(360deg)}}
|
||||
.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:#eef2f3}.login-panel{width:min(430px,100%);background:#fff;border:1px solid #dfe5e9;border-radius:8px;padding:38px;box-shadow:0 18px 48px rgba(19,37,45,.1)}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:38px}.login-brand>span{width:48px;height:48px;border-radius:7px;background:#efbd43;display:grid;place-items:center;color:#13202b;font-size:24px;font-weight:700}.login-brand>div{display:grid}.login-brand strong{font-size:23px}.login-brand small{color:#77858e}.login-copy h1{font-size:26px;margin:0 0 9px}.login-copy p{margin:0 0 28px;color:#74818a;line-height:1.6}.login-panel form{display:grid;gap:18px}.login-panel label{display:grid;gap:8px}.login-panel label>span{font-size:13px;font-weight:600}.login-input{height:48px;border:1px solid #d6dde2;border-radius:5px;display:flex;align-items:center;padding:0 13px;gap:10px;color:#7b878f}.login-input:focus-within{border-color:#176b5b;box-shadow:0 0 0 3px rgba(23,107,91,.09)}.login-input input{border:0;outline:0;min-width:0;flex:1;font:inherit}.login-input button{border:0;background:transparent;padding:4px;color:#65727b;display:grid;place-items:center}.login-error{padding:10px 12px;border:1px solid #f0c9c9;background:#fff6f6;color:#a33b3b;border-radius:5px;font-size:13px}.login-submit{height:48px;border:0;border-radius:5px;background:#176b5b;color:#fff;font:inherit;font-weight:600;cursor:pointer}.login-submit:disabled{opacity:.55;cursor:not-allowed}
|
||||
.account-settings{max-width:1500px;margin:0 auto}.account-settings>header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:22px}.account-settings>header h1{margin:0 0 6px;font-size:28px}.account-settings>header p{margin:0;color:#71808a}.account-settings>header button{display:flex;align-items:center;gap:7px;border:1px solid #d8dee3;background:#fff;border-radius:5px;padding:10px 14px}.settings-message{margin-bottom:18px;padding:12px 15px;border:1px solid #bcdcd3;background:#eef8f5;color:#176b5b;border-radius:5px}.settings-message.error{border-color:#efcaca;background:#fff6f6;color:#9c3838}.settings-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr);gap:20px;align-items:start}.settings-side{display:grid;gap:20px}.profile-card{background:#fff;border:1px solid #dfe5e9;border-radius:6px;padding:24px;display:grid;grid-template-columns:1fr 1fr;gap:18px}.settings-side .profile-card{grid-template-columns:1fr}.profile-card-title{grid-column:1/-1;display:flex;align-items:flex-start;gap:13px;padding-bottom:18px;border-bottom:1px solid #e8ecef}.profile-card-title>svg{color:#176b5b}.profile-card-title h2{font-size:18px;margin:0 0 5px}.profile-card-title p{font-size:13px;color:#77848d;margin:0;line-height:1.5}.profile-card label{display:grid;gap:7px}.profile-card label>span{font-size:13px;font-weight:600}.profile-card input,.profile-card textarea{border:1px solid #d8dee3;border-radius:5px;padding:11px 12px;font:inherit;resize:vertical}.profile-card .wide,.profile-actions{grid-column:1/-1}.profile-actions{display:flex;justify-content:flex-end;padding-top:4px}.profile-actions button{border:0;border-radius:5px;background:#176b5b;color:#fff;padding:10px 15px;display:flex;align-items:center;gap:7px;font:inherit;cursor:pointer}@media(max-width:1000px){.settings-layout{grid-template-columns:1fr}}@media(max-width:620px){.login-panel{padding:28px 22px}.profile-card{grid-template-columns:1fr}.profile-card .wide,.profile-actions{grid-column:auto}.account-settings>header{gap:14px}.account-settings>header p{display:none}}
|
||||
|
||||
/* 菜单导航管理 */
|
||||
.navigation-manager,.navigation-editor{max-width:1500px;margin:0 auto}.navigation-manager>header,.navigation-editor>header{align-items:flex-start}.navigation-list,.navigation-base,.navigation-items{background:#fff;border:1px solid #dfe5e9;border-radius:6px;overflow:hidden}.navigation-list-head,.navigation-list-row{display:grid;grid-template-columns:1.1fr 2.2fr .9fr 110px;align-items:center;gap:18px;padding:15px 20px}.navigation-list-head{background:#f7f9fb;color:#6d7983;font-size:12px;border-bottom:1px solid #e5e9ec}.navigation-list-row{min-height:70px;border-bottom:1px solid #edf0f2}.navigation-list-row:last-child{border-bottom:0}.navigation-list-row>span{color:#52616d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.navigation-list-row>div{display:flex;gap:8px}.navigation-list-row button,.navigation-row-actions button{width:34px;height:34px;border:0;background:transparent;color:#176b5b;display:grid;place-items:center;border-radius:4px;cursor:pointer}.navigation-list-row button:hover,.navigation-row-actions button:hover{background:#eef5f3}.navigation-list-row button.danger,.navigation-row-actions button.danger{color:#b13d3d}.navigation-editor-title{display:flex;align-items:flex-start;gap:12px}.navigation-editor-title .icon-button{width:38px;height:38px;border:1px solid #d6dde2;background:#fff;border-radius:5px;display:grid;place-items:center;cursor:pointer}.navigation-base{padding:22px;display:grid;grid-template-columns:minmax(300px,2fr) minmax(180px,1fr) minmax(180px,1fr);gap:18px;margin-bottom:20px}.navigation-base label{display:grid;gap:7px}.navigation-base label>span{font-size:13px;font-weight:600}.navigation-base input,.navigation-base select,.navigation-item-row input,.navigation-item-row select{height:42px;width:100%;min-width:0;border:1px solid #d7dee3;border-radius:5px;background:#fff;padding:0 12px;font:inherit}.navigation-items-heading{padding:20px 22px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #e6eaed}.navigation-items-heading h2{font-size:18px;margin:0 0 5px}.navigation-items-heading p{margin:0;color:#75818a;font-size:13px}.navigation-items-heading .secondary{height:40px}.navigation-item-head,.navigation-item-row{display:grid;grid-template-columns:minmax(160px,1fr) 190px minmax(260px,1.5fr) 72px 90px;align-items:center;gap:14px;padding:12px 20px}.navigation-item-head{background:#f7f9fb;color:#6d7983;font-size:12px;border-bottom:1px solid #e5e9ec}.navigation-item-row{position:relative;border-bottom:1px solid #edf0f2}.navigation-item-row.child{padding-left:50px;background:#fbfcfd}.navigation-item-row .child-marker{position:absolute;left:24px;color:#87939c}.navigation-row-actions{display:flex;justify-content:flex-end;gap:4px}.switch{display:inline-flex;align-items:center;cursor:pointer}.switch input{position:absolute;opacity:0;pointer-events:none}.switch span{width:40px;height:22px;border-radius:12px;background:#aeb8bf;position:relative;transition:.2s}.switch span:after{content:"";position:absolute;width:18px;height:18px;left:2px;top:2px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0003;transition:.2s}.switch input:checked+span{background:#176b5b}.switch input:checked+span:after{transform:translateX(18px)}.navigation-items>.empty{min-height:210px}@media(max-width:1050px){.navigation-list-head,.navigation-list-row{grid-template-columns:1fr 1.5fr 110px}.navigation-list-head span:nth-child(3),.navigation-list-row>span:nth-child(3){display:none}.navigation-base{grid-template-columns:1fr 1fr}.navigation-base label:first-child{grid-column:1/-1}.navigation-item-head{display:none}.navigation-item-row,.navigation-item-row.child{grid-template-columns:1fr 1fr;padding:16px}.navigation-item-row.child{padding-left:40px}.navigation-item-row select:nth-of-type(2){grid-column:1/-1}.navigation-row-actions{justify-content:flex-start}}@media(max-width:700px){.navigation-list-head{display:none}.navigation-list-row{grid-template-columns:1fr auto}.navigation-list-row>span{grid-column:1/-1}.navigation-base{grid-template-columns:1fr}.navigation-base label:first-child{grid-column:auto}.navigation-item-row,.navigation-item-row.child{grid-template-columns:1fr;padding:14px}.navigation-item-row select:nth-of-type(2){grid-column:auto}}
|
||||
Reference in new issue
Block a user