lrf402788946 4 gadi atpakaļ
vecāks
revīzija
48f39e9324
1 mainītis faili ar 2 papildinājumiem un 3 dzēšanām
  1. 2 3
      app/service/lesson.js

+ 2 - 3
app/service/lesson.js

@@ -323,8 +323,8 @@ class LessonService extends CrudService {
   }
 
   async toSendMsg(teacherInfo, type, term) {
-    console.error('in tosendmsg');
     if (teacherInfo) {
+      console.error(`type:${type};\n email:${teacherInfo.email}; \n qq:${teacherInfo.qq}`);
       let email;
       if (type === 'headteacher') {
         const { qq } = teacherInfo;
@@ -346,14 +346,13 @@ class LessonService extends CrudService {
       if (teacherUser) {
         const { openid } = teacherUser;
         if (openid) {
-          console.error(`${teacherInfo.name}-openid:${openid}`);
           // TODO 推送
           await this.ctx.service.weixin.sendTemplateDesign(
             this.ctx.app.config.REVIEW_TEMPLATE_ID,
             openid,
             '您有一个新的通知',
             '您有新的安排',
-            'null',
+            `欢迎参加由吉林省高等学校毕业生就业指导中心举办的“双困生培训会”第${term}期`,
             '感谢您的使用',
             'http://www.baidu.com'
           );