every遍历

This commit is contained in:
shijingjing
2022-09-28 09:22:16 +08:00
parent cc6d0a987d
commit 147b0a84f3

View File

@@ -594,9 +594,13 @@ export default {
this.form.companionList = []
} else {
if(this.people.length != this.form.companionCount) {
this.$u.toast('请输入完整的同行人信息')
return this.$u.toast('请输入完整的同行人信息')
} else {
this.form.companionList = this.people
if(this.people.every(val=> (val.name=='') || (val.phone=='')) ) {
return this.$u.toast('请输入完整的同行人信息')
} else {
this.form.companionList = this.people
}
}
}