lrf402788946 4 years ago
parent
commit
2586345e34
2 changed files with 3 additions and 3 deletions
  1. 3 1
      app/service/patient.js
  2. 0 2
      app/service/weixin.js

+ 3 - 1
app/service/patient.js

@@ -53,7 +53,9 @@ class PatientService extends CrudService {
         group.patients.push(patient);
         await group.save();
       } else {
-        const groupPatient = group.patients.filter(fil => fil.patientid === entity.id);
+        console.log(group.patients);
+        console.log(entity._id);
+        const groupPatient = group.patients.filter(fil => fil.patientid === entity._id);
         if (groupPatient) {
           throw new BusinessError(ErrorCode.DATA_EXIST, '已经注册,无需重复注册');
         } else {

+ 0 - 2
app/service/weixin.js

@@ -70,7 +70,6 @@ class WeixinAuthService extends AxiosService {
     let { redirect_uri, groupid, doctorid, type } = fqueries;
     let queryStr = `?openid=${openid}`;
     // TODO 验证redirect_uri,如果有groupid,type=group=>用户入驻,直接处理
-    console.log(fqueries);
     if (groupid) {
       if (type === 'group') {
         // TODO加用户,进组
@@ -89,7 +88,6 @@ class WeixinAuthService extends AxiosService {
     }
     if (doctorid) queryStr = `${queryStr}&doctorid=${doctorid}`;
     redirect_uri = urljoin(redirect_uri, queryStr);
-    console.log(redirect_uri);
     this.ctx.redirect(redirect_uri);
   }
   /**