当前位置:网站首页>小程序目录结构
小程序目录结构
2022-07-07 12:33:00 【InfoQ】
目录结构

- pages:这个目录下放的就是小程序的页面
- utils:这里面存的都是一些公用的js,提供公共方法减少冗余和维护难度的
- app.js:整个微信小程序相关的全局js,这里有监听整个小程序的生命周期函数和全局变量;
- app.json:是对整个小程序的静态全局配置,我们可以在这个文件中配置小程序是由哪些页面组成(路由),配置小程序的窗口背景色、配置导航条样式,配置默认标题,可以配置整个项目的样式,超时时间,加载的插件等等;(注意该文件不可添加任何注释);
- app.wxss文件:整个小程序的样式文件,针对每个页面的css文件的内容不同,加载到对应页面的css样式时,当前页面的wxss文件会覆盖app.wxss文件(估计跟普通的css样式的覆盖规则类似)。
- project.config.json文件: 这个其实是每个开发者工具生成的项目都有的,但和项目内容实际没有特别大关联,主要是记录相关工具的配置的,在工具上做的任何配置都会写入到这个文件,当重新安装工具或者换电脑工作时,只要载入同一个项目的代码包,开发者工具就自动会帮你恢复到当时你开发项目时的个性化配置,其中会包括编辑器的颜色、代码上传时自动压缩等等一系列选项。
- sitemap.json文件: 这个可以配置是否允许被微信索引,具体看微信官方文档-sitemap 配置
- wxs
- png
- jpg
- jpeg
- gif
- svg
- json
- cer
- mp3
- aac
- m4a
- mp4
- wav
- ogg
- silk
- wasm
- br
- cert
边栏推荐
- 常用數字信號編碼之反向不歸零碼碼、曼徹斯特編碼、差分曼徹斯特編碼
- 请问,redis没有消费消息,都在redis里堆着是怎么回事?用的是cerely 。
- Cesium knows the longitude and latitude of one point and the distance to find the longitude and latitude of another point
- Hands on Teaching: XML modeling
- 搜索引擎接口
- Es log error appreciation -limit of total fields
- 最长上升子序列模型 AcWing 1014. 登山
- [network security] SQL injection syntax summary
- c#通过frame 和 page 切换页面
- Leetcode——344. 反转字符串/541. 反转字符串 II/151. 颠倒字符串中的单词/剑指 Offer 58 - II. 左旋转字符串
猜你喜欢
Vscode configuration uses pylint syntax checker
Codes de non - retour à zéro inversés, codes Manchester et codes Manchester différentiels couramment utilisés pour le codage des signaux numériques
js 获取当前时间 年月日,uniapp定位 小程序打开地图选择地点
AutoCAD - how to input angle dimensions and CAD diameter symbols greater than 180 degrees?
Excerpt from "misogyny: female disgust in Japan"
Advanced Mathematics - Chapter 8 differential calculus of multivariate functions 1
带你掌握三层架构(建议收藏)
Redis can only cache? Too out!
Did login metamask
LeetCode 648. 单词替换
随机推荐
FCOS3D label assignment
IP and long integer interchange
Use day JS let time (displayed as minutes, hours, days, months, and so on)
Codes de non - retour à zéro inversés, codes Manchester et codes Manchester différentiels couramment utilisés pour le codage des signaux numériques
The difference between memory overflow and memory leak
[network security] SQL injection syntax summary
参数关键字Final,Flags,Internal,映射关键字Internal
请问,PTS对数据库压测有好方案么?
内存溢出和内存泄漏的区别
多商户商城系统功能拆解01讲-产品架构
Laravel5 call to undefined function openssl cipher iv length() 报错 PHP7开启OpenSSL扩展失败
手里的闲钱是炒股票还是买理财产品好?
Selenium库
Cesium 已知一点经纬度和距离求另一个点的经纬度
UML sequence diagram (sequence diagram)
Leetcode——剑指 Offer 05. 替换空格
IP address home location query
请问指南针股票软件可靠吗?交易股票安全吗?
搜索框效果的实现【每日一题】
Wired network IP address of VMware shared host