修改了登录验证方式

This commit is contained in:
lik
2026-06-01 21:16:23 +08:00
parent 40f2c21bfa
commit ca147ac2a8
2 changed files with 33 additions and 18 deletions

View File

@@ -15,7 +15,7 @@ const UserSchema = mongoose.Schema(
name: { type: String, comment: '用户姓名' },
pinyin: { type: String, default: '', comment: '姓名的拼音,用于搜索' },
pinyinFL: { type: String, default: '', comment: '姓名拼音的首字母,用于搜索' },
mobile: { type: String, index: true, trim: true, unique: true, sparse: true, comment: '手机号码' },
mobile: { type: String, index: true, trim: true, comment: '手机号码' },
email: { type: String, index: true, trim: true, unique: true, sparse: true, comment: '电子邮箱' },
idnumber: { type: String, index: true, trim: true, unique: true, sparse: true, comment: '身份证号码' },
ssn: { type: String, index: true, trim: true, unique: true, sparse: true, comment: '社保卡号' },
@@ -58,7 +58,6 @@ const UserSchema = mongoose.Schema(
wechat:{
account: { type: String, default: "", comment: '微信账号' },
unionid: { type: String, index: true, unique: true, sparse: true, comment: '微信UnionID' },
openid: { type: String, index: true, unique: true, sparse: true, comment: '微信OpenID' },
}
},
@@ -67,6 +66,7 @@ const UserSchema = mongoose.Schema(
account: { type: String, enum: ["normal", "lock"], default: "normal", comment: '账户状态' },
},
// 带wxopenid
app: {
},