Giter Club home page Giter Club logo

Comments (4)

zfn215 avatar zfn215 commented on May 30, 2024

code: "442000002"
name: "东区街道" 他们对镇的查找和你给的code不同 请问可以解决下吗?

from address-parse.

zfn215 avatar zfn215 commented on May 30, 2024

基于iviewarea(2.0去做的回显) https://github.com/oyv1cent/iview-area-new

from address-parse.

akebe avatar akebe commented on May 30, 2024

你好 项目中使用的area数据来源于vant的area.js,刚才追溯了一下他这个数据应该是来源自中华人民共和国行政区划代码,这个数据源441900 | 东莞市,442000 | 中山市没有下级区划,猜测为规范为统一6位code他应该是采用了自定制编码,因为我这个项目目前也采用统一6位code规范,所以暂时无法兼容code: "442000002"这个的数据格式哦,不过解决方式也简单,你可以建个映射表统一处理下即可

const codes = {
  '442018': '442000002',
  ...,
};
const [result] = AddressParse.parse('广东省中山市东区街道');

if (codes[result.code]){
  result.code = codes[result.code];
} 

后面有时间我会抽空完善下这块

from address-parse.

zfn215 avatar zfn215 commented on May 30, 2024

from address-parse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.