当前位置:网站首页>Development of small programs ②
Development of small programs ②
2022-07-28 23:28:00 【Corner sheep】
List of articles
Wechat applet development framework
After creating a project, the system comes with a creation introduction
Explain the project catalogue one by one on site

combination HTML,CSS,javascript Explain
Saving and deleting items , transplant

app.json To configure
pages Field —— Used to describe all page paths of the current applet , This is to let wechat clients know which directory your applet page is currently defined in .
1. Configuration file coding

app.json To configure

“window”: High setting of forms and backgrounds
window Field —— Define the background color at the top of all pages of the applet , Text color definition, etc .
Each applet page can also use the same name .json File to configure the window representation of this page , Configuration items in the page will overwrite app.json Of window The same configuration item in .
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": " My WeChat ",
"navigationBarTextStyle":"black",
"enablePullDownRefresh": true,
"backgroundColor": "#ddd"
}
Navigation bar background color :"navigationBarBackgroundColor": "#000",
> Navigation bar text :"navigationBarTitleText": " My WeChat ",
Navigation bar text color :"navigationBarTextStyle":"white"
The drop-down refresh :"enablePullDownRefresh": true,
Pull down to refresh the background color :"backgroundColor": "#ddd"
Pull down to refresh the animation effect of three dots :"backgroundTextStyle":"dark",(loadimg)
Pages: Where all pages exist , Let the system know how many paths the page has
“sitemapLocation”: Map of the station 、 Station navigation 、 On-site search ( Whether to allow on-site search )
“sitemapLocation”: “sitemap.json”
Document introduction website :https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html
sitemap:
In the applet root directory sitemap.json The file is used to configure whether the applet and its page are allowed to be indexed by wechat .
Json The last line of cannot add bean numbers , If it is added, it will report an error and will not compile
Don't remember words

2. Bottom touch bar code writing
Make the touch bar at the bottom of the page
Be careful : Use of icons
"tabBar" least 2 term , most 5 term
stay app.json

PagePath: Configured page path
text: Text
iconPath: Default icon
selectIconPath: Select the icon
"selectedColor": "#f00": Choose the color of the font
"borderStyle": The color of the dividing line of the bottom navigation
Tool configuration project.config.json
The applet developer tool generates a project.config.json, Any configuration you make on the tool will be written to this file , When you re install tools or change your computer to work , You just load the code package of the same project , The developer tool will automatically help you recover to the personalized configuration when you developed the project , It will include the editor's color 、 A series of options such as automatic compression when uploading code .
JSON grammar
Let's talk about the small program JSON Configuration considerations .
JSON The documents are all wrapped in braces {}, adopt key-value How to express data .JSON Of Key Must be wrapped in a double quotation mark , In practice , To write JSON When , Forget to give Key It's a common mistake to use double quotes for values or single quotes for double quotes .
JSON The value of can only be in the following data formats , Any other format will trigger an error , for example JavaScript Medium undefined.
Numbers , Contains floating-point numbers and integers
character string , Need to wrap in double quotes
Bool value ,true perhaps false
Array , Need to be wrapped in square brackets []
object , Need to wrap in braces {}
Null
The other thing to note is that JSON Cannot use comment in file , An attempt to add a comment will result in an error .
边栏推荐
- [MySQL series] addition, deletion, modification and query of MySQL tables (Advanced)
- 【C语言】三子棋小游戏实现
- Rouyi cloud platform - how to realize the launch and login functions of the project and how to create new modules
- Solve the exception that all control files are damaged
- 这个胶水有多强呢?
- c语言进阶篇:指针(三)
- Win11快捷复制粘贴不能用怎么办?Win11快捷复制粘贴不能用
- MySQL数据库的基本概念以及MySQL8.0版本的部署(一)
- (important) first knowledge of C language -- function
- 【MySQL系列】 MySQL表的增删改查(进阶)
猜你喜欢

Win11找不到DNS地址怎么办?Win11找不到DNS无法访问网页解决方法

参加竞赛同学们的留言 : 第十七届的记忆

Cnpm installation steps

英特尔数据中心GPU正式发货,以开放灵活提供强劲算力
![[image segmentation] vein segmentation based on directional valley detection with matlab code](/img/82/7b7b761c975cd5c2f5b8f3e43592d2.png)
[image segmentation] vein segmentation based on directional valley detection with matlab code

The front mounted ADAS camera in parking increased by 54.15% year-on-year, with TOP10 suppliers taking the lead

Retrofit Usage Summary

【C语言】三子棋小游戏实现

当初的“你“为什么做测试/开发程序员?自己存在的价值......
![[physical application] Wake induced dynamic simulation of underwater floating wind turbine wind field with matlab code](/img/31/e4cd4c261a7fc5cfa731976314530b.png)
[physical application] Wake induced dynamic simulation of underwater floating wind turbine wind field with matlab code
随机推荐
High quality subroutine 1
c语言进阶篇:指针(二)
What if win11 cannot find the DNS address? Win11 can't find DNS and can't access the web page solution
Inheritance in swift
Symbol symbol type
Input element label
Nacos配置热更新的4种方式、读取项目配置文件的多种方式,@value,@RefreshScope,@NacosConfigurationProperties
GCD summary
[copy] Internet terms, abbreviations, abbreviations
Invest 145billion euros! EU 17 countries announce joint development of semiconductor technology
6 个超级良心的开源教程!
【MongoDB】MongoDB数据库的基础使用,特殊情况以及Mongoose的安装和创建流程(含有Mongoose固定版本安装)
Win11找不到DNS地址怎么办?Win11找不到DNS无法访问网页解决方法
Runloop, auto release pool, thread, GCD
以流量为主导的数字零售的发展模式,仅仅只是一个开始
深开鸿:万物智联的大江上,升起一轮开源鸿蒙月
High quality programming
Typescript prevents base classes from being instantiated
Form label
[MySQL series] addition, deletion, modification and query of MySQL tables (Advanced)