diff --git a/src/pages.json b/src/pages.json index 669c84a..fcdb8a1 100644 --- a/src/pages.json +++ b/src/pages.json @@ -544,13 +544,13 @@ "iconPath": "", "selectedIconPath": "" } - // , - // { - // "pagePath": "pages/integrated/index", - // "text": "综合服务", - // "iconPath": "static/tabbar/integrated.png", - // "selectedIconPath": "static/tabbar/integrated-select.png" - // } + , + { + "pagePath": "pages/integrated/index", + "text": "综合服务", + "iconPath": "static/tabbar/integrated.png", + "selectedIconPath": "static/tabbar/integrated-select.png" + } ] } } diff --git a/src/pages/integrated/meeting/detail.vue b/src/pages/integrated/meeting/detail.vue index 534aaaf..5d1fef2 100644 --- a/src/pages/integrated/meeting/detail.vue +++ b/src/pages/integrated/meeting/detail.vue @@ -22,30 +22,34 @@ - {{ d }} + {{ d }} - - - - - {{ cell.user }} - 🚫 + + + + + + {{ slot.startTime }} - {{ slot.endTime }} + + 🚫 已预约: {{ slot.bookedBy?.userName }} + 🚫 不可预约 + ✓ 可预约 + + - - - - {{ 8 + h }}:00 + 会议时间:{{ selectedTimeText }} 时长:{{ selectedDuration }}分钟 - 发起人:张三 + 发起人:{{ currentUser.name }} @@ -54,62 +58,216 @@ @@ -117,6 +275,8 @@ function reserveMeeting() { .container { min-height: 100vh; background: #f5f6fa; + display: flex; + flex-direction: column; padding-bottom: 32rpx; } .custom-nav { @@ -220,58 +380,62 @@ function reserveMeeting() { background: #e6f0ff; font-weight: 600; } -.time-table { +.time-list-container { margin: 24rpx; background: #fff; border-radius: 12rpx; + flex: 1; + overflow: hidden; + display: flex; + flex-direction: column; +} +.time-list { + flex: 1; +} +.time-list-content { padding: 16rpx; } -.time-row { - display: flex; - margin-bottom: 8rpx; -} -.time-cell { - flex: 1; - height: 48rpx; - margin-right: 4rpx; - border-radius: 6rpx; - background: #e6eaf2; +.time-item { display: flex; + justify-content: space-between; align-items: center; - justify-content: center; - color: #bbb; - font-size: 22rpx; + padding: 24rpx; + border-bottom: 1px solid #f0f0f0; + background: #f8f9fc; + margin-bottom: 16rpx; + border-radius: 8rpx; + position: relative; } -.time-cell:last-child { - margin-right: 0; +.time-item:last-child { + margin-bottom: 0; } -.time-cell.free { - background: #4d8fff; - color: #fff; +.time-item.free { + background: #e6f0ff; + color: #1777FF; } -.time-cell.booked { - background: #ffb74d; - color: #fff; +.time-item.booked { + background: #fff3e0; + color: #ff9800; } -.time-cell.disabled { - background: #f0f0f0; - color: #ccc; +.time-item.disabled { + background: #f5f5f5; + color: #999; } -.time-cell.selected { +.time-item.selected { border: 2rpx solid #1777FF; } -.time-labels { - display: flex; - margin: 0 24rpx 16rpx 24rpx; +.time-range { + font-size: 28rpx; + font-weight: 500; } -.time-label { - flex: 1; - text-align: center; - color: #bbb; - font-size: 20rpx; +.time-status { + font-size: 24rpx; + padding: 4rpx 16rpx; + border-radius: 4rpx; + background: rgba(255, 255, 255, 0.5); } .reserve-info { - margin: 0 24rpx 16rpx 24rpx; + margin: 0 24rpx; background: #fff; border-radius: 12rpx; padding: 16rpx; @@ -279,7 +443,7 @@ function reserveMeeting() { font-size: 26rpx; } .reserve-btn { - margin: 0 24rpx; + margin: 24rpx; background: linear-gradient(90deg, #0094ff, #06be36); color: #fff; font-size: 30rpx; @@ -287,6 +451,5 @@ function reserveMeeting() { border-radius: 40rpx; padding: 24rpx 0; font-weight: 600; - margin-top: 16rpx; } \ No newline at end of file diff --git a/src/pages/integrated/meeting/index.vue b/src/pages/integrated/meeting/index.vue index bfa38f0..92bbf93 100644 --- a/src/pages/integrated/meeting/index.vue +++ b/src/pages/integrated/meeting/index.vue @@ -74,6 +74,8 @@ function fetchMeetingRooms() { } function goDetail(room) { + console.log('Navigating to detail page with room:', room) + console.log('Room ID:', room.id) uni.navigateTo({ url: `/pages/integrated/meeting/detail?roomId=${room.id}` }) diff --git a/src/sheep/api/meetingRoom.ts b/src/sheep/api/meetingRoom.ts index a219f22..1d2e9d8 100644 --- a/src/sheep/api/meetingRoom.ts +++ b/src/sheep/api/meetingRoom.ts @@ -10,4 +10,31 @@ export default { method: "GET", params, }), + + /** + * 获取会议室时间段 + */ + getTimeSlots: (roomId: string, date: string) => + request({ + url: `/integrated/meetingRoom/${roomId}/time-slots`, + method: "GET", + params: { date }, + }), + + /** + * 预约会议室 + */ + bookMeetingRoom: (roomId: string, data: { + date: string; + startTime: string; + endTime: string; + title: string; + description: string; + attendees: string[]; + }) => + request({ + url: `/integrated/meetingRoom/${roomId}/book`, + method: "POST", + data, + }), } \ No newline at end of file