微信小程序学习笔记(1)-全局配置

版权声明: https://blog.csdn.net/qq_41115965/article/details/82109471

全局配置

{
  // pages页面注册
  "pages": [
    "pages/index/index",
    "pages/logs/logs",
    "pages/about/about",
    "pages/detail/detail",
    "pages/technician/technician",
    "pages/user/user"
  ],
  // 
  "window": {
    "backgroundTextStyle": "light", // 下拉 loading 的样式,仅支持 dark / light,默认white
    "navigationBarBackgroundColor": "#d24a58", // 导航栏背景颜色,16进制,默认#000000
    "navigationBarTitleText": "小程序学习", // 导航栏标题文字内容
    "navigationBarTextStyle": "black" // 导航栏标题颜色,仅支持 black / white
  },
  "tabBar": {
    "color": "#333",     // tab 上的文字默认颜色
    "selectedColor": "#d24a58",  // tab 上的文字默认颜色
    "borderStyle": "white", // tabbar上边框的颜色, 仅支持 black / white,默认为black
    "list": [
      {
        "pagePath": "pages/index/index", // 页面路径,必须在 pages 中先定义
        "text": "首页", // tab 上按钮文字
        "iconPath": "images/index_icon.png", // 图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,不支持网络图片。当 postion 为 top 时,不显示 icon。
        "selectedIconPath": "images/index_icon_HL.png" // 选中时的图片路径,icon 大小限制为40kb,建议尺寸为 81px * 81px,不支持网络图片。当 postion 为 top 时,不显示 icon。
      },
      {
        "pagePath": "pages/detail/detail",
        "text": "技师",
        "iconPath": "images/skill_icon.png",
        "selectedIconPath": "images/skill_icon_HL.png"
      },
      {
        "pagePath": "pages/about/about",
        "text": "我的",
        "iconPath": "images/user_icon.png",
        "selectedIconPath": "images/user_icon_HL.png"
      }
    ]
  },
  "networkTimeout": {
    "request": 10000, // wx.request 的超时时间,单位毫秒。默认值60000
    "downloadFile": 10000 // wx.downloadFile 的超时时间,单位毫秒。默认值60000
  },
  "debug": true // 可以在开发者工具中开启 debug 模式,在开发者工具的控制台面板,调试信息以 info 的形式给出,其信息有Page的注册,页面路由,数据更新,事件触发等。可以帮助开发者快速定位一些常见的问题。
}

猜你喜欢

转载自blog.csdn.net/qq_41115965/article/details/82109471
今日推荐