Skip to content

Commit

Permalink
Revert "ip接口更新"
Browse files Browse the repository at this point in the history
This reverts commit 47ebee2.
  • Loading branch information
ljxi committed Nov 5, 2023
1 parent 47ebee2 commit a869b54
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/IPinfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ const provinceMatch=(str:string)=>{
async function getLocalIp() {
if(props.isVisible){
try {
const response = await fetch('https://api.mir6.com/api/ip_json', { referrerPolicy: 'no-referrer' });
const response = await fetch('https://ip.useragentinfo.com/json', { referrerPolicy: 'no-referrer' });
let resp = await response.json();
let localInfo:any={
ip:resp['data']['ip'],
isp:resp['data']['isp'],
isChinaMainland:provinceMatch(resp['data']['province'])?true:false,
province:provinceMatch(resp['data']['province']),
city:resp['data']['city'].replace(/$/, ""),
area:resp['data']['districts']
ip:resp['ip'],
isp:resp['isp'],
isChinaMainland:provinceMatch(resp['province'])?true:false,
province:provinceMatch(resp['province']),
city:resp['city'].replace(/$/, ""),
area:resp['area']
}
info['localInfo']=localInfo
if(props.IPinfo){
Expand Down

0 comments on commit a869b54

Please sign in to comment.