代理后端出版
This commit is contained in:
@@ -14,9 +14,9 @@ const JWT_SECRET = process.env.JWT_SECRET || 'agent_jwt_secret_key_2024';
|
||||
*/
|
||||
router.post('/login', async (req, res) => {
|
||||
try {
|
||||
const { phone, password } = req.body;
|
||||
const { username, password } = req.body;
|
||||
|
||||
if (!phone || !password) {
|
||||
if (!username || !password) {
|
||||
return res.status(400).json({
|
||||
success: false,
|
||||
message: '请输入手机号和密码'
|
||||
@@ -43,7 +43,7 @@ router.post('/login', async (req, res) => {
|
||||
LEFT JOIN users u ON ra.user_id = u.id
|
||||
LEFT JOIN zhejiang_regions zr ON ra.region_id = zr.id
|
||||
WHERE u.phone = ? AND ra.status = 'active'
|
||||
`, [phone]);
|
||||
`, [username]);
|
||||
|
||||
if (agents.length === 0) {
|
||||
return res.status(401).json({
|
||||
|
||||
Reference in New Issue
Block a user