修复了诸多问题
This commit is contained in:
@@ -30,7 +30,7 @@ async function dashoujianquan(app) {
|
||||
mask: true
|
||||
});
|
||||
await new Promise(r => setTimeout(r, 2100));
|
||||
return { allowed: false, reason: '打手消息权限被限制' };
|
||||
return { allowed: false, reason: '接单员消息权限被限制' };
|
||||
}
|
||||
}
|
||||
throw new Error(res.data?.msg || '鉴权接口异常');
|
||||
|
||||
@@ -50,7 +50,7 @@ class ConnectionManager {
|
||||
}
|
||||
|
||||
if (identityType === 'dashou' && !userId.startsWith('Ds')) {
|
||||
throw new Error(`打手身份的用户ID必须以Ds开头,实际为 ${userId}`);
|
||||
throw new Error(`接单员身份的用户ID必须以Ds开头,实际为 ${userId}`);
|
||||
}
|
||||
if (identityType === 'shangjia' && !userId.startsWith('Sj')) {
|
||||
throw new Error(`商家身份的用户ID必须以Sj开头,实际为 ${userId}`);
|
||||
@@ -104,7 +104,7 @@ class ConnectionManager {
|
||||
|
||||
// 校验 userId 前缀
|
||||
if (identityType === 'dashou' && !userId.startsWith('Ds')) {
|
||||
throw new Error(`打手身份的用户ID必须以Ds开头,实际为 ${userId}`);
|
||||
throw new Error(`接单员身份的用户ID必须以Ds开头,实际为 ${userId}`);
|
||||
}
|
||||
if (identityType === 'shangjia' && !userId.startsWith('Sj')) {
|
||||
throw new Error(`商家身份的用户ID必须以Sj开头,实际为 ${userId}`);
|
||||
|
||||
Reference in New Issue
Block a user