From 9e8f5d6acc2bd82855f6a49d39279b213d5144b0 Mon Sep 17 00:00:00 2001 From: zhouyanli <593579392@qq.com> Date: Thu, 13 Aug 2026 17:42:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activity-list/activityListDetails.vue | 16 ++++++++++----- .../pageSubPack/activity-list/live-add.vue | 8 ++++++-- .../pageSubPack/api/request.js | 4 ++-- .../pageSubPack/my/addHouse.vue | 20 ++++++------------- .../pageSubPack/my/carDetail.vue | 3 --- .../pageSubPack/my/houseDetail.vue | 12 ----------- .../pageSubPack/my/myCarIndex.vue | 5 +++++ .../online-repair/personalRepair.vue | 5 ++++- .../pageSubPack/online-repair/selectHouse.vue | 3 ++- .../pageSubPack/payment-list/paymentIndex.vue | 10 ++++------ property-uniapp-project/pages.json | 6 ++---- 11 files changed, 42 insertions(+), 50 deletions(-) diff --git a/property-uniapp-project/pageSubPack/activity-list/activityListDetails.vue b/property-uniapp-project/pageSubPack/activity-list/activityListDetails.vue index 6d2ae8e..e275de4 100644 --- a/property-uniapp-project/pageSubPack/activity-list/activityListDetails.vue +++ b/property-uniapp-project/pageSubPack/activity-list/activityListDetails.vue @@ -178,7 +178,7 @@ - + @@ -251,6 +251,12 @@ const isActivityEnded = computed(() => { return false }) +// 判断活动是否已开始(开始时间已到) +const isActivityStarted = computed(() => { + if (!activityConent.value.startTime) return false + return moment().isSameOrAfter(moment(activityConent.value.startTime)) +}) + @@ -277,9 +283,9 @@ onLoad((option) =>{ } // 3. 监听实况列表刷新事件 - // uni.$on('refreshLiveList', () => { - // getLiveActivityList() - // }) + uni.$on('refreshLiveList', () => { + getLiveActivityList() + }) }) // 获取列表详情 @@ -449,7 +455,7 @@ const liveClick = () =>{ // --------- onUnload(() => { - // uni.$off('refreshLiveList') + uni.$off('refreshLiveList') }) // 显示提示信息 diff --git a/property-uniapp-project/pageSubPack/activity-list/live-add.vue b/property-uniapp-project/pageSubPack/activity-list/live-add.vue index 13909f2..0609369 100644 --- a/property-uniapp-project/pageSubPack/activity-list/live-add.vue +++ b/property-uniapp-project/pageSubPack/activity-list/live-add.vue @@ -48,7 +48,7 @@ - + @@ -67,6 +67,8 @@ const activityId = ref(''); const statusDesc = ref(''); // 输入字符长度 const currentLength = ref(0); +// 提交状态锁(防重复点击) +const submitting = ref(false); // 图片列表(本地临时路径) const imgList = ref([]); // 定位信息 @@ -117,7 +119,6 @@ const chooseImg = () => { imgList.value = [...imgList.value, ...res.tempFilePaths]; }, fail: (err) => { - uni.showToast({ title: '选择图片失败', icon: 'none' }); console.error('选择图片失败:', err); } }); @@ -229,6 +230,7 @@ const uploadAllImages = async () => { // 提交实况 const submitStatus = async () => { + if (submitting.value) return; if (!statusDesc.value.trim()) { uni.showToast({ title: '请输入实况描述', icon: 'none' }); return; @@ -238,6 +240,7 @@ const submitStatus = async () => { // return; // } + submitting.value = true; uni.showLoading({ title: '提交中...', mask: true }); try { @@ -271,6 +274,7 @@ const submitStatus = async () => { uni.navigateBack(); }, 1500); } catch (err) { + submitting.value = false; uni.hideLoading(); uni.showToast({ title: err.msg || '提交失败', icon: 'none' }); } diff --git a/property-uniapp-project/pageSubPack/api/request.js b/property-uniapp-project/pageSubPack/api/request.js index 58d6827..1e61ae6 100644 --- a/property-uniapp-project/pageSubPack/api/request.js +++ b/property-uniapp-project/pageSubPack/api/request.js @@ -2,8 +2,8 @@ import { navigateToLogin } from '@/common/checkLogin.js' let baseUrl = ''; if (process.env.NODE_ENV === 'development') { - baseUrl = 'http://192.168.1.6:8080'; // 开发环境 - // baseUrl = 'https://wuyeapi.ckdzkj.com'; + // baseUrl = 'http://192.168.1.6:8080'; // 开发环境 + baseUrl = 'http://192.168.1.222:8080'; } else { baseUrl = 'https://wuyeapi.ckdzkj.com'; // 生产环境 } diff --git a/property-uniapp-project/pageSubPack/my/addHouse.vue b/property-uniapp-project/pageSubPack/my/addHouse.vue index de41827..a0e37b7 100644 --- a/property-uniapp-project/pageSubPack/my/addHouse.vue +++ b/property-uniapp-project/pageSubPack/my/addHouse.vue @@ -71,14 +71,14 @@ \u003E --> - + 房屋状态 {{ formData.status.name || '请选择' }} - + 设为默认房屋 @@ -281,7 +281,7 @@ unitId: uni.getStorageSync('unitId'), floorId: uni.getStorageSync('floorId'), houseNumberId: uni.getStorageSync('houseNumberId'), - status: uni.getStorageSync('houseStatus'), + status: uni.getStorageSync('houseStatus') || { id: 0, name: '自住' }, isDefault: uni.getStorageSync('houseIsDefault') == true ? true : false, // 开关默认开启 }) const statusList = ref([{ @@ -499,7 +499,6 @@ }) // 页面显示时从 storage 同步选择数据(从选择小区/楼栋等页面返回时) - // 注意:不用 || 兜底,否则 storage 被清空后旧值会残留导致页面显示与实际数据不一致 const syncFormDataFromStorage = () => { formData.community = uni.getStorageSync('communityName') formData.communityId = uni.getStorageSync('communityId') @@ -511,7 +510,7 @@ formData.floorId = uni.getStorageSync('floorId') formData.houseNumber = uni.getStorageSync('houseNumberName') formData.houseNumberId = uni.getStorageSync('houseNumberId') - formData.status = uni.getStorageSync('houseStatus') + formData.status = uni.getStorageSync('houseStatus') || { id: 0, name: '自住' } } onShow(() => { syncFormDataFromStorage() @@ -520,9 +519,7 @@ try { const tempPath = await (type === 'front' ? idCardFrontUpload.chooseImage() : idCardBackUpload .chooseImage()) - // 已经由 hook 自动处理了 previewUrl 和 tempFilePath } catch (err) { - // 用户取消选择,不处理 } } @@ -601,7 +598,6 @@ // 下一步 const goNext = () => { console.log(typeof(uni.getStorageSync('communityId'))); - // 基础校验 if (!formData.community) { uni.showToast({ title: '请选择小区', @@ -645,13 +641,11 @@ return } currentStep.value = 1 - //跳转 } // 完整校验 const goSubmit = async () => { - // 1. 前端校验 if (!form.name) return uni.showToast({ title: '请输入住户姓名', icon: 'none' @@ -688,8 +682,7 @@ title: '请上传身份证国徽面', icon: 'none' }) - - // 2. 确认弹窗 + const modalRes = await new Promise((resolve) => { uni.showModal({ title: '确认提交', @@ -699,7 +692,6 @@ }) if (!modalRes.confirm) return - // 3. 开始提交 uni.showLoading({ title: '提交中...', mask: true @@ -743,7 +735,7 @@ gender: form.gender == '男' ? '0' : '1', idCardType: form.cardType.id, idCard: form.cardNo, - houseStatus: uni.getStorageSync('houseStatus').id, + houseStatus: formData.status.id, ownerRelationship: form.relation.id, phone: form.phone, smsCode: form.code, diff --git a/property-uniapp-project/pageSubPack/my/carDetail.vue b/property-uniapp-project/pageSubPack/my/carDetail.vue index d5bc584..c05511c 100644 --- a/property-uniapp-project/pageSubPack/my/carDetail.vue +++ b/property-uniapp-project/pageSubPack/my/carDetail.vue @@ -1,8 +1,5 @@