Skip to content

Commit

Permalink
api接口维护
Browse files Browse the repository at this point in the history
  • Loading branch information
ljxi committed Nov 8, 2023
1 parent 41ae105 commit f79b046
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://ip.useragentinfo.com/json', { referrerPolicy: 'no-referrer' });
const response = await fetch('https://pubstatic.b0.upaiyun.com/?_upnode', { referrerPolicy: 'no-referrer' });
let resp = await response.json();
let localInfo:any={
ip:resp['ip'],
isp:resp['isp'],
isChinaMainland:provinceMatch(resp['province'])?true:false,
province:provinceMatch(resp['province']),
city:resp['city'].replace(/$/, ""),
area:resp['area']
ip:resp['remote_addr'],
isp:resp['remote_addr_location']['isp'],
isChinaMainland:provinceMatch(resp['remote_addr_location']['province'])?true:false,
province:provinceMatch(resp['remote_addr_location']['province']),
city:resp['remote_addr_location']['city'].replace(/$/, ""),
area:''
}
info['localInfo']=localInfo
if(props.IPinfo){
Expand Down

0 comments on commit f79b046

Please sign in to comment.