diff --git a/src/api/api.ts b/src/api/api.ts index 47e854b..e599e81 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -7,7 +7,7 @@ class getdata { return await api.post('https://api.shagain.club/textserver', { url }); } async get_country(ip: string) { - return await api.get(`https://ip.useragentinfo.com/json?ip=${ip}`); + return await api.post('https://api.shagain.club/api.php?type=searchip', { ip }); } } export { getdata }; diff --git a/src/pages/CreateLink.vue b/src/pages/CreateLink.vue index 8cb2be4..bec7efd 100644 --- a/src/pages/CreateLink.vue +++ b/src/pages/CreateLink.vue @@ -49,7 +49,8 @@ export default defineComponent({ outlink.value = '' for (let index = 0; index < array.length; index++) { api.get_country(array[index]).then(res => { - let name = res.data.country == '中国' ? res.data.province : res.data.country + // let name = res.data.country == '中国' ? res.data.province : res.data.country + let name = res.data.country obj.ps = name + array[index] obj.add = array[index] outlink.value += 'vmess://' + encode(JSON.stringify(obj)) + '\n'