当前位置:网站首页>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
边栏推荐
猜你喜欢

一款好用的网络骗子举报系统无加密版本源码

Problems encountered by Sphinx

Delete the file unable to find or create trash directory

Sphinx遇到的问题

【TA-霜狼_may-《百人计划》】图形2.5 Bump Mapping

PowerDesigner displays comment comments

成熟的线程要懂得拒绝

OSPF的优化和配置

Water and electricity meter reading and recharge management system in Colleges and universities in property community

PowerDesigner显示Comment注释
随机推荐
leetcode209. Minimum length subarray
DNS原理及解析过程
谷歌浏览器截全图小技巧
B+树存储过程、触发器、Substring和substr的区别及Truncate和Delete的区别
minio安装部署及使用
As a result, all system modifications of the company will be upgraded
How to configure binlog
简历书写注意事项
使用小丸工具箱进行极限视频压缩
Week 2022/7/16
基于JIRA7.9.2定制修改
T + 0 to t + 1! The quick redemption amount is reduced to 10000! Another bank adjusted the rules for the application and redemption of cash wealth management products
常用postgresql数据操作备忘(不定时更新)
MySQL表的查询进阶
复旦微FMQL(国产Zynq) 【IAR裸机开发之PS】——非字节对齐访问
【TA-霜狼_may-《百人计划》】美术2.1 DCC工具链与引擎工具链
OSPF routing control, anti ring related knowledge
mysql中的视图、触发器和存储过程
Install go:tools failed to install in vscode
HCR Huichen is walking on the north slope, a giant beast swimming into digital marketing services