import { getStorage } from '@/utils/storage'
import { scrollTo } from '@/utils/scroll-to'

export default {
  data() {
    return {
      mPath: ''
    }
  },
  created() {
    this.mPath = this.$route.path
    this.initPageInfo()
  },
  methods: {
    initPageInfo() {
      const { listQuery, scrollY } = JSON.parse(getStorage(this.mPath))
      this.listQuery = listQuery
      scrollTo(scrollY, 500)
    }
  }
}
