mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-06 20:02:38 +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;
|
||||
});
|
||||
|
||||
fetch('https://myip.ipip.net/json').then(e=>e.json()).then(e=>{
|
||||
if(e.data.location[0] == '中国' && location.hostname != 'k5.vicicode.cn'){
|
||||
if(!(localStorage.getItem('cnNotice') && parseInt(localStorage.getItem('cnNotice') ?? '') > new Date().getTime() - 604800000)){
|
||||
if(location.hostname === 'k5.vicicode.com'){
|
||||
fetch('/cdn-cgi/trace').then(e=>e.text()).then(e=>{
|
||||
if(e.indexOf('loc=CN') !== -1){
|
||||
DialogPlugin.confirm({
|
||||
header: '提示',
|
||||
body: '🚀 国内用户推荐访问国内镜像以获得极速体验~',
|
||||
|
@ -91,6 +91,7 @@
|
|||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue