preface
Objective: To provide business support and version release for all small programs under the company through platform agent.
First, preparatory work
Registration platform account
Apply for platform qualification through wechat · third-party platform
Pay attention to the permission set of the third-party platform. You are advised not to select message management permission set unless required by the service. If checked in the application for the whole network release qualification wechat will test this basic logic.
Web wide distribution and why it needs to be tested. As the name implies, once you publish a small program, then all the small programs under the template will be published. NO! The whole web release is just a qualification. After passing the audit, the third-party platform can host the authorized official account/mini program for login authorization. The back-end of the third-party platform can automate the management of small programs by dialing API (core interface: setting domain name, setting classification, uploading code, binding user, obtaining qr code for experience, submitting for review and publishing).
Source: author: Internet links: fix true court https://juejin.cn/post/6844903839426936839 the nuggets copyright owned by the author. Commercial reprint please contact the author to obtain authorization, non-commercial reprint please indicate the source.
Register applet
- Independent registered
Independent registration: small programs can be authorized by the administrator himself to wechat public platform to register one (if the authentication needs to pay 300 authentication fee), after the completion of the category, appID and category provided to a third party.
- Interface to register
The third party through API interface quick registration (youzan, weimeng and other small program service providers are examples) quickly create small program documents
2. Small program authorization
Technical Description Document Follow the steps in the preceding document to perform authorization operations. There are two methods for guiding user authorization:
- Authorization registration page scan code authorization
- Click the mobile link to quickly authorize the third-party platform to generate an authorization link and directly send the link to the authorization administrator through the mobile terminal. After the administrator confirms that the authorization is successful.
Tips: Biz_APPID field is a small program or public number that is unique to the specified authorization. It is recommended that the guide user fill inCopy the code
Log in to the wechat public platform [Settings – Basic Settings – Account information], copy the APPID and send it to the third party platform
After authorization, the URI(that is, the page path corresponding to the redirect_URI field) is called back to obtain the authorization_code (authorization_code) and expiration time. The authorization code can be used to obtain the basic information of the small program
Note: If the small program is quickly created through THE API interface, if the registration is successful, wechat will push the registration audit event to the third-party background, which will contain the APPID and auth_code(the authorization code can be used in exchange for authorizer_accesstoken) and other key information.
After the small program authorization is completed, customers need to be guided to log in to the wechat public platform – small program background [Settings – Third party Settings] to bind the small program of the licensor. The diagram below:
3. Platform applet template
Generation of small programs to achieve business – development introduction document
Follow the steps above to bind the applet template to produce the template ID the same: develop common applet. Differences: The code is only uploaded to the background draft box of the open platform, each developer has only one draft, each upload will automatically overwrite the last code, the draft box can only save 10. The appropriate version is ready to add the template library. A maximum of 50 template libraries can be added.
After the front-end upload is complete, third-party platforms can see it in the background of the applets and then specify the draft as a template. You can then submit it for review and release.
Small program authorization after hosting, can only use the third party platform in wechat open platform registered server address. So the third party platform in the public number to help publish the code, need to set the server address to small program server address, set the interface see "modify server address" in the document interface.
Fourth, platform release agent preparation before the release of small program
Basic Information Settings
Basic Information Settings
Set service domain name, set business domain name (webview)
Category management
Category management
Members of the management
Members of the management
Binding experiencer
Subscription message Settings
Subscription message Settings
Plug-in management
Plug-in management Document
Such as small program broadcast plug-in application
Get the QR code of experience version
Obtain the QR code document of the experience version
Common link QR code
Access_token specifies the placement rule of the applets verification file: it is placed in the last subdirectory declared in the URL. If there is no subdirectory, it is placed in the top-level directory of the server to which host belongs. Scan the general link TWO-DIMENSIONAL code to open the small program document two-dimensional code link content will be brought to the page in the form of parameter Q, in the onLoad event to extract q parameter and self decodeURIComponent once, you can obtain the original two-dimensional code complete content.
5. Platform release agent applet
Code management
Upload code
Upload code applet template development
In order to facilitate third-party platforms to use the same applet template to provide services for different applet, the third party can put the custom information in ext_JSON. In the template applet, the interface can be used to obtain the custom information, thus distinguishing different applet. (for example, you can write the corresponding applet id and interface version, etc.)
Tips: Note that the fields should be placed in the ext_JSON object under the ext field."ext_json": {
"ext": {
appId: 'xxxxxxx',
xxxxx: 'xxxxxxx'}} Otherwise wx.getExtConfigSync is not availableCopy the code
Upload applet code interface: Plugins are not currently supported in ext_JSON. We hope wechat will open this function as soon as possible
Solution: package and compile two sets of code drafts, one with plugins and one without plugins. I hope you can give me a better solution.
Submit audit
Submit audit
Post code
Post code
reference
- Interpretation of wechat third party platform – generation small program development
- Wechat product system
- Wechat Open platform documents
- Wechat public platform
- Wechat open platform