| | |
| | | <template> |
| | | <view class="list"> |
| | | <view class="list-item" v-for="(item, index) in list" :key="index"> |
| | | <view class="list-item" v-for="(item, index) in list" :key="index" @click="selectRow(item)"> |
| | | <view class="list-item-left"> |
| | | <view class="list-item-a"> |
| | | <text>{{item.name}}</text> |
| | |
| | | </view> |
| | | <view class="list-item-b">{{item.areaDetail}}{{item.addr}}</view> |
| | | </view> |
| | | <image src="/static/icon/address_ic_edit@2x.png" mode="widthFix" @click="edit(item)"></image> |
| | | <image src="/static/icon/address_ic_edit@2x.png" mode="widthFix" @click.stop="edit(item)"></image> |
| | | </view> |
| | | <view class="button" @click="add"> |
| | | <image src="/static/images/icon_add_dz@2x.png" mode="widthFix"></image> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | list: [] |
| | | list: [], |
| | | type: null |
| | | }; |
| | | }, |
| | | onShow() { |
| | | this.getAddr() |
| | | }, |
| | | onLoad(option) { |
| | | if (option.type) { |
| | | this.type = option.type |
| | | } |
| | | }, |
| | | methods: { |
| | | selectRow(item) { |
| | | if (this.type == 1) { |
| | | uni.$emit('update', item) |
| | | uni.navigateBack({ delta: 1 }); |
| | | } |
| | | }, |
| | | getAddr() { |
| | | this.$u.api.findListAddr() |
| | | .then(res => { |