在pages.json添加导航栏中的按钮
"pages":[{
                 "path":"pages/index/index",
                 "style":{
                                "enablePullDownRefresh":true,
                                "app-plus":{
                                                    "button":[{
                                                                       "index":"0",
                                                                        "text":"\ue609",
                                                                        "fontSrc":"./static/font/font.ttf",
                                                                        "float": "left"
                                                                 }]
                                                  }
                               }
                }]script标签内添加监听事件
onNavigationBarButtonTap(val) {
                console.log(val.index);
                if (val.index == 1) {
                                console.log("第一个按钮");
                };
                if (val.index == 0) {
                                console.log("第二个按钮");
                }
}index下标根据val返回的值来判断是哪一个按钮
                










