当前位置:网站首页>Project structure of wechat applet
Project structure of wechat applet
2022-07-19 04:38:00 【A little rabbit who likes radishes】
Applet project structure
One . Create wechat applet
1. Create applet configuration

2. Description of applet project file
2.1 project.config.json Modify the project name and appid
project.config.json ( Manually modify appid, Project name projectname)
The configuration here basically does not need to be changed manually , adopt 
Check the corresponding content to modify .
2.2 sitemap.json
In the applet root directory sitemap.json This file is used to configure whether the applet and its page can be indexed by wechat , The content of the document is a JSON object , without sitemap.json , All pages are allowed to be indexed by default
Wechat has now opened the search in the applet , Developers can use sitemap.json To configure , Or manage the background page collection switch to configure whether wechat index is allowed for its applet page .
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 term triggers the index , The page of the applet will probably be displayed in the search results .
2.3 app

app application Abbreviation , The main component of rendering
app.js
Register the entire applet Application
Register applet . Accept one Object Parameters , It specifies the life cycle callback of the applet, etc .
App (Object object) , Must be in app.js Call in , Must call and can only call once . Otherwise, there will be unexpected consequences .
and vue The life cycle of seems to be
app.json
Global configuration of wechat applet
pages Configuration page , The first one defaults to the home page , You can also use it entryPagePath Configure home page .


app.wxss
and css equally ,
Because each page has its own style file , therefore app.wxss Place a common style .
2.4 pages
Web page , Again New page When , Will automatically write the path app.json Internal pages In array
2.5 utils
- utils Tool class use
- Used to declare methods , Note included in module.exports in , Otherwise, the call will not find the method
边栏推荐
- Architecture and application of secure multiparty computing
- MySQL表的约束(基础篇)
- 成熟的线程要懂得拒绝
- 而导致公司所有系统修改跟着升级
- Rk1126 realizes picture in picture function picture in picture for rk 1126
- AutoJs学习-找图数据生成
- As a result, all system modifications of the company will be upgraded
- MySQL中的删除:delete、drop、Truncate三者的区别
- py3 redis通用调用
- Static attributes and static methods of class in JS
猜你喜欢

EasyExcel简单使用

Gin框架原理
![[Unity] Input.gettouch[index]的index](/img/9d/ec0e4c9e6b1bb25976357469fe037f.png)
[Unity] Input.gettouch[index]的index

Unity UMP打包黑屏问题总结

百度地图技术概述,及基本API与WebApi的应用开发

On the third day of security, iptables prevents nmap scanning and binlog

mysql中的视图、触发器和存储过程

VB. Net plug-in development - extract files

OSPF路由控制,防环相关知识

HCR Huichen is walking on the north slope, a giant beast swimming into digital marketing services
随机推荐
VB. Net plug-in development - extract files
New network security architecture: Zero trust security
常用postgresql数据操作备忘(不定时更新)
Only when the data analysis report is written in this way can we really understand the data
Tree array: [jxoi2017] addition problem solution
Autojs learning - map finding data generation
Android kotlin custom LinearLayout
N-Beats模型于2020年发布,并且优于M4比赛的获胜者3%!
Real time Bi (IV) low cost data quasi real time processing idea
HCR慧辰北坡而行,一只游入数字营销服务的巨兽
nodejs-uuid
复旦微FMQL(国产Zynq) 【IAR裸机开发之PS】——非字节对齐访问
Tidb learning notes [preliminary]
JS中Class类的静态属性和静态方法
Common errors in golang compilation
策略模式代替if-else
Sphinx遇到的问题
STM32 - timer series (II) general timer
TiDB学习笔记【初阶】
Apache22与opencms9.5集成配置