Code analysis of app.json configuration in WeChat mini program

不言
Release: 2018-08-10 16:46:42
Original
3363 people have browsed it

The content of this article is about the code analysis of app.json configuration in WeChat applet. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Detailed analysis of app.json configuration

{
  "pages": [    "pages/index/index",    "pages/vultr/vultr"
  ],
  "window": {
    "navigationBarBackgroundColor": "#ff99bb",
    "navigationBarTextStyle": "black",
    "navigationBarTitleText": "小程序",
    "backgroundColor": "#c2f0f0",
    "backgroundTextStyle": "light",
    "enablePullDownRefresh": true
  },
  "tabBar": {
    "color": "#ff99ff",
    "selectedColor": "#99bbff",
    "backgroundColor": "#ff4dd2",
    "borderStyle": "black",
    "position":"top",
    "list": [{
      "pagePath": "pages/index/index",
      "text": "首页",
      "iconPath": "img/1.png",
      "selectedIconPath": "img/3.png"
    },{
      "pagePath": "pages/vultr/vultr",
      "text": "科学",
      "iconPath": "img/2.png",
      "selectedIconPath": "img/3.png"
    }]  },
  "networkTimeout": {
    "request": 20000,
    "connectSocket": 20000,
    "uploadFile": 20000,
    "downloadFile": 20000
  }}
Copy after login

The structure is divided into 4 parts

  1. Page registration

  2. Form settings

  3. Menu bar settings

  4. Network delay settings

Page registration

  • The collection of all pages forms an array, the first element is the homepage, and so on!

  • All pages must be registered in page registration!

Form settings

  • The setting content is the top part of the screen, mainly including the navigation bar, pullability and pull-time background settings

  • The navigation bar has three attributes

  • It can be pulled and has one

  • The background color setting after being pulled

Menu bar settings

  • Note: If a menu bar is set, the home page must be a member of the menu bar, otherwise the menu bar will be invalid!

Network delay settings

  • Mainly the delay settings for 4 types of requests

Related recommendations :

Page layout, absolute positioning and button code in the mini program

How to obtain music links (images and text) in the WeChat mini program

Summary of methods to return to the previous page with parameters in WeChat mini program (three types)

The above is the detailed content of Code analysis of app.json configuration in WeChat mini program. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!