From 710327ac0f681c798a7cb1dce9c0b1ec230dd49b Mon Sep 17 00:00:00 2001 From: "@AliceXiaoZhan" <1936165216@qq.com> Date: Tue, 1 Nov 2022 23:57:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/contactUs/contactUs.js | 66 +++++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/pages/contactUs/contactUs.js b/pages/contactUs/contactUs.js index c84a8bb..afd8fe4 100644 --- a/pages/contactUs/contactUs.js +++ b/pages/contactUs/contactUs.js @@ -22,37 +22,47 @@ Page({ userPhone:'', }] }, - - biaoji(e) { - console.log("标记目的地点击", e) - wx.getLocation({//获取当前地址信息 - type: 'wgs84', - success(res) { - const latitude = res.latitude - const longitude = res.longitude - const speed = res.speed - const accuracy = res.accuracy +// click: function (e) { +// wx.openLocation({ +// latitude: 23.362490, +// longitude: 116.715790, +// scale: 18, +// name: '华乾大厦', +// address:'金平区长平路93号' +// }) +// }, + + biaoji: function (e) { + // wx.getLocation({//获取当前地址信息 + // type: 'wgs84', + // success(res) { + // console.log(res) + // const latitude = res.latitude + // const longitude = res.longitude + // const speed = res.speed + // const accuracy = res.accuracy wx.openLocation({//跳转腾讯地图查看并可以进行导航 latitude: parseFloat(that.data.latitude), longitude: parseFloat(that.data.longitude) }) - },fail(res){//未授权地理位置处理 - wx.showModal({ - title: '请授权', - content: '若未授权地理位置,您将不能正常使用导航功能', - confirmText:"授权", - success (res) { - if (res.confirm) { - console.log('用户点击确定') - wx.openSetting({//跳转设置授权界面 - }) - } else if (res.cancel) { - console.log('用户点击取消') - } - } - }) - } - }) + // },fail(res){//未授权地理位置处理 + // wx.showModal({ + // title: '请授权', + // content: '若未授权地理位置,您将不能正常使用导航功能', + // confirmText:"授权", + // success (res) { + // if (res.confirm) { + // console.log('用户点击确定') + // wx.openSetting({//跳转设置授权界面 + // }) + // } else if (res.cancel) { + // console.log('用户点击取消') + // } + // } + // }) + // } + // }) + }, callPhone (e) { @@ -97,7 +107,7 @@ Page({ * 生命周期函数--监听页面初次渲染完成 */ onReady() { - + }, /**