Browse Source

Merge branch 'master' of http://192.168.1.41:3000/maixinrong/Calculation

MaiXinRong 5 years ago
parent
commit
1640aab5da
1 changed files with 6 additions and 1 deletions
  1. 6 1
      app/service/project_account.js

+ 6 - 1
app/service/project_account.js

@@ -363,7 +363,12 @@ module.exports = app => {
             }
             data.id = parseInt(id);
             const operate = await this.db.update(this.tableName, data);
-            return operate.affectedRows > 0;
+            const result = operate.affectedRows > 0;
+            if (result) {
+                // 存入session
+                this.ctx.session.sessionUser.name = data.name;
+            }
+            return result;
         }