wolfboys commented on code in PR #1792:
URL: 
https://github.com/apache/incubator-streampark/pull/1792#discussion_r991338817


##########
streampark-console/streampark-console-webapp/src/views/user/SignIn.vue:
##########
@@ -161,25 +215,57 @@ export default {
         if (!err) {
           const loginParams = {...values}
           SignIn(loginParams)
-            .then(resp => {
-              if (resp.code != null) {
-                const message = 'SignIn failed,' + (resp.code === 0 ? ' 
authentication error' : ' current User is locked.')
-                this.$message.error(message)
-              } else {
-                this.$router.push({path: '/flink/app'})
+            .then(() => {
+              this.$router.push({path: '/flink/app'})
+            }).catch(resp => {
+              const code = resp.code
+              if (code != null && code != undefined) {
+                if (code == 0 || code == 1) {
+                  const message = 'SignIn failed,' + (resp.code === 0 ? ' 
authentication error' : ' current User is locked.')
+                  this.$message.error(message)
+                } else if (resp.code == 403) {
+                  this.loginInfo = values
+                  this.teamVisible = true
+                  this.userId = resp.data
+                  teams({
+                    userId: this.userId
+                  }).then((r) => {
+                    this.teamList = r.data
+                  })
+                } else {
+                  console.log(resp)
+                }
               }
-            })
-            .catch(err => console.log(err))
-            .finally(() => {
+          }).finally(() => {
               state.loginBtn = false
-            })
+          })
         } else {
           setTimeout(() => {
             state.loginBtn = false
           }, 600)
         }
       })
-    }
+    },
+

Review Comment:
   > When the user login the platform, the team show the teamId, it should show 
the teamName
   
   This problem does exist, and it's a front-end problem that's been bugging me 
for a long time.😭



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to