fix: 修复文档格式和内容,确保成人内容过滤功能说明清晰

This commit is contained in:
katelya
2025-09-04 23:25:40 +08:00
parent 2197294cce
commit 2efcf6a812
2 changed files with 15 additions and 12 deletions
+2
View File
@@ -143,6 +143,7 @@ wrangler pages deploy .vercel/output/static --project-name katelyatv
### 🚨 错误:功能正常但开关无法操作(重要修复)
**问题描述**
- 页面不再显示"获取用户设置失败"错误
- 但成人内容过滤开关无法切换,点击无响应
@@ -197,6 +198,7 @@ SELECT * FROM user_settings WHERE username = 'your_username';
3. 测试成人内容过滤开关功能
**重要说明**
- `settings` 字段必须是有效的 JSON 字符串
- `filter_adult_content` 为 `true` 表示开启过滤
- `updated_time` 使用 Unix 时间戳格式
+4 -3
View File
@@ -79,6 +79,7 @@ PASSWORD = your_password_here
#### 第四步:确认 D1 绑定
在 Cloudflare Pages → Settings → Functions → D1 database bindings
- **Variable name**: `DB`
- **D1 database**: 选择您的数据库
@@ -91,7 +92,7 @@ PASSWORD = your_password_here
**表结构说明**
| 字段名 | 类型 | 说明 |
| -------------- | ------- | --------------------------------------- |
| -------------- | ------- | ------------------------------------- |
| `id` | INTEGER | 主键,自动递增 |
| `username` | TEXT | 用户名,必须与 users 表中的用户名匹配 |
| `settings` | TEXT | 用户设置的 JSON 字符串 |
@@ -99,7 +100,7 @@ PASSWORD = your_password_here
**settings JSON 格式**
```json
````json
{
"filter_adult_content": true, // 成人内容过滤开关
"theme": "auto", // 主题设置
@@ -129,7 +130,7 @@ CREATE TABLE IF NOT EXISTS user_settings (
-- 为用户设置添加索引以优化查询性能
CREATE INDEX IF NOT EXISTS idx_user_settings_user_id ON user_settings(user_id);
CREATE INDEX IF NOT EXISTS idx_user_settings_username ON user_settings(username);
```
````
### skip_configs 表(跳过功能 - 可选)