Home  >  Article  >  WeChat Applet  >  What kind of file is app.json?

What kind of file is app.json?

anonymity
anonymityOriginal
2019-05-29 14:32:297365browse

We use the app.json file to globally configure the WeChat applet, determine the path of the page file, window performance, set the network timeout, set multiple tabs, etc.

What kind of file is app.json?

The app.json file is one of the global configuration files:

{
  "pages":[           //这个里边都是用来配置所需要用到的界面所在的文件路径,配置为第一行的是默认显示的页面。
    "pages/index/index",
    "pages/--------/--------”,
    "pages/--------/--------",
    "pages/--------/-------"//记住最后一行不要加逗号
    
  ],
  "window":{      //这个属性是用来配置界面的上边的标题栏的,
    "backgroundTextStyle":"light",//这个用来设置文本的风格。
    "navigationBarBackgroundColor": "#0066CC",//这个是背景颜色,记住用这种颜色格式的,不要用七种颜色的英文单词(red,blue)等,不然不起效果
    "navigationBarTitleText": "--------",//这个就是文字内容
    "navigationBarTextStyle":"white"//这个是文字的颜色。
  },
  "tabBar": {//这个的话就是配置下边的菜单栏。
    "color": "#0066CC",//这个是配置文字的颜色
    "selectedColor": "#FF0033",//这个是配置选中某个菜单时文字的颜色。
    "borderStyle": "#336699",
    "backgroundColor": "#99CC00",//这个是整个菜单栏的背景颜色
    "list": [//这个是列表,就是具体设置菜单栏
      {
      "text": "-----",//文字
      "pagePath": "pages/index/index",//就是对应到那个页面
      "iconPath": "image/--------",//默认的图片
      "selectedIconPath": "image/--------"//选中以后显示的图片。
      }
   --可以根据自己需要来加---
    ]
  }
}

The above is the detailed content of What kind of file is app.json?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is auto.jsNext article:What is auto.js