File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
ui/src/views/login/components Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ const router = useRouter()
7575const { user } = useStore ()
7676const { load } = useScriptTag (' https://g.alicdn.com/dingding/h5-dingtalk-login/0.21.0/ddlogin.js' )
7777const isConfigReady = ref (false )
78+ const errorShown = ref (false )
7879
7980const initActive = async () => {
8081 try {
@@ -100,10 +101,11 @@ const initActive = async () => {
100101 {
101102 redirect_uri: redirectUri ,
102103 client_id: data .appKey ,
103- scope: ' openid' ,
104+ scope: ' openid corpid ' ,
104105 response_type: ' code' ,
105106 state: ' fit2cloud-ding-qr' ,
106- prompt: ' consent'
107+ prompt: ' consent' ,
108+ corpId: data .corp_id
107109 },
108110 (loginResult ) => {
109111 const authCode = loginResult .authCode
@@ -112,8 +114,10 @@ const initActive = async () => {
112114 })
113115 },
114116 (errorMsg : string ) => {
115- MsgError (errorMsg )
116- console .log (errorMsg )
117+ if (! errorShown .value ) {
118+ MsgError (errorMsg )
119+ errorShown .value = true // 设置标志位为 true,表示错误已经显示过
120+ }
117121 }
118122 )
119123 } catch (error ) {
You can’t perform that action at this time.
0 commit comments