wangzhe 2 år sedan
förälder
incheckning
835d9be233
1 ändrade filer med 6 tillägg och 0 borttagningar
  1. 6 0
      src/components/eventLocation.vue

+ 6 - 0
src/components/eventLocation.vue

@@ -308,6 +308,9 @@ export default {
       if (this.longitude == null || this.longitude == '' || this.latitude == null || this.latitude == '') {
         this.$modal.msgError('请输入经纬度!')
         return
+      } else if (this.longitude >180 || this.longitude < -180 || this.latitude > 90 || this.latitude < -90) {
+        this.$modal.msgError('请输入正确经纬度!')
+        return
       }
       this.activeName = 'event'
       let marker = [{
@@ -430,6 +433,9 @@ export default {
         if (that.longitude == null || that.longitude == '' || that.latitude == null || that.latitude == '') {
           that.$modal.msgError('请输入经纬度!')
           return
+        } else if (this.longitude >180 || this.longitude < -180 || this.latitude > 90 || this.latitude < -90) {
+          this.$modal.msgError('请输入正确经纬度!')
+          return
         }
         that.cameraMarkersList = []
         that.cameraList = []