Commit 9e01602e by zhangleyuan

feat:处理切换学院

parent f62aa471
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-04-27 20:35:34 * @Date: 2020-04-27 20:35:34
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-23 10:16:30 * @LastEditTime: 2021-06-23 14:14:20
* @Description: * @Description:
*/ */
...@@ -65,6 +65,10 @@ if (getParameterByName('code') && isWeiXin()) { ...@@ -65,6 +65,10 @@ if (getParameterByName('code') && isWeiXin()) {
User.setUserId(res.result.loginInfo.userId); User.setUserId(res.result.loginInfo.userId);
User.setToken(res.result.loginInfo.xmToken); User.setToken(res.result.loginInfo.xmToken);
User.setEnterpriseId(res.result.enterpriseId); User.setEnterpriseId(res.result.enterpriseId);
window.currentStoreUserInfo = {}
window.currentStoreUserInfo.userId = res.result.loginInfo.userId;
window.currentStoreUserInfo.token = res.result.loginInfo.xmToken;
window.currentStoreUserInfo.enterpriseId = res.result.enterpriseId;
mount() mount()
}) })
} else { } else {
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2019-09-10 18:26:03 * @Date: 2019-09-10 18:26:03
* @LastEditors: fusanqiasng * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-22 15:00:53 * @LastEditTime: 2021-06-23 15:09:26
* @Description: * @Description:
*/ */
import React, { useRef, useContext, useEffect, useState } from 'react'; import React, { useRef, useContext, useEffect, useState } from 'react';
......
...@@ -53,10 +53,14 @@ function Login(props) { ...@@ -53,10 +53,14 @@ function Login(props) {
userId, userId,
}; };
BaseService.getWXWorkLoginNoCheck(params).then((res) => { BaseService.getWXWorkLoginNoCheck(params).then((res) => {
User.setUserId(res.result.loginInfo.userId); User.setUserId(res.result.loginInfo.userId)
User.setToken(res.result.loginInfo.xmToken); User.setToken(res.result.loginInfo.xmToken)
User.setEnterpriseId(res.result.enterpriseId); User.setEnterpriseId(res.result.enterpriseId)
User.setIdentifier(res.result.identifier); window.currentStoreUserInfo = {}
window.currentStoreUserInfo.userId = res.result.loginInfo.userId;
window.currentStoreUserInfo.token = res.result.loginInfo.xmToken;
window.currentStoreUserInfo.enterpriseId = res.result.enterpriseId;
User.setIdentifier(res.result.identifier)
window.RCHistory.push({ window.RCHistory.push({
pathname: `/switch-route`, pathname: `/switch-route`,
}); });
......
...@@ -6,7 +6,7 @@ import { PATH } from '@/domains/basic-domain/constants'; ...@@ -6,7 +6,7 @@ import { PATH } from '@/domains/basic-domain/constants';
import './WechatLogin.less'; import './WechatLogin.less';
const Logo = require('@/common/images/logo.png'); const Logo = require('@/common/images/logo.png');
declare var location: any; declare var location: any;
declare var window: any;
export default function WechatLogin(props: any) { export default function WechatLogin(props: any) {
const freshTime = 60; const freshTime = 60;
const init: any = null; const init: any = null;
...@@ -75,6 +75,10 @@ export default function WechatLogin(props: any) { ...@@ -75,6 +75,10 @@ export default function WechatLogin(props: any) {
User.setUserId(_res.result.loginInfo.userId); User.setUserId(_res.result.loginInfo.userId);
User.setToken(_res.result.loginInfo.xmToken); User.setToken(_res.result.loginInfo.xmToken);
User.setEnterpriseId(_res.result.enterpriseId); User.setEnterpriseId(_res.result.enterpriseId);
window.currentStoreUserInfo = {}
window.currentStoreUserInfo.userId = _res.result.loginInfo.userId;
window.currentStoreUserInfo.token = _res.result.loginInfo.xmToken;
window.currentStoreUserInfo.enterpriseId = _res.result.loginInfo.enterpriseId;
User.setIdentifier(_res.result.identifier); User.setIdentifier(_res.result.identifier);
window.RCHistory.push({ window.RCHistory.push({
pathname: `/switch-route`, pathname: `/switch-route`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment