Loading…

Easy registration for WeChat Mini Program users

Simple registration allows you to exchange `code` for `openid` without user authorization confirmation: Obtain the `code` according to the official WeChat documentation and then call the following registration interface to complete the registration: ["View official interface documentation"](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/login/wx.login.html) After obtaining the user's encrypted data, call the following interface to register: ```javascript WXAPI.register_simple({ code: '', postJsonString: '', referrer: '' }) ``` + code is the user’s temporary code obtained by calling the WeChat login interface. + postJsonString json data of user's extended attributes (requires string) + referrer The referrer information saved when registering this user ```json { code: 0, msg: 'success' } ```