Commit c1629a12 by zhangleyuan

feat:处理切换学院

parent 2c7387fc
...@@ -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 {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2019-09-10 18:26:03 * @Date: 2019-09-10 18:26:03
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @LastEditTime: 2021-06-23 10:08:48 * @LastEditTime: 2021-06-23 14:04:57
* @Description: * @Description:
*/ */
import React, { useRef, useContext, useEffect, useState } from "react"; import React, { useRef, useContext, useEffect, useState } from "react";
......
...@@ -54,6 +54,10 @@ function Login(props) { ...@@ -54,6 +54,10 @@ function Login(props) {
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;
User.setIdentifier(res.result.identifier) User.setIdentifier(res.result.identifier)
window.RCHistory.push({ window.RCHistory.push({
pathname: `/switch-route` pathname: `/switch-route`
...@@ -140,6 +144,9 @@ function Login(props) { ...@@ -140,6 +144,9 @@ function Login(props) {
} else { } else {
User.setUserId(res.result.userId) User.setUserId(res.result.userId)
User.setToken(res.result.xmToken) User.setToken(res.result.xmToken)
window.currentStoreUserInfo = {}
window.currentStoreUserInfo.userId = res.result.userId;
window.currentStoreUserInfo.token = res.result.xmToken;
window.RCHistory.push({ window.RCHistory.push({
pathname: `/switch-route` pathname: `/switch-route`
}) })
......
...@@ -78,6 +78,10 @@ export default function WechatLogin(props: any) { ...@@ -78,6 +78,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