From 72935b2a35765bcc3622561bb06f2eccd64caf83 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期二, 16 五月 2023 16:49:00 +0800 Subject: [PATCH] 修改上传图片时页面跳转问题 --- pages/public-page/mapRoute/mapRoute.vue | 32 ++++++++++---------------------- 1 files changed, 10 insertions(+), 22 deletions(-) diff --git a/pages/public-page/mapRoute/mapRoute.vue b/pages/public-page/mapRoute/mapRoute.vue index 24b8544..b534ca6 100644 --- a/pages/public-page/mapRoute/mapRoute.vue +++ b/pages/public-page/mapRoute/mapRoute.vue @@ -15,7 +15,7 @@ <text>{{ duration || '' }}</text> </view> </view> - <!-- <view class="" @click="awaken"><button type="default">璺宠浆</button></view> --> + <view class="open-button" @click="awaken"><button type="default">璺宠浆</button></view> </view> </template> @@ -213,27 +213,11 @@ }, // 鍞ら啋 awaken() { - uni.getSystemInfo({ - success: function(res) { - if (res.platform == 'android') { - uni.navigateTo({ - url: `intent://map/routeplan?type=drive&fromcoord=&from=${_this.fromLocation}&tocoord=${_this.toLocation.latitude},${ - _this.toLocation.longitude - }&to=name&policy=0&referer=myapp#Intent;scheme=qqmap;package=com.tencent.map;end` - }); - } else if (res.platform == 'ios') { - uni.navigateTo({ - url: `qqmap://map/routeplan?type=drive&fromcoord=&from=${_this.fromLocation}&tocoord=${_this.toLocation.latitude},${ - _this.toLocation.longitude - }&to=name&policy=0&referer=myapp` - }); - } else { - uni.showToast({ - title: '褰撳墠璁惧涓嶆敮鎸佸湴鍥惧鑸�', - icon: 'none' - }); - } - } + uni.openLocation({ + latitude: this.markers[1].latitude, + longitude: this.markers[1].longitude, + name: '鐩殑鍦颁綅缃�', + address: '鐩殑鍦颁綅缃�' }); } }, @@ -268,4 +252,8 @@ } } } +.open-button { + width: 200rpx; + margin: 10rpx 0; +} </style> -- Gitblit v1.9.1