Niapp packs Android app, WeChat authorizes login, obtains user openid, wrong problem

1. uniapp packages the Android app, if you need WeChat login, you need to configure the manifest.json file

2. Use the uni.login method to get user information

uni.login({
  provider: 'weixin',
  success: function (loginRes) {
    //loginRes.authResult里包含openid
    console.log(loginRes.authResult);
  }
});

 Note: If appid and appsecret are not configured or after the configuration is complete, the user obtains openid for WeChat cash withdrawal and other scenarios that require openId, it will take effect after customizing the debugging base. The standard running base uses the simulated appid

 

After you have to make a custom pedestal, then run the pedestal and select the custom pedestal

 

About uniapp packaging Android app, WeChat authorized login Filling in the appid is the same as not filling in the appid to get it. It is not based on my appid. The solution is the same as above.

Guess you like

Origin blog.csdn.net/qq_42044542/article/details/116854072