微信小程序,商城底部工具栏的实现

效果演示:

前提条件:

去阿里云矢量图标,下载8个图标,四个黑,四个红,如图:

新建文件夹icons,把图标放到该文件夹,然后把该文件夹移动到该项目的文件夹里面。如图所示

app.json

复制代码
{
"pages": [
    "pages/home/home",
    "pages/category/category",
    "pages/cart/cart",
    "pages/my/my"
  ],

  "window": {
    "backgroundTextStyle": "light",
    "navigationBarBackgroundColor": "#09bb07",
    "navigationBarTitleText": "我的商场",
    "navigationBarTextStyle": "white"
  },
"tabBar": {
    "color": "#999",
    "selectedColor": "##09bb07",
    "backgroundColor": "#fafafa",
    "list": [
      {
        "pagePath": "pages/home/home",
        "text": "首页",
        "iconPath": "icons/_home.png",
        "selectedIconPath": "icons/home.png"
      },
      {
        "pagePath": "pages/category/category",
        "text": "分类",
        "iconPath": "icons/_category.png",
        "selectedIconPath": "icons/category.png"
      },
      {
        "pagePath": "pages/cart/cart",
        "text": "购物车",
        "iconPath": "icons/_cart.png",
        "selectedIconPath": "icons/cart.png"
      },
      {
        "pagePath": "pages/my/my",
        "text": "我的",
        "iconPath": "icons/_my.png",
        "selectedIconPath": "icons/my.png"
      }
    ]
  },
  "lazyCodeLoading": "requiredComponents",
  "sitemapLocation": "sitemap.json"
}
相关推荐
2501_915918414 分钟前
Mac 抓包软件有哪些?Charles、mitmproxy、Wireshark和Sniffmaster哪个更合适
android·ios·小程序·https·uni-app·iphone·webview
2501_915106327 分钟前
iOS 抓包绕过 SSL 证书认证, HTTPS 暴力抓包、数据流分析
android·ios·小程序·https·uni-app·iphone·ssl
2501_915921438 小时前
iOS App 电耗管理 通过系统电池记录、Xcode Instruments 与克魔(KeyMob)组合使用
android·ios·小程序·https·uni-app·iphone·webview
数字游民952710 小时前
2小时VibeCoding了一个看图猜词小程序:猜对了么
人工智能·ai·小程序·ai绘画·数字游民9527
qq_124987075315 小时前
基于小程序中医食谱推荐系统的设计(源码+论文+部署+安装)
java·spring boot·后端·微信小程序·小程序·毕业设计·计算机毕业设计
2501_9159184119 小时前
iOS App 测试方法,Xcode、TestFlight与克魔(KeyMob)等工具组合使用
android·macos·ios·小程序·uni-app·iphone·xcode
棒棒的唐19 小时前
微信小程序右上角分享按钮如何根据用户登录状态确定是否允许分享
微信小程序·小程序
2501_9159214320 小时前
iOS 描述文件制作过程,从 Bundle ID、证书、设备到描述文件生成后的验证
android·ios·小程序·https·uni-app·iphone·webview
小白学大数据20 小时前
基于 Python 的知网文献批量采集与可视化分析
开发语言·爬虫·python·小程序
毕设源码-郭学长20 小时前
【开题答辩全过程】以 基于微信小程序的医院管理系统为例,包含答辩的问题和答案
微信小程序·小程序