Skip to content

Commit

Permalink
feat: add build arm
Browse files Browse the repository at this point in the history
  • Loading branch information
amuluze committed Apr 23, 2024
1 parent 1fb5e82 commit b7ce200
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 32 deletions.
10 changes: 5 additions & 5 deletions service/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ func (a *Router) RegisterAPI(app *fiber.App) {
// 以下是 websocket service

// 以下是 http 服务
g := app.Group("/api")
//g := app.Group("/api")

if a.config.Auth.Enable {
g.Use(middleware.UserAuthMiddleware(
app.Use(middleware.UserAuthMiddleware(
a.auth,
middleware.AllowPathPrefixSkipper("/api/v1/auth/login"),
middleware.AllowPathPrefixSkipper("/api/v1/auth/token_update"),
middleware.AllowPathPrefixSkipper("/v1/auth/login"),
middleware.AllowPathPrefixSkipper("/v1/auth/token_update"),
))
}

v1 := g.Group("v1")
v1 := app.Group("v1")
{
gIndex := v1.Group("index")
{
Expand Down
Binary file removed web/dist/amprobe.ico
Binary file not shown.
23 changes: 0 additions & 23 deletions web/dist/index.html

This file was deleted.

4 changes: 2 additions & 2 deletions web/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { warning } from '@/components/Message/message.ts'

const config = {
// 默认地址请求地址,可在 .env.*** 文件中修改
baseURL: '/api',
baseURL: '/',
// baseURL: import.meta.env.VITE_API_URL,
// 设置超时时间
timeout: 30000,
Expand Down Expand Up @@ -93,7 +93,7 @@ class Request {
})
this.requestQueue = []
this.isRefreshing = false
window.location.href = "/login"
window.location.href = '/login'
} else {
// 正在刷新 token,将当前请求加入队列,等待刷新完成后再重新发送
return new Promise((resolve) => {
Expand Down
2 changes: 0 additions & 2 deletions web/types/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ declare module 'vue' {
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
readonly ElNotification: UnwrapRef<typeof import('element-plus/es')['ElNotification']>
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
readonly computed: UnwrapRef<typeof import('vue')['computed']>
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
Expand Down Expand Up @@ -169,7 +168,6 @@ declare module '@vue/runtime-core' {
readonly EffectScope: UnwrapRef<typeof import('vue')['EffectScope']>
readonly ElMessage: UnwrapRef<typeof import('element-plus/es')['ElMessage']>
readonly ElMessageBox: UnwrapRef<typeof import('element-plus/es')['ElMessageBox']>
readonly ElNotification: UnwrapRef<typeof import('element-plus/es')['ElNotification']>
readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']>
readonly computed: UnwrapRef<typeof import('vue')['computed']>
readonly createApp: UnwrapRef<typeof import('vue')['createApp']>
Expand Down
1 change: 1 addition & 0 deletions web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'

// https://vitejs.dev/config/
export default defineConfig({
base: './', // 设置打包路径
plugins: [
vue(),
AutoImport({
Expand Down

0 comments on commit b7ce200

Please sign in to comment.