فهرست منبع

登录跳转至原页面

yangc 8 سال پیش
والد
کامیت
11a719ae48
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      components/mobile/common/LoginBox.vue
  2. 1 1
      pages/auth/login.vue

+ 1 - 1
components/mobile/common/LoginBox.vue

@@ -16,7 +16,7 @@
         this.$emit('onLoginBoxClose')
       },
       goLogin: function () {
-        this.$router.push('/auth/login')
+        this.$router.push('/auth/login?returnUrl=' + window.location.href)
       }
     }
   }

+ 1 - 1
pages/auth/login.vue

@@ -8,7 +8,7 @@
     name: 'login',
     layout: 'login',
     mounted () {
-      let uri = window.location.protocol + '//' + window.location.host + '/'
+      let uri = this.$route.query.returnUrl ? this.$route.query.returnUrl : window.location.protocol + '//' + window.location.host + '/'
       this.$http.get('/login/page', {params: {returnUrl: uri}}).then(response => {
         if (response.data) {
           window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)