diff --git a/service/license/src/services/request.ts b/service/license/src/services/request.ts index cdac3d2b9b83..e123308727f5 100644 --- a/service/license/src/services/request.ts +++ b/service/license/src/services/request.ts @@ -36,19 +36,19 @@ request.interceptors.request.use( request.interceptors.response.use( (response: AxiosResponse) => { const { status, data } = response; - if (data.code === 401) { - console.log('鉴权失败'); - useSessionStore.getState().delSession(); - return window.location.replace('/signin'); - } - if (status < 200 || status >= 300) { - return Promise.reject(new Error(data?.code + ':' + data?.message)); - } + // if (data.code === 401) { + // console.log('鉴权失败'); + // useSessionStore.getState().delSession(); + // return window.location.replace('/signin'); + // } + // if (status < 200 || status >= 300) { + // return Promise.reject(new Error(data?.code + ':' + data?.message)); + // } - const apiResp = data as ApiResp; - if (apiResp?.code && (apiResp.code < 200 || apiResp.code >= 300)) { - return Promise.reject(apiResp); - } + // const apiResp = data as ApiResp; + // if (apiResp?.code && (apiResp.code < 200 || apiResp.code >= 300)) { + // return Promise.reject(apiResp); + // } return data; }, diff --git a/service/license/src/styles/globals.css b/service/license/src/styles/globals.css index e69de29bb2d1..0b422cf8dc05 100644 --- a/service/license/src/styles/globals.css +++ b/service/license/src/styles/globals.css @@ -0,0 +1,69 @@ +* { + box-sizing: border-box; + padding: 0; + margin: 0; +} + +html, +body, +#__next { + width: 100vw; + height: 100vh; + overflow: hidden; +} + +iframe { + border: none; +} + +::-webkit-scrollbar, +::-webkit-scrollbar { + width: 8px; + height: 8px; + border-radius: 8px; +} +::-webkit-scrollbar-track, +::-webkit-scrollbar-track { + background: transparent; + border-radius: 6px; +} +::-webkit-scrollbar-thumb, +::-webkit-scrollbar-thumb { + background: #6a6969; + border-radius: 6px; +} +::-webkit-scrollbar-thumb:hover, +::-webkit-scrollbar-thumb:hover { + background: #999; +} + +::-webkit-scrollbar-corner { + background-color: transparent; +} + +.icon { + width: 16px; + height: 16px; + vertical-align: -0.15em; + fill: currentColor; + overflow: hidden; +} + +div { + &::-webkit-scrollbar-thumb, + &::-webkit-scrollbar-thumb { + background: transparent !important; + border-radius: 10px; + transition: 1s; + } + &:hover { + &::-webkit-scrollbar-thumb, + &::-webkit-scrollbar-thumb { + background: rgba(189, 193, 197, 0.5) !important; + } + &::-webkit-scrollbar-thumb:hover, + &::-webkit-scrollbar-thumb:hover { + background: rgba(189, 193, 197, 1) !important; + } + } +} diff --git a/service/license/src/styles/theme.ts b/service/license/src/styles/theme.ts new file mode 100644 index 000000000000..17073e21deb1 --- /dev/null +++ b/service/license/src/styles/theme.ts @@ -0,0 +1,52 @@ +import { defineStyleConfig, extendTheme } from '@chakra-ui/react'; + +const Button = defineStyleConfig({ + baseStyle: { + borderRadius: '4px' + }, + sizes: { + sm: {}, + md: {}, + primary: { + width: '215px', + height: '36px' + } + }, + variants: { + primary: { + bg: '#3E3B3B', + _hover: { + bg: '#3E3B3B', + _disabled: { + bg: '#3E3B3B' + } + }, + color: '#FEFEFE' + } + } +}); + +const Input = defineStyleConfig({}); + +const Select = defineStyleConfig({ + variants: { + filled: { + field: { + backgroundColor: '#F4F6F8' + } + } + }, + defaultProps: { + size: 'md', + variant: 'filled' + } +}); + +export const theme = extendTheme({ + initialColorMode: 'light', + components: { + Button, + Input, + Select + } +});