From e227cf02ad7103fdc872fe1446ed80be576f4ba5 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Thu, 24 Jul 2025 10:58:45 +0800
Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E9=80=89=E7=82=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
component/serviceArchive/service-archive.vue | 29 +++++++++++++++++--
manifest.json | 9 ++++--
package_sub/pages/AddOrder/AddOrder.vue | 30 ++++++++++++++++++--
package_sub/pages/AddOrder/editOrder.vue | 30 ++++++++++++++++++--
package_sub/pages/OrderList/OrderList.vue | 4 +--
pages/order/order.vue | 4 +--
6 files changed, 92 insertions(+), 14 deletions(-)
diff --git a/component/serviceArchive/service-archive.vue b/component/serviceArchive/service-archive.vue
index fa5ea99..86b4a86 100644
--- a/component/serviceArchive/service-archive.vue
+++ b/component/serviceArchive/service-archive.vue
@@ -20,7 +20,8 @@
-
+
+ 地图选点
@@ -113,7 +114,31 @@
onReady() {
this.$refs.uForm1.setRules(this.rules);
},
- methods: {
+ methods: {
+ // 打开地图选点
+ openMap(){
+ console.log("chooseLocation")
+ let that = this
+ uni.chooseLocation({
+ success(res){
+ console.log("chooseLocationres",res)
+ if (res.errMsg === 'chooseLocation:ok') {
+ that.form.address = res.address
+ console.log('位置名称:' + res.name);
+ console.log('详细地址:' + res.address);
+ console.log('纬度:' + res.latitude);
+ console.log('经度:' + res.longitude);
+ }
+ },
+ fail(err){
+ uni.showToast({
+ title:'打开地图失败',
+ icon:'none'
+ })
+ console.log("err",err)
+ }
+ });
+ },
save() {
this.$refs.uForm1.validate(valid => {
diff --git a/manifest.json b/manifest.json
index 0814beb..b99a3cf 100644
--- a/manifest.json
+++ b/manifest.json
@@ -62,10 +62,13 @@
"desc" : "需要获取您的定位"
},
"scope.chooseAddress" : {
- "desc" : "需要获取您的收获地址"
- }
+ "desc" : "需要获取您的收货地址"
+ },
+ "scope.chooseLocation" : {
+ "desc" : "需要获取您的详细地址"
+ }
},
- "requiredPrivateInfos" : [ "getLocation", "chooseAddress" ],
+ "requiredPrivateInfos" : [ "getLocation", "chooseAddress","chooseLocation" ],
"optimization" : {
"subPackages" : true
},
diff --git a/package_sub/pages/AddOrder/AddOrder.vue b/package_sub/pages/AddOrder/AddOrder.vue
index d9a6d7c..28ec7a8 100644
--- a/package_sub/pages/AddOrder/AddOrder.vue
+++ b/package_sub/pages/AddOrder/AddOrder.vue
@@ -202,8 +202,10 @@
+ 地图选点
-
+
+ 地图选点
@@ -529,7 +532,30 @@
}
},
-
+ // 打开地图选点
+ openMap(){
+ console.log("chooseLocation")
+ let that = this
+ uni.chooseLocation({
+ success(res){
+ console.log("chooseLocationres",res)
+ if (res.errMsg === 'chooseLocation:ok') {
+ that.form.city = res.address
+ console.log('位置名称:' + res.name);
+ console.log('详细地址:' + res.address);
+ console.log('纬度:' + res.latitude);
+ console.log('经度:' + res.longitude);
+ }
+ },
+ fail(err){
+ uni.showToast({
+ title:'打开地图失败',
+ icon:'none'
+ })
+ console.log("err",err)
+ }
+ });
+ },
pay() {
this.$refs.uForm.validate(async (valid) => {
if (valid) {
diff --git a/package_sub/pages/OrderList/OrderList.vue b/package_sub/pages/OrderList/OrderList.vue
index d866bbf..553bdd8 100644
--- a/package_sub/pages/OrderList/OrderList.vue
+++ b/package_sub/pages/OrderList/OrderList.vue
@@ -33,7 +33,7 @@
site_id: i.hospital?i.hospital.site_id:''
}
})">
-
+
{{i.type == 1 ? '被服务人' : '被服务人'}}
{{ i.user_archive ? i.user_archive.name : i.user_archive_id }}
@@ -41,7 +41,7 @@
{{(i.type == 1 ? '就诊' : '服务') + '时间'}}
{{ i.time ? $moment(i.time).format('YYYY年MM月DD日 HH:mm') : '' }}
-
+
详细地址
{{ i.city || " " }}
diff --git a/pages/order/order.vue b/pages/order/order.vue
index 7337184..c4c0643 100644
--- a/pages/order/order.vue
+++ b/pages/order/order.vue
@@ -43,7 +43,7 @@
site_id: i.hospital?i.hospital.site_id:''
}
})">
-
+
{{i.type == 1 ? '被服务人' : '被服务人'}}
{{ i.user_archive ? i.user_archive.name : i.user_archive_id }}
@@ -51,7 +51,7 @@
{{(i.type == 1 ? '就诊' : '服务') + '时间'}}
{{ i.time ? $moment(i.time).format('YYYY年MM月DD日 HH:mm') : '' }}
-
+
详细地址
{{ i.city || " " }}