当前位置:网站首页>小程序目录结构
小程序目录结构
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
边栏推荐
- 高等數學---第八章多元函數微分學1
- Parsing of XML files
- js 获取当前时间 年月日,uniapp定位 小程序打开地图选择地点
- Laravel5 call to undefined function OpenSSL cipher IV length() error php7 failed to open OpenSSL extension
- Pert diagram (engineering network diagram)
- Lavarel之环境配置 .env
- 数据流图,数据字典
- Flask session forged hctf admin
- Did login metamask
- 交换机和路由器的异同
猜你喜欢
SSRF vulnerability file pseudo protocol [netding Cup 2018] fakebook1
【立体匹配论文阅读】【三】INTS
Reverse non return to zero code, Manchester code and differential Manchester code of common digital signal coding
带你掌握三层架构(建议收藏)
Pert diagram (engineering network diagram)
通过 iValueConverter 给datagrid 的背景颜色 动态赋值
设备故障预测机床故障提前预警机械设备振动监测机床故障预警CNC震动无线监控设备异常提前预警
XML文件的解析操作
js 获取当前时间 年月日,uniapp定位 小程序打开地图选择地点
Equipment failure prediction machine failure early warning mechanical equipment vibration monitoring machine failure early warning CNC vibration wireless monitoring equipment abnormal early warning
随机推荐
How does MySQL control the number of replace?
Vmware共享主机的有线网络IP地址
FC连接数据库,一定要使用自定义域名才能在外面访问吗?
SSRF vulnerability file pseudo protocol [netding Cup 2018] fakebook1
SAKT方法部分介绍
mysql导入文件出现Data truncated for column ‘xxx’ at row 1的原因
数据流图,数据字典
Parameter keywords final, flags, internal, mapping keywords internal
The reason why data truncated for column 'xxx' at row 1 appears in the MySQL import file
c#通过frame 和 page 切换页面
C # use TCP protocol to establish connection
OAuth 2.0 + JWT 保护API安全
搜索引擎接口
Laravel form builder uses
Search engine interface
When FC connects to the database, do you have to use a custom domain name to access it outside?
Excusez - moi, l'exécution a été réussie lors de l'utilisation des données de puits SQL Flink à Kafka, mais il n'y a pas de nombre dans Kafka
使用day.js让时间 (显示为几分钟前 几小时前 几天前 几个月前 )
Excuse me, as shown in the figure, the python cloud function prompt uses the pymysql module. What's the matter?
THINKPHP框架的优秀开源系统推荐