From 27d5e3422f7b4093915563f9ed1f465231b7916d Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Sun, 26 Jan 2025 00:31:07 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=AC=AC=E4=BA=8C=E4=B8=AA?=
=?UTF-8?q?=E7=89=88=E6=9C=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
service-uniapp-client/components/address/redactAddress.vue | 7 +++++--
service-uniapp-client/pages/index/index.vue | 6 +++---
service-uniapp-client/pages/mine/address.vue | 6 +++---
service-uniapp-client/pages/order/payOrder.vue | 5 +++++
service-uniapp-client/pages/technician/subscribeService.vue | 4 ++--
service-uniapp-client/utils/position.js | 11 +++++++----
service-uniapp-technician/mixins/order.js | 1 +
service-uniapp-technician/pages/index/index.vue | 2 +-
service-uniapp-technician/pages/index/order.vue | 1 +
service-uniapp-technician/pages/order/orderDetail.vue | 6 ++++--
service-uniapp-technician/plugins/utils.js | 2 +-
11 files changed, 33 insertions(+), 18 deletions(-)
diff --git a/service-uniapp-client/components/address/redactAddress.vue b/service-uniapp-client/components/address/redactAddress.vue
index 5b3d6eb..37d1472 100644
--- a/service-uniapp-client/components/address/redactAddress.vue
+++ b/service-uniapp-client/components/address/redactAddress.vue
@@ -11,9 +11,12 @@
-
-
+
定位
diff --git a/service-uniapp-client/pages/index/index.vue b/service-uniapp-client/pages/index/index.vue
index 41643b1..590c9d4 100644
--- a/service-uniapp-client/pages/index/index.vue
+++ b/service-uniapp-client/pages/index/index.vue
@@ -214,12 +214,12 @@
if(uni.getStorageSync('open_address') == 0){
return
}
- Position.getLocation(res => {
- Position.selectAddress(res.longitude, res.latitude, success => {
+ // Position.getLocation(res => {
+ Position.selectAddress(success => {
let address = this.extractProvinceAndCity(success)
this.queryParams.title = address.city
})
- })
+ // })
},
//提取用户选择的地址信息(省市县信息)
diff --git a/service-uniapp-client/pages/mine/address.vue b/service-uniapp-client/pages/mine/address.vue
index 4260557..6563c70 100644
--- a/service-uniapp-client/pages/mine/address.vue
+++ b/service-uniapp-client/pages/mine/address.vue
@@ -293,10 +293,10 @@
//地图上选择地址
selectAddr() {
- Position.getLocation(res => {
- Position.selectAddress(res.longitude, res.latitude, success => {
+ // Position.getLocation(res => {
+ Position.selectAddress(success => {
this.setAddress(success)
- })
+ // })
})
},
diff --git a/service-uniapp-client/pages/order/payOrder.vue b/service-uniapp-client/pages/order/payOrder.vue
index 79ca825..50bd903 100644
--- a/service-uniapp-client/pages/order/payOrder.vue
+++ b/service-uniapp-client/pages/order/payOrder.vue
@@ -486,6 +486,11 @@
// this.initPrice()
// }
// })
+
+ if(uni.getStorageSync('open_address') == 0){
+ return this.temp = 0
+ }
+
if(this.$route.query.setKmOpen=='Y'){ //是否打开了假距离
this.distance = this.$route.query.distance
}else{
diff --git a/service-uniapp-client/pages/technician/subscribeService.vue b/service-uniapp-client/pages/technician/subscribeService.vue
index 40af7b7..e947abb 100644
--- a/service-uniapp-client/pages/technician/subscribeService.vue
+++ b/service-uniapp-client/pages/technician/subscribeService.vue
@@ -67,7 +67,7 @@
-
+
@@ -112,7 +112,7 @@
},
onShow() {
this.getProjectDetail()
- this.getConfig()
+ // this.getConfig()
},
methods: {
diff --git a/service-uniapp-client/utils/position.js b/service-uniapp-client/utils/position.js
index f02c0d2..e71c6c3 100644
--- a/service-uniapp-client/utils/position.js
+++ b/service-uniapp-client/utils/position.js
@@ -23,7 +23,7 @@ function calculateDistance(lat1, lon1, lat2, lon2) { //计算两点距离
function getLocation(fn) { //获取用户经纬度
if(uni.getStorageSync('open_address') == 0){
- return {}
+ return fn && fn({})
}
wxGetLocation() //此方法只用于提示用户打开gps
uni.getLocation({
@@ -124,10 +124,13 @@ function getUserAddressByIp(key) { //根据IP获取当前用户位置
}
//打开地图让用户选择位置
-function selectAddress(longitude, latitude, successCallback) {
+function selectAddress(successCallback) {
+ if(uni.getStorageSync('open_address') == 0){
+ return
+ }
uni.chooseLocation({
- longitude, //经度
- latitude, //纬度
+ // longitude, //经度
+ // latitude, //纬度
success: function(res) {
successCallback && successCallback(res)
}
diff --git a/service-uniapp-technician/mixins/order.js b/service-uniapp-technician/mixins/order.js
index 67d8936..ceb016a 100644
--- a/service-uniapp-technician/mixins/order.js
+++ b/service-uniapp-technician/mixins/order.js
@@ -57,6 +57,7 @@ export default {
this.uploadFileToOSS(res.tempFiles[0]).then(imgPath => {
this.$utils.getLocation(loca => {
+ console.log(loca);
self.$api('arriveVipOrder', {
orderId: order.id,
...loca,
diff --git a/service-uniapp-technician/pages/index/index.vue b/service-uniapp-technician/pages/index/index.vue
index dd90b36..1258ab8 100644
--- a/service-uniapp-technician/pages/index/index.vue
+++ b/service-uniapp-technician/pages/index/index.vue
@@ -105,7 +105,7 @@
{{ item.phone }}
- 下单地址:{{item.addressId_dictText}}
+ 下单地址:{{item.address}}{{item.addressDetails || ''}}
diff --git a/service-uniapp-technician/pages/index/order.vue b/service-uniapp-technician/pages/index/order.vue
index 776992e..35d82cb 100644
--- a/service-uniapp-technician/pages/index/order.vue
+++ b/service-uniapp-technician/pages/index/order.vue
@@ -196,6 +196,7 @@
let params = {
...this.queryParams,
+ tenstate : this.queryParams.state,
}
if (this.selectDate) {
diff --git a/service-uniapp-technician/pages/order/orderDetail.vue b/service-uniapp-technician/pages/order/orderDetail.vue
index a65077e..7875bae 100644
--- a/service-uniapp-technician/pages/order/orderDetail.vue
+++ b/service-uniapp-technician/pages/order/orderDetail.vue
@@ -148,13 +148,15 @@
服务地址
-
{{msgOrder.name}} {{msgOrder.phone}}
- {{msgOrder.address}}
+ {{msgOrder.address}}{{msgOrder.addressDetails || ''}}
diff --git a/service-uniapp-technician/plugins/utils.js b/service-uniapp-technician/plugins/utils.js
index 8c7dea2..07f06ff 100644
--- a/service-uniapp-technician/plugins/utils.js
+++ b/service-uniapp-technician/plugins/utils.js
@@ -59,7 +59,7 @@ function verificationAll(data){
function getLocation(fn){
if(uni.getStorageSync('open_address') == 0){
- return {}
+ return fn && fn({})
}
uni.getLocation({
type: 'wgs84',