From 99c36c0d831c58a09d7d1a6b564199bf0ffedb63 Mon Sep 17 00:00:00 2001 From: zhouyanli <593579392@qq.com> Date: Tue, 19 May 2026 17:52:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E4=B8=80=E9=94=AE=E5=BC=80?= =?UTF-8?q?=E9=97=A8=20=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5=E5=BC=95?= =?UTF-8?q?=E5=AF=BC=E9=A1=B5=E8=87=AA=E9=80=82=E5=BA=94=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wuye-manager-uniapp/api/api.js | 2 +- .../fault-reporting/fault-reporting.vue | 8 +- .../fault-reporting/repairSelect.vue | 14 +- .../pageSubPack/loginSub/login.vue | 5 +- .../pageSubPack/notice-list/notice-list.vue | 2 +- .../pageSubPack/oneClickOpen/oneClickOpen.vue | 7 +- wuye-manager-uniapp/pages/guide/guide.vue | 109 ++++-- wuye-manager-uniapp/pages/index/index.vue | 9 +- wuye-manager-uniapp/pages/my/my.vue | 364 +++++++++--------- 9 files changed, 271 insertions(+), 249 deletions(-) diff --git a/wuye-manager-uniapp/api/api.js b/wuye-manager-uniapp/api/api.js index 754443b..553e6ea 100644 --- a/wuye-manager-uniapp/api/api.js +++ b/wuye-manager-uniapp/api/api.js @@ -66,7 +66,7 @@ export const addRepairList = (data) =>{ } // 上传图片 export const uploadFile = (filePath) => { - return upload(filePath,' /resource/oss/upload'); + return upload(filePath,'/resource/oss/upload'); } // 查询一键开门 diff --git a/wuye-manager-uniapp/pageSubPack/fault-reporting/fault-reporting.vue b/wuye-manager-uniapp/pageSubPack/fault-reporting/fault-reporting.vue index fcf4292..fb2e47c 100644 --- a/wuye-manager-uniapp/pageSubPack/fault-reporting/fault-reporting.vue +++ b/wuye-manager-uniapp/pageSubPack/fault-reporting/fault-reporting.vue @@ -100,14 +100,14 @@ onLoad((options) => { repairId.value = options.projectId } - // ✅ 监听返回选择的项目 + // 监听返回选择的项目 uni.$on('selectRepairProject', (data) => { repairProject.value = `${data.category}-${data.project}` repairId.value = data.projectId }) }) -// ✅ 页面卸载时移除监听(必须加) +// 页面卸载时移除监听 onUnload(() => { uni.$off('selectRepairProject') }) @@ -155,8 +155,8 @@ const uploadImages = async () => { uploadedUrls.push(res.url || '') } catch (err) { uni.showToast({ - title:e.msg || '图片上传失败', - icon:'error' + title:err.msg || '图片上传失败', + icon:'error' }) } } diff --git a/wuye-manager-uniapp/pageSubPack/fault-reporting/repairSelect.vue b/wuye-manager-uniapp/pageSubPack/fault-reporting/repairSelect.vue index 08b156f..4caa60b 100644 --- a/wuye-manager-uniapp/pageSubPack/fault-reporting/repairSelect.vue +++ b/wuye-manager-uniapp/pageSubPack/fault-reporting/repairSelect.vue @@ -42,18 +42,10 @@ import { onLoad } from '@dcloudio/uni-app' import {getRepairOrder} from '../../api/api.js' // 分类列表 -const categoryList = ref([ - // { id: 1, name: '基础设施' }, - // { id: 2, name: '电子设施' } -]) +const categoryList = ref([]) // 所有项目数据 -const projectList = ref([ - // { id: 101, categoryId: 1, name: '路灯' }, - // { id: 102, categoryId: 1, name: '楼层指示灯' }, - // { id: 103, categoryId: 2, name: '应急出口灯' }, - // { id: 104, categoryId: 1, name: '草坪灯' } -]) +const projectList = ref([]) // 选中的分类 const activeCategory = ref(1) @@ -91,7 +83,7 @@ const fetchProjectList = async () => { activeCategory.value = categoryList.value[0]?.id || 1 } } catch (e) { - uni.showToast({ title: '获取项目列表失败', icon: 'none' }) + uni.showToast({ title: e.msg ||'获取项目列表失败', icon: 'none' }) } } diff --git a/wuye-manager-uniapp/pageSubPack/loginSub/login.vue b/wuye-manager-uniapp/pageSubPack/loginSub/login.vue index cd95b3f..5e9d5ef 100644 --- a/wuye-manager-uniapp/pageSubPack/loginSub/login.vue +++ b/wuye-manager-uniapp/pageSubPack/loginSub/login.vue @@ -10,7 +10,7 @@ @@ -31,7 +31,7 @@ @@ -269,7 +269,6 @@ onUnmounted(() => { /* 页面容器 */ .login-page { padding: 80rpx 40rpx 40rpx; - /* background-color: #f8f9fa; */ min-height: 100vh; background: repeating-linear-gradient(to bottom, #e2f0ff, #f6faff); } diff --git a/wuye-manager-uniapp/pageSubPack/notice-list/notice-list.vue b/wuye-manager-uniapp/pageSubPack/notice-list/notice-list.vue index a4e00b6..95676a7 100644 --- a/wuye-manager-uniapp/pageSubPack/notice-list/notice-list.vue +++ b/wuye-manager-uniapp/pageSubPack/notice-list/notice-list.vue @@ -45,7 +45,7 @@ const noticeList = ref([]) // 分页相关 const pageNum = ref(1) // 当前页 -const pageSize = ref(5) // 每页条数 +const pageSize = ref(10) // 每页条数 const total = ref(0) // 总条数 const loading = ref(false) // 加载状态 const noMore = ref(false) // 是否没有更多 diff --git a/wuye-manager-uniapp/pageSubPack/oneClickOpen/oneClickOpen.vue b/wuye-manager-uniapp/pageSubPack/oneClickOpen/oneClickOpen.vue index 766c6b3..3811cbb 100644 --- a/wuye-manager-uniapp/pageSubPack/oneClickOpen/oneClickOpen.vue +++ b/wuye-manager-uniapp/pageSubPack/oneClickOpen/oneClickOpen.vue @@ -1,7 +1,7 @@ - + @@ -59,6 +59,7 @@ import { getOpenDoorList, switchOpenDoor } from '../../api/api.js' // 响应式数据:选中的门索引、开门成功提示 const selectedDoor = ref(-1) // -1表示未选中 const showSuccess = ref(false) +const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0) // 门列表数据 const doorList = ref([]) @@ -130,8 +131,10 @@ const openDoor = () => { box-sizing: border-box; } .status_bar { - height: 32px; + /* height: 32px; */ width: 100%; + /* height: var(--status-bar-height); */ + flex-shrink: 0; } /* 顶部标题 */ .top-bar { diff --git a/wuye-manager-uniapp/pages/guide/guide.vue b/wuye-manager-uniapp/pages/guide/guide.vue index 4276773..914a398 100644 --- a/wuye-manager-uniapp/pages/guide/guide.vue +++ b/wuye-manager-uniapp/pages/guide/guide.vue @@ -1,6 +1,6 @@ - + - - - - - 精准服务 - 需求深度洞察,资源优化配置 + + + + + 精准服务 + 需求深度洞察,资源优化配置 + - - - - - 高效沟通 - 反馈即时响应,流程无缝衔接 + + + + + 高效沟通 + 反馈即时响应,流程无缝衔接 + - - - - - 智能管理 - 数据驱动决策,风险提前预警 + + + + + 智能管理 + 数据驱动决策,风险提前预警 + - + @@ -91,9 +94,9 @@ const handleBtnClick = () => { // 1. 记录引导已完成 uni.setStorageSync('hasShowGuide', true); // 2. 跳转首页 - uni.navigateTo({ - url:"/pageSubPack/loginSub/pwd-login" - }) + uni.navigateTo({ + url: "/pageSubPack/loginSub/pwd-login" + }) // uni.switchTab({ // url: '/pages/index/index' // }); @@ -106,40 +109,61 @@ const handleBtnClick = () => { .guide-page { width: 100%; height: 100vh; - /* background-color: #f8f9ff; */ background: linear-gradient(to bottom, #E2F0FF, #F6FAFF); display: flex; flex-direction: column; align-items: center; - justify-content: space-between; - padding: 120rpx 40rpx 80rpx; box-sizing: border-box; } - .status_bar { - height: 140px; - width: 100%; - } + +/* 状态栏 - 自适应设备状态栏高度 */ +.status-bar { + height: var(--status-bar-height); + width: 100%; + flex-shrink: 0; +} + /* 滑动容器 */ .guide-swiper { flex: 1; width: 100%; } -/* 单个引导项 */ +/* 单个引导项 - 全屏自适应 */ .guide-item { - width: 360px; - height: 480px; + width: 100%; + height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; + padding: 0 60rpx; + box-sizing: border-box; } - +/* 图片区域 - 自适应 */ .guide-img { - width: 77%; - height: 50%; - margin-bottom: 80rpx; + width: 80%; + max-width: 600rpx; + flex: 1; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 40rpx; +} + +.img-content { + width: 100%; + height: 100%; + max-height: 50vh; +} + +/* 文字区域 */ +.guide-text { + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 40rpx; } /* 引导标题 */ @@ -161,7 +185,8 @@ const handleBtnClick = () => { display: flex; align-items: center; justify-content: center; - margin-bottom: 60rpx; + margin-bottom: 40rpx; + flex-shrink: 0; } /* 单个进度点 */ @@ -171,6 +196,7 @@ const handleBtnClick = () => { border-radius: 8rpx; background-color: #ddd; margin: 0 8rpx; + transition: all 0.3s ease; } /* 激活的进度点 */ @@ -182,6 +208,9 @@ const handleBtnClick = () => { /* 按钮容器 */ .guide-btn-wrap { width: 80%; + max-width: 600rpx; + margin-bottom: 80rpx; + flex-shrink: 0; } /* 引导按钮 */ @@ -210,7 +239,7 @@ const handleBtnClick = () => { border: none; } -/* 按钮禁用态 */ +/* 按钮禁用态(可选) */ .guide-btn:disabled { background-color: #ccc; color: #fff; diff --git a/wuye-manager-uniapp/pages/index/index.vue b/wuye-manager-uniapp/pages/index/index.vue index 3a6cd4d..d56c07b 100644 --- a/wuye-manager-uniapp/pages/index/index.vue +++ b/wuye-manager-uniapp/pages/index/index.vue @@ -2,7 +2,7 @@ - + 首页 @@ -134,6 +134,7 @@ const noticeText = ref('暂无公告') const allCount = ref(0) // 全部巡检 const pendingCount = ref(0) //待巡检 const InspectedCount = ref(0) //已巡检 +const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0) // =======方法======= @@ -214,7 +215,7 @@ const getInspectionData = () =>{ getTodayInspection().then(res =>{ if(res.code === 200){ if(res.data){ - allCount.value = res.data.unfinishedPoints + allCount.value = res.data.totalTasks pendingCount.value = res.data.unfinishedTasks InspectedCount.value = res.data.completedTasks }else{ @@ -288,8 +289,8 @@ const clickItem = index => { } .status_bar { - height: 46px; width: 100%; + flex-shrink: 0; } /* 导航栏 */ @@ -300,7 +301,7 @@ const clickItem = index => { } .nav-title { - font-size: 14px; + font-size: 32rpx; font-weight: 400; } diff --git a/wuye-manager-uniapp/pages/my/my.vue b/wuye-manager-uniapp/pages/my/my.vue index fc24d3f..4077465 100644 --- a/wuye-manager-uniapp/pages/my/my.vue +++ b/wuye-manager-uniapp/pages/my/my.vue @@ -1,14 +1,12 @@ - + - + {{ loginName }} @@ -21,20 +19,10 @@ - + {{ item.title }} - {{ - item.desc - }} @@ -46,193 +34,203 @@