|
@@ -78,13 +78,10 @@ class UserService extends CrudService {
|
|
|
|
|
|
// 学生绑定
|
|
|
async bind(data) {
|
|
|
- const { openid, id_number, mobile, passwd, unionid } = data;
|
|
|
+ const { openid, id_number, mobile, unionid } = data;
|
|
|
assert(openid && id_number && mobile, '缺少部分信息项');
|
|
|
let user = await this.model.findOne({ mobile });
|
|
|
if (user) {
|
|
|
- if (user.passwd.secret !== passwd) {
|
|
|
- throw new BusinessError(ErrorCode.BAD_PASSWORD);
|
|
|
- }
|
|
|
user.openid = openid;
|
|
|
user.unionid = unionid;
|
|
|
await user.save();
|