From a13b2a8d6e84662275ea913850e01be9b2ff31e5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 13 八月 2021 00:24:31 +0800 Subject: [PATCH] 2021-08-13 --- src/views/login/index.jsx | 26 +++++++++++++++----------- 1 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index 3ef55be..d34928c 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -198,15 +198,17 @@ componentDidMount () { // 鑾峰彇ip鍙婂煄甯備俊鎭� - let ipurl = window.atob('aHR0cHM6Ly9lcGMubWs5a$mkC5jbi93ZWJhcGkvaXBsb2M='.replace(/\$mk/ig, '')) - Api.directRequest(ipurl, 'get', null, 'true').then(res => { - if (!res || !res.location) return - sessionStorage.setItem('city', res.location) - this.setState({ - ipAddress: res.ip || '', - city: res.location - }) - }) + // 鑾峰彇鍦扮悊浣嶇疆锛氳胺姝屾棤鏁堬紝璋锋瓕瀹氫綅闇�瑕佸皢闄勮繎鐨勬棤绾夸俊鎭彂閫佸埌璋锋瓕鐨勬湇鍔″櫒锛屾煡璇㈠畾浣嶄俊鎭紝鍥藉唴鏃犳硶杩炴帴鍒拌胺姝屾湇鍔″櫒锛岀伀鐙愬彲浠ヨ幏鍙栫粡绾害 + // let ipurl = window.atob('aHR0cHM6Ly9lcGMubWs5a$mkC5jbi93ZWJhcGkvaXBsb2M='.replace(/\$mk/ig, '')) + // Api.directRequest(ipurl, 'get', null, 'true').then(res => { + // if (!res || !res.location) return + // sessionStorage.setItem('city', res.location) + // this.setState({ + // ipAddress: res.ip || '', + // city: res.location + // }) + // }) + sessionStorage.setItem('city', '') // ip鍦板潃瀹氫綅鏆傚仠浣跨敤 const timeStamp = new Date().getTime() const _authUrl = window.location.href.split('#')[0] + 'AuthCode' @@ -215,13 +217,15 @@ authCode = authCode ? authCode.split(',') : [] let index = authCode.findIndex(key => key === _s) - if (index > -1) { + let key = md5(window.GLOB.appId + 'minke_software' + window.GLOB.appkey).toUpperCase().substr(-6) + + if (index > -1 || window.GLOB.licenseKey === key) { this.setState({ auth: true }) } - if (index === -1 || index > 5) { + if (window.GLOB.licenseKey !== key && (index === -1 || index > 5)) { let _appId = window.GLOB.appId if (options.sysType === 'cloud') { // 浜戠浣跨敤绯荤粺閰嶇疆appid -- Gitblit v1.8.0