Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getCurrentAddress()偶尔返回的city.name错误,返回的值是district.name #3

Open
sesntt opened this issue Dec 25, 2019 · 5 comments

Comments

@sesntt
Copy link

sesntt commented Dec 25, 2019

getCurrentAddress()偶尔返回的city.name错误,返回的值是district.name

@JasonBoy
Copy link
Owner

能有重现的例子么?

@sesntt
Copy link
Author

sesntt commented Dec 27, 2019

是偶尔出现的,目前100条数据,也就出现了5次左右,返回的code是正常的,就是name不对;
代码如下:
location.changeLocation(selectSsq[0], selectSsq[1], selectSsq[2]);
let selectLocation = location.getCurrentAddress();
formData.provinceCode = selectLocation.province.code;
formData.provinceName = selectLocation.province.name;
formData.cityCode = selectLocation.city.code;
formData.cityName = selectLocation.city.name;
formData.areaCode = selectLocation.district.code;
formData.areaName = selectLocation.district.name;

@JasonBoy
Copy link
Owner

JasonBoy commented Dec 31, 2019

出现错误的是哪些城市/区错了?直接调方法100次,还是通过页面联动点击那种?

@sesntt
Copy link
Author

sesntt commented Jan 2, 2020

通过页面联动,在提交数据时,获取到选择的省市区code,再执行我发的那段代码,获取省市区名字,目前遇到出现错误的有:
陕西省/新城区/新城区、江苏省/海陵区/海陵区、江苏省/鼓楼区/鼓楼区、安徽省/镜湖区/镜湖区、贵州省/南明区/南明区、广东省/香洲区/香洲区、北京市/东城区/东城区

以上城市/区是偶尔出现,不是每次都出现

@JasonBoy
Copy link
Owner

JasonBoy commented Jan 4, 2020

试了几次重现不了 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants