|
|
@@ -1114,7 +1114,8 @@ export default {
|
|
|
jiedanNo: false, //当前不能接
|
|
|
list2: [],
|
|
|
//画板边长默认是屏幕宽度,正方形画布
|
|
|
- cw: uni.getSystemInfoSync().windowWidth
|
|
|
+ cw: uni.getSystemInfoSync().windowWidth,
|
|
|
+ tianToken:'',//天地图token
|
|
|
}
|
|
|
},
|
|
|
onHide() {
|
|
|
@@ -1163,6 +1164,14 @@ export default {
|
|
|
let that = this
|
|
|
that.getOrderNum()
|
|
|
that.getZhandian()
|
|
|
+ //获取天地图token
|
|
|
+ that.$Request.getT('/app/common/type/417').then((res) => {
|
|
|
+ if (res.code === 0) {
|
|
|
+ that.tianToken = res.data.value
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
//是否开启骑手新订单推送 340
|
|
|
that.$Request.getT('/app/common/type/340').then((res) => {
|
|
|
if (res.code === 0) {
|
|
|
@@ -1236,18 +1245,37 @@ export default {
|
|
|
success: function (res) {
|
|
|
console.log('当前位置的经度:' + res.longitude)
|
|
|
console.log('当前位置的纬度:' + res.latitude)
|
|
|
- let data = {
|
|
|
- lat: res.latitude,
|
|
|
- lng: res.longitude
|
|
|
- }
|
|
|
-
|
|
|
- that.$Request.getT('/app/Login/selectCity', data).then((res) => {
|
|
|
- if (res.code == 0) {
|
|
|
- that.province = res.data.province
|
|
|
- that.city = res.data.city
|
|
|
- that.district = res.data.district
|
|
|
- }
|
|
|
+
|
|
|
+ uni.request({
|
|
|
+ url: that.config("ROOAA") +'geocoder?postStr={%27ver%22:%221%22,%22lon%22:'+res.longitude+',%22lat%22:'+res.latitude+'}&type=geocode&tk=ad07f7a00b20b7f4cd4af3b6f7590330',
|
|
|
+ success: res => {
|
|
|
+ console.log(res,'ppp运行')
|
|
|
+ that.province = res.data.result.addressComponent.province
|
|
|
+ that.city = res.data.result.addressComponent.city
|
|
|
+ that.district = res.data.result.addressComponent.county
|
|
|
+ },
|
|
|
+ fail: err => {
|
|
|
+ console.log("请求超时");
|
|
|
+ console.log(err);
|
|
|
+ },
|
|
|
+ // complete: () => { //无论成功都会调用
|
|
|
+ // uni.hideLoading()
|
|
|
+ // }
|
|
|
})
|
|
|
+
|
|
|
+ // let data = {
|
|
|
+ // lat: res.latitude,
|
|
|
+ // lng: res.longitude
|
|
|
+ // }
|
|
|
+
|
|
|
+ // that.$Request.getT('/app/Login/selectCity', data).then((res) => {
|
|
|
+ // if (res.code == 0) {
|
|
|
+ // console.log(res,'天天')
|
|
|
+ // that.province = res.data.province
|
|
|
+ // that.city = res.data.city
|
|
|
+ // that.district = res.data.district
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
fail(e) {
|
|
|
uni.hideLoading()
|
|
|
@@ -1470,18 +1498,35 @@ export default {
|
|
|
success: function (res) {
|
|
|
console.log('当前位置的经度:' + res.longitude)
|
|
|
console.log('当前位置的纬度:' + res.latitude)
|
|
|
- let data = {
|
|
|
- lat: res.latitude,
|
|
|
- lng: res.longitude
|
|
|
- }
|
|
|
-
|
|
|
- that.$Request.getT('/app/Login/selectCity', data).then((res) => {
|
|
|
- if (res.code == 0) {
|
|
|
- that.province = res.data.province
|
|
|
- that.city = res.data.city
|
|
|
- that.district = res.data.district
|
|
|
- }
|
|
|
+
|
|
|
+ uni.request({
|
|
|
+ url: that.config("ROOAA") +'geocoder?postStr={%27ver%22:%221%22,%22lon%22:'+res.longitude+',%22lat%22:'+res.latitude+'}&type=geocode&tk=ad07f7a00b20b7f4cd4af3b6f7590330',
|
|
|
+ success: res => {
|
|
|
+ console.log(res,'ppp运行')
|
|
|
+ that.province = res.data.result.addressComponent.province
|
|
|
+ that.city = res.data.result.addressComponent.city
|
|
|
+ that.district = res.data.result.addressComponent.county
|
|
|
+ },
|
|
|
+ fail: err => {
|
|
|
+ console.log("请求超时");
|
|
|
+ console.log(err);
|
|
|
+ },
|
|
|
+ // complete: () => { //无论成功都会调用
|
|
|
+ // uni.hideLoading()
|
|
|
+ // }
|
|
|
})
|
|
|
+ // let data = {
|
|
|
+ // lat: res.latitude,
|
|
|
+ // lng: res.longitude
|
|
|
+ // }
|
|
|
+
|
|
|
+ // that.$Request.getT('/app/Login/selectCity', data).then((res) => {
|
|
|
+ // if (res.code == 0) {
|
|
|
+ // that.province = res.data.province
|
|
|
+ // that.city = res.data.city
|
|
|
+ // that.district = res.data.district
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
fail(e) {
|
|
|
uni.hideLoading()
|
|
|
@@ -1976,7 +2021,8 @@ export default {
|
|
|
page: this.page1,
|
|
|
receivingPattern: this.receivingPettern,
|
|
|
riderLat: this.latitude,
|
|
|
- riderLng: this.longitude
|
|
|
+ riderLng: this.longitude,
|
|
|
+ city:this.city
|
|
|
})
|
|
|
.then((res) => {
|
|
|
uni.hideLoading()
|
|
|
@@ -2013,7 +2059,8 @@ export default {
|
|
|
indentType: this.indentType,
|
|
|
shopId: this.shopId,
|
|
|
riderLat: this.latitude,
|
|
|
- riderLng: this.longitude
|
|
|
+ riderLng: this.longitude,
|
|
|
+ city:this.city
|
|
|
})
|
|
|
.then((res) => {
|
|
|
uni.hideLoading()
|