diff --git a/.env b/.env index a83acd9..b0e1196 100644 --- a/.env +++ b/.env @@ -19,18 +19,16 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' # --------------------------- 开发环境 api地址 ---------------------------------- # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 #VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 -# VITE_APP_DEV_SERVICE = http://192.168.101.139:9999 # 邓-本地 -# VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 -# VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api # 测试线上-过期 -VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上 +#VITE_APP_DEV_SERVICE = http://192.168.101.139:9999 # 邓-本地 +VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 +# VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api # 测试线上 # --------------------------- 开发环境 图片访问基础地址 --------------------------- # VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 #VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上 -# VITE_IMAGE_DEV_PATH = http://192.168.101.139:9999 # 邓-本地 -# VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 -# VITE_IMAGE_DEV_PATH = http://123.156.230.15:8089/api # 测试线上-过期 -VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 +#VITE_IMAGE_DEV_PATH = http://192.168.101.139:9999 # 邓-本地 + VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 +# VITE_IMAGE_DEV_PATH = http://123.156.230.15:8089/api # 测试线上 # --------------------------- 生产环境 api地址 ---------------------------------- VITE_APP_PROD_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 diff --git a/src/pages.json b/src/pages.json index eff3e15..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" + } ] } -} \ No newline at end of file +} diff --git a/src/pages/integrated/meeting/detail.vue b/src/pages/integrated/meeting/detail.vue index 534aaaf..d73fcca 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,249 @@ @@ -117,6 +308,8 @@ function reserveMeeting() { .container { min-height: 100vh; background: #f5f6fa; + display: flex; + flex-direction: column; padding-bottom: 32rpx; } .custom-nav { @@ -220,58 +413,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 +476,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 +484,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..0018fcd 100644 --- a/src/pages/integrated/meeting/index.vue +++ b/src/pages/integrated/meeting/index.vue @@ -74,8 +74,15 @@ function fetchMeetingRooms() { } function goDetail(room) { + console.log('index.vue: Navigating to detail page with room:', room) + console.log('index.vue: Room ID being passed:', room.id) uni.navigateTo({ - url: `/pages/integrated/meeting/detail?roomId=${room.id}` + url: `/pages/integrated/meeting/detail?roomId=${room.id}`, + success: function(res) { + // 通过 eventChannel 传递 room 对象 + res.eventChannel.emit('acceptRoomInfo', room) + console.log('index.vue: Room object emitted via eventChannel:', room) + } }) } diff --git a/src/pages/integrated/visitor/myvisitor.vue b/src/pages/integrated/visitor/myvisitor.vue new file mode 100644 index 0000000..3c67402 --- /dev/null +++ b/src/pages/integrated/visitor/myvisitor.vue @@ -0,0 +1,484 @@ + + + + + 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