This is the third day of my participation in the August Text Challenge.More challenges in August

preface

This article is mainly for the first time contact small program development, introduce some basic concepts and knowledge, after reading the whole small program development life cycle have a preliminary understanding, this article does not involve the actual code development.

The article introduces the general route of small program development life cycle, the actual development should be combined with functional requirements to add a variety of module functions, such as customer service, message notification and so on.

This article is written from personal experience. if there are any mistakes or omissions, please advise

In the early to prepare

Small program registration and certification

(1) To develop a small program, first register a small program, as shown below

(2) After registration, to do a small program certification, the cost is 300 yuan/year, the website will remind you how to do certification, follow the process step by step on the line.

PS: If you have a public number to do the certification, it is possible to reuse the public number qualification to do the certification, do not have to pay 300 yuan

(3) After the certification, improve the small program information, including the name, introduction, etc.

Configure and obtain basic information

(1) After the above steps are completed, the next step is to go to the development management to do some configuration, as shown in the following menu

(2) Enter the development Settings, copy the APPID, AppSecret(small program key) data to you this time to store, future development to use

PS: The administrator needs to scan the code to obtain AppSecret

(3) On the same page, scroll down to configure the server domain name

This is used when your applet calls the back end interface. If your applet calls the back end interface of www.xxx.com/api and is deployed to www.xxx.com/api, you must add the domain name www.xxx.com to it. Otherwise the online version of the small program will not call you

By the way, be sure to configure HTTPS for your www.xxx.com domain. Applets only allow HTTPS, not HTTP

Set out to develop

Tools to prepare

Small program development must use wechat official small program developer tools

Development technology selection

I only know the following two types. In the actual development, I use uni-app technology, because the project needs small programs, and I want APP and mobile terminal, but I don’t want to develop so many ports repeatedly, so I choose uni-app technology

Native development of small programs

This details please see the official website introduction, because I have not actually used small program native development. Developers.weixin.qq.com/miniprogram…

Uni – app technology

Vue. Js is a framework for developing all front-end applications using vue. js. Developers write a set of code that can be published to iOS, Android, Web (responsive), and various small applications (wechat/Alipay, etc…). , fast application and other platforms.

  • The biggest advantage is that if there are multiple port requirements in the project development (such as small program, APP, mobile terminal, etc.), only need to develop a set of code on the line, of course, in the code to add appropriate compatible code for different ports.
  • Because it is based on Vue. Js, so people who can learn Vue are also very fast, the cost of learning is not high
  • The syntax is similar to vue.js
  • See uniapp.dcloud. IO /README for more details

The development of interface

The interface of the applets development tool is as follows

Version management

During the process of developing applets, there are several versions: development version, trial version, review version, and official version.

The overall process is: you develop a small program, upload it, into the development version, the development version submitted for review, into the review version, after the review passed, can be officially released, into the official version of the small program

PS: The functions of the experience version are described below

Development version

To put it simply, you run a version of the project locally, and the development version only keeps everyone’s latest copy of the uploaded code

  • First of all, will have the authority to develop small procedures, set the authority, as shown below, only have the authority, can be regular development operations

  • As shown below, after running the small program, you can upload the version of the code, after background control, it will become an experience version

(Development version can be deleted, does not affect the online version and the review version of the code, only affect your own)

  • Click on the upload

  • Then you can go to the small program official background, see you upload the development version

Experience version

  • Experience version, in my opinion, as a test function is greater, that is, you develop a small program, turn it into an experience version, there will be an experience version of the TWO-DIMENSIONAL code, others can scan the code to experience the small program
  • The development version is your own play, the experience version is the small program can be given to others to experience
  • There can be several development builds (as many personal builds as there are), but only one play build throughout the cycle

The following figure sets the development version to the experience version

Note: If the applet of experience edition is to be used by others, the user must have the permission to use the applet of experience edition. The permission can be added in the background of the applet, as shown below

Review version

Only one piece of code can be under review for a version under review. After the audit results can be published online, or directly resubmit the audit, covering the original audit version.

  • Submit it for review here

  • After approval, it will become the following figure

The online version

The code version used by all online users, that is, the version can be searched in wechat mini program.

  • Click submit to release the approved version, that is, release the official version!

  • Select publish mode, publish!

  • Ok, and then administrator scan (many operations require administrator scan)