From 3b93ccbf0bad2a4c01fa23dd36f2002c1ea5b906 Mon Sep 17 00:00:00 2001 From: jianweie code Date: Sat, 18 Nov 2023 19:01:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=AB=AF=E9=97=A8=E5=BA=97?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E3=80=90=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E7=BA=BF=E8=B7=AF=E8=A7=84=E5=88=92=E3=80=91=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CoreCms.Net.Uni-App/CoreShop/pages.json | 8 +++++- .../CoreShop/pages/storeMap/storeMap.scss | 2 +- .../CoreShop/pages/storeMap/storeMap.vue | 28 +++++++++++++++++-- .../CoreShop/static/style/style.app.scss | 2 +- .../CoreShop/static/style/style.mp.scss | 2 +- 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/CoreCms.Net.Uni-App/CoreShop/pages.json b/CoreCms.Net.Uni-App/CoreShop/pages.json index 410c742c..9d83122d 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages.json +++ b/CoreCms.Net.Uni-App/CoreShop/pages.json @@ -268,7 +268,13 @@ "navigationBarTitleText": "门店列表" } } - ] + ], + "plugins": { + "routePlan": { + "version": "1.0.18", + "provider": "wx50b5593e81dd937a" + } + } }, { "root": "pages/search", diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/storeMap/storeMap.scss b/CoreCms.Net.Uni-App/CoreShop/pages/storeMap/storeMap.scss index 6efcc4cb..7588c1bf 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/storeMap/storeMap.scss +++ b/CoreCms.Net.Uni-App/CoreShop/pages/storeMap/storeMap.scss @@ -1,7 +1,7 @@ .content { width: 100%; } .map-body { width: 100%; height: 350px; position: relative; } .store-list { background-color: #fff; height: calc(100vh - 44px - 350px); - .coreshop-list-item { height: 80px; + .coreshop-list-item { height: 100px; .action { width: 65px; } } } diff --git a/CoreCms.Net.Uni-App/CoreShop/pages/storeMap/storeMap.vue b/CoreCms.Net.Uni-App/CoreShop/pages/storeMap/storeMap.vue index 2323934c..02934f9c 100644 --- a/CoreCms.Net.Uni-App/CoreShop/pages/storeMap/storeMap.vue +++ b/CoreCms.Net.Uni-App/CoreShop/pages/storeMap/storeMap.vue @@ -37,9 +37,14 @@ {{item.distanceStr|| ''}} - - + + + + + + + @@ -152,6 +157,25 @@ } }); }, + //查看所在坐标地图位置 + goShopMap(address,latitude, longitude) { + let plugin = requirePlugin('routePlan'); + + // #ifdef MP-WEIXIN + const txMapkey = this.$store.state.config.qqMapKey; //使用在腾讯位置服务申请的key + const referer = this.$store.state.config.shopName; //调用插件的app的名称 + let endPoint = JSON.stringify({ //终点 + 'name': address, + 'latitude': latitude, + 'longitude': longitude + }); + + wx.navigateTo({ + url: 'plugin://routePlan/index?key=' + txMapkey + '&referer=' + referer + '&endPoint=' + endPoint + + }); + // #endif + }, doPhoneCall(phome) { if (phome != 0) { uni.makePhoneCall({ diff --git a/CoreCms.Net.Uni-App/CoreShop/static/style/style.app.scss b/CoreCms.Net.Uni-App/CoreShop/static/style/style.app.scss index 1d1ac065..8159c448 100644 --- a/CoreCms.Net.Uni-App/CoreShop/static/style/style.app.scss +++ b/CoreCms.Net.Uni-App/CoreShop/static/style/style.app.scss @@ -355,7 +355,7 @@ u-icon { line-height: 0; } /*通用列表样式*/ .coreshop-list { - & + .coreshop-list { margin-top: 15px; } + /*& + .coreshop-list { margin-top: 15px; }*/ & > .coreshop-list-item { transition: all .6s ease-in-out 0s; transform: translateX(0px); &.move-cur { transform: translateX(-130px); } .move { position: absolute; right: 0; display: flex; width: 130px; height: 100%; transform: translateX(100%); diff --git a/CoreCms.Net.Uni-App/CoreShop/static/style/style.mp.scss b/CoreCms.Net.Uni-App/CoreShop/static/style/style.mp.scss index 7842a041..879da0db 100644 --- a/CoreCms.Net.Uni-App/CoreShop/static/style/style.mp.scss +++ b/CoreCms.Net.Uni-App/CoreShop/static/style/style.mp.scss @@ -355,7 +355,7 @@ u-icon { line-height: 0; } /*通用列表样式*/ .coreshop-list { - & + .coreshop-list { margin-top: 15px; } + /*& + .coreshop-list { margin-top: 15px; }*/ & > .coreshop-list-item { transition: all .6s ease-in-out 0s; transform: translateX(0px); &.move-cur { transform: translateX(-130px); } .move { position: absolute; right: 0; display: flex; width: 130px; height: 100%; transform: translateX(100%);