Selaa lähdekoodia

增加用户状态

liuyu 5 vuotta sitten
vanhempi
commit
d4375041a1
2 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 1 0
      app/model/user.js
  2. 1 1
      app/service/user.js

+ 1 - 0
app/model/user.js

@@ -12,6 +12,7 @@ const UserSchema = {
   remark: { type: String, required: false }, // 备注
   type: { type: String, required: false, maxLength: 200 }, // 身份,0、中心管理元1、班主任用户2、学校用户3、教师4、学生
   uid: { type: String, required: false, maxLength: 200 }, // 关联用户信息id
+  status: { type: String, required: false, default: 0 }, // 注册状态
 };
 
 

+ 1 - 1
app/service/user.js

@@ -53,8 +53,8 @@ class UserService extends CrudService {
     if (openid) {
       user.openid = openid;
     }
+    user.status = '1';
     await user.save();
-
     return user;
   }