From 28b258f1cdb7f62fb31dead3bb98a9a160fdba6f Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 27 Sep 2019 11:27:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=97=B6=E9=97=B4=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMIndexHOC.js | 4 ++-- public/react/src/modules/user/AccountPage.js | 2 +- public/react/src/modules/user/usersInfo/InfosBanner.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 4d2e4fbba..d4142bd06 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -89,8 +89,8 @@ export function TPMIndexHOC(WrappedComponent) { // header里面需要有user initCommonState(user) { - // 更新头像后,需要改变参数,不然会被图片缓存影响到 - const newUser = Object.assign({}, {...user}, { image_url: `${user.image_url}?t=${new Date().getTime()}`}); + // 更新头像后,需要改变参数,不然会被图片缓存影响到 --> 后台已加 ?t=${new Date().getTime() + const newUser = Object.assign({}, {...user}, { image_url: `${user.image_url}`}); this.setState({ user: newUser, current_user: newUser diff --git a/public/react/src/modules/user/AccountPage.js b/public/react/src/modules/user/AccountPage.js index 3d34b3e13..7268bd7bb 100644 --- a/public/react/src/modules/user/AccountPage.js +++ b/public/react/src/modules/user/AccountPage.js @@ -60,7 +60,7 @@ class AccountPage extends Component { // "authentication": "uncertified", // "uncertified" | "applying" | "certified" this.setState({ basicInfo: Object.assign({}, {...result.data}, { - avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`, + avatar_url: `${result.data.avatar_url}`, gender: result.data.gender == null || result.data.gender == undefined ? 0 : result.data.gender }) }) diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js index a3b834493..40732d757 100644 --- a/public/react/src/modules/user/usersInfo/InfosBanner.js +++ b/public/react/src/modules/user/usersInfo/InfosBanner.js @@ -39,7 +39,7 @@ class InfosBanner extends Component{
{data && data.name}