Compare commits

...

5 Commits

Author SHA1 Message Date
55902aa8b6 fix: 移除验证码功能(暂时隐藏)
- 移除验证码输入框和发送验证码按钮
- 移除验证码验证逻辑
- 保留手机号格式验证(11位中国手机号)
- 保留手机号唯一性检查
- 注册字段:用户名、手机号(必填)、邮箱(可选)、密码
2026-04-27 11:31:44 +08:00
295218b4e4 feat: 注册增加手机号验证和邮箱
- 手机号输入(必填,11位中国手机号格式验证)
- 验证码机制(模拟,6位随机码,5分钟有效期)
- 发送验证码按钮(60秒倒计时)
- 验证码输入框
- 邮箱输入(可选,格式验证)
- 手机号唯一性检查(防止重复注册)
2026-04-27 11:26:51 +08:00
0812a6192f fix: 普通对话返回后不再显示智能体对话
- showConversationList 简化为直接返回主页
- 主页对话列表正确过滤(只显示没有 agentId 的普通对话)
- 添加操作菜单支持(重命名、分享、置顶、删除)
- 统一使用全局变量 currentActionConvId
2026-04-27 11:18:15 +08:00
c8cea4c1a1 feat: 登录注册系统 + 游客使用限制
功能:
- 登录/注册界面(本地存储用户数据)
- 我的页面显示用户状态、登录/退出按钮
- 游客配额显示(对话会话/消息/智能体消息)

游客限制:
- 每天最多1个对话会话
- 每天最多20条对话消息
- 只能使用通用助手智能体
- 每天最多20条智能体消息
- 登录用户无限制

限制提示:
- 达到限制弹出提示对话框
- 提示登录解锁全部功能
2026-04-27 11:06:20 +08:00
439743c051 fix: 智能体对话不显示在历史对话列表中
- 对话页面只显示没有智能体的普通对话
- 智能体对话只在智能体页面的最近使用列表显示
- 搜索功能也只搜索普通对话
2026-04-27 10:50:43 +08:00
3 changed files with 1075 additions and 249 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -8,12 +8,12 @@
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>AI助手</title>
<link rel="stylesheet" href="style.css?v=3.0.0">
<link rel="stylesheet" href="style.css?v=3.4.1">
<link rel="manifest" href="manifest.json">
</head>
<body>
<div id="app"></div>
<script src="marked.min.js?v=3.0.0"></script>
<script src="app.js?v=3.0.0"></script>
<script src="marked.min.js?v=3.4.1"></script>
<script src="app.js?v=3.4.1"></script>
</body>
</html>

View File

