docs: 更新项目文档,完善需求和技术细节

This commit is contained in:
ylweng
2025-09-01 01:05:53 +08:00
parent 028a458283
commit 816a51ae82
48 changed files with 18629 additions and 5301 deletions

View File

@@ -66,7 +66,7 @@ router.post('/register', async (req, res, next) => {
// 创建用户
const result = await dbConnector.query(
'INSERT INTO users (username, password_hash, phone, email, user_type) VALUES (?, ?, ?, ?, ?)',
'INSERT INTO users (username, password, phone, email, user_type) VALUES (?, ?, ?, ?, ?)',
[username, hashedPassword, phone, email, user_type]
);
@@ -127,7 +127,7 @@ router.post('/login', async (req, res, next) => {
const userData = user[0];
// 验证密码
const isValidPassword = await bcrypt.compare(password, userData.password_hash);
const isValidPassword = await bcrypt.compare(password, userData.password);
if (!isValidPassword) {
return res.status(401).json({
code: 401,