|
@@ -17,7 +17,23 @@ uniCrazyRouter.beforeEach(async (to, from, next) => {
|
|
|
|
|
|
// 逻辑代码
|
|
// 逻辑代码
|
|
console.log("beforeEach")
|
|
console.log("beforeEach")
|
|
- routerBeforeEach(to, from, next);
|
|
|
|
|
|
+ if(to.url==from.url){
|
|
|
|
+
|
|
|
|
+ var url="pages/index/index";
|
|
|
|
+ if(to.url.indexOf("pages/my")==0){
|
|
|
|
+ url="pages/my/index";
|
|
|
|
+ }
|
|
|
|
+ if(to.url.indexOf("pages/news")==0){
|
|
|
|
+ url="pages/news/index";
|
|
|
|
+ }
|
|
|
|
+ if(to.url.indexOf("pages/remind")==0){
|
|
|
|
+ url="pages/remind/index";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ window.location.href=window.location.href.split('#')[0]+"#/"+url
|
|
|
|
+ }else{
|
|
|
|
+ routerBeforeEach(to, from, next);
|
|
|
|
+ }
|
|
})
|
|
})
|
|
|
|
|
|
uniCrazyRouter.afterEach((to, from) => {
|
|
uniCrazyRouter.afterEach((to, from) => {
|