当前位置:网站首页>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 .
边栏推荐
- Introduction to address book export without code development platform
- The industry's first cloud native security detection dual model! Safety dog heavyweight report appears at the digital China Construction Summit
- Summary of core functions of software testing tool Fiddler postman JMeter charlse
- This year, MediaTek 5g chip shipments are expected to reach 50million sets!
- Summary of koltin knowledge points
- After reading MySQL database advanced practice (SQL xiaoxuzhu)
- Input element label
- Goer shares and Shanghai Taisi Weida growth cooperation agreement! Special SOC jointly promotes the development of TWS headphones
- 【雷达】基于核聚类实现雷达信号在线分选附matlab代码
- Rouyi cloud platform - how to realize the launch and login functions of the project and how to create new modules
猜你喜欢

Programmer growth Chapter 30: artifact of identifying true and false needs

sql优化常用的几种方法

The functions and differences of display, visibility and overflow

【雷达】基于核聚类实现雷达信号在线分选附matlab代码

Hands on Teaching of servlet use (1)

Retrofit Usage Summary

1314_串口技术_RS232通信基础的信息

Applet, JS, transfer object jump transfer parameter problem

这个胶水有多强呢?

《MySQL数据库进阶实战》读后感(SQL 小虚竹)
随机推荐
VR全景创业如何开拓市场?如何让创业之路更加顺畅?
如何在VR全景中嵌入AI数字人功能?打造云端体验感
当初的“你“为什么做测试/开发程序员?自己存在的价值......
Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
What if win11 cannot find the DNS address? Win11 can't find DNS and can't access the web page solution
Runloop, auto release pool, thread, GCD
英特尔数据中心GPU正式发货,以开放灵活提供强劲算力
Performance optimized APK slimming
Sqlilabs-3 (entry notes)
Invest 145billion euros! EU 17 countries announce joint development of semiconductor technology
行泊一体迎爆发期,抢量产还是修技术护城河?
MySQL常用的日期时间函数
1314_串口技术_RS232通信基础的信息
Retrofit Usage Summary
Messages from students participating in the competition: memories of the 17th session
【滤波跟踪】基于EKF、时差和频差定位实现目标跟踪附matlab代码
How to embed AI digital human function in VR panorama? Create a cloud experience
Servlet的使用手把手教学(一)
The applet vant webapp component is missing, and the referenced component reports an error
业界首创云原生安全检测双模型!安全狗重磅报告亮相数字中国建设峰会