WeChat mini game game.json

{
  "deviceOrientation": "portrait",
  "entryPagePath": "pages/index/index",
  "networkTimeout": {
    "request": 10000,
    "downloadFile": 10000
  },
  "pages": [
    "pages/index/index",
    "pages/game/game",
    "pages/rank/rank"
  ],
  "window": {
    "navigationBarBackgroundColor": "#000000",
    "navigationBarTextStyle": "white",
    "navigationBarTitleText": "游戏名称",
    "backgroundColor": "#ffffff",
    "backgroundTextStyle": "light",
    "enablePullDownRefresh": true
  },
  "tabBar": {
    "list": [
      {
        "pagePath": "pages/index/index",
        "text": "首页",
        "iconPath": "images/home.png",
        "selectedIconPath": "images/home-active.png"
      },
      {
        "pagePath": "pages/game/game",
        "text": "游戏",
        "iconPath": "images/game.png",
        "selectedIconPath": "images/game-active.png"
      },
      {
        "pagePath": "pages/rank/rank",
        "text": "排行榜",
        "iconPath": "images/rank.png",
        "selectedIconPath": "images/rank-active.png"
      }
    ]
  },
  "sitemapLocation": "sitemap.json",
  "subpackages": [
    {
      "root": "subpkg",
      "name": "subpkg"
    }
  ],
  "plugins": {
    "myPlugin": {
      "version": "1.0.0",
      "provider": "wx1234567890"
    }
  },
  "preloadRule": {
    "page1": {
      "network": "all",
      "packages": [
        "package1"
      ]
    }
  }
}

illustrate:

  • deviceOrientation: The screen orientation of the game, which can be portrait (portrait) or landscape (horizontal).
  • entryPagePath: The path to the game's entry page.
  • networkTimeout: Timeout for network requests and downloading files.
  • pages: The page list of the game, which can contain multiple page paths.
  • window: Game window properties, such as navigation bar color, startup page, background color, etc.
  • tabBar: The bottom navigation bar of the game, which can contain multiple tab pages.
  • sitemapLocation: Path to the game's sitemap.
  • subpackages: The subpackage list of the game, which can contain multiple subpackages.
  • plugins: A list of plugins for the game, which can contain multiple plugins.
  • preloadRule: The preloading rules of the game, which can be preloaded for different pages.

Guess you like

Origin blog.csdn.net/m0_57790713/article/details/130490992