Browse Source

添加了一些跳转逻辑

wangcy 5 months ago
parent
commit
ca8273d180

+ 1 - 1
commons/basic/src/main/ets/utils/YTRequest.ets

@@ -43,7 +43,7 @@ instance.interceptors.response.use((response: AxiosResponse) => {
   YTLog.info(response)
   // 对响应错误做点什么
   if (response.data.code == 401) {
-
+    userInfo.logout()
     yTRouter.router2LoginPage()
     return Promise.reject('401');
   }

+ 1 - 1
features/user/src/main/ets/views/Mine.ets

@@ -12,7 +12,7 @@ export struct Mine {
         if (this.userInfo.checkLogin()) {
 
         } else {
-          //TODO 去登录页
+          yTRouter.router2LoginPage()
         }
 
       },

+ 8 - 0
features/user/src/main/resources/base/profile/router_map.json

@@ -33,6 +33,14 @@
       "data": {
         "description": "this is loginPage"
       }
+    },
+    {
+      "name": "SettingPage",
+      "pageSourceFile": "src/main/ets/pages/SettingPage.ets",
+      "buildFunction": "settingBuilder",
+      "data": {
+        "description": "this is SettingPage"
+      }
     }
   ]
 }