修改bug\优化内容、加上公区收益和巡检记录页面
This commit is contained in:
@@ -146,6 +146,7 @@
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { onLoad, onUnload } from '@dcloudio/uni-app'
|
||||
import { addQueryRepair, uploadFile } from '../api/api.js'
|
||||
import { getUserProfile } from '../api/apiSub.js'
|
||||
import moment from 'moment/moment'
|
||||
|
||||
// 选中的房屋/项目名称
|
||||
@@ -282,6 +283,14 @@ onLoad(() => {
|
||||
uni.$on('selectProject', (data) => {
|
||||
projectName.value = data.name
|
||||
projectId.value = data.id
|
||||
form.value.title = data.name
|
||||
})
|
||||
|
||||
// 自动获取当前登录用户手机号
|
||||
getUserProfile().then(res => {
|
||||
if (res.code === 200 && res.data && res.data.phone) {
|
||||
form.value.phone = res.data.phone
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -350,9 +359,9 @@ const submitForm = async () => {
|
||||
if (!houseName.value) return uni.showToast({ title: '请选择报修房屋', icon: 'none' })
|
||||
if (!projectName.value) return uni.showToast({ title: '请选择维修项目', icon: 'none' })
|
||||
if (!form.value.title) return uni.showToast({ title: '请输入标题', icon: 'none' })
|
||||
if (!form.value.desc) 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' })
|
||||
|
||||
const villageId = uni.getStorageSync('currentVillageId')
|
||||
if (!villageId || villageId === '0') return uni.showToast({ title: '请先选择小区', icon: 'none' })
|
||||
|
||||
Reference in New Issue
Block a user