feat: super admin use sakai

This commit is contained in:
2025-12-17 11:48:53 +08:00
parent f2b53967eb
commit 1a16b0290f
137 changed files with 29250 additions and 3412 deletions

View File

@@ -1,7 +1,18 @@
import axios from 'axios'
import { getApiBaseURL } from './tenant'
import { toFriendlyApiError } from '@shared/apiError'
export const api = axios.create({
baseURL: getApiBaseURL(),
})
api.interceptors.response.use(
(resp) => resp,
(err) => {
const fe = toFriendlyApiError(err)
const wrapped = new Error(fe.detail || fe.summary)
;(wrapped as any).friendly = fe
;(wrapped as any).cause = err
throw wrapped
},
)

View File

@@ -13,6 +13,5 @@
"strict": true,
"types": ["vite/client"]
},
"include": ["src"]
"include": ["src", "../shared"]
}

View File

@@ -1,11 +1,17 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'node:path'
export default defineConfig({
plugins: [vue()],
base: './',
resolve: {
alias: {
'@shared': path.resolve(__dirname, '../shared'),
},
},
server: {
port: 5173,
fs: { allow: ['..'] },
},
})