<template>
  <v-header :title="typeItem.title">
    <view class="flex-all-1 overflow">
      <flat-list
          @changeData="flatChangeData"
          background="transparent"
          :ref="base_flat_id"
          @fetch="fetch"
      >
        <view>
          <view class="address-item row aCenter"
            v-for="(item,index) in base_flat_data.data"
            :key="index"
            @click="checkedAddress(item)"
          >
            <view class="flex-all-1 overflow">
              <view class="address-title row aCenter">
                <view class="address-name line-1">{{item.name}}</view>
                <view class="address-mobile line-1">{{item.mobile}}</view>
                <view v-if="item.is_default === 1" class="address-default center">默认</view>
              </view>
              <view class="address-info line-1">{{item.province_name}} {{item.city_name}} {{item.area_name}} {{item.address}}</view>
            </view>
            <v-radio :value="checkId==item.id" disabled borderColor="#c3c3c3" activeBorderColor="#41AE3C" activeColor="#41AE3C" class="address-margin" v-if="typeItem.select"></v-radio>
            <image v-else @click.stop="routerUpdateAddress(item)" src="/static/images/address-edit.png" class="address-edit"></image>
          </view>
        </view>
      </flat-list>

    </view>
    <view class="center address-button-container">
      <view @click="routerAddAddress" class="address-button center">添加地址</view>
    </view>

  </v-header>
</template>

<script>
import vHeader from '../../components/v-header/main';
import flatList from '../../components/flat-list/src/main';
import mixins from './mixins';
import vRadio from '../../components/v-radio/main';
export default {

  components:{
    vHeader,
    flatList,
    vRadio
  },

  mixins

}
</script>

<style src="./style.scss" scoped lang="scss"></style>
