Browse Source

微信和审批bug

laiguoran 4 years ago
parent
commit
0f52d64822
2 changed files with 7 additions and 1 deletions
  1. 6 0
      app/controller/wechat_controller.js
  2. 1 1
      app/service/stage_audit.js

+ 6 - 0
app/controller/wechat_controller.js

@@ -134,6 +134,12 @@ module.exports = app => {
             }
             }
         }
         }
 
 
+        async urlchange(ctx) {
+            // 设置用户微信登录项目,跳转到对应wap页面
+            co
+            ctx.redirect(ctx.query.url);
+        }
+
         async oauthTxt(ctx) {
         async oauthTxt(ctx) {
             ctx.body = 't3MkWAMqplVxPjmr';
             ctx.body = 't3MkWAMqplVxPjmr';
         }
         }

+ 1 - 1
app/service/stage_audit.js

@@ -294,7 +294,7 @@ module.exports = app => {
                 // 添加推送
                 // 添加推送
                 const noticeContent = await this.getNoticeContent(pid, audit.tid, stageId)
                 const noticeContent = await this.getNoticeContent(pid, audit.tid, stageId)
                 const records = [{ pid, type: pushType.stage, uid: this.ctx.stage.user_id, status: auditConst.status.checkNo, content: noticeContent }]
                 const records = [{ pid, type: pushType.stage, uid: this.ctx.stage.user_id, status: auditConst.status.checkNo, content: noticeContent }]
-                ctx.stage.auditors.forEach( audit => {
+                this.ctx.stage.auditors.forEach( audit => {
                     records.push({ pid, type: pushType.stage, uid: audit.aid, status: auditConst.status.checkNo, content: noticeContent })
                     records.push({ pid, type: pushType.stage, uid: audit.aid, status: auditConst.status.checkNo, content: noticeContent })
                 })
                 })
                 await transaction.insert('zh_notice', records);
                 await transaction.insert('zh_notice', records);