|
@@ -102,7 +102,8 @@
|
|
|
position: '',
|
|
|
point: '',
|
|
|
coord: '',
|
|
|
- address: ''
|
|
|
+ address: '',
|
|
|
+ addd:''
|
|
|
}
|
|
|
},
|
|
|
onBackPress(options) {
|
|
@@ -161,11 +162,8 @@
|
|
|
geocode: true,
|
|
|
success: function(res) {
|
|
|
console.log(res)
|
|
|
- that.point = new plus.maps.Point(res.longitude, res.latitude);
|
|
|
- plus.maps.Map.convertCoordinates(that.point, {}, event => {
|
|
|
- that.coord = event.coord; // 转换后的坐标值
|
|
|
- that.tishi(that.coord, res)
|
|
|
- })
|
|
|
+ this.addd = res
|
|
|
+ that.tishi(that.coord, res)
|
|
|
},
|
|
|
fail: function(e) {
|
|
|
uni.showToast({
|
|
@@ -189,28 +187,19 @@
|
|
|
// 取到用户的定位地址,赋值传递出去
|
|
|
let aress = res.result.address_component.nation + res.result.address_component.province + res.result.address_component
|
|
|
.city + res.result.formatted_addresses.recommend
|
|
|
- this_.addreev(aress)
|
|
|
+ this_.addreev(res,aress)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- async addreev(x) {
|
|
|
+ async addreev(res,x) {
|
|
|
this.address = x
|
|
|
+ this.addd = res.result.location
|
|
|
+ console.log(this.addd)
|
|
|
},
|
|
|
//手动录入调用
|
|
|
manualentry() {
|
|
|
console.log(this.coord)
|
|
|
console.log(this.address)
|
|
|
- let data = {
|
|
|
- storeId: this.$store.state.storeInfo.storeId,
|
|
|
- userId: this.$store.state.storeInfo.userId,
|
|
|
- tyreNum: this.number_a,
|
|
|
- scanType: 2,
|
|
|
- scanWay: 0,
|
|
|
- longitude: this.coord.longitude,
|
|
|
- latitude: this.coord.latitude,
|
|
|
- scanAddress: this.address
|
|
|
- }
|
|
|
- console.log(data)
|
|
|
if (this.number_a.length != 0) {
|
|
|
request({
|
|
|
url: '/storeScan/storeScanGetTyre',
|
|
@@ -221,8 +210,8 @@
|
|
|
tyreNum: this.number_a,
|
|
|
scanType: 2,
|
|
|
scanWay: 0,
|
|
|
- longitude: this.coord.longitude,
|
|
|
- latitude: this.coord.latitude,
|
|
|
+ longitude: this.addd.lng,
|
|
|
+ latitude: this.addd.lat,
|
|
|
scanAddress: this.address
|
|
|
}
|
|
|
}).then(res => {
|
|
@@ -403,8 +392,8 @@
|
|
|
tyreNum: this.number_s,
|
|
|
scanType: 2,
|
|
|
scanWay: 1,
|
|
|
- longitude: this.coord.longitude,
|
|
|
- latitude: this.coord.latitude,
|
|
|
+ longitude: this.addd.lng,
|
|
|
+ latitude: this.addd.lat,
|
|
|
scanAddress: this.address
|
|
|
}
|
|
|
}).then(res => {
|