当前位置:网站首页>[graduation season · advanced technology Er] what is a wechat applet, which will help you open the door of the applet
[graduation season · advanced technology Er] what is a wechat applet, which will help you open the door of the applet
2022-06-26 15:28:00 【Half body wind and snow】
Active address : Graduation season · The technique of attack er
author : Half body wind and snow
brief introduction : This course , I will lead you to learn about wechat apps , Through the development of small programs , development environment , development tool , Project structure, etc , Make a detailed explanation .
the other day , I also wrote an article about graduation season , Long time , Remember 2019 The graduation season in , I am new to wechat apps , This article , I no longer remember , No longer motivates , I will graduate this season , A gift to all graduates and students .
This graduation season , I decided to put what I had learned about wechat apps 、 income 、 All the feelings are summed up , Give you a hand .

Learn about applets
One 、 What are applets
Applet It's a new kind of openness , Developers can quickly develop a small program . Small programs can be easily obtained and spread in wechat , At the same time, it has an excellent use experience .
2016 year 9 month 21 Beta version of the applet released on the th .2017 year 1 month 9 Day of launch . Applet base library update log
Two 、 Applet development tools
No matter what language we use for development , All need development tools , You can click Download tool , Install development tools .
In use , We need to log in first , To enter the development interface .
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-TcPpZ8Kz-1655915629292)(/Users/tiger/Library/Application Support/typora-user-images/image-20220622233119081.png)]](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
We choose to create a new one called HelloWord Small program , Path or something , Just choose for yourself , ad locum , We found that AppID It's empty. , This is what we need , So we need to register one APPID, Just click register Button , Enter the registration page .
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-3x225zml-1655915604943)(/Users/tiger/Library/Application Support/typora-user-images/image-20220622233539447.png)]](/img/db/dd5a854e56b491817f137302c75032.png)
2-1. Access to the process
- Applet registration — Register the app on wechat public platform , After the completion of registration, information can be improved and developed synchronously .
- Small program information perfect — Fill in the basic information of the applet , Include the name 、 Head portrait 、 Introduction and service scope, etc .
- Developing small programs — Complete applet developer binding 、 After developing information configuration , Developers can download developer tools 、 Refer to the development documentation for applet development and debugging .
- Submit for review and release — After completing the development of the applet , Submit the code to wechat team for review , It can be released after approval ( It can't be released during the public beta ).
2-2.AppID
AppID — Development --》 Development settings , find APPID
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-U9vWZVlM-1655915604944)(/Users/tiger/Library/Application Support/typora-user-images/image-20220622234124148.png)]](https://img-blog.csdnimg.cn/e2487c63600b4d788b313407e9adc9e4.png)
Add project members — management --》 Member management , Only administrators can add members here .
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-bc5vO7ER-1655915604944)(/Users/tiger/Library/Application Support/typora-user-images/image-20220622234203233.png)]](/img/c8/f3f31a8e53c5918abc719603811cc7.png)
Now we add APPID, And create one called HelloWord Project , Then click OK .
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-kdnNjnTV-1655915604945)(/Users/tiger/Library/Application Support/typora-user-images/image-20220622234459921.png)]](/img/f1/1490b2b91a44c7c0c7d2330426183d.png)
2-3. Introduce development tools
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-GpuoyMZL-1655915604945)(/Users/tiger/Library/Application Support/typora-user-images/image-20220622234613103.png)]](/img/94/6c3ea090a8c1655483e29597d2200f.png)
As shown in the figure above , We created a small program project directly , Introduction to the interface , We can development tool Go to the official website to learn , No more details here .
3、 ... and 、 Applet structure
Applet development tools currently provide 5 Editing of kinds of files :wxml、wxss、js、json、wxs And a preview of the image file .
3-1. New page code
File operations , There are two ways :
- Right click on the directory tree , Choose new Page, Will automatically generate what the page needs
wxml、wxss、js、json. - stay app.json Of pages Field , Add the path to the new page , The files required for this page will be automatically generated .
3-2. To configure
JSON The documents are all wrapped in braces {}, adopt key-value How to express data .JSON Of Key Must be wrapped in a double quotation mark .
Be careful :json In file , You can't write notes .
- project.config.json — Project profile .
- Usually when you use a tool , They will make some personalized configurations according to their preferences , For example, interface color 、 Compile configuration, etc , When you change to another computer and re install the tools , You have to reconfigure .
- With that in mind , The applet developer tool generates a
project.config.json, Any configuration you make on the tool will be written to this file , When you re install tools or change your computer to work , You just load the code package of the same project , The developer tool will automatically help you recover to the personalized configuration when you developed the project , It will include the editor's color 、 A series of options such as automatic compression when uploading code .
- sitemap To configure — Search in applet , When developers allow wechat indexing , Wechat will take the form of a crawler , Index the page content of the applet .
- app.json — Global configuration .
- Configuration page — Configuration of each applet page , You can only configure window attribute .
3-3.WXML
WXML(WeiXin Markup Language) Is the framework design of a set of tag language . Similar to Android layout file .
3-4.WXSS
WXSS (WeiXin Style Sheets) It's a style language , Used to describe WXML Component style . Similar to Android style.
3-5.JS
It is equivalent to an zhuozhong java, Execute lifecycle functions and processing logic .
3-6.wxs
WXS(WeiXin Script) Is a scripting language for small programs , combination WXML, You can build the structure of the page .
Four 、 Minimalist applet
In the process of our development , Many times we need a blank project , To build your own framework , Directly enter the project file , Delete the blue part of the file in the picture below .
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-PVb4O0Dw-1655915604946)(/Users/tiger/Library/Application Support/typora-user-images/image-20220622235233126.png)]](/img/d7/3f7689f3fb9f979923ef8da7c292d1.png)
Delete the finished item style
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-9QEvfKUS-1655915604947)(/Users/tiger/Library/Application Support/typora-user-images/image-20220622235627859.png)]](/img/ab/958402cd694df1385901841137c240.png)
Now let's build a new app.json file
{
"pages": [
"home"
]
}
Create a new one home.wxml file
<!--home.wxml-->
<view>Hello World</view>
Create a new one home.js file
Page({
})
Click on the compilation , The operation results are as follows :
![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-tY4ic1SM-1655915604948)(/Users/tiger/Library/Application Support/typora-user-images/image-20220623000222154.png)]](/img/5c/75ffde82d889c5ab3c0d9dc2485f6d.png)
summary
Actually, in my opinion , Wechat applet should be regarded as a very simple development language , If you like , Please support , I am going to write a series of articles , Thank you for your support
Active address : Graduation season · The technique of attack er
边栏推荐
- 在校生学习生涯总结(2022)
- clustermeet
- Particle filter PF -- Application in maneuvering target tracking (particle filter vs extended Kalman filter)
- [CEPH] cephfs internal implementation (I): Concept -- undigested
- Principle of TCP reset attack
- Program analysis and Optimization - 8 register allocation
- Unity C# 网络学习(九)——WWWFrom
- Pod of kubernetes
- ETL过程中数据精度不准确问题
- 一篇博客彻底掌握:粒子滤波 particle filter (PF) 的理论及实践(matlab版)
猜你喜欢

