MrShi
12 小时以前 62b483cc627b0a5f7d626d6b333a3ef7c7c1f4f4
mini-program/pages/address/address.vue
@@ -1,6 +1,6 @@
<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>
@@ -9,7 +9,7 @@
            </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>
@@ -22,13 +22,25 @@
   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 => {