Просмотр исходного кода

修改资料更新底部名称

laiguoran 5 лет назад
Родитель
Сommit
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;
         }