优化
This commit is contained in:
@@ -53,25 +53,34 @@ export default {
|
||||
created() {
|
||||
this.searchDetail();
|
||||
},
|
||||
onLoad () {
|
||||
document.title = this.$route.query.id ? '调查走访详情' : '新增调查走访'
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
if (!this.form.title) {
|
||||
return this.$u.toast("请输入调查走访事项")
|
||||
}
|
||||
|
||||
this.$loading()
|
||||
this.$refs.interviewForm?.validate(v => {
|
||||
if (v) {
|
||||
this.$http.post(`/app/appinterview/add-xcx`, {
|
||||
...this.form
|
||||
}).then(res => {
|
||||
uni.hideLoading()
|
||||
if (res?.code == 0) {
|
||||
this.$u.toast("提交成功!")
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({})
|
||||
}, 1000)
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
searchDetail() {
|
||||
|
||||
Reference in New Issue
Block a user