区号自动获取
This commit is contained in:
@@ -1022,17 +1022,22 @@ export async function getaddr() {
|
||||
const res = await get<any>('ip');
|
||||
const gj = res.data.address.split("|")[0];
|
||||
const lan = getValue("Lanvuage");
|
||||
const qh = await get<any>('countryCode', {
|
||||
longitude: res.data.content.point.x,
|
||||
latitude: res.data.content.point.y
|
||||
});
|
||||
console.log(qh)
|
||||
if(lan != null && lan){
|
||||
if(gj == "CN"){
|
||||
return ['人民币¥'];
|
||||
return {hb: '人民币¥', qh};
|
||||
}else {
|
||||
return [ '美元$']
|
||||
return {hb: '美元$'}
|
||||
}
|
||||
}else{
|
||||
if(gj == "CN"){
|
||||
return ["zh", "中文", '人民币¥'];
|
||||
return {yy: "zh", yyx: "中文", hb: '人民币¥', qh};
|
||||
}else {
|
||||
return ['en', 'English', '美元$']
|
||||
return {yy: 'en', yyx: 'English', hb: '美元$', qh}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user