About WeChat Mini Programs authorization, get the address

Open Mini Program, there will be a prompt to get the address. If you click cancel, how to get the address again in the future?
Open Mini Program, click on a page, ask if you are authorized, click cancel, then how to authorize again?
(delete Mini Program and re-enter this method)

Sep.18,2021

Mini Program updated, the previous authorization method and can not be used, now it is a new authorization method, you can take a look at Mini Program's official document:
Note: wx.authorize ({scope:" scope.userInfo "}), cannot pop up authorization window, Please use < button open-type= "getUserInfo" > < / button >


about getting the address again, you can do this: you can guide the user to open the authorization settings page and open the location authorization

wx.getSetting({
  success: function(res) { 
    if (res.authSetting['scope.userLocation'] === false) {
      wx.openSetting({
        success: function(res) {
          console.log(res);
          if (res.authSetting['scope.userLocation']) {
            //
          }
        }
      })
    } else {
      //
    }
  }
})
Menu