<template>
  <div>
    <!-- <h2>正在登陆中，请稍等。</h2> -->
  </div>
</template>

<script>

export default {
  name: 'SilentSigninOidc',
  data: function() {
    return {
      redirect: undefined,
      otherQuery: {}
    }
  },
  watch: {
    // $route: {
    //   handler: function(route) {
    //     const query = route.query;
    //     if (query) {
    //       this.redirect = query.redirect;
    //       this.otherQuery = this.getOtherQuery(query);
    //     }
    //   },
    //   immediate: true
    // }
  },
  async mounted() {
    await this.$store.dispatch('user/loginCallbackOidc')
  },
  methods: {
    getOtherQuery(query) {
      return Object.keys(query).reduce((acc, cur) => {
        if (cur !== 'redirect') {
          acc[cur] = query[cur]
        }
        return acc
      }, {})
    }
  }
}
</script>

<style scoped></style>
