lrf402788946 4 年之前
父節點
當前提交
e7a49b9453

+ 0 - 1
app/controller/patientemrs.js

@@ -40,7 +40,6 @@ class PatientEmrsController extends Controller {
   // DELETE /{id}
   async destroy() {
     const { patientid, id } = this.ctx.params;
-    console.log(patientid);
     await this.service.deleteEmr({ patientid, id });
     this.ctx.ok({ msg: 'deleted' });
   }

+ 0 - 1
app/controller/qrcode.js

@@ -20,7 +20,6 @@ class QrcodeController extends Controller {
 
   // POST 生成群二维码
   async createQrcode() {
-    console.log(this.ctx.query);
     const res = await this.service.createQrcodeGroup(this.ctx.query);
     this.ctx.ok({ data: res });
   }

+ 0 - 3
app/service/chat.js

@@ -91,8 +91,6 @@ class ChatService extends CrudService {
       icon = patient.icon;
     }
     // TODO: 检查是否已经注册
-    const moment = require('moment');
-    console.log(moment().format('YYYY-MM-DD HH:mm:ss'));
     const newdata = { type, sendid, audiotime, sendname, receiveid, receivename, content, contenttype: data.contenttype };
     const entity = await this.model.create(newdata);
 
@@ -140,7 +138,6 @@ class ChatService extends CrudService {
       this.ctx.logger.error(e.toString());
     }
     const d = await this.fetch({ id: entity.id });
-    console.log(d);
     return d;
 
 

+ 0 - 3
app/service/doctor.js

@@ -22,9 +22,7 @@ class DoctorService extends CrudService {
   }
 
   async update({ id }, data) {
-    console.log(data.id);
     const doctor = await this.model.findById(id);
-    console.log(doctor);
     doctor.name = data.name;
     doctor.mobile = data.mobile;
     doctor.hosname = data.hosname;
@@ -49,7 +47,6 @@ class DoctorService extends CrudService {
   }
 
   async updateopenid({ id }, data) {
-    console.log(data.id);
     const doctor = await this.model.findById(id);
     doctor.openid = data.openid;
     return await doctor.save();

+ 0 - 2
app/service/groupchat.js

@@ -63,9 +63,7 @@ class GroupChatService extends CrudService {
       sendname = doctor.name;
       icon = doctor.icon;
     } else {
-      console.log(sendid);
       const patient = await this.cPatient.findById(sendid);
-      console.log(patient);
       if (!patient) {
         throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '患者信息不存在');
       }

+ 0 - 2
app/service/login.js

@@ -32,8 +32,6 @@ class LoginService extends CrudService {
       throw new BusinessError(ErrorCode.USER_NOT_EXIST);
     }
     // 验证密码
-    console.log(res.passwd.secret);
-    console.log(passwd);
     if (res.passwd.secret !== passwd) {
       throw new BusinessError(ErrorCode.BAD_PASSWORD);
     }

+ 0 - 2
app/service/nurse.js

@@ -21,9 +21,7 @@ class NurseService extends CrudService {
   }
 
   async update({ id }, data) {
-    console.log(data.id);
     const nurse = await this.model.findById(id);
-    console.log(nurse);
     nurse.name = data.name;
     nurse.mobile = data.mobile;
     nurse.hosname = data.hosname;

+ 0 - 6
app/service/patient.js

@@ -45,11 +45,8 @@ class PatientService extends CrudService {
     // TODO: 检查是否已经注册
     let entity = await this.model.findOne({ openid });
     if (entity) {
-      console.log(group.patients);
       if (group.patients.length === 0) {
         const patient = { patientid: entity.id, url: entity.url, name: entity.name, openid: entity.openid };
-        // const newpatient = group.patients.create(patient);
-        // console.log('newpatient:', newpatient);
         group.patients.push(patient);
         await group.save();
       } else {
@@ -58,8 +55,6 @@ class PatientService extends CrudService {
           throw new BusinessError(ErrorCode.DATA_EXIST, '已经注册,无需重复注册');
         } else {
           const patient = { patientid: entity.id, url: entity.url, name: entity.name, openid: entity.openid };
-          // const newpatient = group.patients.create(patient);
-          // console.log('newpatient:', newpatient);
           group.patients.push(patient);
           await group.save();
         }
@@ -150,7 +145,6 @@ class PatientService extends CrudService {
     const newData = { indate, outdate, title, content, doctorid, doctorname };
     // TODO: 保存数据
     const newemr = patient.emrs.create(newData);
-    console.log('newemr:', newemr);
     patient.emrs.push(newemr);
     await patient.save();
     return newemr;

+ 0 - 5
app/service/rabbitmq.js

@@ -28,19 +28,14 @@ class RabbitmqService extends Service {
       try {
         await ch.assertExchange(ex, self.exType, { durable: self.durable });
         const q = await ch.assertQueue('', { exclusive: true });
-        console.log('==q=', q);
         // 队列绑定 exchange
         await ch.bindQueue(q.queue, ex, '*');
         ch.consume(q.queue, msg => {
-          console.log('收到消息: ', msg);
           const result = msg.content.toString();
           const headers = msg.properties.headers;
           // 插入待办事项到数据库中。
-          console.log(result);
-          console.log(headers);
         }, { noAck: true });
       } catch (e) {
-        console.log('==e==', e);
         await ch.close();
       }
     } else {

+ 0 - 1
app/service/weixin.js

@@ -35,7 +35,6 @@ class WeixinAuthService extends AxiosService {
     const val = JSON.stringify({ ...others, redirect_uri });
     await this.app.redis.set(key, val, 'EX', 600);
     const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${this.authBackUrl}&response_type=code&scope=snsapi_base&state=${state}#wechat_redirect`;
-    console.log(`url=>${url}`);
     this.ctx.redirect(url);
   }