diff --git a/src/views/demand/index.vue b/src/views/demand/index.vue index 3fbdab5..88b72a1 100644 --- a/src/views/demand/index.vue +++ b/src/views/demand/index.vue @@ -38,6 +38,11 @@ + +
+ + +
提交 @@ -71,7 +76,9 @@ export default { demandTypeOptions: [], content: '', parentCode: '', - categoryCode: '' + categoryCode: '', + name: '', + phone: '' } }, mounted() { @@ -86,6 +93,7 @@ export default { 'translateVoice' ]) this.getSelectList() + this.phone = this.$store.state.app.userInfo.phone }, methods: { setVal(values) { @@ -117,6 +125,18 @@ export default { this.$toast.fail('请输入描述') return } + if (!this.name) { + this.$toast.fail('请输入姓名') + return + } + if (!this.phone) { + this.$toast.fail('请输入电话') + return + } + if (!/^1[3456789]\d{9}$/.test(this.phone)) { + this.$toast.fail('请输入正确的联系电话') + return + } saveOfficialAccountDemand({ content: this.content, duration: this.audio.duration, @@ -126,7 +146,9 @@ export default { parentCode: this.parentCode, categoryCode: this.categoryCode, homeId: this.$store.state.app.userInfo.homeId, - customerId: this.$store.state.app.userInfo.customerId + customerId: this.$store.state.app.userInfo.customerId, + name: this.name, + phone: this.phone }).then(() => { this.$toast.success('提交成功') this.$router.replace('/appeal') diff --git a/src/views/event/index.vue b/src/views/event/index.vue index 63a6448..fd322d9 100644 --- a/src/views/event/index.vue +++ b/src/views/event/index.vue @@ -36,14 +36,8 @@
- -
{{ address }}
-
-
-
- -
{{ address }}
-
+ +
提交 @@ -60,7 +54,7 @@ import Audio from '@/components/Audio' import Map from '@/components/Map' import { uploadvariedfile } from '@/api/basic' import { saveOfficialAccountEvent } from '@/api/event' -import { mapKey } from "@/config" +import { mapKey } from '@/config' export default { name: 'event', components: { Recording, Audio, Perfect, Map }, @@ -76,7 +70,9 @@ export default { audio: {}, isFile: true, address: '', - eventContent: '' + eventContent: '', + name: '', + phone: '' } }, mounted() { @@ -94,6 +90,7 @@ export default { this.geolocation = new qq.maps.Geolocation(mapKey, 'myapp') // 获取定位 this.getMyLocation() + this.phone = this.$store.state.app.userInfo.phone }, methods: { // 获取当前位置 @@ -144,6 +141,18 @@ export default { this.$toast.fail('请输入描述') return } + if (!this.name) { + this.$toast.fail('请输入姓名') + return + } + if (!this.phone) { + this.$toast.fail('请输入电话') + return + } + if (!/^1[3456789]\d{9}$/.test(this.phone)) { + this.$toast.fail('请输入正确的联系电话') + return + } saveOfficialAccountEvent({ duration: this.audio.duration, serverId: this.audio.serverId, @@ -151,6 +160,8 @@ export default { latitude: this.latitude, longitutd: this.longitude, address: this.address, + name: this.name, + phone: this.phone, eventContent: this.eventContent, userId: this.$store.state.app.userInfo.userId, customerId: this.$store.state.app.userInfo.customerId diff --git a/src/views/register/index.vue b/src/views/register/index.vue index fb5ecc5..b810a07 100644 --- a/src/views/register/index.vue +++ b/src/views/register/index.vue @@ -50,7 +50,8 @@ export default { phone: this.phone, smsCode: this.smsCode, surName: this.surName, - appid: this.$store.state.app.appId + appId: this.$store.state.app.appId, + gender: this.gender } if (!params.phone) { this.$toast.fail('请输入手机号')