在租户平台「离线推送」卡片中新增「推送管理 →」入口,新增 /apps/:appId/push-management 路由及 PushManagementView 页面。 页面支持按用户 ID 查询设备在线状态与注册设备列表、发送测试 离线推送消息、浏览设备登录日志。同步新增 push.ts API 客户端 及 vite 开发代理对 /api/push 的路由。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
57 行
1.5 KiB
TypeScript
57 行
1.5 KiB
TypeScript
import { defineConfig, loadEnv } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, new URL('.', import.meta.url).pathname, '')
|
|
|
|
return {
|
|
base: env.VITE_APP_BASE || '/',
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
resolvers: [ElementPlusResolver()],
|
|
}),
|
|
Components({
|
|
resolvers: [ElementPlusResolver()],
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': new URL('./src', import.meta.url).pathname,
|
|
},
|
|
},
|
|
build: {
|
|
chunkSizeWarningLimit: 1000,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id) {
|
|
if (!id.includes('node_modules')) return undefined
|
|
if (id.includes('element-plus')) return 'element-plus'
|
|
if (id.includes('@element-plus/icons-vue')) return 'element-plus-icons'
|
|
if (id.includes('vue-router')) return 'vue-router'
|
|
if (id.includes('pinia')) return 'pinia'
|
|
if (id.includes('axios')) return 'axios'
|
|
return 'vendor'
|
|
},
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api/push': {
|
|
target: 'http://127.0.0.1:8083',
|
|
changeOrigin: true,
|
|
},
|
|
'/api': {
|
|
target: 'http://127.0.0.1:8081',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
}
|
|
})
|