头图

In order to help service provider developers to focus more on business development and reduce the cost of projects such as environment construction and management tool construction, the back-end services of third-party platforms and third-party platform management tools that are opened in the form of mirroring are now launched.

This image can be deployed to WeChat cloud hosting with one , and the third-party platform development environment construction and third-party platform management tool deployment can be completed in minutes.

In addition, the image is open source, which is convenient for developers to carry out secondary development. The official will also continue to maintain and iterate the tool to help service providers conduct business based on third-party platforms more efficiently.

project address:

https://github.com/WeixinCloud/wxcloudrun-wxcomponent

module introduction

One-click deployment of official services, you can get the following two functional modules:

  • [Third-party platform authorized events and message and event configuration] Service providers do not need to purchase servers, develop and receive events and messages pushed by the platform to developers, and deploy to cloud hosting with one click to obtain complete back-end services for receiving messages and events , out of the box.
  • [Third-party platform management tool] provides functions and usage guidelines, please click at the end of the article to read the original text for details.

How to build ?

If the official image is deployed to WeChat cloud hosting, one-click deployment and environment initialization configuration can be completed on the third-party platform. At the same time, developers are also supported to go to the project address to download the source code and build the mirror.

1.1, create a new account

For users who create a new third-party platform account, you can refer to the following steps to complete the setup.

  • Log in to the WeChat open platform, go to the third-party platform, and then click to create a third-party platform ;
  • Fill in the basic information and select to activate the cloud service:

图片

  • After the account is created, click "Build Now" to start the deployment:

图片

Start deploying. By default, a free environment will be created to deploy services, and if the free quota is used up, a paid environment will be created. Details of the free quota of WeChat cloud hosting can be found at:

https://developers.weixin.qq.com/miniprogram/dev/wxcloudrun/src/Billing/price.html

图片

  • The deployment is expected to be completed in 1-3 minutes:

图片

  • After the cloud service deployment is completed, you can complete the configuration of development materials such as "Permission Set", "Login Authorization Initiating Domain Name", "Authorization Event Receiving Configuration", "Message and Event Receiving Configuration", etc., to complete the development environment construction.

图片

  • After the development environment is set up, you can go to the third-party platform management tool to use it. For details, see the third-party platform management tool instructions.

图片

  • Since the secret needs to be configured in the third-party platform management tool to use the function normally, it is necessary to bind the third-party platform management according to the guidelines and use the open platform management to scan the code to verify the secret.

图片

  • To test the authorized account status, since the newly created third-party platform account has not been released on the entire network, you need to configure the original id of the authorized test account to the [Authorized Test Official Account/Mini Program List], and the third-party platform can be used after the configuration is completed. The function of the platform management tool quickly generates an authorization page to complete the authorization.

图片

  • To access the WeChat cloud hosting management service, you can access it from the following portal:

图片

1.2, stock account

For third-party platform accounts that are already in normal use, you can refer to the following steps to complete cloud service activation, deployment, and environment construction.

  • Log in to the WeChat open platform, go to the third-party platform, and enter the details of the third-party platform;
  • Then go to the "Cloud Services" module, click "Activate", and select "Create a New Account" or "Associate a Tencent Cloud Account"

图片

图片

  • After the cloud service is activated, click "Start Now" to enter the link of service deployment and environment configuration:

图片

  • For existing accounts, permission sets and development materials have been configured, it is recommended to fully test and then replace them with system-generated configurations:

图片

  • To stop ticket push, do the following:

图片

How to use ?

Using Authorization Events and Messages and Events Configuration

After the cloud service deployment is completed and the relevant configuration is applied to the development materials of the third-party platform, the back-end service can normally receive the messages pushed by the WeChat platform. The back-end service will store the received message and time in the MySQL database hosted by WeChat Cloud, and developers can read the relevant information from the database.

If the developer's business is also deployed in WeChat cloud hosting, the database can be accessed through the intranet. For details, please refer to:

https://developers.weixin.qq.com/miniprogram/dev/wxcloudrun/src/guide/mysql/

If the developer's business is not deployed in WeChat Cloud Hosting, you can go to WeChat Cloud Hosting to enable public network access, and then you can access the database through the public network.

图片

  • If developers need to further connect the messages pushed from the WeChat platform with the business, they can conduct secondary development according to the project README document.

Using third-party platform management tools

For details, see the instructions for use:

https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/product/management-tools.html

Manage Cloud Services

You can perform cloud service management, database management, viewing monitoring alarms, and viewing resource usage on WeChat Cloud Hosting. The way to log in to WeChat Cloud Hosting with a third-party platform account is as follows:

图片

  • After entering the WeChat cloud hosting console, you can perform related management operations:

图片

Complete reference documentation:
https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/product/wxcloudrun.html


CloudBase云开发
425 声望438 粉丝

云开发(Tencent CloudBase,TCB)是云端一体化的后端云服务 ,采用 serverless 架构,免去了移动应用构建中繁琐的服务器搭建和运维。同时云开发提供的静态托管、命令行工具(CLI)、Flutter SDK 等能力极大的降...