From 9d0a98fe89d51c411c9d7eada217fc52ca6f6f1b Mon Sep 17 00:00:00 2001 From: kenyanghui Date: Sun, 15 Nov 2026 07:39:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(db):=20v8=20=E5=8D=95=E8=A1=A8=E5=90=88?= =?UTF-8?q?=E5=B9=B6=20=E2=80=94=20users=20=E7=89=A9=E7=90=86=E5=90=B8?= =?UTF-8?q?=E6=94=B6=20chaishu=5Fmembers=EF=BC=8C=E6=97=A7=E5=BA=93?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E8=87=AA=E5=8A=A8=E8=BF=81=E7=A7=BB=EF=BC=9B?= =?UTF-8?q?admin-web=20=E5=88=87=E5=8D=95=E8=A1=A8=E8=A7=86=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yaoyue-sever/admin-web/index.html | 506 +++++++--------- yaoyue-sever/database/schema.sql | 37 +- yaoyue-sever/database/seed.sql | 17 +- yaoyue-sever/server/server.js | 957 +++++++++++++++--------------- 4 files changed, 740 insertions(+), 777 deletions(-) diff --git a/yaoyue-sever/admin-web/index.html b/yaoyue-sever/admin-web/index.html index 272c40e..b53145d 100644 --- a/yaoyue-sever/admin-web/index.html +++ b/yaoyue-sever/admin-web/index.html @@ -20,65 +20,67 @@ .login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; } .field { margin-bottom: 16px; } .field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; } - .field input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; outline: none; transition: border .15s; } + .field input, .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; outline: none; transition: border .15s; background: #fff; } .field input:focus { border-color: var(--brand); } + .field input[readonly] { background: #f5f6fa; color: var(--muted); } .btn { display: inline-block; border: none; cursor: pointer; font-size: 14px; border-radius: 8px; padding: 10px 18px; transition: all .15s; } .btn-primary { background: var(--brand); color: #fff; width: 100%; padding: 12px; font-size: 15px; } .btn-primary:hover { background: var(--brand-dark); } .login-error { color: var(--red); font-size: 13px; margin-bottom: 12px; min-height: 18px; } /* ===== 主界面 ===== */ - .topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 0 28px; height: 60px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; } - .topbar .brand { font-weight: 700; font-size: 17px; } - .topbar .brand span { color: var(--brand); } - .topbar .who { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 14px; } - .topbar .who a { color: var(--red); cursor: pointer; text-decoration: none; } - .container { max-width: 1100px; margin: 24px auto; padding: 0 24px; } - - .stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 22px; } - .tabs { display: flex; gap: 8px; margin-bottom: 16px; } - .tab { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 9px 20px; font-size: 14px; cursor: pointer; color: var(--muted); } - .tab.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500; } + .topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 28px; display: flex; justify-content: space-between; align-items: center; } + .topbar .brand { font-size: 18px; font-weight: 600; } + .topbar .brand span { color: var(--muted); font-weight: 400; font-size: 14px; } + .topbar .who { color: var(--muted); font-size: 13px; } + .topbar .who a { color: var(--brand); cursor: pointer; margin-left: 14px; } + .container { max-width: 1500px; margin: 24px auto; padding: 0 24px; } + .stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; } .stat-card { background: var(--card); border-radius: 12px; padding: 18px 20px; border: 1px solid var(--line); } .stat-card .num { font-size: 26px; font-weight: 700; } .stat-card .label { color: var(--muted); font-size: 13px; margin-top: 4px; } - .panel { background: var(--card); border-radius: 12px; border: 1px solid var(--line); overflow: hidden; } - .panel-head { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; } + .panel { background: var(--card); border-radius: 12px; border: 1px solid var(--line); padding: 18px 20px; } + .panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; } .panel-head h2 { font-size: 16px; } .search-box { display: flex; gap: 8px; } - .search-box input { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; width: 240px; outline: none; } + .search-box input { width: 460px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; outline: none; } .search-box input:focus { border-color: var(--brand); } + table { width: 100%; border-collapse: collapse; font-size: 13px; } + th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; } + td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; } + tr:hover td { background: #f8f9fc; } + .muted { color: var(--muted); } + .nick { display: flex; align-items: center; gap: 8px; } + .nick img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; } + .avatar-fallback { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #eef1f8; color: var(--brand); font-size: 13px; flex-shrink: 0; } + .tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; white-space: nowrap; } + .tag-admin { background: var(--red-bg); color: var(--red); } + .tag-user { background: #eef1ff; color: var(--brand); } + .empty { text-align: center; color: var(--muted); padding: 30px 0; } + .pager { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; } + .pager span { color: var(--muted); font-size: 13px; } + .pager button { margin-left: 8px; } + .btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; background: #f0f4f8; color: var(--text); } + .btn-sm:disabled { opacity: .4; cursor: not-allowed; } + .btn-grant { background: var(--green-bg); color: var(--green); } + .btn-revoke { background: var(--red-bg); color: var(--red); } - table { width: 100%; border-collapse: collapse; font-size: 14px; } - th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; } - th { color: var(--muted); font-weight: 500; font-size: 12.5px; background: #fafbfe; } - td .nick { display: flex; align-items: center; gap: 10px; } - td img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #eef; } - .avatar-fallback { width: 34px; height: 34px; border-radius: 50%; background: #eef0fa; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; } - .tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; } - .tag-admin { background: var(--green-bg); color: var(--green); } - .tag-user { background: #eef0f5; color: var(--muted); } - .btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 7px; } - .btn-grant { background: var(--brand); color: #fff; } - .btn-grant:hover { background: var(--brand-dark); } - .btn-revoke { background: #fff; color: var(--red); border: 1px solid #f3c1c1; } - .btn-revoke:hover { background: var(--red-bg); } - .muted { color: var(--muted); font-size: 12.5px; } - .empty { padding: 40px; text-align: center; color: var(--muted); } - .pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 14px 20px; font-size: 13px; color: var(--muted); } - .pager button { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 6px 14px; cursor: pointer; } - .pager button:disabled { opacity: .4; cursor: default; } - - /* ===== 改密弹窗 ===== */ - .modal-mask { position: fixed; inset: 0; background: rgba(20,26,45,.45); display: none; align-items: center; justify-content: center; z-index: 100; } + /* ===== 弹窗 ===== */ + .modal-mask { position: fixed; inset: 0; background: rgba(20,26,44,.45); display: none; align-items: flex-start; justify-content: center; z-index: 50; overflow-y: auto; padding: 40px 16px; } .modal-mask.show { display: flex; } - .modal { background: #fff; border-radius: 14px; padding: 30px; width: 380px; } - .modal h3 { margin-bottom: 18px; font-size: 17px; } - .modal .tip { color: var(--red); font-size: 13px; margin: -6px 0 14px; } + .modal { background: #fff; border-radius: 14px; padding: 26px 26px 22px; width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.3); } + .modal h3 { font-size: 17px; margin-bottom: 16px; } + .modal .tip { background: #f0f4ff; color: var(--brand-dark); font-size: 12px; border-radius: 8px; padding: 8px 10px; margin-bottom: 14px; } + .section-title { font-size: 13px; font-weight: 600; color: var(--text); margin: 14px 0 10px; padding-top: 12px; border-top: 1px dashed var(--line); } + .section-title:first-of-type { border-top: none; padding-top: 0; margin-top: 0; } + .row2 { display: flex; gap: 10px; } + .row2 .field { flex: 1; } + .bind-box { background: #f8f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 13px; } + .bind-box label { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--red); font-size: 12px; cursor: pointer; } - .toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); background: #1c2333; color: #fff; padding: 10px 22px; border-radius: 999px; font-size: 14px; opacity: 0; transition: opacity .25s; z-index: 200; pointer-events: none; } - .toast.show { opacity: .92; } + .toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: rgba(28,35,51,.92); color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 13px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 99; } + .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); } .hidden { display: none !important; } @@ -88,16 +90,16 @@
@@ -108,20 +110,17 @@
拆约 · 后台管理
+ 改密 退出
-
- - -
-

用户列表

+

用户列表(拆书帮会员 + 注册账号 单表)

@@ -129,7 +128,7 @@ - + @@ -138,33 +137,10 @@
- - -
- -
用户姓名邮箱微信号手机号职业/公司行业籍贯专长拆书帮活动数注册时间角色操作姓名/昵称城市/分舵等级邮箱微信号手机号师父标签简介职业/行业籍贯专长公司账号状态活动数角色操作
- - - - - - -
姓名城市/分舵等级邮箱微信号手机号师父标签简介职业/行业籍贯专长公司角色操作
-
- -
- - - + + + +
@@ -183,60 +159,61 @@ +