From 1779677cece5864b62a65df4b01a4a69496e149a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 13 五月 2025 20:51:15 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/views/login/index.jsx | 81 +++++++++++++++++++++++++--------------- 1 files changed, 50 insertions(+), 31 deletions(-) diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index e604a7c..c6ad6c2 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -161,12 +161,31 @@ } } - let iframe = sessionStorage.getItem('iframe') - if (iframe) { - sessionStorage.removeItem('iframe') - this.props.history.replace(iframe.replace(/@loginuid@/, res.LoginUID)) + if (['20210626201522493D7AD7591D7A547278685', '20210626201956190740F1DF384914A3CA9EF'].includes(window.GLOB.appkey) && process.env.NODE_ENV === 'production' && param.username !== 'IF_DMS_APP') { + let _param = { + UserName: param.username, + Password: param.password, + BasePath: '/' + } + Api.loginAndRedirect(_param).then(result => { + if (result.IsError) { + this.setState({ + isDisabled: false + }) + message.warning('鐧诲綍澶辫触,鐢ㄦ埛鍚嶆垨瀵嗙爜閿欒!') + } else { + let lang = sessionStorage.getItem('lang') !== 'en-US' ? '/zh-CN' : '/en-US' + window.location.replace(document.location.origin + lang + '/Home/Index') + } + }) } else { - this.props.history.replace('/main') + let iframe = sessionStorage.getItem('iframe') + if (iframe) { + sessionStorage.removeItem('iframe') + this.props.history.replace(iframe.replace(/@loginuid@/, res.LoginUID)) + } else { + this.props.history.replace('/main') + } } } else if (res.ErrCode === 'Need_Get_Appkey' && window.GLOB.sysType === 'SSO') { message.warning('搴旂敤灏氭湭鍒涘缓锛岃鍚戜簯绔悓姝ュ簲鐢紒') @@ -795,32 +814,32 @@ } // positecgroup - // if (res.users_upt === 'true' && window.GLOB.systemType === 'production') { - // Api.genericInterface({ - // func: 's_Get_local_u_deleted', - // users_upt_date: res.users_upt_date, - // userid: result.UserID, - // LoginUID: result.LoginUID - // }).then(localres => { - // if (!localres.status) return - // Api.getSystemConfig({ - // func: 's_get_sso_u_create', - // user_ids: localres.user_ids, - // user_ids_local: localres.user_ids_local, - // users_upt_date: localres.users_upt_date, - // userid: result.UserID, - // LoginUID: result.LoginUID - // }).then(ssores => { - // if (!ssores.status) return - // Api.genericInterface({ - // func: 's_get_local_u_create', - // user_ids_local: ssores.user_ids_local, - // userid: result.UserID, - // LoginUID: result.LoginUID - // }) - // }) - // }) - // } + if (['20210626201522493D7AD7591D7A547278685', '20210626201956190740F1DF384914A3CA9EF'].includes(window.GLOB.appkey) && res.users_upt === 'true' && window.GLOB.systemType === 'production') { + Api.genericInterface({ + func: 's_Get_local_u_deleted', + users_upt_date: res.users_upt_date, + userid: result.UserID, + LoginUID: result.LoginUID + }).then(localres => { + if (!localres.status) return + Api.getSystemConfig({ + func: 's_get_sso_u_create', + user_ids: localres.user_ids, + user_ids_local: localres.user_ids_local, + users_upt_date: localres.users_upt_date, + userid: result.UserID, + LoginUID: result.LoginUID + }).then(ssores => { + if (!ssores.status) return + Api.genericInterface({ + func: 's_get_local_u_create', + user_ids_local: ssores.user_ids_local, + userid: result.UserID, + LoginUID: result.LoginUID + }) + }) + }) + } } else { message.warning(res.message) } -- Gitblit v1.8.0