<template>
  <div>
    <van-nav-bar title="我的二维码" left-text="返回" @click-left="$route_back" left-arrow>

    </van-nav-bar>
    <div style="padding:0.5rem 0.5rem;">
      <div style=" text-align: center; -webkit-border-radius: 0.2rem;-moz-border-radius: 0.2rem;border-radius: 0.2rem; padding:0.5rem 0;">
        <h4> {{userinfo.nickname}} </h4>
        <qrcode-vue class="qrcode_box" :value="url" :size="150" level="H"></qrcode-vue>

        <p style="color:#999; font-size:0.28rem;">用APP扫一扫</p>
      </div>

    </div>
  </div>
</template>

<script>
  import QrcodeVue from 'qrcode.vue'
  export default {
    components: {
      QrcodeVue,
    },
    name: 'user_qr',
    data(){
      return {
        userinfo: this.$store.getters.user_info,
        url: 'http://#/chat?touser='+this.$store.getters.user_info.id
      }
    }
  }
</script>

<style scoped>

</style>
