当前位置:网站首页>Composition of wechat applet code
Composition of wechat applet code
2022-07-19 05:53:00 【One finger quicksand Q】
Catalog
1. Understand the basic composition and structure of the project
Two 、JSON The configuration file
5. Page .json The configuration file
7. Modify the project home page
2. WXML and HTML The difference between
2. WXSS and CSS The difference between
5、 ... and 、JS Logical interaction
2. Small program .js Classification of documents
One 、 Project structure
1. Understand the basic composition and structure of the project

2. Part of the applet page
Applet official suggested that all applet pages , All stored in pages Directory , Exist as a separate folder , As shown in the figure :

Two 、JSON The configuration file
1.JSON Role of profile
2. app.json file
app.json Is the global configuration of the current applet , Including all the page paths of the applet 、 Window appearance 、 Interface performance 、 Bottom tab etc. .Demo In the project app.json The configuration is as follows :
3. project.config.json file
project.config.json It's a project configuration file , Used to record our personalized configuration of applet development tools , for example :
- setting The configuration related to compilation is saved in
- projectname The project name is saved in
- appid The account number of the applet is saved in the ID
4. sitemap.json file
Wechat has now opened the search in the applet , The effect is similar to PC Web page SEO.sitemap.json This file is used to configure whether the applet page allows wechat indexing . When developers allow wechat indexing , Wechat will take the form of a crawler , Index the page content of the applet . When the user's search keyword matches the page successfully , The page of the applet will probably be displayed in the search results .

5. Page .json The configuration file
Every page in the applet , have access to .json File to configure the window appearance of this page , The configuration items in the page will overwrite app.json Of window The same configuration item in . for example :

6. New applet page
Only need app.json -> pages The storage path of the new page in , The applet developer tool can help us automatically create the corresponding page file

7. Modify the project home page
Just adjust app.json -> pages The sequence of page paths in the array , You can modify the front page of the project . The applet will put the first page , Render as the first page of the project , As shown in the figure :

3、 ... and 、WXML Templates
1. What is? WXML
WXML(WeiXin Markup Language) Is a set of tag language designed for small program framework , The structure used to build applet pages , Its function is similar to that in web page development HTML.
2. WXML and HTML The difference between

Four 、WXSS style
1. What is? WXSS
WXSS (WeiXin Style Sheets) It's a style language , Used to describe WXML Component style , Similar to... In web development CSS.
2. WXSS and CSS The difference between

5、 ... and 、JS Logical interaction
1. In the applet .js file
It is not enough for a project to only provide interface display , In the applet , We go through .js File to handle user operations . for example : Respond to user clicks 、 Get the user's location and so on .
2. Small program .js Classification of documents

Share the learning notes page I created :George's Notes (gitee.io)
边栏推荐
- PyTorch学习笔记【4】:从图像学习
- Gradle custom plug-in
- 基于复旦微 FPGA+华为海思 HI3531DV200+兆易创新MCU 的综合视频处理卡
- 网吧管理系统数据库设计
- [speech recognition] Kaldi installation experience
- Pointnet++ code details (II): Square_ Distance function
- Aperçu de l'apprentissage auto - supervisé
- Try some methods to solve the delay of yolov5 reasoning RTSP
- 如何将进程线程与CPU核进行绑定
- 【CS创世】 SD NAND和Raw NAND优劣势对比分析
猜你喜欢

Contrastive learning for image semantic segmentation (two articles)

Overview of self supervised learning

8种视觉Transformer整理(下)

CV-Model【3】:VGG16

CUDA编程-02: 初识CUDA编程

如何用NumPy读取和保存点云数据

3U VPX导冷高性能SRIO/以太网数据交换板

KU115 FPGA 高性能万兆光纤网络硬件加速卡 / 2 路 10G 光纤数据加速卡

PCIE于 总线架构高性能数据预处理板 / K7 325T FMC接口数据采集传输卡

Xinlinx zynq7020、7045国产替代 FMQL45T900 全国产化 ARM 核心板+扩展板
随机推荐
USB to TTL ch340 module installation (win10)
Some problems in face recognition testing with facenet source code
C language - bubble sort
Selective Kernel Networks方法简单整理
Deploy yolov7 target detection using OpenCV and onnxruntime - record post
Simple sorting of selective kernel networks methods
Xinlinx zynq7010国产替代 FMQL10S400 全国产化 ARM 核心板+扩展板
什么是tSD/qSD?CS创世 SD NAND到底是什么?
String distance problem
Transform the inriapearson data set into Yolo training format and visualize it
7种视觉MLP整理(上)
Review of software process and management (6)
基于 Kintex UltraScale 系列 FPGA 的高性能 PXIE 数据预处理载板(KU060 +FMC子卡接口)
Xinlinx zynq7020、7045国产替代 FMQL45T900 全国产化 ARM 核心板+扩展板
Livedata analysis
PyTorch学习笔记【4】:从图像学习
【CS创世】 SD NAND和Raw NAND优劣势对比分析
MySQL service is starting MySQL service failed to start
Overview of self supervised learning
CV-Model【2】:Alexnet