소스 검색

修改资料更新底部名称

laiguoran 5 년 전
부모
커밋
bacdf344cb
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  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;
         }