mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-08 04:44:29 +00:00
update
This commit is contained in:
parent
966b76b829
commit
9ba81c36cb
1 changed files with 6 additions and 5 deletions
11
src/App.vue
11
src/App.vue
|
@ -73,9 +73,9 @@
|
||||||
return lang;
|
return lang;
|
||||||
});
|
});
|
||||||
|
|
||||||
fetch('https://myip.ipip.net/json').then(e=>e.json()).then(e=>{
|
if(location.hostname === 'k5.vicicode.com'){
|
||||||
if(e.data.location[0] == '中国' && location.hostname != 'k5.vicicode.cn'){
|
fetch('/cdn-cgi/trace').then(e=>e.text()).then(e=>{
|
||||||
if(!(localStorage.getItem('cnNotice') && parseInt(localStorage.getItem('cnNotice') ?? '') > new Date().getTime() - 604800000)){
|
if(e.indexOf('loc=CN') !== -1){
|
||||||
DialogPlugin.confirm({
|
DialogPlugin.confirm({
|
||||||
header: '提示',
|
header: '提示',
|
||||||
body: '🚀 国内用户推荐访问国内镜像以获得极速体验~',
|
body: '🚀 国内用户推荐访问国内镜像以获得极速体验~',
|
||||||
|
@ -91,6 +91,7 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue