bug修复
This commit is contained in:
1 parent
3893b25848
commit
de8d37e0e6
5 files changed
+542
-20
No files matched your search
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import {
|
||||
Boxes,
|
||||
Building2,
|
||||
Code2,
|
||||
ChevronDown,
|
||||
FileText,
|
||||
@@ -35,6 +36,7 @@ import SettingsPage from "./SettingsPage";
|
||||
import SeoSettingsPage from "./SeoSettingsPage";
|
||||
import NavigationManager from "./NavigationManager";
|
||||
import AgreementSettingsPage from "./AgreementSettingsPage";
|
||||
import AboutUsSettingsPage from "./AboutUsSettingsPage";
|
||||
import { apiPost } from "./api";
|
||||
import { statusLabel } from "./statusLabels";
|
||||
|
||||
@@ -58,6 +60,7 @@ type Section =
|
||||
| "decoration"
|
||||
| "custom-code"
|
||||
| "agreements"
|
||||
| "about-us"
|
||||
| "media"
|
||||
| "inquiries"
|
||||
| "inquiry-settings"
|
||||
@@ -113,6 +116,7 @@ async function post(path: string, body: unknown) {
|
||||
|
||||
const frontSiteMenus = [
|
||||
{ key: "pages" as Section, label: "页面", icon: FileText },
|
||||
{ key: "about-us" as Section, label: "关于我们", icon: Building2 },
|
||||
{ key: "navigation" as Section, label: "菜单导航", icon: Menu },
|
||||
{ key: "decoration" as Section, label: "店铺装修", icon: Paintbrush },
|
||||
{ key: "custom-code" as Section, label: "自定义代码", icon: Code2 },
|
||||
@@ -141,6 +145,7 @@ const sectionLabels: Record<Section, string> = {
|
||||
"inquiry-settings": "询盘设置",
|
||||
"seo-settings": "页面 SEO",
|
||||
agreements: "协议设置",
|
||||
"about-us": "关于我们",
|
||||
settings: "系统设置",
|
||||
};
|
||||
function App({
|
||||
@@ -227,6 +232,8 @@ function App({
|
||||
? { items: [] }
|
||||
: section === "agreements"
|
||||
? { items: [] }
|
||||
: section === "about-us"
|
||||
? { items: [] }
|
||||
: section === "products"
|
||||
? await post("/products/list", { siteCode: SITE })
|
||||
: section === "pages"
|
||||
@@ -583,6 +590,8 @@ function App({
|
||||
onAccount={onAccount}
|
||||
onLogout={onLogout}
|
||||
/>
|
||||
) : section === "about-us" ? (
|
||||
<AboutUsSettingsPage />
|
||||
) : section === "seo-settings" ? (
|
||||
<SeoSettingsPage />
|
||||
) : section === "agreements" ? (
|
||||
@@ -630,7 +639,6 @@ function App({
|
||||
<header>
|
||||
<div>
|
||||
<h1>{title}管理</h1>
|
||||
<p>Local Development Site · 英文站内容</p>
|
||||
</div>
|
||||
{!["inquiries", "inquiry-settings"].includes(section) && (
|
||||
<div className="header-actions">
|
||||
|
||||
Reference in new issue
Block a user