收藏
回答

调用位置API,wx.chooseLocation为什么调试的时候可以用,但是真机按了没反应?

wx.chooseLocation、wx.getLocation这两个,然后关联两个按钮,为什么调试的时候可以用,但是真机按了没反应?

chooseloc:function(temp)

  {

  let that=this

    wx.chooseLocation({

    success: function(res) {

console.log(res)

            that.setData({

              choosen:res,

            })

        },

      })

  },


  gotloc: function (temp) {

    let that = this

    wx.getLocation({

      success: function (res) {

        console.log(res)

        that.setData({

          got: res,

          flag2: true

        })

      },

    })

  },

t

调试电脑端:

真机端这两个按钮死活没用


回答关注问题邀请回答
收藏

1 个回答

  • 老张
    老张
    2020-02-19

    提示一下手机的、微信的、小程序的、依次位置授权是否正常。

    2020-02-19
    有用
    回复
登录 后发表内容
问题标签