diff --git a/my/order/payModify.vue b/my/order/payModify.vue index f0d5d33..71146d4 100644 --- a/my/order/payModify.vue +++ b/my/order/payModify.vue @@ -525,12 +525,14 @@ }, liliaoshi(){ let massageTypeId = this.orderXm.massageTypeId; + let longitude = this.longitude; + let latitude = this.latitude; uni.setStorage({ key: 'taocanDd', data: '支付', success: function () { uni.navigateTo({ - url: '/pages/therapist/therapistDingdan?massageTypeId='+massageTypeId + url: '/pages/therapist/therapistDingdan?massageTypeId='+massageTypeId+'&latitude='+latitude+'&longitude='+longitude }) } }); @@ -558,7 +560,6 @@ }, addressMy() { this.$Request.getT('/app/address/selectAddressById').then(res => { - console.log(res) if (res.code == 0) { this.name = res.data.name; this.mobile = res.data.phone; @@ -607,7 +608,6 @@ }, changeLog(e){//服务时间 - console.log("11111",e) this.single=e; }, goChat() { diff --git a/my/order/payModifyTcMy.vue b/my/order/payModifyTcMy.vue index 0b26165..4894c97 100644 --- a/my/order/payModifyTcMy.vue +++ b/my/order/payModifyTcMy.vue @@ -495,12 +495,14 @@ liliaoshi(){ var that=this let massageTypeId = that.orderXm.massageTypeId; + let longitude = that.longitude; + let latitude = that.latitude; uni.setStorage({ key: 'taocanDd', data: '我的套餐', success: function () { uni.navigateTo({ - url: '/pages/therapist/therapistDingdan?technicianType='+that.orderXm.level+'&massageTypeId='+massageTypeId + url: '/pages/therapist/therapistDingdan?technicianType='+that.orderXm.level+'&massageTypeId='+massageTypeId+'&latitude='+latitude+'&longitude='+longitude }) } }); diff --git a/pages/therapist/therapistDingdan.vue b/pages/therapist/therapistDingdan.vue index c25f0f7..9b3b86c 100644 --- a/pages/therapist/therapistDingdan.vue +++ b/pages/therapist/therapistDingdan.vue @@ -224,6 +224,8 @@ let that = this that.technicianType=e.technicianType that.massageTypeId=e.massageTypeId + that.longitude=e.longitude + that.latitude=e.latitude // that.getLocation();//低精度,快就完事了 // that.getLocation(true);//高精度,慢慢查询 uni.getStorage({ @@ -233,34 +235,46 @@ } }); that.getTypeList(); - uni.getLocation({ - type: 'gcj02', - geocode: true, //设置该参数为true可直接获取经纬度及城市信息 - highAccuracyExpireTime: 500, - success: function(res) { - console.log(res, '地理位置-----------------------》') - that.latitude = res.latitude - that.longitude = res.longitude - - uni.setStorageSync('latitude', res.latitude) - uni.setStorageSync('longitude', res.longitude) - if (that.amap) { - that.amap.setCenter(new AMap.LngLat(res.latitude, res.longitude)); - } - if (that.infoWindow) { - that.infoWindow.setPosition(new TMap.LatLng(res.latitude, res.longitude)); - } - that.page = 1 - that.getTypeList(); - }, - fail: function(e) { - console.log('获取地址失败1', e) - // #ifdef APP-PLUS - that.checkPermission(); - // #endif + if(that.latitude!='' && that.longitude!=''){ + uni.setStorageSync('latitude', that.latitude) + uni.setStorageSync('longitude', that.longitude) + if (that.amap) { + that.amap.setCenter(new AMap.LngLat(that.latitude, that.longitude)); } - }) - + if (that.infoWindow) { + that.infoWindow.setPosition(new TMap.LatLng(that.latitude, that.longitude)); + } + that.page = 1 + that.getTypeList(); + }else{ + uni.getLocation({ + type: 'gcj02', + geocode: true, //设置该参数为true可直接获取经纬度及城市信息 + highAccuracyExpireTime: 500, + success: function(res) { + console.log(res, '地理位置-----------------------》') + that.latitude = res.latitude + that.longitude = res.longitude + + uni.setStorageSync('latitude', res.latitude) + uni.setStorageSync('longitude', res.longitude) + if (that.amap) { + that.amap.setCenter(new AMap.LngLat(res.latitude, res.longitude)); + } + if (that.infoWindow) { + that.infoWindow.setPosition(new TMap.LatLng(res.latitude, res.longitude)); + } + that.page = 1 + that.getTypeList(); + }, + fail: function(e) { + console.log('获取地址失败1', e) + // #ifdef APP-PLUS + that.checkPermission(); + // #endif + } + }) + } // 获取邀请码保存到本地 if (e.invitation) { that.$queue.setData('inviterCode', e.invitation); @@ -341,7 +355,6 @@ wx.requestSubscribeMessage({ tmplIds: this.arr, success(re) { - console.log(JSON.stringify(re), 111111111111) var datas = JSON.stringify(re); if (datas.indexOf("accept") != -1) { console.log(re) @@ -660,7 +673,7 @@ city: this.city, technicianType:this.technicianType } - // console.log(data) + console.log(data) this.$Request.get("/app/artificer/selectArtificerList", data).then(res => { this.loading = false; if (res.code == 0) {