Commit 32c9b4ed authored by 周宏民's avatar 周宏民

fix: 修改 登录

parent a531419c
Pipeline #89851 passed with stages
...@@ -924,7 +924,7 @@ class Login { ...@@ -924,7 +924,7 @@ class Login {
if (response && response.getMe && response.getMe.length) { if (response && response.getMe && response.getMe.length) {
const tk = response.getMe[0].Token; const tk = response.getMe[0].Token;
self.globalConfig.token = tk; self.globalConfig.token = tk;
// Cookies.set('token', tk); Cookies.set('token', tk);
let url = window.location.href; // 获取当前页面的url let url = window.location.href; // 获取当前页面的url
if (url.indexOf('&code') !== -1) { if (url.indexOf('&code') !== -1) {
// 判断是否存在参数 // 判断是否存在参数
......
...@@ -41,14 +41,15 @@ const Login = forwardRef((props, _ref) => { ...@@ -41,14 +41,15 @@ const Login = forwardRef((props, _ref) => {
const history = useHistory(); const history = useHistory();
const [action, setAction] = useState(() => new LoginAction(Object.assign({}, props, { history }), setVisible, true)); const [action, setAction] = useState(() => new LoginAction(Object.assign({}, props, { history }), setVisible, true));
let { ddCode } = props.global; let { ddCode } = props.global;
const loginMode = Cookies.get('loginMode') || null; if (originType) {
if (loginMode && loginMode === 'iotWechat') ddCode = null; Cookies.set('loginMode', LOGIN_WAY[LOGIN_DISPLAY.WeCom], {
if (type === LOGIN_DISPLAY.WeCom) {
Cookies.set('loginMode', isRQcodeFunc(type) ? LOGIN_WAY[LOGIN_DISPLAY.Account] : LOGIN_WAY[LOGIN_DISPLAY.WeCom], {
expires: 5 * 60 * 1000, expires: 5 * 60 * 1000,
path: '/', path: '/',
}); });
} }
const loginMode = Cookies.get('loginMode') || null;
if (loginMode && loginMode === 'iotWechat') ddCode = null;
const handleSubmit = values => { const handleSubmit = values => {
/* eslint-disable */ /* eslint-disable */
action && action &&
...@@ -97,8 +98,6 @@ const Login = forwardRef((props, _ref) => { ...@@ -97,8 +98,6 @@ const Login = forwardRef((props, _ref) => {
}, [props.loginMode]); }, [props.loginMode]);
useEffect(() => { useEffect(() => {
if (ddCode && loginMode === 'qywx') {
} else {
dom.removeClass(timeRef.current, styles.caseHide); dom.removeClass(timeRef.current, styles.caseHide);
dom.addClass(timeRef.current, 'animate__fadeIn'); dom.addClass(timeRef.current, 'animate__fadeIn');
...@@ -109,7 +108,6 @@ const Login = forwardRef((props, _ref) => { ...@@ -109,7 +108,6 @@ const Login = forwardRef((props, _ref) => {
dom.addClass(footerRef.current, 'animate__slideInUp'); dom.addClass(footerRef.current, 'animate__slideInUp');
dom.removeClass(titleRef.current, styles.caseHide); dom.removeClass(titleRef.current, styles.caseHide);
dom.addClass(titleRef.current, 'animte__fadeInUp'); dom.addClass(titleRef.current, 'animte__fadeInUp');
}
return () => {}; return () => {};
}, []); }, []);
useEffect(() => { useEffect(() => {
......
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