|
@@ -64,7 +64,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<u-toast ref="repeat" position="bottom" />
|
|
|
- <view class="tail" @click="Submit">
|
|
|
+ <view class="tail" @click="location">
|
|
|
扫码确认
|
|
|
</view>
|
|
|
</view>
|
|
@@ -90,7 +90,6 @@
|
|
|
longitude:'', //经度
|
|
|
latitude:'', //纬度
|
|
|
address: '' //中文地址
|
|
|
-
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -102,7 +101,6 @@
|
|
|
type:'redirectTo',
|
|
|
url: 'pages/me/Warehousing-details/index'
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
getDatalist() {
|
|
|
uni.$on('update', data => {
|
|
@@ -117,7 +115,6 @@
|
|
|
}
|
|
|
}).then(res => {
|
|
|
this.dalist = res.data.data
|
|
|
-
|
|
|
for (let i = 0; i < this.dalist.length; i++) {
|
|
|
this.total += parseInt(this.dalist[i].rewardMoney)
|
|
|
}
|
|
@@ -130,15 +127,17 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- Submit() {
|
|
|
+ location(){
|
|
|
+ let this_s = this
|
|
|
uni.getLocation({
|
|
|
type: 'wgs84', // 返回国测局坐标
|
|
|
geocode: true,
|
|
|
success: function(res) {
|
|
|
console.log(res);
|
|
|
- this.longitude = res.longitude
|
|
|
- this.latitude = res.latitude
|
|
|
- this.address = res.address.country + res.address.province + res.address.city + res.address.district + res.address.street
|
|
|
+ this_s.longitude = res.longitude
|
|
|
+ this_s.latitude = res.latitude
|
|
|
+ this_s.address = res.address.city + res.address.district + res.address.poiName
|
|
|
+ this_s.Submit()
|
|
|
},
|
|
|
fail: function(e) {
|
|
|
uni.showToast({
|
|
@@ -147,6 +146,8 @@
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ Submit() {
|
|
|
this.show = true;
|
|
|
request({
|
|
|
url: '/storeScan/storeScanTyres',
|
|
@@ -154,12 +155,16 @@
|
|
|
data: {
|
|
|
storeId:this.$store.state.storeInfo.storeId,
|
|
|
userId:this.$store.state.storeInfo.userId,
|
|
|
- scanAddress: this.address,
|
|
|
- longitude: this.longitude,
|
|
|
- latitude: this.latitude,
|
|
|
- materialList: this.datalist
|
|
|
+ // scanAddress: '青岛市市北区橡胶谷-B栋', //地址
|
|
|
+ // longitude: 120.3898355082192, //纬度
|
|
|
+ // latitude: 36.14788760436011, //经度
|
|
|
+ scanAddress: this.address, //地址
|
|
|
+ longitude: this.longitude, //纬度
|
|
|
+ latitude: this.latitude, //经度
|
|
|
+ materialList: this.datalist //轮胎参数
|
|
|
}
|
|
|
}).then(res => {
|
|
|
+ console.log(res)
|
|
|
console.log(res.data.msg)
|
|
|
if (res.data.code == 500) {
|
|
|
this.$refs.repeat.show({
|
|
@@ -180,6 +185,7 @@
|
|
|
}).finally(() => {
|
|
|
// Loading.close()
|
|
|
})
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
}
|