当前位置:网站首页>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)
边栏推荐
- CS品牌SDNAND在颜色检测仪行业中的应用案例
- Comparative learning loss function (rince/relic/relicv2)
- SD NAND与eMMC优劣势对比
- Opencv reads the image under the Chinese path and converts its format without changing the color
- CV-Model【3】:VGG16
- Xinlinx zynq7010国产替代 FMQL10S400 全国产化 ARM 核心板+扩展板
- Pytorch learning notes [5]: generalization using convolution
- PyTorch学习笔记【2】:学习的机制
- Emotional classification based on Bert
- CUDA编程-01: 搭建CUDA编程环境
猜你喜欢

Xinlinx zynq7020、7045国产替代 FMQL45T900 全国产化 ARM 核心板+扩展板

基于 KU115+MPSOC 的 6U VPX 高速信号处理板(XCKU115 + ZU9EG +DSP)

Review of software process and management (IX)

BEVFormer: Learning Bird’s-Eye-View Representation from Multi-Camera Images via Spatiotemporal Trans

Some problems in face recognition testing with facenet source code

对比学习用于图像语义分割(两篇文章)
![[附代码] 如何用HOG+SVM实现手写数字识别](/img/e1/870aec8bb75c7cf82dee62c68d1009.jpg)
[附代码] 如何用HOG+SVM实现手写数字识别

基于四叉树的图像压缩问题

PyTorch学习笔记【3】:使用神经网络拟合数据

基于复旦微 FPGA+华为海思 HI3531DV200+兆易创新MCU 的综合视频处理卡
随机推荐
3U VPX导冷高性能SRIO/以太网数据交换板
NOR 与 NAND的区别对比分析
新产品如何选型Flash?
Application and principle of throttle/debounce
深入理解卡尔曼滤波器(2): 一维卡尔曼滤波器
Hanoi Tower problem -- > recursive implementation
基于 UltraScale FPGA+华为海思 ARM 的高性能综合视频图像处理板 / FPGA+ARM
CS品牌SD NAND与SPI NAND的对比
Pointnet++ code explanation (III): query_ ball_ Point function
CV-Model【1】:Mnist
QuizCardGame
Pytorch learning notes [4]: learn from images
FMC子卡:8 通道 125MSPS采样率16 位 AD 采集子卡
CV-Model【1】:Mnist
网吧管理系统数据库设计
分享CS品牌SDNAND与可穿戴设备之间成功合作
5种3D Attention/Transformer整理(A-SCN、Point Attention、CAA、Offset Attention、Point Transformer)
Review of software process and management (IX)
自監督學習概述
如何将进程线程与CPU核进行绑定