diff --git a/.env.prod b/.env.prod index cbe40ee..d69fded 100644 --- a/.env.prod +++ b/.env.prod @@ -4,8 +4,3 @@ VITE_ICONIFY_URL=/snail-job/iconify # backend service base url, prod environment VITE_SERVICE_BASE_URL=/snail-job - -# other backend service base url, prod environment -VITE_OTHER_SERVICE_BASE_URL= `{ - "demo": "http://localhost:9529" -}` diff --git a/.env.test b/.env.test index 7a00a24..952c067 100644 --- a/.env.test +++ b/.env.test @@ -2,8 +2,3 @@ VITE_BASE_URL=/ # backend service base url, test environment VITE_SERVICE_BASE_URL=http://localhost:8080/snail-job - -# other backend service base url, test environment -VITE_OTHER_SERVICE_BASE_URL= `{ - "demo": "http://localhost:9528" -}` diff --git a/packages/work-flow/src/utils/service.ts b/packages/work-flow/src/utils/service.ts index bd85b28..52f58c3 100644 --- a/packages/work-flow/src/utils/service.ts +++ b/packages/work-flow/src/utils/service.ts @@ -8,7 +8,7 @@ export function createServiceConfig(env: Env.ImportMeta) { let other = {} as Record; try { - other = JSON.parse(VITE_OTHER_SERVICE_BASE_URL); + other = VITE_OTHER_SERVICE_BASE_URL ? JSON.parse(VITE_OTHER_SERVICE_BASE_URL) : {}; } catch (error) { // eslint-disable-next-line no-console console.error('VITE_OTHER_SERVICE_BASE_URL is not a valid JSON string'); diff --git a/public/iconify/line-md.json b/public/iconify/line-md.json index f0eac7b..a7d92d9 100644 --- a/public/iconify/line-md.json +++ b/public/iconify/line-md.json @@ -7,6 +7,9 @@ "icons": { "menu-fold-left": { "body": "" + }, + "menu-fold-right": { + "body": "" } } } diff --git a/src/plugins/iconify.ts b/src/plugins/iconify.ts index f58d669..8d52c26 100644 --- a/src/plugins/iconify.ts +++ b/src/plugins/iconify.ts @@ -1,4 +1,4 @@ -import { addAPIProvider, disableCache } from '@iconify/vue'; +import { addAPIProvider } from '@iconify/vue'; /** Setup the iconify offline */ export function setupIconifyOffline() { @@ -6,7 +6,5 @@ export function setupIconifyOffline() { if (VITE_ICONIFY_URL) { addAPIProvider('', { resources: [VITE_ICONIFY_URL] }); - - disableCache('all'); } } diff --git a/src/service/request/index.ts b/src/service/request/index.ts index 9e34358..17f85e7 100644 --- a/src/service/request/index.ts +++ b/src/service/request/index.ts @@ -1,5 +1,5 @@ import type { AxiosResponse } from 'axios'; -import { BACKEND_ERROR_CODE, createFlatRequest, createRequest } from '@sa/axios'; +import { BACKEND_ERROR_CODE, createFlatRequest } from '@sa/axios'; import { useAuthStore } from '@/store/modules/auth'; import { $t } from '@/locales'; import { localStg } from '@/utils/storage'; @@ -8,7 +8,7 @@ import { handleRefreshToken, showErrorMsg } from './shared'; import type { RequestInstanceState } from './type'; const isHttpProxy = import.meta.env.DEV && import.meta.env.VITE_HTTP_PROXY === 'Y'; -const { baseURL, otherBaseURL } = getServiceBaseURL(import.meta.env, isHttpProxy); +const { baseURL } = getServiceBaseURL(import.meta.env, isHttpProxy); export const request = createFlatRequest( { @@ -59,10 +59,7 @@ export const request = createFlatRequest( - { - baseURL: otherBaseURL.demo - }, - { - async onRequest(config) { - const { headers } = config; - - // set token - const token = localStg.get('token'); - const Authorization = token ? `Bearer ${token}` : null; - Object.assign(headers, { Authorization }); - - return config; - }, - isBackendSuccess(response) { - // when the backend response code is "200", it means the request is success - // you can change this logic by yourself - return response.data.status === '200'; - }, - async onBackendFail(_response) { - // when the backend response code is not "200", it means the request is fail - // for example: the token is expired, refresh token and retry request - }, - transformBackendResponse(response) { - return response.data.result; - }, - onError(error) { - // when the request is fail, you can show error message - - let message = error.message; - - // show backend error message - if (error.code === BACKEND_ERROR_CODE) { - message = error.response?.data?.message || message; - } - - window.$message?.error(message); - } - } -); diff --git a/src/views/_builtin/iframe-page/[url].vue b/src/views/_builtin/iframe-page/[url].vue index b28c952..fe1c54c 100644 --- a/src/views/_builtin/iframe-page/[url].vue +++ b/src/views/_builtin/iframe-page/[url].vue @@ -8,11 +8,11 @@ interface Props { defineProps(); onMounted(() => { - console.log('mounted'); + // console.log('mounted'); }); onActivated(() => { - console.log('activated'); + // console.log('activated'); }); diff --git a/src/views/group/modules/group-detail-drawer.vue b/src/views/group/modules/group-detail-drawer.vue index 8d2c8ff..8eac37b 100644 --- a/src/views/group/modules/group-detail-drawer.vue +++ b/src/views/group/modules/group-detail-drawer.vue @@ -1,5 +1,4 @@