Browse Source

修改事件上报校验

feature
战立标 2 years ago
parent
commit
bfacb03ae8
  1. 9
      src/views/event/index.vue

9
src/views/event/index.vue

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<van-tabs v-model="type" animated sticky swipeable lazy-render> <van-tabs v-model="type" animated lazy-render sticky swipeable>
<van-tab title="上报诉求"> <van-tab title="上报诉求">
<div class="container"> <div class="container">
<div class="block"> <div class="block">
@ -131,7 +131,8 @@ export default {
errorPosition() { errorPosition() {
console.log('定位失败,再次进行定位') console.log('定位失败,再次进行定位')
}, },
clickUpload() {}, clickUpload() {
},
setAudio(val) { setAudio(val) {
console.log(val, 'this.val') console.log(val, 'this.val')
this.isFile = false this.isFile = false
@ -156,10 +157,12 @@ export default {
}) })
}, },
submit() { submit() {
if (!this.audio.serverId) {
if (!this.eventContent) { if (!this.eventContent) {
this.$toast.fail('请输入描述') this.$toast.fail('请输入描述')
return return
} }
}
if (!this.name) { if (!this.name) {
this.$toast.fail('请输入姓名') this.$toast.fail('请输入姓名')
return return
@ -181,7 +184,7 @@ export default {
address: this.address, address: this.address,
reporterName: this.name, reporterName: this.name,
reporterMobile: this.phone, reporterMobile: this.phone,
eventContent: this.eventContent, eventContent: this.eventContent ? this.eventContent : '语音报事',
userId: this.$store.state.app.userInfo.userId, userId: this.$store.state.app.userInfo.userId,
customerId: this.$store.state.app.userInfo.customerId customerId: this.$store.state.app.userInfo.customerId
}).then(() => { }).then(() => {

Loading…
Cancel
Save