You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by so...@apache.org on 2022/03/16 11:19:02 UTC

[dolphinscheduler] branch dev updated: [Fix][UI Next][V1.0.0-Alpha] Fix refresh resource manage auto logout bug (#8932)

This is an automated email from the ASF dual-hosted git repository.

songjian pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new f9efd68  [Fix][UI Next][V1.0.0-Alpha] Fix refresh resource manage auto logout bug (#8932)
f9efd68 is described below

commit f9efd68878070ed549bc5f1bf0553b54b992c08b
Author: Devosend <de...@gmail.com>
AuthorDate: Wed Mar 16 19:18:50 2022 +0800

    [Fix][UI Next][V1.0.0-Alpha] Fix refresh resource manage auto logout bug (#8932)
---
 dolphinscheduler-ui-next/src/service/service.ts       | 4 +---
 dolphinscheduler-ui-next/src/views/login/use-login.ts | 2 --
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/dolphinscheduler-ui-next/src/service/service.ts b/dolphinscheduler-ui-next/src/service/service.ts
index c22d51f..ada15ac 100644
--- a/dolphinscheduler-ui-next/src/service/service.ts
+++ b/dolphinscheduler-ui-next/src/service/service.ts
@@ -70,12 +70,10 @@ const err = (err: AxiosError): Promise<AxiosError> => {
 
 service.interceptors.request.use((config: AxiosRequestConfig<any>) => {
   config.headers && (config.headers.sessionId = userStore.getSessionId)
-
-  const sIdCookie = cookies.get('sessionId')
   const language = cookies.get('language')
   config.headers = config.headers || {}
   if (language) config.headers.language = language
-  if (sIdCookie) config.headers.sessionId = sIdCookie
+
   return config
 }, err)
 
diff --git a/dolphinscheduler-ui-next/src/views/login/use-login.ts b/dolphinscheduler-ui-next/src/views/login/use-login.ts
index e98e9e6..b449dc7 100644
--- a/dolphinscheduler-ui-next/src/views/login/use-login.ts
+++ b/dolphinscheduler-ui-next/src/views/login/use-login.ts
@@ -23,7 +23,6 @@ import type { Router } from 'vue-router'
 import type { SessionIdRes } from '@/service/modules/login/types'
 import type { UserInfoRes } from '@/service/modules/users/types'
 import { useMenuStore } from '@/store/menu/menu'
-import cookies from 'js-cookie'
 import { useTimezoneStore } from '@/store/timezone/timezone'
 
 export function useLogin(state: any) {
@@ -37,7 +36,6 @@ export function useLogin(state: any) {
       if (!valid) {
         const loginRes: SessionIdRes = await login({ ...state.loginForm })
         await userStore.setSessionId(loginRes.sessionId)
-        cookies.set('sessionId', loginRes.sessionId, { path: '/' })
 
         const userInfoRes: UserInfoRes = await getUserInfo()
         await userStore.setUserInfo(userInfoRes)