小程序基础之app.json

目录结构说明

在这里插入图片描述
主体文件,由三个文件组成,必须放在项目的根目录下

文件必填作用
app.json小程序公共设置
app.js小程序逻辑
app.wxss小程序公共样式表

页面由四个文件组成

文件类型必填作用
js页面逻辑
wxml页面结构
wxss页面样式表
json页面配置

app.json

{
//创建包的地方
  "pages":[ 
    "pages/index/index",
    "pages/images/images",
    "pages/search/search",
    "pages/shopping/shopping",
    "pages/mine/mine",
    "pages/logs/logs"
  ],
  //窗口位置
  "window":{
  //下拉 loading 的样式,仅支持 dark / light
    "backgroundTextStyle":"dark",
    //导航栏背景颜色
    "navigationBarBackgroundColor": "#8470FF",
    //导航栏标题文字内容
    "navigationBarTitleText": "金盛牙科",
      //导航栏标题文字颜色
    "navigationBarTextStyle":"white",
    //是否开启当前页面下拉刷新。
    "enablePullDownRefresh":true
  },
  "tabBar": {
  //Tabbar的项的数组,按照规范,至少要有2个Tabbar项
    "list": [
      {
      //是否显示Tabbar的右上角的Badge
      "pagePath": "pages/index/index",
      //Tabbar项的标题
      "text": "首页",
      //Tabbar项的icon图片路径,建议使用绝对路径,相对路径要相对于组件所在目录的。
      "iconPath": "images/_icon_sy.png",
      //Tabbar项选中时的icon,建议使用绝对路径,相对路径要相对于组件所在目录的。
      "selectedIconPath": "images/_icon_sy.png"
    },
    {
    "pagePath": "pages/search/search",
    "text": "发现",
    "iconPath": "images/_icon_ss.png",
    "selectedIconPath": "images/_icon_ss.png"
   },
   {
    "pagePath": "pages/shopping/shopping",
    "text": "问诊",
    "iconPath": "images/icon_s.png",
    "selectedIconPath": "images/icon_s.png"
   },
   {
    "pagePath": "pages/mine/mine",
    "text": "我的",
    "iconPath": "images/_icon_m.png",
    "selectedIconPath": "images/_icon_m.png"
   }
  ],
   "color": "#FFFFFF",
   "backgroundColor": "#8470FF",
   "selectedColor": "#000000",
   "borderStyle": "white"
  },
  "style": "v2",
  "sitemapLocation": "sitemap.json"
  }
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

眼里只有码

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值