在page.json页面加入

"tabBar":{
        "color":"#999999",
        "selectedColor":"#333333",
        "backgroundColor":"#FFFFFF",
        "borderStyle":"black",        
        "list":[{
            "pagePath":"pages/index/index",
            "text":"首页",
            "iconPath":"static/img/首页.png",
            "selectedIconPath":"static/img/indexS.png"
        },{
            "pagePath":"pages/order/order",
            "text":"订单",
            "iconPath":"static/img/已想看.png",
            "selectedIconPath":"static/img/爱心.png"
        },{
            "pagePath":"pages/person/person",
            "text":"我的",
            "iconPath":"static/img/我的.png",
            "selectedIconPath":"static/img/myS.png"
        }]

得到如图

设置右上角角标

 

uni.setTabBarBadge({
				index: 1,
				text: '5'
			})

 隐藏

uni.hideTabBarRedDot({index:1})

  

 效果图

 

posted on 2020-08-02 23:46  京鸿一瞥  阅读(239)  评论(0)    收藏  举报