<template>
  <div class='full-width full-height flex flex-col flex-justify-start'>
    <div>
      <el-button @click='push'>设置</el-button>
      {{data}}
    </div>
    <div v-for='item in list' :key='item.id' class='mt-20'>
      <button >{{item.title}}</button>
    </div>
  </div>
</template>

<route>
  {
    name: '设置',
  }
</route>

<script>
import useCounterStore from '../../store/user.js'

export default {
  name: 'index',
  setup () {
    const user = useCounterStore()
    return { user }
  },
  data () {
    return {
      list: [],
      data: null
    }
  },
  created () {
    this.init()
  },
  methods: {
    init () {
      this.user.info = { user: '123', name: 'holle' }
      this.data = this.$route.query
      this.user.$dispose()
      this.$api.login.sendSMS({ current: 1, size: 200 }).then((res) => {
        if (res.code === 200) {
          this.list = res.data.records
        }
      })
    },
    push () {
      this.$router.push({ path: '/user', query: { id: 12, type: 'test' } })
    }
  }
}
</script>

<style scoped>

</style>
