版本1.0.4 - 发布前准备
- 修复system.py缩进错误 - 优化前端页面样式(待重构) - 改进API接口结构 - 完善文档和自动化脚本 - 平台基本功能稳定运行
This commit is contained in:
@@ -0,0 +1,194 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>宇之然内容创作平台 - Vue调试</title>
|
||||
|
||||
<!-- 资源加载 -->
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
||||
<link rel="stylesheet" href="https://unpkg.com/element-plus@2.4.3/dist/index.css">
|
||||
<script src="https://unpkg.com/element-plus@2.4.3/dist/index.full.min.js"></script>
|
||||
|
||||
<style>
|
||||
.card { background: white; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); padding: 24px; margin-bottom: 24px; }
|
||||
aside button { width: 100%; text-align: left; border: none; background: transparent; border-radius: 8px; margin-bottom: 4px; }
|
||||
@media (max-width: 768px) { main { padding-bottom: 70px; } }
|
||||
.nav-title { text-align: center; }
|
||||
.status-badge { display: inline-flex; align-items: center; gap: 4px; }
|
||||
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
|
||||
.status-dot.pending { background: #E6A23C; }
|
||||
.status-dot.review { background: #F56C6C; }
|
||||
.status-dot.ready { background: #67C23A; }
|
||||
.status-dot.published { background: #409EFF; }
|
||||
.debug-panel { background: #f5f5f5; padding: 10px; border-radius: 4px; font-family: monospace; font-size: 12px; max-height: 200px; overflow-y: auto; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<!-- 导航栏 -->
|
||||
<nav class="bg-gradient-to-r from-blue-600 to-blue-700 text-white shadow-lg">
|
||||
<div class="container mx-auto px-6 py-4 flex justify-between items-center">
|
||||
<h1 class="text-2xl font-bold nav-title">宇之然内容创作平台 - Vue调试</h1>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- 侧边栏 -->
|
||||
<div class="page flex gap-6">
|
||||
<aside class="w-40 flex-shrink-0 hidden md:block">
|
||||
<button @click="testType='topics'" :class="['px-4 py-2 rounded-lg', testType === 'topics' ? 'bg-blue-50 text-blue-600 font-semibold' : 'text-gray-600']">📋 选题管理</button>
|
||||
<button @click="testType='logs'" :class="['px-4 py-2 rounded-lg', testType === 'logs' ? 'bg-blue-50 text-blue-600 font-semibold' : 'text-gray-600']">📄 系统日志</button>
|
||||
<button @click="testType='users'" :class="['px-4 py-2 rounded-lg', testType === 'users' ? 'bg-blue-50 text-blue-600 font-semibold' : 'text-gray-600']">👥 用户管理</button>
|
||||
</aside>
|
||||
|
||||
<!-- 主内容区 -->
|
||||
<main class="flex-1">
|
||||
<div class="card" style="padding: 20px; margin-top: 20px;">
|
||||
<h2 class="text-2xl font-bold text-gray-800 mb-6">🔍 Vue调试控制台</h2>
|
||||
|
||||
<!-- 调试信息显示 -->
|
||||
<div class="debug-panel mb-4">
|
||||
<strong>调试输出:</strong><br/>
|
||||
<span v-for="log in debugLogs" :key="log">{{ log }}</span>
|
||||
</div>
|
||||
|
||||
<!-- 测试按钮 -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
|
||||
<button @click="runDebugTest" class="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600">运行调试测试</button>
|
||||
<button @click="testElementPlus" class="px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600">测试Element Plus</button>
|
||||
<button @click="resetDebug" class="px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600">重置调试</button>
|
||||
</div>
|
||||
|
||||
<!-- 测试结果 -->
|
||||
<div v-if="testResults.length > 0" class="mb-4 p-4 bg-green-50 border-l-4 border-green-400">
|
||||
<h3 class="font-bold mb-2">测试结果:</h3>
|
||||
<ul class="list-disc pl-5">
|
||||
<li v-for="result in testResults">{{ result }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 模拟表格 -->
|
||||
<div v-if="testType === 'topics'" class="overflow-x-auto">
|
||||
<table class="w-full border-collapse">
|
||||
<thead>
|
||||
<tr class="bg-gray-50">
|
||||
<th class="border p-2"><input type="checkbox"></th>
|
||||
<th class="border p-2">ID</th>
|
||||
<th class="border p-2">标题</th>
|
||||
<th class="border p-2">状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="topic in mockTopics" :key="topic.id">
|
||||
<td class="border p-2"><input type="checkbox"></td>
|
||||
<td class="border p-2">{{ topic.id }}</td>
|
||||
<td class="border p-2">{{ topic.title }}</td>
|
||||
<td class="border p-2">
|
||||
<span class="status-badge">
|
||||
<span class="status-dot" :class="getStatusClass(topic.status)"></span>
|
||||
{{ getStatusText(topic.status) }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const DebugApp = {
|
||||
data() {
|
||||
return {
|
||||
testType: 'topics',
|
||||
debugLogs: [
|
||||
'Vue调试应用已启动',
|
||||
'请运行调试测试查看详细信息',
|
||||
''
|
||||
],
|
||||
testResults: [],
|
||||
mockTopics: [
|
||||
{ id: 'A01', title: '可持续发展趋势分析', status: 'pending' },
|
||||
{ id: 'B02', title: 'AI在内容创作中的应用', status: 'review' },
|
||||
{ id: 'C03', title: '数字化转型案例研究', status: 'ready' }
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addLog(message) {
|
||||
this.debugLogs.push('[' + new Date().toLocaleTimeString() + '] ' + message);
|
||||
},
|
||||
|
||||
runDebugTest() {
|
||||
this.addLog('开始运行调试测试...');
|
||||
|
||||
// 测试数据绑定
|
||||
setTimeout(() => {
|
||||
this.addLog('✅ 数据绑定测试通过');
|
||||
}, 100);
|
||||
|
||||
// 测试方法调用
|
||||
setTimeout(() => {
|
||||
this.addLog('✅ 方法调用测试通过');
|
||||
this.testResults.push('Vue数据绑定正常');
|
||||
}, 200);
|
||||
|
||||
// 测试DOM操作
|
||||
setTimeout(() => {
|
||||
this.addLog('✅ DOM操作测试通过');
|
||||
this.testResults.push('VueDOM渲染正常');
|
||||
}, 300);
|
||||
},
|
||||
|
||||
testElementPlus() {
|
||||
this.addLog('正在测试Element Plus集成...');
|
||||
|
||||
// 模拟Element Plus功能测试
|
||||
setTimeout(() => {
|
||||
this.addLog('✅ Element Plus样式加载成功');
|
||||
this.addLog('✅ Element Plus组件可用');
|
||||
this.testResults.push('Element Plus集成正常');
|
||||
}, 200);
|
||||
},
|
||||
|
||||
resetDebug() {
|
||||
this.debugLogs = ['Vue调试应用已启动', '请运行调试测试查看详细信息', ''];
|
||||
this.testResults = [];
|
||||
this.addLog('调试信息已重置');
|
||||
},
|
||||
|
||||
getStatusClass(status) {
|
||||
const classes = {
|
||||
'pending': 'status-dot pending',
|
||||
'review': 'status-dot review',
|
||||
'ready': 'status-dot ready',
|
||||
'published': 'status-dot published'
|
||||
};
|
||||
return classes[status] || '';
|
||||
},
|
||||
|
||||
getStatusText(status) {
|
||||
const texts = {
|
||||
'pending': '待处理',
|
||||
'review': '待审查',
|
||||
'ready': '待发布',
|
||||
'published': '已发布'
|
||||
};
|
||||
return texts[status] || status;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.addLog('Vue应用程序挂载完成');
|
||||
this.addLog('应用状态:', this.$data);
|
||||
console.log('Vue调试应用已启动');
|
||||
}
|
||||
}
|
||||
|
||||
Vue.createApp(DebugApp).mount('#app')
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user