mirror of https://github.com/ElemeFE/element
chore: use eleme.cn as domain (#15139)
parent
116b01d9ff
commit
01a4118c51
|
@ -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');
|
||||||
|
|
Loading…
Reference in New Issue