Works against the war

1, the configuration file
1.1 Global app.json

{
“pages”:[
“pages/index/index”,
“pages/home/index”,
“pages/cart/index”,
],
“window”:{
“backgroundTextStyle”:“light”,
“navigationBarBackgroundColor”: “#ff6666”,
“navigationBarTitleText”: “嗨购”,
“navigationBarTextStyle”:“black”
},
“tabBar”: {
“color”: “#333”,
“selectedColor”: “#f66”,
“backgroundColor”: “#efefef”,
“list”: [
{
“pagePath”: “pages/home/home”,
“text”: “首页”,
“iconPath”: “resources/home.png”,
“selectedIconPath”: “resources/home_active.png”
},
{
“pagePath”: “pages/kind/kind”,
“text”: “分类”,
“iconPath”: “resources/kind.png”,
“selectedIconPath”: “resources/kind_active.png”
},
]
}

Simply put, what the meaning of those fields above

  1. pages field - is used to describe all of the pages of the current path of small programs, which is to allow the client to know the current micro-channel your applet page which is defined in the directory
  2. window field - definition of applet background color of the top of all pages, text color definitions.
  3. Please refer to the full (https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html).
  4. tabbar picture represents the (Note: tabbar which list a minimum of two, maximum of five)
    Simple thumbnail

Page.json here is actually used to represent page.json such applets and associated configuration page catalog
developer can independently define the attributes of each page, such as the top color, whether to allow the pull-down refresh wait for
the page configuration only You can set the content app.json section window configuration items, configuration item page will cover the same configuration items in the global app.json the window
1
----------------
copyright: this article CSDN bloggers 'Ayabeni?' original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/Hzz66/article/details/104459014

Configuration Item (applets official website a list of micro-channel transfer of this list, if infringement contact deleted)
Property Type Default Description Minimum Version
navigationBarBackgroundColor HexColor # 000000 navigation bar background color, such as # 000000
navigationBarTextStyle String White Navigation Bar title color, only supports black / White
navigationBarTitleText String navigation bar title text
navigationStyle string default navigation bar style, only supports the following values:
default default style
custom custom navigation bar, leaving only the micro-capsule letter button upper right corner of the client 7.0.0
backgroundColor background color HexColor #ffffff window
backgroundTextStyle string dark loading of the pull-down pattern, only supports dark / light
background color backgroundColorTop string #ffffff top of the window, only the channel support micro-client iOS 6.5.16
background color backgroundColorBottom string #ffffff bottom of the window, only the client iOS support micro-channel 6.5. 16
enablePullDownRefresh boolean false whether to open the drop-down refresh the current page.
See Page.onPullDownRefresh
Distance from the bottom of the page, the unit is px pull on the bottom onReachBottomDistance number 50 page event is triggered.

Published an original article · won praise 0 · Views 5

Guess you like

Origin blog.csdn.net/kangLinYan/article/details/104467187