sss 3 лет назад
Родитель
Сommit
e6bfff114d
2 измененных файлов с 8 добавлено и 4 удалено
  1. 3 3
      src/views/dm/systemNavigation/index.vue
  2. 5 1
      src/views/home.vue

+ 3 - 3
src/views/dm/systemNavigation/index.vue

@@ -46,9 +46,9 @@ export default {
         const username = encrypt(this.user.username)
         const username = encrypt(this.user.username)
         const password = this.userPassword
         const password = this.userPassword
         let aEle = document.createElement('a')
         let aEle = document.createElement('a')
-        a.href = `${url}/#/sso?username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}`
-        a.target = '_blank'
-        a.click()
+        aEle.href = `${url}/#/sso?username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}`
+        aEle.target = '_blank'
+        aEle.click()
       })
       })
 
 
     }
     }

+ 5 - 1
src/views/home.vue

@@ -56,7 +56,11 @@
         findPassWord(this.user.username).then(res => {
         findPassWord(this.user.username).then(res => {
           const username = encrypt(this.user.username)
           const username = encrypt(this.user.username)
           const password = this.userPassword
           const password = this.userPassword
-          location.href = `${url}/#/sso?username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}`
+          // location.href = `${url}/#/sso?username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}`
+          let aEle = document.createElement('a')
+          aEle.href = `${url}/#/sso?username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}`
+          aEle.target = '_blank'
+          aEle.click()
         })
         })
 
 
       }
       }