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

fix: 修改 登录

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