This commit is contained in:
zuowei1216
2025-12-22 21:33:18 +08:00
parent 1b19ff1b92
commit 6c73b31100
5 changed files with 142 additions and 5 deletions

View File

@@ -4,12 +4,12 @@ const routes: RouteRecordRaw[] = [
{ {
path: '/', path: '/',
name: 'Home', name: 'Home',
component: () => import('@/view/Home.vue') component: () => import('../view/Home.vue')
}, },
{ {
path: '/iframe', path: '/iframe',
name: 'IframePage', name: 'IframePage',
component: () => import('@/view/IframePage.vue') component: () => import('../view/IframePage.vue')
} }
] ]

View File

@@ -0,0 +1,122 @@
<template>
<div class="home-view">
<header class="header">
<h1>Designer 管理后台</h1>
<p class="subtitle">集成开发与资源管理中心</p>
</header>
<div class="card-grid">
<div class="card" @click="goToIframe">
<div class="icon">🌐</div>
<h3>外部预览</h3>
<p>嵌入式浏览器页面查看</p>
</div>
<div class="card" @click="toggleTheme">
<div class="icon">{{ isDark ? '🌙' : '☀️' }}</div>
<h3>主题切换</h3>
<p>当前: {{ isDark ? '深色模式' : '浅色模式' }}</p>
</div>
</div>
<div class="status-panel">
<h3>系统状态</h3>
<div class="status-item">
<span>版本:</span>
<code>{{ version }}</code>
</div>
<div class="status-item">
<span>运行模式:</span>
<span class="badge" :class="{ dev: isDev }">{{ isDev ? '开发模式' : '生产模式' }}</span>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import { useRouter } from 'vue-router'
import { useTheme } from '@/hooks/useTheme'
const router = useRouter()
const { isDark, toggleTheme } = useTheme()
const version = __VERSION__
const isDev = __DEV__
const goToIframe = () => {
router.push('/iframe')
}
</script>
<style scoped>
.home-view {
padding: 24px;
display: flex;
flex-direction: column;
gap: 32px;
}
.header h1 {
margin: 0;
font-size: 24px;
background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.subtitle {
margin: 10px 0 0;
opacity: 0.6;
}
.card-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
}
.card {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
padding: 24px;
cursor: pointer;
transition: all 0.3s ease;
text-align: center;
}
.card:hover {
background: rgba(255, 255, 255, 0.1);
transform: translateY(-4px);
border-color: #4facfe;
}
.icon {
font-size: 32px;
margin-bottom: 12px;
}
.status-panel {
background: rgba(0, 0, 0, 0.2);
border-radius: 8px;
padding: 16px;
}
.status-item {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
font-family: monospace;
}
.badge {
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
}
.badge.dev {
background: #f39c12;
color: #000;
}
</style>

View File

@@ -45,7 +45,7 @@ const loading = ref(true)
const currentUrl = ref( const currentUrl = ref(
// localStorage.getItem('adminPanelUrl') || 'https://app.aidg168.uk' // localStorage.getItem('adminPanelUrl') || 'https://app.aidg168.uk'
localStorage.getItem('adminPanelUrl') || 'http://localhost:5175/#/login' localStorage.getItem('adminPanelUrl') || 'http://localhost:5173/#/login'
) )
function goBack() { function goBack() {

View File

@@ -26,8 +26,8 @@ export default defineConfig(({ command }) => {
base: './', base: './',
resolve: { resolve: {
alias: { alias: {
"@/": new URL("./src/", import.meta.url).pathname, "@": path.resolve(__dirname, 'src').replace(/\\/g, '/'),
'@plugins': path.resolve(__dirname, './plugins') '@plugins': path.resolve(__dirname, './plugins').replace(/\\/g, '/')
} }
}, },
define: { define: {

View File

@@ -94,9 +94,24 @@ services:
networks: networks:
- designer_net - designer_net
# ==================== Portainer (Docker管理) ====================
portainer:
image: portainer/portainer-ce:latest
container_name: designercep_portainer
restart: unless-stopped
ports:
- "9000:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- portainer_data:/data
networks:
- designer_net
volumes: volumes:
db_data2: db_data2:
driver: local driver: local
portainer_data:
driver: local
networks: networks:
designer_net: designer_net: