<template>
  <view>
    <uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="收货地址"></uni-nav-bar>
  </view>
</template>

<script>
import { go2, back, setCache } from '@/utils/hook.js'
export default {
  data() {
    return {
      /**
       * 页面操作类型 none: 无操作, select: 选择
       */
      operation: 'none'
    }
  },
  methods: {
    go2,
    back,
    // 选择地址
    selectAddress(item) {
      if (this.operation === 'select') {
        setCache('address', item)
        back()
      }
    }
  },
  onLoad(option) {
    if (option) {
      this.operation = option.operation
    }
  }
}
</script>

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