login.vue 613 B

12345678910111213141516171819
  1. <template>
  2. <div>
  3. <!--登录代理页面-->
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. name: 'login',
  9. layout: 'login',
  10. mounted () {
  11. let uri = this.$route.query.returnUrl ? this.$route.query.returnUrl : window.location.protocol + '//' + window.location.host + '/'
  12. this.$http.get('/login/page', {params: {returnUrl: uri}}).then(response => {
  13. if (response.data) {
  14. window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
  15. }
  16. })
  17. }
  18. }
  19. </script>