<template>
  <div class="uc_address_edit_container">
    <van-field
      :value="address_info.username"
      required
      clearable
      label="收货人"
      placeholder="收货人姓名"
    />
    <van-field
      :value="address_info.phone"
      required
      clearable
      label="手机号"
      placeholder="收货人手机号"
    />
    <van-field
      :value="address_info.city"
      required
      clearable
      label="所在地区"
      placeholder="选择省/市/区"
      is-link
    />
    <van-field
      :value="address_info.detail"
      required
      clearable
      label="详细地址"
      placeholder="请填写详细地址"
    />
    <div class="button_container">
      <button class="cu-btn lg cu-btn-primary text-white text-center padding" @click="choose_ok">保存并使用</button>
    </div>
  </div>
</template>

<script>

var $this
export default {
  name: "uc_address_edit_container",
  components: {},
  data() {
    return {
      address_info: {
        username: "",
        phone: "",
        city: "",
        detail: ""
      }
    }
  },
  methods: {
    //保存并使用
    choose_ok() {
      $this.to_address_list()
    },
    //  跳转到地址列表
    to_address_list() {
      // mpvue.navigateTo({
      //   url: "/pages/user_center/address/list/main"
      // })
      mpvue.navigateBack({
        delta:1
      })
    }
  }
  ,
  mounted() {
  },
  created() {
    $this = this;
  },
  onLoad() {
  }
}
</script>

<style scoped>
.button_container{
  padding: 10px;
  position: absolute;
  bottom: 50px;
  text-align: center;
  width: 100%;
}

</style>
