diff --git a/src/api/centre_maps.js b/src/api/centre_maps.js new file mode 100644 index 0000000..0bbb758 --- /dev/null +++ b/src/api/centre_maps.js @@ -0,0 +1,11 @@ +import axiosInstance from './axiosConfig'; + + +export const getMapEditors = async () => { + try { + const response = await axiosInstance.get('/map/editors'); + return response.data; + } catch (error) { + throw error; + } +}; diff --git a/src/router/index.js b/src/router/index.js index 4688309..f0e012a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,6 +1,7 @@ import { createRouter, createWebHistory } from 'vue-router' import { hasValidToken, getUserInfo, logoutUser } from '../utils/jwt'; import { justLoggedIn } from '../utils/authSessionState'; +import EditorsMaps from '@/views/index/EditorsMaps.vue' const routes = [ { @@ -70,6 +71,11 @@ const routes = [ name: 'CompetitionSignUp', component: () => import('@/views/index/CompetitionSignUp.vue'), meta: { requiresAuth: true } + }, + { + path: 'editors-maps', + name: 'EditorsMaps', + component: () => import('@/views/index/EditorsMaps.vue') } ] }, diff --git a/src/views/index/ActiveAuthor.vue b/src/views/index/ActiveAuthor.vue index efd1b93..789b147 100644 --- a/src/views/index/ActiveAuthor.vue +++ b/src/views/index/ActiveAuthor.vue @@ -1,61 +1,166 @@ \ No newline at end of file diff --git a/src/views/index/DemandList.vue b/src/views/index/DemandList.vue index ac52849..64cd825 100644 --- a/src/views/index/DemandList.vue +++ b/src/views/index/DemandList.vue @@ -113,6 +113,23 @@ 发布时间: {{ formatDate(selectedDemand?.date) }} +
+

回复内容

+
+
+
+
+ {{ reply.author || '匿名用户' }} + {{ formatDate(reply.time) }} +
+
{{ reply.content }}
+
+
+
+ 暂无回复 +
+
+
@@ -427,7 +444,7 @@ function autoResize() { background: white; border-radius: 8px; width: 90%; - max-width: 600px; + max-width: 800px; max-height: 80vh; overflow-y: auto; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); @@ -588,4 +605,57 @@ function autoResize() { line-height: 1.6; overflow-y: auto; } + +.reply-section { + margin-top: 20px; + padding-top: 20px; + border-top: 1px solid #eee; +} + +.reply-section h3 { + color: #1a237e; + margin-bottom: 15px; + font-size: 1.2rem; +} + +.reply-list { + max-height: 300px; + overflow-y: auto; +} + +.reply-item { + background: #f7faff; + border-radius: 8px; + padding: 15px; + margin-bottom: 15px; +} + +.reply-header { + display: flex; + justify-content: space-between; + margin-bottom: 8px; +} + +.reply-author { + font-weight: 600; + color: #1a237e; +} + +.reply-time { + color: #666; + font-size: 0.9em; +} + +.reply-content { + color: #333; + line-height: 1.5; +} + +.no-reply { + text-align: center; + color: #666; + padding: 20px; + background: #f7faff; + border-radius: 8px; +} \ No newline at end of file diff --git a/src/views/index/Maps.vue b/src/views/index/Maps.vue index 4a44e37..ff9293f 100644 --- a/src/views/index/Maps.vue +++ b/src/views/index/Maps.vue @@ -256,5 +256,74 @@ onMounted(() => { \ No newline at end of file