The last article mainly talks about small program development and debugging and real machine debugging, this article continues to introduce the creation and analysis of small program projects.

Focus on Spring Boot+ micro services, mini programs, Flutter, Android, regularly share articles and video tutorials, reply to Java materials after attention, receive the learning dry goods carefully prepared for you!

This article is the fifth in the series of small programs, and knowing the previous articles will help you understand it better:

1. Applets (I) Understand applets 2. Applets (II) APPID fetching and project directory structure 3. Small program (3) life cycle 4. Small program (4) development and debugging methods and real machine debugging

preface

I. Project creation

1. Small program project creation

Create a small program project, open the small program development tool, select the left side of the small program, click on the right side of the plus sign for information Settings

1. Project name


2. Select a project storage directory


3. AppId required by the project

As the following:


The project name and store directory are easy to understand, but what is an appID?

AppId: It acts as your mini program’s “id card” in wechat. With it, wechat clients can determine your mini program’s “identity” and allow access to the advanced interface provided by wechat.

To obtain the AppID, you only need to register a small program account on the official website of wechat public platform (mp.weixin.qq.com) and log in. Then you can view the AppID of wechat small program in the “Development” – “Development Settings” of the website.

Note that appids for service numbers or subscription numbers cannot be used directly.

The procedure is as follows:

1. Log in or register an applet account

2. After entering the mini program account, the left development option —- “Development Settings –” appID (small program ID)

Once you get your appID, you can copy it to where you want to create your project.

If you don’t have your own applets account, you can use the test appID for temporary development

3. Create a directory, click Pages, right-click, and select New Directory (login)

4. Click Login, right-click and select Page

The directory structure is as follows

Set the startup page: modify pages in app.json, if the first startup is required, put it in the first position

The resulting screen looks like this

5. Set the title and refresh the page


6. Listen for the refresh listener function


Procedural workplace, a dedicated workplace programmer.