From 33b6028716d54115fdae0a53769243382c2c86e1 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Fri, 14 Apr 2023 10:28:17 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E7=BB=9F=E4=B8=80=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E8=B7=B3=E8=BD=AC=E5=90=8E=E8=A7=A3=E6=9E=90=E5=A4=B4?= =?UTF-8?q?=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/login.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/pages/login/login.js b/src/pages/login/login.js index c21ff2fd..e60c49d3 100644 --- a/src/pages/login/login.js +++ b/src/pages/login/login.js @@ -18,10 +18,14 @@ export default class App extends Component { componentWillMount() { const tokenString = this.props.location.search; - const token = tokenString.substring(tokenString.indexOf('=') + 1); + const token = tokenString.substring( + tokenString.indexOf('=') + 1, + tokenString.indexOf('&') + ); + const head = tokenString.substring(tokenString.indexOf('&') + 6); /* 判断是否有token */ if (tokenString && tokenString.indexOf('=') > -1) { - this.onSubmit(token); + this.onSubmit(token, head); return; } /* 调整统一登录平台 */ @@ -48,8 +52,8 @@ export default class App extends Component { }); } - onSubmit(authorization) { - postLoginCode({ authorization }) + onSubmit(authorization, head) { + postLoginCode({ authorization, head }) .then((res) => { handelResponse( res,