jiexi(num) {
			var that = this
			qqmapsdk.reverseGeocoder({
				location: {
					latitude:that.latitude,
					longitude: that.longitude
				},
				success: function(res) { //成功后的回调
					console.log(res,'解析');
					let params = {
						longitude: that.longitude,
						latitude:  that.latitude,
						location: res.result.address_component.street+res.result.address_reference.landmark_l2.title
					}
			
					that.$http.post('punch', params).then(res => {
						if (res.err_code == 0) {
							that.show = true
							setTimeout(()=>{
								that.show = false
							}, 2000)
							
						}
					});
				},
				fail: function(error) {
					console.error(error, '解析fail');
				},
				complete: function(res) {
					console.log(res,'complete');
				}
			})
		},

更多推荐