chooseaddress
地址选择器
API
pick
since v28.0.2
pick(params, callback) - @params
- @callback
ok {boolean}
: true 表示成功, false表示失败data {Object}
: 数据对象province {string}
: 省city {number}
: 市district {string}
: 区town {string}
: 街道address {string}
: 地址lat {string}
: 纬度lng {number}
: 经度locationType {string}
: 坐标系类型(GCJ-02)phoneNo {string}
: 手机号码userName {string}
: 收货人姓名gender {number}
: 性别 (0男 1女)
const chooseaddress = weex.requireModule('chooseaddress');
chooseaddress.pick({
}, e => {
if(e.ok) {
this.province = e.data.province;
this.city = e.data.city;
this.district = e.data.district;
this.town = e.data.town;
this.address = e.data.address;
this.phoneNo = e.data.phoneNo;
this.userName = e.data.userName;
this.gender = (e.data.gender == 0 ? '先生' : '女士');
}
});