tt.chooseAddress

2020-02-12 17:28 更新

調(diào)起用戶編輯收貨地址原生界面,并在編輯完成后返回用戶選擇的地址

提示
該 API 需要用戶授權(quán)方可調(diào)用,詳細(xì)信息可參考用戶授權(quán)


參數(shù)

object 類型,屬性如下:

屬性類型默認(rèn)值必填說(shuō)明最低支持版本
successfunction接口調(diào)用成功的回調(diào)函數(shù)1.0.0
completefunction接口調(diào)用結(jié)束的回調(diào)函數(shù)(調(diào)用成功、失敗都會(huì)執(zhí)行)1.0.0
failfunction接口調(diào)用失敗的回調(diào)函數(shù)1.0.0

success 返回參數(shù)說(shuō)明

object 類型,屬性如下:

屬性類型說(shuō)明
errMsgstring調(diào)用結(jié)果
userNamestring收貨人姓名
provinceNamestring國(guó)標(biāo)收貨地址第一級(jí)地址
cityNamestring國(guó)標(biāo)收貨地址第二級(jí)地址
countyNamestring國(guó)標(biāo)收貨地址第三級(jí)地址
detailInfostring詳細(xì)收貨地址信息
telNumberstring收貨人手機(jī)號(hào)碼


代碼示例

tt.chooseAddress({
  success(res) {
    console.log(res.userName);
    console.log(res.provinceName);
    console.log(res.cityName);
    console.log(res.countyName);
    console.log(res.detailInfo);
    console.log(res.telNumber);
  }
});
以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)