How to debug WeChat applets

Since its launch, WeChat mini-programs have been deeply loved by users, and the online volume has shown an explosive growth trend . One of the main reasons is that the WeChat applet is a ready-to-use application , which brings great convenience to users while saving space on their mobile phones .

For WeChat Mini Program developers, the threshold for applying for registration of WeChat Mini Programs is low , and editing and debugging projects are relatively simple. After registering a Mini Program account , download and install the WeChat Web Developer Tools, and start the developer tools to edit and debug projects. However, there are two problems that must be solved in the process of debugging WeChat applets . One is the need to have a registered domain name , and the other is that the debugging address must be HTTPS encrypted.

Now , we can use Jinwanwei to quickly resolve the port mapping to realize the mapping of the user's local HTTP service to the HTTPS address of the external network. Since the certificate is deployed on the fast resolution server, the user server does not need to purchase and deploy the SSLZ certificate by itself. By using the top-level domain name provided by Kuaiyan , users can easily implement WeChat mini-program applications. The facet is the specific operation method for your reference.

1. First , deploy the local server and ensure normal access, then log in to the official website of Jinwanwei Quick Analysis or download the Quick Analysis client , and register a top-level domain name. If you already have a top-level domain name under your account, you can skip the registration step. ( Due to the strict scanning mechanism of WeChat , it is not recommended to use shell domain names for WeChat promotion. In order to prevent being affected, it is recommended to use top-level domain names )

2. Log in to the Quick Analysis client , and click Add Mapping in the upper left corner of the client .

Follow the prompts on the page and fill in the corresponding information.

Fill in the mapped information:

Mapping name: custom

Application port : fill in according to the actual situation

Public port type: choose according to your own application requirements

 
Intranet address: Intranet access fixed address. It can be a fixed intranet IP or a computer name. If the mapping is used locally on the server, it is recommended to fill in the 127.0.0.1 format.

4. Log in to the WeChat public platform, find the " server domain name " in the menu " Settings " -- " Development Settings " page, and fill in the mapped HTTPS address in the legal domain name of the request ; 3. After the mapping setting is completed, a message will be automatically generated HTTPS external network access address, then you can start WeChat applet debugging. Before debugging, make sure that you have registered the WeChat applet and completed the identity verification ; 

5. Open the WeChat developer tool, add the URL to the mapped HTTPS address in the project that needs to be debugged, and then you can debug;

6. Debugging is complete.

Guess you like

Origin blog.csdn.net/asdaddsd/article/details/127034611