Commit c1629a12 by zhangleyuan

feat:处理切换学院

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