v1.0.3修复优化
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
<path d="M8 16v2M16 16v2M12 16v3"/>
|
<path d="M8 16v2M16 16v2M12 16v3"/>
|
||||||
</svg>
|
</svg>
|
||||||
<h1>AI Chat</h1>
|
<h1>AI Chat</h1>
|
||||||
|
<p class="login-subtitle">登录你的 AI 对话平台</p>
|
||||||
</div>
|
</div>
|
||||||
<div id="loginError" class="alert alert-error" style="display:none;"></div>
|
<div id="loginError" class="alert alert-error" style="display:none;"></div>
|
||||||
<form id="loginForm">
|
<form id="loginForm">
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
<label for="password">密码</label>
|
<label for="password">密码</label>
|
||||||
<input type="password" id="password" name="password" required autocomplete="current-password" placeholder="请输入密码">
|
<input type="password" id="password" name="password" required autocomplete="current-password" placeholder="请输入密码">
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary btn-block" id="loginBtn">登录</button>
|
<button type="submit" class="btn btn-primary btn-block" id="loginBtn" style="margin-top:8px;">登录</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,25 +1,40 @@
|
|||||||
/* CSS 变量 */
|
/* ========================================
|
||||||
|
CSS 变量
|
||||||
|
======================================== */
|
||||||
:root {
|
:root {
|
||||||
--primary: #4a90d9;
|
--primary: #4a90d9;
|
||||||
--primary-hover: #357abd;
|
--primary-hover: #357abd;
|
||||||
|
--primary-light: rgba(74, 144, 217, 0.12);
|
||||||
|
--primary-glow: rgba(74, 144, 217, 0.25);
|
||||||
--bg-primary: #1a1a2e;
|
--bg-primary: #1a1a2e;
|
||||||
--bg-secondary: #16213e;
|
--bg-secondary: #16213e;
|
||||||
--bg-card: #1e2a45;
|
--bg-card: #1e2a45;
|
||||||
--bg-input: #0f1b33;
|
--bg-input: #0f1b33;
|
||||||
--text-primary: #e0e0e0;
|
--text-primary: #e0e0e0;
|
||||||
--text-secondary: #a0a0a0;
|
--text-secondary: #8892a8;
|
||||||
|
--text-hint: #5c6a85;
|
||||||
--border-color: #2a3a5c;
|
--border-color: #2a3a5c;
|
||||||
|
--border-light: rgba(42, 58, 92, 0.6);
|
||||||
--success: #4caf50;
|
--success: #4caf50;
|
||||||
|
--success-bg: rgba(76, 175, 80, 0.1);
|
||||||
--danger: #f44336;
|
--danger: #f44336;
|
||||||
|
--danger-bg: rgba(244, 67, 54, 0.1);
|
||||||
--warning: #ff9800;
|
--warning: #ff9800;
|
||||||
--sidebar-width: 260px;
|
--sidebar-width: 260px;
|
||||||
--toolbar-height: 50px;
|
--toolbar-height: 50px;
|
||||||
--input-height: 120px;
|
--input-height: 120px;
|
||||||
--radius: 8px;
|
--radius: 8px;
|
||||||
--font-family: system-ui, -apple-system, sans-serif;
|
--radius-lg: 12px;
|
||||||
|
--font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
||||||
|
--shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
|
||||||
|
--shadow-md: 0 4px 16px rgba(0,0,0,0.2);
|
||||||
|
--shadow-lg: 0 8px 32px rgba(0,0,0,0.3);
|
||||||
|
--transition: 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Reset */
|
/* ========================================
|
||||||
|
Reset
|
||||||
|
======================================== */
|
||||||
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
|
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@@ -28,87 +43,317 @@ body {
|
|||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 登录页样式 */
|
/* ========================================
|
||||||
|
登录页
|
||||||
|
======================================== */
|
||||||
.login-container {
|
.login-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
|
background:
|
||||||
|
radial-gradient(ellipse at 20% 50%, rgba(74, 144, 217, 0.08) 0%, transparent 50%),
|
||||||
|
radial-gradient(ellipse at 80% 20%, rgba(74, 144, 217, 0.05) 0%, transparent 50%),
|
||||||
|
linear-gradient(160deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-card {
|
.login-card {
|
||||||
background: var(--bg-card);
|
background: var(--bg-card);
|
||||||
border-radius: 12px;
|
border-radius: var(--radius-lg);
|
||||||
padding: 48px 40px;
|
padding: 48px 40px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 420px;
|
max-width: 420px;
|
||||||
box-shadow: 0 8px 32px rgba(0,0,0,0.3);
|
box-shadow: var(--shadow-lg);
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-logo {
|
.login-logo {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 36px;
|
margin-bottom: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-logo .logo-icon {
|
.login-logo .logo-icon {
|
||||||
width: 48px;
|
width: 56px;
|
||||||
height: 48px;
|
height: 56px;
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
margin-bottom: 12px;
|
margin-bottom: 16px;
|
||||||
|
filter: drop-shadow(0 2px 8px rgba(74, 144, 217, 0.3));
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-logo h1 {
|
.login-logo h1 {
|
||||||
font-size: 24px;
|
font-size: 26px;
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
font-weight: 600;
|
font-weight: 700;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 安装向导样式 */
|
.login-subtitle {
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========================================
|
||||||
|
安装向导页
|
||||||
|
======================================== */
|
||||||
.install-container {
|
.install-container {
|
||||||
max-width: 700px;
|
max-width: 720px;
|
||||||
margin: 40px auto;
|
margin: 0 auto;
|
||||||
padding: 0 20px;
|
padding: 48px 24px 32px;
|
||||||
|
min-height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.install-container h1 svg {
|
.install-header {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.install-logo {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.install-logo svg {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
|
filter: drop-shadow(0 2px 8px rgba(74, 144, 217, 0.3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.install-header h1 {
|
||||||
|
font-size: 26px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-primary);
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.install-subtitle {
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
max-width: 400px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.install-footer {
|
||||||
|
text-align: center;
|
||||||
|
padding: 24px 0 8px;
|
||||||
|
margin-top: auto;
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--text-hint);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 步骤指示器 */
|
||||||
.step-indicator {
|
.step-indicator {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 30px;
|
margin-bottom: 36px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
gap: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.step-indicator .step {
|
.step-indicator .step {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
text-align: center;
|
display: flex;
|
||||||
padding: 10px;
|
flex-direction: column;
|
||||||
font-size: 14px;
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 12px 4px 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-indicator .step::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 3px;
|
||||||
|
background: var(--border-color);
|
||||||
|
border-radius: 2px;
|
||||||
|
transition: background var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-indicator .step.active::after {
|
||||||
|
background: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-indicator .step.completed::after {
|
||||||
|
background: var(--success);
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-num {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--border-color);
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
border-bottom: 3px solid var(--border-color);
|
font-size: 13px;
|
||||||
transition: all 0.3s;
|
font-weight: 600;
|
||||||
|
transition: all var(--transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
.step-indicator .step.active {
|
.step.active .step-num {
|
||||||
|
background: var(--primary);
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: 0 2px 8px rgba(74, 144, 217, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
.step.completed .step-num {
|
||||||
|
background: var(--success);
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-label {
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
white-space: nowrap;
|
||||||
|
transition: color var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.step.active .step-label {
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
border-bottom-color: var(--primary);
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.step-indicator .step.completed {
|
.step.completed .step-label {
|
||||||
color: var(--success);
|
color: var(--success);
|
||||||
border-bottom-color: var(--success);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 通用表单样式 */
|
/* 步骤内容卡片 */
|
||||||
|
.step-content {
|
||||||
|
display: none;
|
||||||
|
background: var(--bg-card);
|
||||||
|
border-radius: var(--radius-lg);
|
||||||
|
padding: 32px;
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
box-shadow: var(--shadow-sm);
|
||||||
|
animation: stepFadeIn 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-content.active {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes stepFadeIn {
|
||||||
|
from { opacity: 0; transform: translateY(8px); }
|
||||||
|
to { opacity: 1; transform: translateY(0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-header {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-header h2 {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-desc {
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 环境检查列表 */
|
||||||
|
.check-list {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 12px 16px;
|
||||||
|
border-radius: var(--radius);
|
||||||
|
margin-bottom: 6px;
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
transition: background var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-item:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-name {
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-status {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-status svg {
|
||||||
|
vertical-align: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-item.pass .check-status {
|
||||||
|
color: var(--success);
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-item.fail .check-status {
|
||||||
|
color: var(--danger);
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-item.fail {
|
||||||
|
background: var(--danger-bg);
|
||||||
|
border: 1px solid rgba(244, 67, 54, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-item.pass {
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 供应商配置卡片 */
|
||||||
|
.provider-item {
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: var(--radius);
|
||||||
|
margin-bottom: 12px;
|
||||||
|
border: 1px solid var(--border-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.provider-item-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 16px;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
border-bottom: 1px solid var(--border-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.provider-item-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.provider-item .form-group {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.provider-item .form-group:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========================================
|
||||||
|
通用表单
|
||||||
|
======================================== */
|
||||||
.form-group {
|
.form-group {
|
||||||
margin-bottom: 18px;
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
@@ -119,20 +364,25 @@ body {
|
|||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
letter-spacing: 0.3px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group input,
|
.form-group input,
|
||||||
.form-group select,
|
.form-group select,
|
||||||
.form-group textarea {
|
.form-group textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px 12px;
|
padding: 10px 14px;
|
||||||
background: var(--bg-input);
|
background: var(--bg-input);
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
transition: border-color 0.3s;
|
font-family: inherit;
|
||||||
|
transition: all var(--transition);
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group input::placeholder,
|
||||||
|
.form-group textarea::placeholder {
|
||||||
|
color: var(--text-hint);
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-group input:focus,
|
.form-group input:focus,
|
||||||
@@ -140,9 +390,43 @@ body {
|
|||||||
.form-group textarea:focus {
|
.form-group textarea:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--primary);
|
border-color: var(--primary);
|
||||||
|
box-shadow: 0 0 0 3px var(--primary-light);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 按钮 */
|
/* 表单行(并排布局) */
|
||||||
|
.form-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
.form-row {
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 输入框+按钮行 */
|
||||||
|
.input-action-row {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-action-row input {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 表单提示文字 */
|
||||||
|
.form-hint {
|
||||||
|
display: block;
|
||||||
|
margin-top: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--text-hint);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ========================================
|
||||||
|
按钮
|
||||||
|
======================================== */
|
||||||
.btn {
|
.btn {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -152,10 +436,12 @@ body {
|
|||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
font-family: inherit;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s ease;
|
transition: all var(--transition);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
@@ -166,11 +452,19 @@ body {
|
|||||||
.btn-primary:hover {
|
.btn-primary:hover {
|
||||||
background: var(--primary-hover);
|
background: var(--primary-hover);
|
||||||
transform: translateY(-1px);
|
transform: translateY(-1px);
|
||||||
box-shadow: 0 2px 8px rgba(74, 144, 217, 0.3);
|
box-shadow: 0 4px 12px rgba(74, 144, 217, 0.35);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary:active {
|
.btn-primary:active {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:disabled {
|
||||||
|
opacity: 0.6;
|
||||||
|
cursor: not-allowed;
|
||||||
|
transform: none;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary {
|
.btn-secondary {
|
||||||
@@ -184,6 +478,16 @@ body {
|
|||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-outline {
|
||||||
|
background: transparent;
|
||||||
|
color: var(--primary);
|
||||||
|
border: 1px solid var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-outline:hover {
|
||||||
|
background: var(--primary-light);
|
||||||
|
}
|
||||||
|
|
||||||
.btn-danger {
|
.btn-danger {
|
||||||
background: var(--danger);
|
background: var(--danger);
|
||||||
color: white;
|
color: white;
|
||||||
@@ -198,6 +502,12 @@ body {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-lg {
|
||||||
|
padding: 12px 32px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
.btn-block {
|
.btn-block {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -207,32 +517,39 @@ body {
|
|||||||
.btn-group {
|
.btn-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
margin-top: 24px;
|
margin-top: 28px;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 消息提示 */
|
/* ========================================
|
||||||
|
消息提示
|
||||||
|
======================================== */
|
||||||
.alert {
|
.alert {
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
border-radius: var(--radius);
|
border-radius: var(--radius);
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert-error {
|
.alert-error {
|
||||||
background: rgba(244, 67, 54, 0.1);
|
background: var(--danger-bg);
|
||||||
border: 1px solid var(--danger);
|
border: 1px solid rgba(244, 67, 54, 0.3);
|
||||||
color: var(--danger);
|
color: var(--danger);
|
||||||
}
|
}
|
||||||
|
|
||||||
.alert-success {
|
.alert-success {
|
||||||
background: rgba(76, 175, 80, 0.1);
|
background: var(--success-bg);
|
||||||
border: 1px solid var(--success);
|
border: 1px solid rgba(76, 175, 80, 0.3);
|
||||||
color: var(--success);
|
color: var(--success);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 配置页样式 */
|
/* ========================================
|
||||||
|
配置页
|
||||||
|
======================================== */
|
||||||
.config-container {
|
.config-container {
|
||||||
max-width: 900px;
|
max-width: 900px;
|
||||||
margin: 40px auto;
|
margin: 40px auto;
|
||||||
@@ -259,7 +576,7 @@ body {
|
|||||||
|
|
||||||
.config-section {
|
.config-section {
|
||||||
background: var(--bg-card);
|
background: var(--bg-card);
|
||||||
border-radius: 12px;
|
border-radius: var(--radius-lg);
|
||||||
padding: 28px;
|
padding: 28px;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
@@ -273,13 +590,62 @@ body {
|
|||||||
border-bottom: 1px solid var(--border-color);
|
border-bottom: 1px solid var(--border-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 响应式 */
|
/* ========================================
|
||||||
|
响应式
|
||||||
|
======================================== */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.login-card {
|
.login-card {
|
||||||
padding: 24px;
|
padding: 32px 24px;
|
||||||
}
|
}
|
||||||
.install-container,
|
|
||||||
|
.install-container {
|
||||||
|
padding: 24px 16px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-content {
|
||||||
|
padding: 24px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-label {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step-indicator {
|
||||||
|
gap: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.install-header h1 {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.install-subtitle {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
.config-container {
|
.config-container {
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
|
padding: 0 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.config-header {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
.login-card {
|
||||||
|
padding: 24px 20px;
|
||||||
|
border-radius: var(--radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-logo .logo-icon {
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-logo h1 {
|
||||||
|
font-size: 22px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,39 +13,54 @@ if (file_exists($configFile)) {
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>AI Chat - 安装向导</title>
|
<title>AI Chat - 安装向导</title>
|
||||||
<link rel="stylesheet" href="/assets/css/style.css">
|
<link rel="stylesheet" href="/assets/css/style.css">
|
||||||
<style>
|
|
||||||
.install-container { max-width: 700px; margin: 40px auto; padding: 0 20px; }
|
|
||||||
.step-content { display: none; background: var(--bg-card); border-radius: var(--radius); padding: 24px; }
|
|
||||||
.step-content.active { display: block; }
|
|
||||||
.check-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-color); }
|
|
||||||
.check-item .status { font-weight: bold; }
|
|
||||||
.check-item .status.pass { color: var(--success); }
|
|
||||||
.check-item .status.fail { color: var(--danger); }
|
|
||||||
.provider-item { background: var(--bg-secondary); padding: 16px; border-radius: var(--radius); margin-bottom: 12px; }
|
|
||||||
.provider-item .form-group { margin-bottom: 8px; }
|
|
||||||
h1 { text-align: center; margin-bottom: 30px; color: var(--primary); }
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="install-container">
|
<div class="install-container">
|
||||||
<h1>
|
<!-- 标题区域 -->
|
||||||
<svg viewBox="0 0 24 24" width="28" height="28" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:-6px;margin-right:10px;"><rect x="3" y="4" width="18" height="12" rx="3"/><circle cx="9" cy="10" r="1.5" fill="currentColor" stroke="none"/><circle cx="15" cy="10" r="1.5" fill="currentColor" stroke="none"/><path d="M8 16v2M16 16v2M12 16v3"/></svg>
|
<div class="install-header">
|
||||||
AI Chat 安装向导
|
<div class="install-logo">
|
||||||
</h1>
|
<svg viewBox="0 0 24 24" width="40" height="40" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<rect x="3" y="4" width="18" height="12" rx="3"/>
|
||||||
|
<circle cx="9" cy="10" r="1.5" fill="currentColor" stroke="none"/>
|
||||||
|
<circle cx="15" cy="10" r="1.5" fill="currentColor" stroke="none"/>
|
||||||
|
<path d="M8 16v2M16 16v2M12 16v3"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<h1>AI Chat 安装向导</h1>
|
||||||
|
<p class="install-subtitle">跟随引导完成初始配置,快速启用你的 AI 对话平台</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 步骤指示器 -->
|
<!-- 步骤指示器 -->
|
||||||
<ul class="step-indicator">
|
<ul class="step-indicator">
|
||||||
<li class="step active" data-step="1">1. 环境检查</li>
|
<li class="step active" data-step="1">
|
||||||
<li class="step" data-step="2">2. 数据库配置</li>
|
<span class="step-num">1</span>
|
||||||
<li class="step" data-step="3">3. 应用配置</li>
|
<span class="step-label">环境检查</span>
|
||||||
<li class="step" data-step="4">4. 管理员账户</li>
|
</li>
|
||||||
<li class="step" data-step="5">5. AI供应商</li>
|
<li class="step" data-step="2">
|
||||||
|
<span class="step-num">2</span>
|
||||||
|
<span class="step-label">数据库</span>
|
||||||
|
</li>
|
||||||
|
<li class="step" data-step="3">
|
||||||
|
<span class="step-num">3</span>
|
||||||
|
<span class="step-label">应用配置</span>
|
||||||
|
</li>
|
||||||
|
<li class="step" data-step="4">
|
||||||
|
<span class="step-num">4</span>
|
||||||
|
<span class="step-label">管理员</span>
|
||||||
|
</li>
|
||||||
|
<li class="step" data-step="5">
|
||||||
|
<span class="step-num">5</span>
|
||||||
|
<span class="step-label">AI 供应商</span>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!-- 步骤1:环境检查 -->
|
<!-- 步骤1:环境检查 -->
|
||||||
<div class="step-content active" id="step1">
|
<div class="step-content active" id="step1">
|
||||||
|
<div class="step-header">
|
||||||
<h2>环境检查</h2>
|
<h2>环境检查</h2>
|
||||||
<div id="envChecks">
|
<p class="step-desc">检查服务器运行环境是否满足安装要求</p>
|
||||||
|
</div>
|
||||||
|
<div id="envChecks" class="check-list">
|
||||||
<!-- 由 JS 动态填充 -->
|
<!-- 由 JS 动态填充 -->
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@@ -55,48 +70,62 @@ if (file_exists($configFile)) {
|
|||||||
|
|
||||||
<!-- 步骤2:数据库配置 -->
|
<!-- 步骤2:数据库配置 -->
|
||||||
<div class="step-content" id="step2">
|
<div class="step-content" id="step2">
|
||||||
|
<div class="step-header">
|
||||||
<h2>数据库配置</h2>
|
<h2>数据库配置</h2>
|
||||||
<div class="form-group">
|
<p class="step-desc">填写 MySQL 数据库连接信息</p>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group" style="flex:2">
|
||||||
<label>主机地址</label>
|
<label>主机地址</label>
|
||||||
<input type="text" id="dbHost" value="127.0.0.1" placeholder="数据库主机">
|
<input type="text" id="dbHost" value="127.0.0.1" placeholder="数据库主机">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group" style="flex:1">
|
||||||
<label>端口</label>
|
<label>端口</label>
|
||||||
<input type="number" id="dbPort" value="3306" placeholder="数据库端口">
|
<input type="number" id="dbPort" value="3306" placeholder="端口号">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>数据库名</label>
|
<label>数据库名</label>
|
||||||
<input type="text" id="dbName" placeholder="数据库名称">
|
<input type="text" id="dbName" placeholder="数据库名称">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-row">
|
||||||
|
<div class="form-group" style="flex:1">
|
||||||
<label>用户名</label>
|
<label>用户名</label>
|
||||||
<input type="text" id="dbUser" placeholder="数据库用户名">
|
<input type="text" id="dbUser" placeholder="数据库用户名">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group" style="flex:1">
|
||||||
<label>密码</label>
|
<label>密码</label>
|
||||||
<input type="password" id="dbPassword" placeholder="数据库密码">
|
<input type="password" id="dbPassword" placeholder="数据库密码">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div id="dbTestResult"></div>
|
<div id="dbTestResult"></div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn btn-secondary" onclick="InstallWizard.prevStep()">上一步</button>
|
<button class="btn btn-secondary" onclick="InstallWizard.prevStep()">上一步</button>
|
||||||
<button class="btn btn-secondary" onclick="InstallWizard.testDb()">测试连接</button>
|
<button class="btn btn-outline" onclick="InstallWizard.testDb()">
|
||||||
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-right:4px;"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
|
||||||
|
测试连接
|
||||||
|
</button>
|
||||||
<button class="btn btn-primary" onclick="InstallWizard.nextStep()">下一步</button>
|
<button class="btn btn-primary" onclick="InstallWizard.nextStep()">下一步</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 步骤3:应用配置 -->
|
<!-- 步骤3:应用配置 -->
|
||||||
<div class="step-content" id="step3">
|
<div class="step-content" id="step3">
|
||||||
|
<div class="step-header">
|
||||||
<h2>应用配置</h2>
|
<h2>应用配置</h2>
|
||||||
|
<p class="step-desc">设置 JWT 令牌参数,用于用户认证加密</p>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>JWT 密钥</label>
|
<label>JWT 密钥</label>
|
||||||
<div style="display:flex;gap:8px;">
|
<div class="input-action-row">
|
||||||
<input type="text" id="jwtSecret" placeholder="留空则自动生成" style="flex:1;">
|
<input type="text" id="jwtSecret" placeholder="留空则自动生成安全密钥">
|
||||||
<button class="btn btn-secondary btn-sm" onclick="document.getElementById('jwtSecret').value=InstallWizard.generateSecret()">自动生成</button>
|
<button class="btn btn-outline btn-sm" onclick="document.getElementById('jwtSecret').value=InstallWizard.generateSecret()">自动生成</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>JWT 过期时间(秒)</label>
|
<label>JWT 过期时间(秒)</label>
|
||||||
<input type="number" id="jwtExpiry" value="86400" placeholder="默认 86400(24小时)">
|
<input type="number" id="jwtExpiry" value="86400" placeholder="默认 86400(24小时)">
|
||||||
|
<span class="form-hint">默认 86400 秒(24 小时),可根据需要调整</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn btn-secondary" onclick="InstallWizard.prevStep()">上一步</button>
|
<button class="btn btn-secondary" onclick="InstallWizard.prevStep()">上一步</button>
|
||||||
@@ -106,19 +135,24 @@ if (file_exists($configFile)) {
|
|||||||
|
|
||||||
<!-- 步骤4:管理员账户 -->
|
<!-- 步骤4:管理员账户 -->
|
||||||
<div class="step-content" id="step4">
|
<div class="step-content" id="step4">
|
||||||
|
<div class="step-header">
|
||||||
<h2>创建管理员账户</h2>
|
<h2>创建管理员账户</h2>
|
||||||
|
<p class="step-desc">设置管理员登录凭据,安装后可在系统中修改</p>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>用户名</label>
|
<label>用户名</label>
|
||||||
<input type="text" id="adminUsername" placeholder="管理员用户名">
|
<input type="text" id="adminUsername" placeholder="管理员用户名">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-row">
|
||||||
|
<div class="form-group" style="flex:1">
|
||||||
<label>密码</label>
|
<label>密码</label>
|
||||||
<input type="password" id="adminPassword" placeholder="至少6位密码">
|
<input type="password" id="adminPassword" placeholder="至少6位密码">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group" style="flex:1">
|
||||||
<label>确认密码</label>
|
<label>确认密码</label>
|
||||||
<input type="password" id="adminPasswordConfirm" placeholder="再次输入密码">
|
<input type="password" id="adminPasswordConfirm" placeholder="再次输入密码">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn btn-secondary" onclick="InstallWizard.prevStep()">上一步</button>
|
<button class="btn btn-secondary" onclick="InstallWizard.prevStep()">上一步</button>
|
||||||
<button class="btn btn-primary" onclick="InstallWizard.nextStep()">下一步</button>
|
<button class="btn btn-primary" onclick="InstallWizard.nextStep()">下一步</button>
|
||||||
@@ -127,18 +161,28 @@ if (file_exists($configFile)) {
|
|||||||
|
|
||||||
<!-- 步骤5:AI供应商 -->
|
<!-- 步骤5:AI供应商 -->
|
||||||
<div class="step-content" id="step5">
|
<div class="step-content" id="step5">
|
||||||
|
<div class="step-header">
|
||||||
<h2>AI 供应商配置</h2>
|
<h2>AI 供应商配置</h2>
|
||||||
<p style="color:var(--text-secondary);margin-bottom:16px;">至少配置一个 AI 供应商</p>
|
<p class="step-desc">至少配置一个 AI 供应商,安装后可在设置中添加更多</p>
|
||||||
|
</div>
|
||||||
<div id="providerList">
|
<div id="providerList">
|
||||||
<!-- 由 JS 动态管理 -->
|
<!-- 由 JS 动态管理 -->
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-secondary" onclick="InstallWizard.addProvider()" style="margin-top:8px;">+ 添加供应商</button>
|
<button class="btn btn-outline" onclick="InstallWizard.addProvider()" style="margin-top:12px;width:100%;">
|
||||||
<div id="installResult"></div>
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" style="margin-right:4px;"><path d="M12 5v14M5 12h14"/></svg>
|
||||||
|
添加供应商
|
||||||
|
</button>
|
||||||
|
<div id="installResult" style="margin-top:16px;"></div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn btn-secondary" onclick="InstallWizard.prevStep()">上一步</button>
|
<button class="btn btn-secondary" onclick="InstallWizard.prevStep()">上一步</button>
|
||||||
<button class="btn btn-primary" id="installBtn" onclick="InstallWizard.runInstall()">完成安装</button>
|
<button class="btn btn-primary btn-lg" id="installBtn" onclick="InstallWizard.runInstall()">完成安装</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 底部版本信息 -->
|
||||||
|
<div class="install-footer">
|
||||||
|
AI Chat · v1.0
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -162,16 +206,20 @@ if (file_exists($configFile)) {
|
|||||||
|
|
||||||
const container = document.getElementById('envChecks');
|
const container = document.getElementById('envChecks');
|
||||||
container.innerHTML = checks.map(c => `
|
container.innerHTML = checks.map(c => `
|
||||||
<div class="check-item">
|
<div class="check-item ${c.pass ? 'pass' : 'fail'}">
|
||||||
<span>${c.name}</span>
|
<span class="check-name">${c.name}</span>
|
||||||
<span class="status ${c.pass ? 'pass' : 'fail'}">${c.pass ? '通过' : '未通过'}</span>
|
<span class="check-status">
|
||||||
|
${c.pass
|
||||||
|
? '<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg> 通过'
|
||||||
|
: '<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg> 未通过'
|
||||||
|
}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
`).join('');
|
`).join('');
|
||||||
},
|
},
|
||||||
|
|
||||||
nextStep() {
|
nextStep() {
|
||||||
if (this.currentStep === 4) {
|
if (this.currentStep === 4) {
|
||||||
// 验证管理员密码
|
|
||||||
const pwd = document.getElementById('adminPassword').value;
|
const pwd = document.getElementById('adminPassword').value;
|
||||||
const confirm = document.getElementById('adminPasswordConfirm').value;
|
const confirm = document.getElementById('adminPasswordConfirm').value;
|
||||||
const username = document.getElementById('adminUsername').value;
|
const username = document.getElementById('adminUsername').value;
|
||||||
@@ -229,10 +277,24 @@ if (file_exists($configFile)) {
|
|||||||
const index = list.children.length;
|
const index = list.children.length;
|
||||||
const html = `
|
const html = `
|
||||||
<div class="provider-item" data-index="${index}">
|
<div class="provider-item" data-index="${index}">
|
||||||
<div class="form-group">
|
<div class="provider-item-header">
|
||||||
|
<span class="provider-item-title">供应商 #${index + 1}</span>
|
||||||
|
${index > 0 ? '<button class="btn btn-danger btn-sm" onclick="this.closest(\'.provider-item\').remove()">删除</button>' : ''}
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group" style="flex:1">
|
||||||
<label>供应商名称</label>
|
<label>供应商名称</label>
|
||||||
<input type="text" class="provider-name" placeholder="如:OpenAI、DeepSeek">
|
<input type="text" class="provider-name" placeholder="如:OpenAI、DeepSeek">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group" style="flex:1">
|
||||||
|
<label>供应商类型</label>
|
||||||
|
<select class="provider-type">
|
||||||
|
<option value="newapi">OpenAI 兼容</option>
|
||||||
|
<option value="openai">OpenAI 官方</option>
|
||||||
|
<option value="claude">Claude (Anthropic)</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>API URL</label>
|
<label>API URL</label>
|
||||||
<input type="text" class="provider-url" placeholder="如:https://api.openai.com">
|
<input type="text" class="provider-url" placeholder="如:https://api.openai.com">
|
||||||
@@ -245,15 +307,6 @@ if (file_exists($configFile)) {
|
|||||||
<label>可用模型(逗号分隔)</label>
|
<label>可用模型(逗号分隔)</label>
|
||||||
<input type="text" class="provider-models" placeholder="如:gpt-3.5-turbo, gpt-4">
|
<input type="text" class="provider-models" placeholder="如:gpt-3.5-turbo, gpt-4">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
|
||||||
<label>供应商类型</label>
|
|
||||||
<select class="provider-type">
|
|
||||||
<option value="newapi">OpenAI 兼容</option>
|
|
||||||
<option value="openai">OpenAI 官方</option>
|
|
||||||
<option value="claude">Claude (Anthropic)</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
${index > 0 ? '<button class="btn btn-danger btn-sm" onclick="this.parentElement.remove()">删除</button>' : ''}
|
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
list.insertAdjacentHTML('beforeend', html);
|
list.insertAdjacentHTML('beforeend', html);
|
||||||
|
|||||||
Reference in New Issue
Block a user