| | |
| | | |
| | | 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 || '') |
| | | |