关于uniapp跳转界面之前的拦截
目前想出来两种方法
1.使用uni-simple-router
保留了 Vue-router 完全相似的书写风格
但是小程序系列无法拦截原生tabbar及原生导航返回,如需拦截请自定义tabbar、header
具体 https://hhyang.cn/src/router/start/introduction.html
2. uni.addInterceptor
uni.addInterceptor 一般是用于拦截api的方法
具体 https://uniapp.dcloud.io/api/interceptor?id=addinterceptor