diff --git a/.env b/.env index f56b7f1..f789095 100644 --- a/.env +++ b/.env @@ -20,15 +20,15 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' # 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.174:9999 # 邓-本地 - VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 -#VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上 +VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 +; VITE_APP_DEV_SERVICE = http://123.157.250.162: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.174:9999 # 邓-本地 - VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 -#VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 +VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 +; VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 生产环境 api地址 ---------------------------------- VITE_APP_PROD_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 diff --git a/index.html b/index.html index 531f584..2f148ee 100644 --- a/index.html +++ b/index.html @@ -21,9 +21,9 @@
- + diff --git a/src/App.vue b/src/App.vue index 400d2f5..5e6e197 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,235 +1,235 @@ - - - + + + diff --git a/src/pages/integrated/feedback/detail.vue b/src/pages/integrated/feedback/detail.vue index 118768b..e950eb7 100644 --- a/src/pages/integrated/feedback/detail.vue +++ b/src/pages/integrated/feedback/detail.vue @@ -14,9 +14,11 @@ @@ -40,36 +42,26 @@ const typeOptionsLoaded = ref(false) async function loadTypeOptions() { try { const res: any = await feedbackApi.getFeedbackType() - console.log('反馈类型API响应:', res) if (res.code === 0 && res.data && Array.isArray(res.data)) { typeOptions.value = res.data.map(item => ({ value: item.id, label: item.label })) - console.log('处理后的反馈类型选项:', typeOptions.value) typeOptionsLoaded.value = true } else { - console.error('获取反馈类型失败:', res.msg) typeOptionsLoaded.value = true } } catch (e) { - console.error('获取反馈类型异常:', e) typeOptionsLoaded.value = true } } function getTypeLabel(type) { - console.log('获取类型标签 - 输入类型:', type, '类型:', typeof type) - console.log('获取类型标签 - 类型选项:', typeOptions.value) if (!typeOptions.value.length || !type) { - console.log('获取类型标签 - 无选项或无类型,返回:', type || '') return type || '' } const option = typeOptions.value.find(item => String(item.value) === String(type)) - console.log('获取类型标签 - 找到的选项:', option) - const result = option ? option.label : type - console.log('获取类型标签 - 最终结果:', result) - return result + return option ? option.label : type } function getTypeClass(type: string) { @@ -108,6 +100,14 @@ function formatTime(time: string) { return new Date(time).toLocaleString() } +function handleImageError(img: string) { + // 图片加载失败处理 +} + +function handleImageLoad(img: string) { + // 图片加载成功处理 +} + // 计算图片数组 const imageList = computed(() => { if (!detail.value.picUrl) return [] @@ -116,7 +116,6 @@ const imageList = computed(() => { onLoad(async (options: any) => { const id = options.id - console.log('页面参数:', options) if (!id) { uni.showToast({ title: '缺少反馈ID', icon: 'none' }) return @@ -127,7 +126,6 @@ onLoad(async (options: any) => { // 先获取反馈详情 const response: any = await feedbackApi.getFeedbackDetail(id) - console.log('反馈详情响应:', response) if (response.code === 0) { // 处理不同的数据结构 @@ -136,11 +134,9 @@ onLoad(async (options: any) => { } else if (response.data && typeof response.data === 'object') { detail.value = response.data } else { - console.error('数据结构异常:', response.data) uni.showToast({ title: '数据格式错误', icon: 'none' }) return } - console.log('反馈详情数据:', detail.value) } else { uni.showToast({ title: response.msg || '获取详情失败', icon: 'none' }) return @@ -151,7 +147,6 @@ onLoad(async (options: any) => { uni.hideLoading() } catch (error) { - console.error('获取详情失败:', error) uni.hideLoading() uni.showToast({ title: '获取详情失败', icon: 'none' }) } diff --git a/src/pages/integrated/feedback/index.vue b/src/pages/integrated/feedback/index.vue index 7710ccb..083855d 100644 --- a/src/pages/integrated/feedback/index.vue +++ b/src/pages/integrated/feedback/index.vue @@ -119,21 +119,17 @@ const canSubmit = computed(() => { async function loadTypeOptions() { try { const res: any = await feedbackApi.getFeedbackType() - console.log('反馈类型API响应:', res) if (res.code === 0 && res.data && Array.isArray(res.data)) { typeOptions.value = res.data.map(item => ({ value: item.id, label: item.label })) - console.log('处理后的反馈类型选项:', typeOptions.value) typeOptionsLoaded.value = true } else { - console.error('获取反馈类型失败:', res.msg) uni.showToast({ title: res.msg || '获取反馈类型失败', icon: 'none' }) typeOptionsLoaded.value = true } } catch (e) { - console.error('获取反馈类型异常:', e) uni.showToast({ title: '获取反馈类型失败', icon: 'none' }) typeOptionsLoaded.value = true } @@ -144,17 +140,11 @@ function onTypeChange(e: any) { } function getTypeLabel(type: string) { - console.log('列表页获取类型标签 - 输入类型:', type, '类型:', typeof type) - console.log('列表页获取类型标签 - 类型选项:', typeOptions.value) if (!typeOptions.value.length || !type) { - console.log('列表页获取类型标签 - 无选项或无类型,返回:', type || '') return type || '' } const option = typeOptions.value.find(item => String(item.value) === String(type)) - console.log('列表页获取类型标签 - 找到的选项:', option) - const result = option ? option.label : type - console.log('列表页获取类型标签 - 最终结果:', result) - return result + return option ? option.label : type } function getTypeClass(type: string) { @@ -220,6 +210,8 @@ async function submitFeedback() { description.value = '' contact.value = '' typeIndex.value = 0 + // 使用 nextTick 确保在下一个 DOM 更新周期清空上传列表 + await nextTick() uploadList.value = [] // 刷新列表 loadFeedbackList() diff --git a/src/pages/integrated/meeting/booking-detail.vue b/src/pages/integrated/meeting/booking-detail.vue index 2b5ba75..3a87140 100644 --- a/src/pages/integrated/meeting/booking-detail.vue +++ b/src/pages/integrated/meeting/booking-detail.vue @@ -1,42 +1,75 @@ @@ -48,6 +81,18 @@ import meetingRoomApi from '@/sheep/api/meetingRoom' const detail = ref({}) +// 获取状态样式类 +function getStatusClass(status: string) { + const classMap: Record = { + '1': 'status-pending', + '2': 'status-approved', + '3': 'status-rejected', + '4': 'status-cancelled', + '5': 'status-completed' + } + return classMap[status] || 'status-pending' +} + onLoad(async (options: any) => { const id = options.id if (!id) return @@ -60,51 +105,154 @@ onLoad(async (options: any) => {