微信小程序地图导航、拨打电话

地图导航:

latitude和longitude是数值类型,不能是字符串类型。

 handleNav:function(index){
       let _this = this;
       let item =_this.orderList[index];
       
	  //​使用微信内置地图查看位置
       wx.openLocation({
       	   latitude:parseFloat(item.lat),//地址的纬度
           longitude: parseFloat(item.lon),//地址的经度-
           address: item.deliveryAddress//详细地址
       })
}

拨打电话:

handleCallPhone:function(index){
       let _this = this;
       wx.makePhoneCall({
            phoneNumber: _this.orderList[index].deliveryPhone
       })
}
发布了258 篇原创文章 · 获赞 21 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/wsln_123456/article/details/104569709