Generally common WeChat scan code login, after clicking login, the page jumps to WeChat, where the QR code is displayed, and then scan the code to log in.
But I saw this website, http://www.lativ.com. After clicking to log in, the page did not jump to WeChat. Instead, the QR code was displayed on its own page. After scanning the code, You can log in.
How is this effect achieved?
Generally common WeChat scan code login, after clicking login, the page jumps to WeChat, where the QR code is displayed, and then scan the code to log in.
But I saw this website, http://www.lativ.com. After clicking to log in, the page did not jump to WeChat. Instead, the QR code was displayed on its own page. After scanning the code, You can log in.
How is this effect achieved?
https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN
It is speculated that when you click the login button, it will request the WeChat API and then obtain the QR code through the WeChat URL and display it
This is the second method officially given by WeChat:
The main purpose of JS WeChat login: the website hopes that users can complete the login within the website, without jumping to the WeChat domain to log in and then return, to improve WeChat login fluency and success rate.
For details, please refer to WeChat official documentation
Create a website application on the WeChat open platform and implement it step by step according to the above document