cyy vor 10 Monaten
Ursprung
Commit
7f7c840a67
1 geänderte Dateien mit 13 neuen und 1 gelöschten Zeilen
  1. 13 1
      src/views/system/login/index.vue

+ 13 - 1
src/views/system/login/index.vue

@@ -122,6 +122,18 @@ export default {
   },
   },
 
 
   created() {
   created() {
+    if (this.$router.currentRoute.query.hasOwnProperty('accessToken') && this.$router.currentRoute.query.hasOwnProperty('orgCode') && this.$router.currentRoute.query.hasOwnProperty('username')) {
+      console.log(this.$router.currentRoute.query)
+
+      this.loginForm.clientKey = '1001'
+      this.loginForm.token = this.$router.currentRoute.query.accessToken
+      this.loginForm.username = this.$router.currentRoute.query.username
+      this.loginForm.password = ''
+      this.loginForm.orgCode = this.$router.currentRoute.query.orgCode
+      console.log(this.loginForm)
+
+      this.handleLogin()
+    }
     this.isRegisterOpen()
     this.isRegisterOpen()
     this.loadValidCode(true)
     this.loadValidCode(true)
   },
   },
@@ -212,7 +224,7 @@ export default {
     handleLogin() {
     handleLogin() {
       // eslint-disable-next-line no-undef
       // eslint-disable-next-line no-undef
       const params = structuredClone(this.loginForm)
       const params = structuredClone(this.loginForm)
-      params.password = encryptByAes(this.loginForm.password, 'pwd')
+      params.password = this.loginForm.password === '' ? '' : encryptByAes(this.loginForm.password, 'pwd')
       this.login({
       this.login({
         form: params
         form: params
       }).then(() => {
       }).then(() => {