微信小游戏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"
      ]
    }
  }
}

说明:

  • deviceOrientation: 游戏的屏幕方向,可以是portrait(竖屏)或landscape(横屏)。
  • entryPagePath: 游戏的入口页路径。
  • networkTimeout: 网络请求和下载文件的超时时间。
  • pages: 游戏的页面列表,可以包含多个页面路径。
  • window: 游戏的窗口属性,例如导航栏颜色、启动页、背景色等。
  • tabBar: 游戏的底部导航栏,可以包含多个tab页。
  • sitemapLocation: 游戏的站点地图的路径。
  • subpackages: 游戏的分包列表,可以包含多个分包。
  • plugins: 游戏的插件列表,可以包含多个插件。
  • preloadRule: 游戏的预加载规则,可以对不同页面进行预加载设置。

猜你喜欢

转载自blog.csdn.net/m0_57790713/article/details/130490992