Vsomeip3 dual computer communication file configuration

RestCloud ETL抽取动态库表数据实践
![[tcapulusdb knowledge base] tcapulusdb system user group introduction](/img/7b/8c4f1549054ee8c0184495d9e8e378.png)
[tcapulusdb knowledge base] tcapulusdb system user group introduction

Restcloud ETL extracting dynamic library table data

【毕业季·进击的技术er】 什么是微信小程序,带你推开小程序的大门

AbortController的使用

【文件】VFS四大struct:file、dentry、inode、super_block 是什么?区别?关系?--编辑中

音视频学习(一)——PTZ控制原理

Using restcloud ETL shell component to schedule dataX offline tasks

【TcaplusDB知识库】TcaplusDB系统用户组介绍
随机推荐
RestCloud ETL解决shell脚本参数化
[tcapulusdb knowledge base] tcapulusdb doc acceptance - create business introduction
Pytoch deep learning code skills
Unity C # e-learning (10) -- unitywebrequest (1)
打新债注册开户安全吗,有没有什么风险?
【SNMP】snmp trap 介绍、安装、命令|Trap的发送与接收代码实现
【TcaplusDB知识库】TcaplusDB单据受理-创建游戏区介绍
Is it safe to open a new bond registration account? Is there any risk?
[tcapulusdb knowledge base] tcapulusdb doc acceptance - table creation approval introduction
The tablestack function of the epidisplay package of R language makes a statistical summary table (descriptive statistics of groups, hypothesis test, etc.), does not set the by parameter to calculate
Learning memory barrier
Sikuli automatic testing technology based on pattern recognition
[tcapulusdb knowledge base] Introduction to tcapulusdb data structure
10 minutes to understand bim+gis fusion, common BIM data formats and characteristics
Evaluate:huggingface detailed introduction to the evaluation index module
clustermeet
/etc/profile、/etc/bashrc、~/.bashrc的区别
JS之事件
【TcaplusDB知识库】TcaplusDB系统用户组介绍
2Gcsv文件打不开怎么处理,使用byzer工具