支付宝小程序重写tabbar底部导航,供大家参考,具体内容如下
成都创新互联公司客户idc服务中心,提供西部信息服务器租用、成都服务器、成都主机托管、成都双线服务器等业务的一站式服务。通过各地的服务中心,我们向成都用户提供优质廉价的产品以及开放、透明、稳定、高性价比的服务,资深网络工程师在机房提供7*24小时标准级技术保障。1.app.js中代码如下
editTabBar: function () { var e = this.globalData.tabbar, a = getCurrentPages(), t = a[a.length - 1], s = t.route; console.log(t) console.log(s) 0 != s.indexOf("/") && (s = "/" + s); for (var n in e.items) e.items[n].selected = !1, e.items[n].pagePath == s && (e.items[n].selected = !0); t.setData({ tabbar: e }); }, globalData: { userInfo: null, //配置tabbar tabbar: { textColor: "#333", selectedColor: "#d0501f", backgroundColor: "#ffffff", borderStyle: "#d5d5d5", items: [{ pagePath: "/pages/seller/gzt/gzt", name: "工作台", icon: "/pages/icon/index.png", activeIcon: "/pages/icon/index_1.png", selected: !0 },{ pagePath: "/pages/seller/shezhi/shezhi", name: "设置", icon: "/pages/images/sz@3x.png", activeIcon: "/pages/images/xzsz.png", selected: !1 }], position: "bottom" } }