Skip to content

Commit

Permalink
chore: use eleme.cn as domain (ElemeFE#15139)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyoung authored Apr 16, 2019
1 parent 116b01d commit 01a4118
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@
const href = location.href;
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(() => {
if (this.lang !== 'zh-CN') return;
this.$confirm('建议大陆用户访问部署在国内的站点,是否跳转?', '提示')
.then(() => {
location.href = location.href
.replace('https:', 'http:')
.replace('element.', 'element-cn.');
location.replace('https://element.eleme.cn');
})
.catch(() => {
localStorage.setItem('PREFER_GITHUB', 'true');
Expand Down

0 comments on commit 01a4118

Please sign in to comment.