2026-06-14 16:49:18 +08:00
|
|
|
|
<!-- =============================================================================
|
|
|
|
|
|
// 企微IT智能服务台 — 坐席工作台根组件
|
|
|
|
|
|
// =============================================================================
|
|
|
|
|
|
// 说明:Vue3 应用的根组件,所有页面都渲染在这个组件内
|
|
|
|
|
|
// 使用 router-view 渲染当前路由对应的页面
|
|
|
|
|
|
// ============================================================================= -->
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2026-07-07 21:52:11 +08:00
|
|
|
|
<div class="app-container">
|
|
|
|
|
|
<!-- 测试环境标识 - 右上角覆盖层,不占用布局 -->
|
|
|
|
|
|
<div v-if="isTestEnv" class="test-env-badge">
|
|
|
|
|
|
🔧 测试环境
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- 路由视图:显示当前路由对应的页面组件 -->
|
|
|
|
|
|
<router-view />
|
|
|
|
|
|
</div>
|
2026-06-14 16:49:18 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2026-07-07 21:52:11 +08:00
|
|
|
|
import { computed } from 'vue'
|
|
|
|
|
|
|
|
|
|
|
|
// 检测是否为测试环境
|
|
|
|
|
|
const isTestEnv = computed(() => {
|
|
|
|
|
|
return import.meta.env.MODE === 'development' ||
|
|
|
|
|
|
window.location.hostname.includes('localhost') ||
|
|
|
|
|
|
window.location.hostname.includes('127.0.0.1')
|
|
|
|
|
|
})
|
2026-06-14 16:49:18 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
2026-07-07 21:52:11 +08:00
|
|
|
|
<style scoped>
|
|
|
|
|
|
.app-container {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.test-env-badge {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 8px;
|
|
|
|
|
|
left: 8px;
|
|
|
|
|
|
z-index: 9999;
|
|
|
|
|
|
background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
padding: 4px 12px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
}
|
2026-06-14 16:49:18 +08:00
|
|
|
|
</style>
|