From d3914eb6f67bd71ba54d1558be50cd6f6145e6d9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 01 十二月 2022 10:39:56 +0800 Subject: [PATCH] 2022-12-01 --- src/views/login/index.jsx | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index e4e3c08..faa33c5 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -499,6 +499,21 @@ Api.getTouristMsg().then(result => { if (result.status) { + if (result.website && process.env.NODE_ENV === 'production') { + let website = result.website.replace(/http(s)?:\/\/|\/$/ig, '').toLowerCase() + let current = window.GLOB.baseurl.replace(/http(s)?:\/\/|\/$/ig, '').toLowerCase() + + if (website !== current) { + try { + window.history.replaceState(null, null, result.website.replace(/\/$/ig, '') + '/admin/index.html#/login') + window.location.reload() + } catch(e) { + window.location.href = result.website.replace(/\/$/ig, '') + '/admin/index.html#/login' + } + return + } + } + sessionStorage.setItem('visitorUserID', result.UserID || '') sessionStorage.setItem('visitorLoginUID', result.LoginUID || '') -- Gitblit v1.8.0