当前位置:网站首页>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 .
边栏推荐
- Meet the outbreak period with the integration of transportation and parking, rush for mass production or build a technical moat?
- Solve the exception that all control files are damaged
- [physical application] atmospheric absorption loss with matlab code
- 【MongoDB】MongoDB数据库的基础使用,特殊情况以及Mongoose的安装和创建流程(含有Mongoose固定版本安装)
- How does VR panorama entrepreneurship expand the market? How to make the road of entrepreneurship smoother?
- With the "integration of driving and parking", freytek's high-performance domain controller leads the new track
- 一文读懂Okaleido Tiger近期动态,挖掘背后价值与潜力
- DirectX repair tool download (where is exagear simulator package)
- [C language] implementation of three piece chess games
- In order for digital retail to continue to play its role, we need to give new connotation and significance to digital retail
猜你喜欢

Why did "you" become a test / development programmer? The value of your existence

以价换量却遭遇销量“六连跌”,不再安全的沃尔沃还能翻身吗?

Input element label

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

【物理应用】大气吸收损耗附matlab代码

Performance optimized APK slimming

Sdwebimage source code combs 5 author motivation, modifies directory, and changes inheritance relationship

Applet Download Preview PDF, document cannot open solution

A new MPLS note from quigo, which must be read when taking the IE exam ---- quigo of Shangwen network

1314_串口技术_RS232通信基础的信息
随机推荐
6 个超级良心的开源教程!
Apk signature.Apk version information
A new paradigm of distributed deep learning programming: Global tensor
Typescript类方法this指针绑定
MySQL数据库的基本概念以及MySQL8.0版本的部署(一)
In order for digital retail to continue to play its role, we need to give new connotation and significance to digital retail
How does VR panorama entrepreneurship expand the market? How to make the road of entrepreneurship smoother?
Swift type attribute and its attentions
深开鸿:万物智联的大江上,升起一轮开源鸿蒙月
General principles of software quality
Text is hidden beyond and ellipsis is displayed
No code development platform management background tutorial
Thesis reading (3) - googlenet of classification
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
解决控制文件全部损坏的异常
Object object
行泊ADAS摄像头前装搭载同比增长54.15%,TOP10供应商领跑
一种分布式深度学习编程新范式:Global Tensor
【MongoDB】MongoDB数据库的基础使用,特殊情况以及Mongoose的安装和创建流程(含有Mongoose固定版本安装)