Home  >  Article  >  Backend Development  >  javascript - The front-end website written in angular2 needs to be integrated into WeChat. How to develop the front-end and back-end separately?

javascript - The front-end website written in angular2 needs to be integrated into WeChat. How to develop the front-end and back-end separately?

WBOY
WBOYOriginal
2016-12-01 00:25:251403browse

I am a front-end developer. Do I need to bind the web account to the official account and WeChat account? How should I work with the backend to develop this feature?

Reply content:

I am a front-end developer. Do I need to bind the web account to the official account and WeChat account? How should I work with the backend to develop this feature?

Please refer to the WeChat public account development documentation on how to access.

Secondly, you need to associate your WeChat account with your web account. When the user clicks to log in with WeChat, it will jump to the WeChat QR code scanning interface. Scanning the QR code is actually an authorization process, and then the callback address configured in the WeChat developer backend (OAuth2 authorization) will be called back. This is the case when the user logs in using WeChat for the first time. Next, the user needs to verify the username and password of the web account. After the verification is passed, the openid and unionid of WeChat will be associated with the web account. In the future, you can know which web account it is based on the openid returned by the callback.

For the functions and differences between openid and unionid, please also refer to the WeChat public account development documentation (authorized login is only available with service accounts).
https://mp.weixin.qq.com/wiki

Basically, the front-end only needs to provide the WeChat login entrance, and the rest is basically a matter of the back-end

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn