小程序 定位不准

  positionClick: function() {
    console.log("查看地图");
    if (!app.globalData.isPosition) {
      app.checkPositionShop();
    } else {
      const la = Number(latitude);
      const lo = Number(longitude);
      //经纬度 改为客户的
      wx.openLocation({
        latitude: la,
        longitude: lo,
        scale: 16,
        address: this.data.bankAddress
      })
    }
  },

  注意 

const la = Number(latitude);
const lo = Number(longitude);
要进行类型转换!!!!!
posted @ 2019-06-12 20:29  zhangheliang  阅读(1299)  评论(0编辑  收藏  举报