| File was renamed from src/views/h5/signup/BaiduMap.vue |
| | |
| | | type: Object, |
| | | default: () => ({ lng: 0, lat: 0 }) |
| | | }, |
| | | limitDistanceFlag: Boolean |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | center: { |
| | | handler: function(val) { |
| | | const newPoint = new BMapGL.Point(val.lng, val.lat); |
| | | this.map.map.setCenter(newPoint) |
| | | this.map.setCenter(newPoint) |
| | | }, |
| | | deep: true |
| | | } |
| | |
| | | lng: pt.lng, |
| | | lat: pt.lat |
| | | } |
| | | that.$emit('getUserPositionStatus', 'success') |
| | | that.diffDistance() |
| | | const positionAddressText = r.address.province + r.address.city + r.address.district + r.address.street |
| | | that.$emit('getUserPositionStatus', { |
| | | status: 'success', |
| | | userPositionText: positionAddressText |
| | | }) |
| | | if (this.limitDistanceFlag) { |
| | | that.diffDistance() |
| | | } else { |
| | | const newPoint = new BMapGL.Point(that.userPosition.lng, that.userPosition.lat); |
| | | that.map.setCenter(newPoint) |
| | | } |
| | | } else { |
| | | that.$emit('getUserPositionStatus', 'fail') |
| | | that.$emit('getUserPositionStatus', { status: 'fail' }) |
| | | } |
| | | }); |
| | | }, |