当前位置:网站首页>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 .
边栏推荐
- 以流量为主导的数字零售的发展模式,仅仅只是一个开始
- Typescript防止基类被实例化
- 18张图,直观理解神经网络、流形和拓扑
- trivy【3】自定义扫描策略
- GCD implementation and arc, blocks, GCD usage examples
- (important) first knowledge of C language -- function
- 智能电视与小程序的结合
- pg_ Installation and use of RMAN "PostgreSQL"
- Sqlilabs-3 (entry notes)
- All aspect visual monitoring of istio microservice governance grid (microservice architecture display, resource monitoring, traffic monitoring, link monitoring)
猜你喜欢

英特尔数据中心GPU正式发货,以开放灵活提供强劲算力

trivy【2】工具漏洞扫描

Zero vision technology completed the pre-A round of financing and promoted the domestic replacement of intelligent driving platform software
![[filter tracking] target tracking based on EKF, TDOA and frequency difference positioning with matlab code](/img/e5/878bf5908856c80d6e07b03ba59da5.png)
[filter tracking] target tracking based on EKF, TDOA and frequency difference positioning with matlab code

The front mounted ADAS camera in parking increased by 54.15% year-on-year, with TOP10 suppliers taking the lead
![[physical application] atmospheric absorption loss with matlab code](/img/72/e6ac23012a59ac48a37bcbb068890b.png)
[physical application] atmospheric absorption loss with matlab code

How strong is this glue?
![[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

Applet, JS, transfer object jump transfer parameter problem

Media query adaptation
随机推荐
Kotlin function nesting
Mycms we media mall V3.6 release, compatible with micro engine application development (laravel framework)
二叉搜索树
Typescript class method this pointer binding
Summary of core functions of software testing tool Fiddler postman JMeter charlse
零念科技完成Pre-A轮融资,推动智能驾驶平台软件国产替代
6 个超级良心的开源教程!
Assembly analysis swift polymorphism principle
The functions and differences of display, visibility and overflow
GCD implementation and arc, blocks, GCD usage examples
Thesis reading (2) - vggnet of classification
[image segmentation] vein segmentation based on directional valley detection with matlab code
Nacos配置热更新的4种方式、读取项目配置文件的多种方式,@value,@RefreshScope,@NacosConfigurationProperties
General principles of software quality
Sqlilabs-2 (breakthrough record)
Binary search tree
18张图,直观理解神经网络、流形和拓扑
mgr.exe病毒导致启动程序启动失败
Sdwebimage source code comb 4 # introduce several usages of existing code
Price for volume has encountered "six consecutive declines" in sales. Can Volvo, which is no longer safe, turn around?