1
This commit is contained in:
@@ -191,7 +191,7 @@ module.exports = {
|
|||||||
|
|
||||||
// 生成新的邀请码
|
// 生成新的邀请码
|
||||||
const invite_code = `INV${user.id}_${Date.now().toString(36).toUpperCase()}`;
|
const invite_code = `INV${user.id}_${Date.now().toString(36).toUpperCase()}`;
|
||||||
const invite_link = `https://work.light120.com/invite?code=${invite_code}`;
|
const invite_link = `https://work.light120.com/register.html?code=${invite_code}`;
|
||||||
|
|
||||||
return ctx.success({
|
return ctx.success({
|
||||||
invite_code,
|
invite_code,
|
||||||
|
|||||||
@@ -160,9 +160,9 @@ module.exports = {
|
|||||||
|
|
||||||
// 验证客户端提供的 device_id 格式
|
// 验证客户端提供的 device_id 格式
|
||||||
if (client_device_id) {
|
if (client_device_id) {
|
||||||
if (!validateDeviceId(client_device_id)) {
|
// if (!validateDeviceId(client_device_id)) {
|
||||||
return ctx.fail('设备ID格式不正确,请重新登录');
|
// return ctx.fail('设备ID格式不正确,请重新登录');
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 如果与数据库不同,需要额外验证(防止设备ID劫持)
|
// 如果与数据库不同,需要额外验证(防止设备ID劫持)
|
||||||
if (user.device_id && client_device_id !== user.device_id) {
|
if (user.device_id && client_device_id !== user.device_id) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ module.exports = (db) => {
|
|||||||
},
|
},
|
||||||
pwd: {
|
pwd: {
|
||||||
comment: '密码',
|
comment: '密码',
|
||||||
type: Sequelize.STRING(50),
|
type: Sequelize.STRING(200),
|
||||||
allowNull: false,
|
allowNull: false,
|
||||||
defaultValue: ''
|
defaultValue: ''
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user