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

效果演示:

前提条件:

去阿里云矢量图标,下载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"
}
相关推荐
拖孩1 天前
用 AI 重解千年观音灵签,做了一个微信小程序,每天摇一摇,命运给你回应
前端·后端·微信小程序
黄华SJ520it1 天前
顶俏洗衣液模式制度开发介绍:S2B2C社交分销+多门店核销系统全解析
前端·数据库·小程序·零售·系统开发
北极糊的狐1 天前
钉钉小程序报错data.formatTime is not a function是因为 axml 模板中不能直接调用 Page 内自定义方法!
java·小程序·钉钉
java1234_小锋1 天前
【免费】微信小程序网约车(打车,在线叫车,移动出行)系统(SpringBoot4+Vue3) 锋哥原创出品,必属精品
微信小程序·网约车·在线叫车·移动出行
show4332 天前
多格式导出怎么做?2026免费小程序TXT/SRT实践
开发语言·小程序·c#
AI砖家2 天前
AI编程—微信小程序开发规范
微信小程序·小程序·notepad++·ai编程
show4333 天前
2026小程序端视频转文字技术对比:识别引擎精度实测
小程序·音视频
sam-zy3 天前
微信小程序+ESP8266+Arduino 开发智能插座,有本地OTA功能
微信小程序·小程序
A24207349303 天前
微信小程序开发:常用基础语法与指令详解
微信小程序·小程序·notepad++
黄华SJ520it3 天前
青蓝送水类型社交裂变小程序系统技术拆解
小程序·系统开发