Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/apps/AppMonitoringObject/Add.vue
This commit is contained in:
aixianling
2022-04-29 19:27:27 +08:00
4 changed files with 27 additions and 47 deletions

View File

@@ -582,11 +582,6 @@ export default {
},
nextStep() {
// objectType: '请选择监测对象类型',
// name: '请输入户主姓名',
// idNumber: '请输入身份证号',
// phone: '请输入联系方式',
// currentAreaId: '请选择现住址',
if (!this.isEdit) {
if (!this.form.objectType) {
@@ -604,14 +599,6 @@ export default {
return this.$u.toast('请选择现住址')
}
// const rules = this.rules()
// for (let v of Object.keys(rules)) {
// if (!this.form[v]) {
// return this.$u.toast(rules[v])
// }
// }
let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
if (this.form.phone.length == 11 && !regTel.test(this.form.phone)) {
return this.$u.toast('请输入正确的手机号')
@@ -685,7 +672,15 @@ export default {
if (res.code == 0) {
this.$u.toast(this.$route.query.id ? '保存成功' : '提交成功')
uni.$emit('reload')
uni.navigateTo({url: './serviceResult'})
setTimeout(() =>{
if (this.$route.query.id) {
uni.navigateBack({
delta: 2
})
} else {
uni.navigateTo({url: './serviceResult'})
}
})
}
}).catch((err) => {
this.$u.toast(err)