Wechat's experience of getting the code page jump is not good, can it be optimized?

to pay via Wechat"s official account, Wechat"s authorization is required to obtain openid,. The first step is to obtain code, Wechat"s official API:

https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE-sharpwechat_redirect

this requires a page jump, and the experience is very bad. Can you skip this step? I think ele.me didn"t jump in the h5 of Wechat. It could directly pull up WeChat Pay and sent a request to open.weixin.qq.com. Do you have any good ways to optimize the experience?


  1. there are two ways to get user information. If you only need openid, you can use silent
  2. .
  3. is usually done on the page entry. In addition, you can cache what you have acquired to avoid repeated acquisition
  4. .

Yes. After logging in, Wechat puts the openid in the database and then can directly re-enter the database to get

.
Menu