@@ -689,6 +689,362 @@ body {
opacity: 1;
}
/* ==================== 登录注册页面 ==================== */
.auth-page {
display: flex;
flex-direction: column;
height: 100vh;
height: 100dvh;
background: #f5f5f5;
}
.auth-header {
display: flex;
align-items: center;
padding: 12px 16px;
background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
color: white;
}
.auth-header h1 {
font-size: 18px;
font-weight: 600;
margin-left: 12px;
}
.auth-content {
flex: 1;
padding: 24px 16px;
display: flex;
flex-direction: column;
}
.auth-form {
background: white;
padding: 24px;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.auth-input-group {
margin-bottom: 20px;
}
.auth-input-group label {
display: block;
font-size: 14px;
font-weight: 500;
color: var(--text-color);
margin-bottom: 8px;
}
.auth-input-group input {
width: 100%;
padding: 12px 16px;
border: 2px solid var(--border-color);
border-radius: 10px;
font-size: 16px;
outline: none;
transition: border-color 0.2s;
}
.auth-input-group input:focus {
border-color: var(--primary);
}
.auth-input-group .required {
color: #e53e3e;
font-size: 12px;
}
.auth-input-group .optional {
color: var(--text-light);
font-size: 12px;
}
/* 手机号输入框布局 */
.phone-input-wrapper {
display: flex;
gap: 8px;
}
.phone-input-wrapper input {
flex: 1;
}
.send-code-btn {
padding: 12px 16px;
background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 10px;
font-size: 14px;
cursor: pointer;
white-space: nowrap;
transition: opacity 0.2s;
}
.send-code-btn:hover {
opacity: 0.9;
}
.send-code-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.auth-submit-btn {
width: 100%;
padding: 14px;
background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 10px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s;
}
.auth-submit-btn:hover {
transform: scale(1.02);
}
.auth-submit-btn:active {
transform: scale(0.98);
}
.auth-footer {
text-align: center;
padding: 24px;
color: var(--text-light);
}
.auth-link {
color: var(--primary);
font-weight: 500;
cursor: pointer;
}
.auth-link:hover {
color: #5a67d8;
}
/* ==================== 我的页面 ==================== */
.profile-card {
display: flex;
flex-direction: column;
align-items: center;
padding: 24px;
background: white;
border-radius: 12px;
margin-bottom: 16px;
}
.profile-avatar {
font-size: 48px;
margin-bottom: 8px;
}
.profile-name {
font-size: 18px;
font-weight: 600;
color: var(--text-color);
margin-bottom: 8px;
}
.profile-status {
font-size: 14px;
color: #22c55e;
margin-bottom: 16px;
}
.profile-status.guest {
color: var(--text-light);
}
.profile-login-buttons {
display: flex;
flex-direction: column;
gap: 12px;
width: 100%;
}
.login-btn, .register-btn, .logout-btn {
width: 100%;
padding: 12px;
background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
transition: transform 0.2s;
}
.login-btn:hover, .register-btn:hover, .logout-btn:hover {
transform: scale(1.02);
}
.register-btn {
background: white;
border: 2px solid var(--primary);
color: var(--primary);
}
.logout-btn {
background: #fee2e2;
color: #e53e3e;
}
.skip-btn {
width: 100%;
padding: 10px;
background: transparent;
border: 1px solid var(--border-color);
color: var(--text-light);
border-radius: 8px;
font-size: 14px;
cursor: pointer;
}
.skip-btn:hover {
background: rgba(0,0,0,0.05);
}
/* ==================== 配额显示 ==================== */
.quota-card {
background: white;
padding: 16px;
border-radius: 12px;
margin-bottom: 16px;
border: 1px solid var(--border-color);
}
.quota-title {
font-size: 14px;
font-weight: 600;
color: var(--text-color);
margin-bottom: 12px;
}
.quota-items {
display: flex;
flex-direction: column;
gap: 8px;
}
.quota-item {
display: flex;
justify-content: space-between;
align-items: center;
}
.quota-label {
font-size: 14px;
color: var(--text-light);
}
.quota-value {
font-size: 14px;
font-weight: 500;
color: var(--primary);
}
.quota-tip {
text-align: center;
font-size: 12px;
color: #f59e0b;
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid var(--border-color);
}
/* ==================== 限制提示对话框 ==================== */
.limit-dialog {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 2000;
}
.limit-dialog-content {
background: white;
padding: 24px;
border-radius: 16px;
max-width: 300px;
text-align: center;
animation: dialogSlideUp 0.2s ease;
}
@keyframes dialogSlideUp {
from { transform: translateY(20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.limit-dialog-icon {
font-size: 48px;
margin-bottom: 16px;
}
.limit-dialog-title {
font-size: 18px;
font-weight: 600;
color: var(--text-color);
margin-bottom: 12px;
}
.limit-dialog-message {
font-size: 14px;
color: var(--text-light);
line-height: 1.6;
margin-bottom: 20px;
white-space: pre-line;
}
.limit-dialog-actions {
display: flex;
gap: 12px;
}
.limit-dialog-btn {
flex: 1;
padding: 12px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
}
.limit-dialog-btn.login {
background: linear-gradient(135deg, var(--primary) 0%, #764ba2 100%);
color: white;
border: none;
}
.limit-dialog-btn.login:hover {
transform: scale(1.02);
}
.limit-dialog-btn.cancel {
background: white;
border: 1px solid var(--border-color);
color: var(--text-light);
}
.limit-dialog-btn.cancel:hover {
background: var(--bg-color);
}
/* 最近使用的智能体列表 */
.recent-agents-list {
display: flex;