search
HomeWeChat AppletMini Program DevelopmentCode analysis of app.json configuration in WeChat mini program

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
  }}

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

  • 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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools