Xiaobai develops WeChat applet 51--Release the version of WeChat applet

The background code has been deployed to the public network Ip server, the interface program is running on the IIS web site, the front-end WeChat applet request interface address has also been changed to the public network Ip, the test is normal, and the last half of a cigarette is missing, that is, the The code of the applet is published on the WeChat platform, because the applet is still running locally and has not really run into WeChat. To do it this way, the process is very complicated and troublesome, with many details and many pitfalls.

1. Prepare to apply for a domain name

Purchase a domain name in the Alibaba Cloud service console purchased earlier

 

First check whether the domain name has been registered

 Here I registered and purchased the domain name ywjwest.vip, which costs money, and it costs a lot, and you can play with money.

 2. The domain name has been purchased and needs to be filed

Filing is very troublesome and picky, the requirements are very detailed, the process must be patient 

 Click on the filing of the workbench. The filing takes 10 days and half a month. It depends on the official mood. Do you understand that this is very painful. Filing does not cost money, but the process is cumbersome and picky. You can also spend a lot of money to ask Ali customer service for filing, but the process also takes time, at least 10 days, and the filing is divided into 2 steps. The filing by the Ministry of Public Security seems to have received a lot of attention and attention.

The following is my filing result

 

 Let me show you my filing process

   

 Follow this link to go to the website of the Ministry of Public Security for filing ( https://beian.miit.gov.cn ), click on this website to enter

 It’s registration, verification, and login again. The process is very annoying. On this website, you need to upload photos of the person in charge of the website, website contact person, ID card, and hand-held certificate. The result is

 Be patient, be patient. After the Ministry of Public Security is successfully prepared, the record information needs to be placed at the bottom of the website homepage as required. Here you need to write a website yourself, just build a purely static website. For example, mine is:

 

 There must be a record number in the middle of the website, there must be a record number, there must be a record number, this is the requirement of the public security.

3. Apply for an SSL certificate

1) Apply for a free certificate

SSL certificates cost money, and it costs a lot of foreign dollars, but fortunately, Alibaba Cloud provides a free one-year SSL certificate

 2) Download the certificate

 After downloading to the local machine, upload it to the cloud server and place it in the specified directory, here it is placed in the d:\website\ directory, decompress it, and use it later

 

3) Import the certificate

Enter mmc in cmd to open the console

On the top menu bar of the console, choose File > Add/Remove Snap-in.

The final result is

4. Website binding certificate

1) Two port numbers are opened on the ECS server console of the cloud server, one is 443, and the other is 9966, which will be useful later. Many people have not done this operation, and it will definitely not work. The website will not be accessible at that time. This 443 is used for filing, and this 9966 is used for the background website of the small program released later. It is really too carved, a lot of details.

2) Install iis on the cloud server and create a new website, here is to create a website called www.ywjest.vip.443, the name is determined by yourself, pay attention to select the previous certificate

 SSL Certificate: Select the imported certificate

3) Verify that the certificate is installed successfully

 Access method: https://ywjwest.vip, the default https is port 443

 Finally completed 60% of a huge project, give yourself a steel clap 

5. Small program background program website binding certificate

Create a directory ywjwest.996 in d:\website\, and copy all the files in the LingHangApp directory to this directory. The files in the LingHangApp directory are the files released by the backend API program of the applet. IIS creates a website, www.ywjwest.vip. 9966,

 

 Set homepage index.html

Visit the website, success

 Click on an interface, pay attention to the interface address, it is in the form of https://www.ywjwest.vip:9966, which shows that the domain name of the applet has been prepared, it is very important, very important , this operation is related to the release of the applet Whether to go online.

6. Small program upload code

1) Log in to mp.weixin.qq.com, scan the code to enter the management platform, enter the development management-"development settings, configure the request domain name, this domain name is the domain name in the previous steps

     

2) In all js files in the applet, replace the front part of the url address requested by wx.request with https://www.ywjwest.vip:9966, such as the course page and home page, and others are similar operate

 

 

3) Upload code

 

4) You can see it after the upload is successful, and you can upload it multiple times

 

Click to submit for review

 

 

 

 

Approved, click submit to publish

 The release is successful, you can see the online version

 The whole process may fail, submit again when it fails, do it a few more times, and if you are lucky, it will be completed in one day

 

So far, the mini program has finally been published on the WeChat server, 99% completed, really handsome 6666.

Guess you like

Origin blog.csdn.net/hqwest/article/details/129928364