Parcourir la source

登录保留路径

zhengnaiwen_citu il y a 4 mois
Parent
commit
f988e81a8c
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      src/views/login/index.vue

+ 2 - 1
src/views/login/index.vue

@@ -90,7 +90,8 @@ export default {
           await this.$store.dispatch('user/login', query)
           await this.$store.dispatch('user/getEmployee') // 获取绑定员工信息
           await this.$store.dispatch('system/getOrganizationTree') // 获取机构信息
-          this.$router.push('/')
+          this.$route.query.redirect ? this.$router.push(this.$route.query.redirect) : this.$router.push('/')
+          // this.$router.push('/')
         } catch (error) {
           if (typeof error === 'object' && error?.code) {
             this.$message.error(error.msg || error)