| | |
| | | <template> |
| | | <view class="list"> |
| | | <view class="list-item"> |
| | | <view class="list-item" v-for="(item, index) in list" :key="index"> |
| | | <view class="list-item-left"> |
| | | <view class="list-item-a"> |
| | | <text>李金平</text> |
| | |
| | | </view> |
| | | <image src="/static/icon/address_ic_edit@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <view class="button"> |
| | | <view class="button" @click="add"> |
| | | <image src="/static/images/icon_add_dz@2x.png" mode="widthFix"></image> |
| | | <text>添加收货地址</text> |
| | | </view> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | |
| | | list: [] |
| | | }; |
| | | }, |
| | | onLoad(option) { |
| | | |
| | | this.getAddr() |
| | | }, |
| | | methods: { |
| | | |
| | | getAddr() { |
| | | this.$u.api.findListAddr() |
| | | .then(res => { |
| | | if (res.code === 200) { |
| | | this.list = res.data |
| | | } |
| | | }) |
| | | }, |
| | | add() { |
| | | uni.navigateTo({ |
| | | url: '/pages/new-address/new-address' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |