uniapp——使用微信地址

<view class="use" @click="chooseAddress">使用微信收货地址</view>
data() {
	return {
		// 默认地址
		checked: true,
		// 城市
		cityValue: [],
		model: {
			name: '',
			mobile: '',
			address: '',
			infos: '',
			is_default: 1,
			id: 0,
		},
	};
},


chooseAddress() {
	uni.chooseAddress({
		success: (res) => {
			let data = {
				name: res.userName,
				mobile: res.telNumber,
				address: `${res.provinceName}-${res.cityName}-${res.countyName}`,
				infos: res.detailInfo,
			}
			this.cityValue = [res.provinceName, res.cityName, res.countyName]
			this.model = this.$common.setObject(this.model, data)
		},
		fail: (err) => {
			console.log(err);
		}
	})
},

相关推荐

  1. uniapp——使用地址

    2024-04-26 17:38:01       28 阅读
  2. uniapp使用登录

    2024-04-26 17:38:01       24 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-26 17:38:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-26 17:38:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-26 17:38:01       82 阅读
  4. Python语言-面向对象

    2024-04-26 17:38:01       91 阅读

热门阅读

  1. GRUB故障转储——/etc/kdump.conf指定故障转储分区

    2024-04-26 17:38:01       32 阅读
  2. git强制覆盖本地命令

    2024-04-26 17:38:01       30 阅读
  3. Ubuntu编译AOSP Android9

    2024-04-26 17:38:01       31 阅读
  4. Uniapp 跨页面传复杂参、传对象

    2024-04-26 17:38:01       27 阅读