diff --git a/property-uniapp-project/.claude/settings.local.json b/property-uniapp-project/.claude/settings.local.json
index 0a85c55..9bc7fee 100644
--- a/property-uniapp-project/.claude/settings.local.json
+++ b/property-uniapp-project/.claude/settings.local.json
@@ -34,7 +34,13 @@
"Bash(perl -i -pe 's/^t\\\\t\\\\t\\\\t\\\\t\"disableScroll\"/\\\\t\\\\t\\\\t\\\\t\\\\t\\\\t\"disableScroll\"/' pages.json)",
"Bash(sed -i '113s|// loadRevenue\\(true\\)|loadRevenue\\(true\\)|' pageSubPack/inspection-revenue/public-revenue.vue)",
"Bash(sed -i '120s|// loadRevenue\\(\\)|loadRevenue\\(\\)|' pageSubPack/inspection-revenue/public-revenue.vue)",
- "Bash(xxd pageSubPack/visitor/visitor-add.vue)"
+ "Bash(xxd pageSubPack/visitor/visitor-add.vue)",
+ "Bash(sed -i '24s/^\\\\t\\\\t\\\\t\\\\t/\\\\t\\\\t /' pageSubPack/online-repair/publicRepair.vue)",
+ "Bash(sed -i '25s/^ \\\\t\\\\t\\\\t\\\\t/\\\\t\\\\t \\\\t/' pageSubPack/online-repair/publicRepair.vue)",
+ "Bash(sed -i '26s/^\\\\t\\\\t\\\\t\\\\t/\\\\t\\\\t \\\\t/' pageSubPack/online-repair/publicRepair.vue)",
+ "Bash(sed -i '27s/^\\\\t\\\\t\\\\t\\\\t/\\\\t\\\\t /' pageSubPack/online-repair/publicRepair.vue)",
+ "Bash(sed -i '416s/.*/ } else {\\\\n submitting.value = false\\\\n uni.showToast\\({ title: res.msg || '\\\\''提交失败'\\\\'', icon: '\\\\''none'\\\\'' }\\)\\\\n }/' pageSubPack/online-repair/personalRepair.vue)",
+ "Bash(sed -i '420s/.*/ } catch \\(e\\) {\\\\n submitting.value = false\\\\n uni.showToast\\({ title: '\\\\''提交失败,请检查网络或重试'\\\\'', icon: '\\\\''none'\\\\'' }\\)\\\\n } finally {\\\\n uni.hideLoading\\(\\)\\\\n }/' pageSubPack/online-repair/personalRepair.vue)"
]
}
}
diff --git a/property-uniapp-project/manifest.json b/property-uniapp-project/manifest.json
index 0ed7d69..2d6fd46 100644
--- a/property-uniapp-project/manifest.json
+++ b/property-uniapp-project/manifest.json
@@ -2,8 +2,8 @@
"name" : "花开物业",
"appid" : "__UNI__29C3D60",
"description" : "智慧社区居民端面向小区业主使用,支持注册、验证码、账号密码多种登录方式,提供密码找回功能,账号使用安全便捷。支持多小区切换,首页设有轮播 banner、社区公告,集成远程开门、生活缴费、在线报修、访客邀请、社区活动常用服务。全服务板块统一涵盖门禁开门、线上缴费、报修申报、访客预约、投诉反馈、问卷调研、活动报名、社区公示、一键联系物业功能。个人中心可管理房屋、住户、车位、车辆信息,支持更换手机号、修改密码、消息通知设置、版本更新及账号退出,一站式满足业主居家生活、社区服务、房产车辆管理需求,实现社区生活数字化、便捷化。",
- "versionName" : "1.0.4",
- "versionCode" : 117,
+ "versionName" : "1.0.5",
+ "versionCode" : 118,
"transformPx" : false,
"uniCloud" : {
"provider" : "aliyun",
diff --git a/property-uniapp-project/pageSubPack/online-repair/personalRepair.vue b/property-uniapp-project/pageSubPack/online-repair/personalRepair.vue
index 03ac6de..2b8c27a 100644
--- a/property-uniapp-project/pageSubPack/online-repair/personalRepair.vue
+++ b/property-uniapp-project/pageSubPack/online-repair/personalRepair.vue
@@ -22,13 +22,17 @@
标题
-
+
问题描述
-
+
+
+ {{ form.desc.length }}/200
+
+
@@ -61,7 +65,9 @@
-
+
+
+
@@ -149,6 +155,9 @@ const houseId = ref('')
const projectName = ref('')
const projectId = ref('')
+
+ // 提交状态锁
+const submitting = ref(false)
// 表单数据
const form = ref({
title: '',
@@ -214,6 +223,11 @@ const closeTimePopup = () => {
const confirmTime = () => {
const selectedDateTime = `${selectedDate.value} ${selectedHour.value}:${selectedMinute.value}`
+ const now = moment()
+ if (moment(selectedDateTime, 'YYYY-MM-DD HH:mm').isBefore(now)) {
+ uni.showToast({ title: '预约时间不能早于当前时间', icon: 'none' })
+ return
+ }
selectedTime.value = moment(selectedDateTime, 'YYYY-MM-DD HH:mm')
form.value.datetime = selectedTime.value.format('YYYY-MM-DD HH:mm')
closeTimePopup()
@@ -355,15 +369,17 @@ const submitForm = async () => {
if (!form.value.title) return uni.showToast({ title: '请输入标题', icon: 'none' })
// if (!form.value.desc) return uni.showToast({ title: '请输入问题描述', icon: 'none' })
if (!/^1[3-9]\d{9}$/.test(form.value.phone)) return uni.showToast({ title: '手机号不正确', icon: 'none' })
- // if (!form.value.datetime) return uni.showToast({ title: '请选择预约时间', icon: 'none' })
+ if (!form.value.datetime) return uni.showToast({ title: '请选择预约时间', icon: 'none' })
+ if (moment(form.value.datetime, 'YYYY-MM-DD HH:mm').isBefore(moment())) return uni.showToast({ title: '预约时间不能早于当前时间', icon: 'none' })
const villageId = uni.getStorageSync('currentVillageId')
if (!villageId || villageId === '0') return uni.showToast({ title: '请先选择小区', icon: 'none' })
const userId = uni.getStorageSync('userId')
if (!userId) return uni.showToast({ title: '用户信息失效', icon: 'none' })
+ submitting.value = true
- uni.showLoading({ title: '提交中...' })
+ uni.showLoading({ title: '提交中...' ,mask:true})
try {
const imageUrls = await uploadImages()
@@ -399,9 +415,11 @@ const submitForm = async () => {
})
}, 1500)
} else {
+ submitting.value = false
uni.showToast({ title: res.msg || '提交失败', icon: 'none' })
}
} catch (e) {
+ submitting.value = false
uni.showToast({ title: '提交失败,请检查网络或重试', icon: 'none' })
} finally {
uni.hideLoading()
@@ -438,9 +456,10 @@ const submitForm = async () => {
justify-content: space-between;
}
-/* .time-value {
- color: #000;
-} */
+.time-value {
+ white-space: nowrap;
+ font-size: 26rpx;
+}
.input, .textarea {
flex: 1;
padding: 20rpx;
@@ -458,6 +477,27 @@ const submitForm = async () => {
/* border-bottom: 1px solid #eee; */
padding-bottom: 10px;
}
+.textarea-wrap {
+ flex: 1;
+ position: relative;
+}
+.desc-textarea {
+ width: 100%;
+ height: 160rpx;
+ font-size: 28rpx;
+ padding: 10rpx 0;
+ box-sizing: border-box;
+ border: 1px solid #eee;
+ border-radius: 4px;
+ padding: 5px;
+}
+.char-count {
+ position: absolute;
+ right: 10rpx;
+ bottom: 10rpx;
+ font-size: 24rpx;
+ color: #999;
+}
.switch {
font-size: 12px;
@@ -511,6 +551,16 @@ textarea {
color: #999;
font-size: 12px;
}
+/* 提交中遮罩 */
+.submit-mask {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.4);
+ z-index: 9999;
+}
.submit-btn {
width: 100%;
background: #007aff;
diff --git a/property-uniapp-project/pageSubPack/online-repair/personalSelectPoject.vue b/property-uniapp-project/pageSubPack/online-repair/personalSelectPoject.vue
index 7e17a25..bc1cca3 100644
--- a/property-uniapp-project/pageSubPack/online-repair/personalSelectPoject.vue
+++ b/property-uniapp-project/pageSubPack/online-repair/personalSelectPoject.vue
@@ -1,20 +1,20 @@
-
+
-
+
-
{{ item.projectName }}
@@ -23,28 +23,16 @@
-
{{ item.projectName }}
-
-
-
-
-
- 暂无维修项目
-
-
-
-
-
@@ -56,13 +44,11 @@ import { getRepairProjectList } from '../api/api.js'
// 分类列表
const categoryList = ref([])
-// 项目列表
+// 所有项目数据
const projectList = ref([])
-// 选中状态
+// 选中的分类
const activeCategory = ref(1)
-const selectedProject = ref({}) // 选中的项目
-const searchKey = ref('')
// 从接口获取个人报修项目列表
const fetchProjectList = async () => {
@@ -89,7 +75,10 @@ onLoad(() => {
fetchProjectList()
})
-// 筛选当前分类的项目
+// 搜索关键词
+const searchKey = ref('')
+
+// 筛选当前分类的项目(含搜索)
const currentProjectList = computed(() => {
let list = projectList.value.filter(item => item.categoryId === activeCategory.value)
if (searchKey.value) {
@@ -101,41 +90,34 @@ const currentProjectList = computed(() => {
// 选择分类
const selectCategory = (item) => {
activeCategory.value = item.id
- selectedProject.value = {} // 切换分类清空选中项目
}
-// 选择项目
+// 选择项目并返回
const selectProject = (item) => {
- selectedProject.value = item
-}
-
-// 确认选择
-const confirmSelect = () => {
- if (!selectedProject.value.id) {
- uni.showToast({ title: '请选择维修项目', icon: 'none' })
- return
- }
-
// 获取分类名称
- const categoryName = categoryList.value.find(c => c.id === activeCategory.value).projectName
- // 传递给表单页
+ const categoryName = categoryList.value.find(c => c.id === item.categoryId)?.projectName || ''
+
+ // 用全局事件发送参数
uni.$emit('selectProject', {
- name: `${categoryName}-${selectedProject.value.projectName}`,
- id: selectedProject.value.id
+ name: `${categoryName}-${item.projectName}`,
+ id: item.id
+ })
+
+ // 返回上一页
+ uni.navigateBack({
+ delta: 1
})
-
- uni.navigateBack({ delta: 1 })
}
\ No newline at end of file
+
diff --git a/property-uniapp-project/pageSubPack/online-repair/publicRepair.vue b/property-uniapp-project/pageSubPack/online-repair/publicRepair.vue
index b3b98ef..ce6154b 100644
--- a/property-uniapp-project/pageSubPack/online-repair/publicRepair.vue
+++ b/property-uniapp-project/pageSubPack/online-repair/publicRepair.vue
@@ -15,13 +15,16 @@
标题
-
+
问题描述
-
+
+
+ {{ form.desc.length }}/200
+
@@ -49,7 +52,10 @@
-
+
+
+
+
@@ -63,6 +69,8 @@ import { getUserProfile } from '../api/apiSub.js'
const repairProject = ref('')
const projectId = ref('')
+ // 提交状态锁
+ const submitting = ref(false)
// 表单数据
const form = ref({
title: '',
@@ -186,7 +194,8 @@ const submitForm = async () => {
return
}
- uni.showLoading({ title: '提交中...' })
+ submitting.value = true
+ uni.showLoading({ title: '提交中...' ,mask:true})
try {
// 先上传图片
@@ -218,9 +227,11 @@ const submitForm = async () => {
uni.navigateTo({ url: '/pageSubPack/online-repair/onlineRepair' })
}, 1500)
} else {
+ submitting.value = false
uni.showToast({ title: res.msg || '提交失败', icon: 'none' })
}
} catch (e) {
+ submitting.value = false
uni.showToast({ title: '网络异常', icon: 'none' })
} finally {
uni.hideLoading()
@@ -270,6 +281,27 @@ const submitForm = async () => {
.textarea {
resize: none;
}
+.textarea-wrap {
+ flex: 1;
+ position: relative;
+}
+.desc-textarea {
+ width: 100%;
+ height: 160rpx;
+ font-size: 28rpx;
+ padding: 10rpx 0;
+ box-sizing: border-box;
+ border: 1px solid #eee;
+ border-radius: 4px;
+ padding: 5px;
+}
+.char-count {
+ position: absolute;
+ right: 10rpx;
+ bottom: 10rpx;
+ font-size: 24rpx;
+ color: #999;
+}
.upload-wrap {
display: flex;
flex-wrap: wrap;
@@ -308,6 +340,16 @@ const submitForm = async () => {
color: #999;
font-size: 12px;
}
+/* 提交中遮罩 */
+.submit-mask {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ background: rgba(0, 0, 0, 0.4);
+ z-index: 9999;
+}
.submit-btn {
width: 100%;
background: #007aff;
diff --git a/property-uniapp-project/pageSubPack/online-repair/repairSelect.vue b/property-uniapp-project/pageSubPack/online-repair/repairSelect.vue
index c6a1b4c..1727405 100644
--- a/property-uniapp-project/pageSubPack/online-repair/repairSelect.vue
+++ b/property-uniapp-project/pageSubPack/online-repair/repairSelect.vue
@@ -117,14 +117,17 @@ const selectProject = (item) => {
height: 100vh;
box-sizing: border-box;
background-color: #f9f9f9;
+ display: flex;
+ flex-direction: column;
}
.search-bar {
display: flex;
align-items: center;
- padding: 15px 10px;
+ padding: 8px 10px;
background: #f5f5f5;
border-radius: 6px;
margin-bottom: 10px;
+ flex-shrink: 0;
}
.search-bar input {
flex: 1;
@@ -132,11 +135,11 @@ const selectProject = (item) => {
}
.category-wrap {
display: flex;
- height: calc(100% - 50px);
+ flex: 1;
+ min-height: 0;
}
.category-left {
width: 120px;
- height: 100%;
background: #fff;
border-radius: 6px 0 0 6px;
margin-right: 20rpx;
@@ -155,7 +158,6 @@ const selectProject = (item) => {
}
.category-right {
flex: 1;
- height: 100%;
background: #fff;
border-radius: 0 6px 6px 0;
padding: 10px;