|
@ -36,14 +36,8 @@ |
|
|
</van-cell> |
|
|
</van-cell> |
|
|
</div> |
|
|
</div> |
|
|
<div class="block"> |
|
|
<div class="block"> |
|
|
<van-cell title="联系人" @click="$refs.map.show = true" is-link> |
|
|
<van-field required v-model="name" label="联系人" placeholder="请输入联系人" /> |
|
|
<div>{{ address }}</div> |
|
|
<van-field required type="number" maxlength="11" v-model="phone" label="联系电话" placeholder="请输入联系电话" /> |
|
|
</van-cell> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="block"> |
|
|
|
|
|
<van-cell title="联系电话" @click="$refs.map.show = true" is-link> |
|
|
|
|
|
<div>{{ address }}</div> |
|
|
|
|
|
</van-cell> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<van-button round block @click="submit" color="linear-gradient(to right, #81B5FB, #3E92FF)">提交</van-button> |
|
|
<van-button round block @click="submit" color="linear-gradient(to right, #81B5FB, #3E92FF)">提交</van-button> |
|
|
|
|
|
|
|
@ -60,7 +54,7 @@ import Audio from '@/components/Audio' |
|
|
import Map from '@/components/Map' |
|
|
import Map from '@/components/Map' |
|
|
import { uploadvariedfile } from '@/api/basic' |
|
|
import { uploadvariedfile } from '@/api/basic' |
|
|
import { saveOfficialAccountEvent } from '@/api/event' |
|
|
import { saveOfficialAccountEvent } from '@/api/event' |
|
|
import { mapKey } from "@/config" |
|
|
import { mapKey } from '@/config' |
|
|
export default { |
|
|
export default { |
|
|
name: 'event', |
|
|
name: 'event', |
|
|
components: { Recording, Audio, Perfect, Map }, |
|
|
components: { Recording, Audio, Perfect, Map }, |
|
@ -76,7 +70,9 @@ export default { |
|
|
audio: {}, |
|
|
audio: {}, |
|
|
isFile: true, |
|
|
isFile: true, |
|
|
address: '', |
|
|
address: '', |
|
|
eventContent: '' |
|
|
eventContent: '', |
|
|
|
|
|
name: '', |
|
|
|
|
|
phone: '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
@ -94,6 +90,7 @@ export default { |
|
|
this.geolocation = new qq.maps.Geolocation(mapKey, 'myapp') |
|
|
this.geolocation = new qq.maps.Geolocation(mapKey, 'myapp') |
|
|
// 获取定位 |
|
|
// 获取定位 |
|
|
this.getMyLocation() |
|
|
this.getMyLocation() |
|
|
|
|
|
this.phone = this.$store.state.app.userInfo.phone |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 获取当前位置 |
|
|
// 获取当前位置 |
|
@ -144,6 +141,18 @@ export default { |
|
|
this.$toast.fail('请输入描述') |
|
|
this.$toast.fail('请输入描述') |
|
|
return |
|
|
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({ |
|
|
saveOfficialAccountEvent({ |
|
|
duration: this.audio.duration, |
|
|
duration: this.audio.duration, |
|
|
serverId: this.audio.serverId, |
|
|
serverId: this.audio.serverId, |
|
@ -151,6 +160,8 @@ export default { |
|
|
latitude: this.latitude, |
|
|
latitude: this.latitude, |
|
|
longitutd: this.longitude, |
|
|
longitutd: this.longitude, |
|
|
address: this.address, |
|
|
address: this.address, |
|
|
|
|
|
name: this.name, |
|
|
|
|
|
phone: this.phone, |
|
|
eventContent: this.eventContent, |
|
|
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 |
|
|