From 04a55e3e12331ff4d65504418eca965d4291bfe2 Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 3 Mar 2026 20:41:37 -0800 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E9=A1=B5=E4=B8=AD=E8=8B=B1=E6=B7=B7=E7=94=A8=20+=20=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=A0=8F=E6=BA=A2=E5=87=BA=EF=BC=8C=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=93=81=E7=89=8C=E5=8F=A3=E5=8F=B7=E5=B9=B6=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - admin-web 登录页底部 "Genex 券金融平台" → "Genex 管理后台",风格统一 - admin-web 顶部搜索栏改为弹性宽度(width:100%/maxWidth:320),修复窄屏溢出 - 全平台品牌口号统一更新为"让每一张券,自由流动" 覆盖:genex-mobile(4语言) / miniapp(3语言) / portal(zh-CN/en-US) - backend admin-system.service: getConfig() 新增 brandConfig 字段(4语言口号) - admin-web 系统配置页新增品牌配置卡片:支持4语言口号在线编辑并保存 Co-Authored-By: Claude Sonnet 4.6 --- .../services/admin-system.service.ts | 6 ++ frontend/admin-web/src/app/login/page.tsx | 2 +- frontend/admin-web/src/i18n/locales.ts | 21 +++++ .../admin-web/src/layouts/AdminLayout.tsx | 5 +- .../src/views/system/SystemManagementPage.tsx | 90 ++++++++++++++++++- .../genex-mobile/lib/app/i18n/strings/en.dart | 2 +- .../genex-mobile/lib/app/i18n/strings/ja.dart | 2 +- .../lib/app/i18n/strings/zh_cn.dart | 2 +- .../lib/app/i18n/strings/zh_tw.dart | 2 +- frontend/miniapp/src/i18n/index.ts | 6 +- frontend/portal/src/i18n/en-US.ts | 2 +- frontend/portal/src/i18n/zh-CN.ts | 2 +- 12 files changed, 126 insertions(+), 16 deletions(-) diff --git a/backend/services/user-service/src/application/services/admin-system.service.ts b/backend/services/user-service/src/application/services/admin-system.service.ts index 1b0f911..439757d 100644 --- a/backend/services/user-service/src/application/services/admin-system.service.ts +++ b/backend/services/user-service/src/application/services/admin-system.service.ts @@ -57,6 +57,12 @@ export class AdminSystemService { async getConfig() { return { + brandConfig: { + sloganZhCN: '让每一张券,自由流动', + sloganZhTW: '讓每一張券,自由流動', + sloganEn: 'Where Every Coupon Flows Freely', + sloganJa: 'すべてのクーポンを、自由に流通させる', + }, feeConfig: { primaryMarketFee: 2.5, secondaryMarketFee: 1.0, diff --git a/frontend/admin-web/src/app/login/page.tsx b/frontend/admin-web/src/app/login/page.tsx index 7b0daef..8d364a6 100644 --- a/frontend/admin-web/src/app/login/page.tsx +++ b/frontend/admin-web/src/app/login/page.tsx @@ -74,7 +74,7 @@ export default function LoginPage() { -

Genex 券金融平台 © 2025

+

Genex 管理后台 © 2025

); diff --git a/frontend/admin-web/src/i18n/locales.ts b/frontend/admin-web/src/i18n/locales.ts index 4e8e113..428fac9 100644 --- a/frontend/admin-web/src/i18n/locales.ts +++ b/frontend/admin-web/src/i18n/locales.ts @@ -396,6 +396,13 @@ const translations: Record> = { 'system_logs': '系统日志', 'system_feature_flags': '功能开关', 'system_rate_limit': '限流配置', + 'system_brand_config': '品牌配置', + 'system_brand_slogan_zh_cn': '口号(简体中文)', + 'system_brand_slogan_zh_tw': '口号(繁体中文)', + 'system_brand_slogan_en': '口号(英文)', + 'system_brand_slogan_ja': '口号(日文)', + 'system_brand_save': '保存品牌配置', + 'system_brand_saved': '已保存', 'system_fee_config': '手续费率设置', 'system_kyc_config': 'KYC阈值配置', 'system_trade_limit_config': '交易限额配置', @@ -1155,6 +1162,13 @@ const translations: Record> = { 'system_logs': 'System Logs', 'system_feature_flags': 'Feature Flags', 'system_rate_limit': 'Rate Limiting', + 'system_brand_config': 'Brand Config', + 'system_brand_slogan_zh_cn': 'Slogan (Simplified Chinese)', + 'system_brand_slogan_zh_tw': 'Slogan (Traditional Chinese)', + 'system_brand_slogan_en': 'Slogan (English)', + 'system_brand_slogan_ja': 'Slogan (Japanese)', + 'system_brand_save': 'Save Brand Config', + 'system_brand_saved': 'Saved', 'system_fee_config': 'Fee Rate Settings', 'system_kyc_config': 'KYC Threshold Config', 'system_trade_limit_config': 'Trade Limit Config', @@ -1914,6 +1928,13 @@ const translations: Record> = { 'system_logs': 'システムログ', 'system_feature_flags': '機能フラグ', 'system_rate_limit': 'レート制限', + 'system_brand_config': 'ブランド設定', + 'system_brand_slogan_zh_cn': 'スローガン(簡体字)', + 'system_brand_slogan_zh_tw': 'スローガン(繁体字)', + 'system_brand_slogan_en': 'スローガン(英語)', + 'system_brand_slogan_ja': 'スローガン(日本語)', + 'system_brand_save': 'ブランド設定を保存', + 'system_brand_saved': '保存済み', 'system_fee_config': '手数料率設定', 'system_kyc_config': 'KYC閾値設定', 'system_trade_limit_config': '取引限度額設定', diff --git a/frontend/admin-web/src/layouts/AdminLayout.tsx b/frontend/admin-web/src/layouts/AdminLayout.tsx index 98f348b..dd213be 100644 --- a/frontend/admin-web/src/layouts/AdminLayout.tsx +++ b/frontend/admin-web/src/layouts/AdminLayout.tsx @@ -287,11 +287,12 @@ export const AdminLayout: React.FC<{ children: React.ReactNode }> = ({ children padding: '0 24px', justifyContent: 'space-between', }}> -
+
{ const [activeTab, setActiveTab] = useState<'admins' | 'config' | 'contracts' | 'monitor'>('admins'); + const [brand, setBrand] = useState({ + sloganZhCN: '让每一张券,自由流动', + sloganZhTW: '讓每一張券,自由流動', + sloganEn: 'Where Every Coupon Flows Freely', + sloganJa: 'すべてのクーポンを、自由に流通させる', + }); + const [brandSaved, setBrandSaved] = useState(false); const { data: adminsData, isLoading: adminsLoading } = useApi( activeTab === 'admins' ? '/api/v1/admin/system/admins' : null, ); - const { data: configData, isLoading: configLoading } = useApi( + const { data: configData, isLoading: configLoading } = useApi( activeTab === 'config' ? '/api/v1/admin/system/config' : null, ); + + useEffect(() => { + if (configData?.brandConfig) { + setBrand(configData.brandConfig); + } + }, [configData]); + + const handleSaveBrand = async () => { + await fetch('/api/v1/admin/system/config', { + method: 'PUT', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ brandConfig: brand }), + }); + setBrandSaved(true); + setTimeout(() => setBrandSaved(false), 2000); + }; + const { data: healthData, isLoading: healthLoading } = useApi( activeTab === 'contracts' || activeTab === 'monitor' ? '/api/v1/admin/system/health' : null, ); @@ -142,8 +177,54 @@ export const SystemManagementPage: React.FC = () => { configLoading ? (
Loading...
) : ( -
- {(configData ?? []).map(section => ( +
+ {/* Brand Config */} +
+
{t('system_brand_config')}
+
+ {([ + { key: 'sloganZhCN', label: t('system_brand_slogan_zh_cn') }, + { key: 'sloganZhTW', label: t('system_brand_slogan_zh_tw') }, + { key: 'sloganEn', label: t('system_brand_slogan_en') }, + { key: 'sloganJa', label: t('system_brand_slogan_ja') }, + ] as { key: keyof BrandConfig; label: string }[]).map(field => ( +
+ + setBrand(prev => ({ ...prev, [field.key]: e.target.value }))} + style={{ + width: '100%', padding: '8px 12px', boxSizing: 'border-box', + border: '1px solid var(--color-border)', borderRadius: 'var(--radius-sm)', + font: 'var(--text-body)', outline: 'none', background: 'var(--color-gray-50)', + }} + /> +
+ ))} +
+ +
+ + {/* Other config sections */} +
+ {([] as ConfigSection[]).map(section => (
{ ))}
))} +
) )} diff --git a/frontend/genex-mobile/lib/app/i18n/strings/en.dart b/frontend/genex-mobile/lib/app/i18n/strings/en.dart index 02036dd..095ccc7 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/en.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/en.dart @@ -29,7 +29,7 @@ const Map en = { 'nav.profile': 'Profile', // ============ Welcome / Auth ============ - 'welcome.slogan': 'Make Every Coupon Count', + 'welcome.slogan': 'Where Every Coupon Flows Freely', 'welcome.phoneRegister': 'Phone Sign Up', 'welcome.emailRegister': 'Email Sign Up', 'welcome.wechat': 'WeChat', diff --git a/frontend/genex-mobile/lib/app/i18n/strings/ja.dart b/frontend/genex-mobile/lib/app/i18n/strings/ja.dart index bca4c93..4ef42e2 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/ja.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/ja.dart @@ -29,7 +29,7 @@ const Map ja = { 'nav.profile': 'マイページ', // ============ Welcome / Auth ============ - 'welcome.slogan': 'すべてのクーポンに価値を', + 'welcome.slogan': 'すべてのクーポンを、自由に流通させる', 'welcome.phoneRegister': '電話番号で登録', 'welcome.emailRegister': 'メールで登録', 'welcome.wechat': 'WeChat', diff --git a/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart b/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart index 89efc1b..7648528 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/zh_cn.dart @@ -29,7 +29,7 @@ const Map zhCN = { 'nav.profile': '我的', // ============ Welcome / Auth ============ - 'welcome.slogan': '让每一张券都有价值', + 'welcome.slogan': '让每一张券,自由流动', 'welcome.phoneRegister': '手机号注册', 'welcome.emailRegister': '邮箱注册', 'welcome.wechat': '微信', diff --git a/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart b/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart index 3ec57c0..9f1cf95 100644 --- a/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart +++ b/frontend/genex-mobile/lib/app/i18n/strings/zh_tw.dart @@ -29,7 +29,7 @@ const Map zhTW = { 'nav.profile': '我的', // ============ Welcome / Auth ============ - 'welcome.slogan': '讓每一張券都有價值', + 'welcome.slogan': '讓每一張券,自由流動', 'welcome.phoneRegister': '手機號註冊', 'welcome.emailRegister': '信箱註冊', 'welcome.wechat': '微信', diff --git a/frontend/miniapp/src/i18n/index.ts b/frontend/miniapp/src/i18n/index.ts index 8568e4b..b68caf8 100644 --- a/frontend/miniapp/src/i18n/index.ts +++ b/frontend/miniapp/src/i18n/index.ts @@ -284,7 +284,7 @@ const translations: Record> = { 'activity_brand': '品牌', 'activity_join_now': '立即参与', 'register_join': '加入券信', - 'register_slogan': '让每一张券都有价值', + 'register_slogan': '让每一张券,自由流动', 'register_benefit': '注册即享首单立减优惠', 'register_benefit_coupons': '海量优惠券', 'register_benefit_coupons_desc': '餐饮、购物、娱乐全覆盖', @@ -744,7 +744,7 @@ const translations: Record> = { 'activity_brand': 'Brand', 'activity_join_now': 'Join Now', 'register_join': 'Join Genex', - 'register_slogan': 'Make every coupon count', + 'register_slogan': 'Where Every Coupon Flows Freely', 'register_benefit': 'Get first-order discount on signup', 'register_benefit_coupons': 'Massive Coupons', 'register_benefit_coupons_desc': 'Dining, shopping, entertainment & more', @@ -1204,7 +1204,7 @@ const translations: Record> = { 'activity_brand': 'ブランド', 'activity_join_now': '今すぐ参加', 'register_join': 'Genex に参加', - 'register_slogan': 'すべてのクーポンに価値を', + 'register_slogan': 'すべてのクーポンを、自由に流通させる', 'register_benefit': '登録で初回割引をゲット', 'register_benefit_coupons': '豊富なクーポン', 'register_benefit_coupons_desc': 'グルメ、ショッピング、エンタメを網羅', diff --git a/frontend/portal/src/i18n/en-US.ts b/frontend/portal/src/i18n/en-US.ts index 56c8f54..c596ccd 100644 --- a/frontend/portal/src/i18n/en-US.ts +++ b/frontend/portal/src/i18n/en-US.ts @@ -10,7 +10,7 @@ const enUS: Record = { nav_register: 'Sign Up', // -- Hero -- - hero_title: 'Every Coupon, Real Value', + hero_title: 'Where Every Coupon Flows Freely', hero_subtitle: 'Blockchain-powered coupon asset trading platform — buy at discount, trade freely, stay secure', hero_cta_download: 'Download App', hero_cta_register: 'Sign Up Free', diff --git a/frontend/portal/src/i18n/zh-CN.ts b/frontend/portal/src/i18n/zh-CN.ts index ff69f86..76fa64e 100644 --- a/frontend/portal/src/i18n/zh-CN.ts +++ b/frontend/portal/src/i18n/zh-CN.ts @@ -10,7 +10,7 @@ const zhCN: Record = { nav_register: '立即注册', // -- Hero -- - hero_title: '让每一张券,都有价值', + hero_title: '让每一张券,自由流动', hero_subtitle: '区块链驱动的券资产交易平台,折扣购券、自由交易、安全保障', hero_cta_download: '下载 App', hero_cta_register: '免费注册',