微信小程序配置app.json

微信小程序之配置app.json

{

  "pages": [
    "pages/index/index",
    "pages/perInfo/updateInfo/updateInfo",
    "pages/help/help"
  ],
  "window": {
    "backgroundColor": "#F6F6F6",
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#FF8C00",
    "navigationBarTitleText": "云图书",
    "navigationBarTextStyle": "white"
  },
  "tabBar": {
    "list": [
      {
        "pagePath": "pages/index/index",
        "text": "首页",
        "iconPath": "images/icon-home/find.png",
        "selectedIconPath": "images/icon-home/find1.png"
      },
      {
        "pagePath": "pages/scan/scan",
        "text": "扫一扫",
        "iconPath": "images/icon-home/scan.png",
        "selectedIconPath": "images/icon-home/scan1.png"
      },
      {
        "pagePath": "pages/my/my",
        "text": "我的",
        "iconPath": "images/icon-home/my.png",
        "selectedIconPath": "images/icon-home/my1.png"
      }
    ]
  },
  "sitemapLocation": "sitemap.json",
  "cloud": true
}

上面的pages里面写入页面路径后,程序会在pages目录下自动生成相应的页面,无需自己手动添加
navigationBarTitleText:标题
navigationBarBackgroundColor:设置标题背景色
navigationBarTextStyle:标题字体的颜色

其中下面的tabBar中的list至少添加两项
pagePath:目标路径
text:小标题
iconPath:初始照片路径
selectedIconPath:被点击选择后所变化的图片路径,一般与iconPath的图片相同,只是颜色不同

关于透明图片大家可以到 “阿里巴巴矢量库”取搜索自己喜欢的图标,当然也可以通过ps去制作。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

有勇气的牛排

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

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

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

打赏作者

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

抵扣说明:

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

余额充值