From 9e7e2d83b4f60aca2157eba362f9e2929bf65e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Thu, 12 Aug 2021 10:45:23 +0800 Subject: [PATCH] * reset session for user avatar. --- module/index/js/index.js | 2 +- module/user/control.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/index/js/index.js b/module/index/js/index.js index edad5856cc..c7703c866c 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -463,7 +463,7 @@ { var $item = $(this); var isDivider = $item.hasClass('divider'); - var height = isDivider ? 17 : $item.outerHeight(); + var height = isDivider ? 17 : ($.cookie('hideMenu') ? 44 : 40); currentHeight += height; if(currentHeight > maxHeight) { diff --git a/module/user/control.php b/module/user/control.php index 3ecf43600a..180c34a732 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -1139,6 +1139,7 @@ class user extends control $this->file->cropImage($image->realPath, $image->realPath, $size->left, $size->top, $size->right - $size->left, $size->bottom - $size->top, $size->scaled ? $size->scaleWidth : 0, $size->scaled ? $size->scaleHeight : 0); $this->app->user->avatar = $image->webPath; + $this->session->set('user', $this->app->user); exit('success'); }