您的位置:首页 > 博客中心 > 前端开发 >

uni-app调用微信收货地址的原生界面,并返回用户填写的地址信息到上一个页面

时间:2022-09-07 11:14

// 获取用户收货地址。调起用户编辑收货地址原生界面,并在编辑完成后返回用户选择的地址
    chooseAddr(){
        const that = this
        uni.chooseAddress({
            success(res){
            that.inputData.ToAddress = res.provinceName + res.cityName;     // 收件地址
            that.inputData.addrDetail = res.countyName+res.detailInfo;     // 详细地址
            that.inputData.Recipient = res.userName;                      // 收货人
            that.inputData.phoneNumber = res.telNumber;                    // 联系电话            
        }
    })        

注意:我这里的that.inputtData.xxx 是我根据我的需求要返回给上一个页面展示并进行保存的

本类排行

今日推荐

热门手游