Commit 01a4118c authored by hetech's avatar hetech Committed by GitHub

chore: use eleme.cn as domain (#15139)

parent 116b01d9
...@@ -60,14 +60,13 @@ ...@@ -60,14 +60,13 @@
const href = location.href; const href = location.href;
const preferGithub = localStorage.getItem('PREFER_GITHUB'); const preferGithub = localStorage.getItem('PREFER_GITHUB');
if (href.indexOf('element-cn') > -1 || href.indexOf('element.faas') > -1 || preferGithub) return; const cnHref = href.indexOf('eleme.cn') > -1 || href.indexOf('element-cn') > -1 || href.indexOf('element.faas') > -1;
if (cnHref || preferGithub) return;
setTimeout(() => { setTimeout(() => {
if (this.lang !== 'zh-CN') return; if (this.lang !== 'zh-CN') return;
this.$confirm('建议大陆用户访问部署在国内的站点,是否跳转?', '提示') this.$confirm('建议大陆用户访问部署在国内的站点,是否跳转?', '提示')
.then(() => { .then(() => {
location.href = location.href location.replace('https://element.eleme.cn');
.replace('https:', 'http:')
.replace('element.', 'element-cn.');
}) })
.catch(() => { .catch(() => {
localStorage.setItem('PREFER_GITHUB', 'true'); localStorage.setItem('PREFER_GITHUB', 'true');
......
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