feat:修改token失效

This commit is contained in:
lixg
2022-11-29 13:45:02 +08:00
parent dc1f46a19c
commit 556ad2d54d
3 changed files with 505 additions and 442 deletions

View File

@@ -41,7 +41,7 @@ export default defineComponent({
const store = useStore(); const store = useStore();
const isLogin = ref(false); const isLogin = ref(false);
// console.log("router", router.getRoutes(), route); // console.log("router", router.getRoutes(), route);
console.log("版本0.01------------"); console.log("版本0.02------------");
const routes = computed(() => { const routes = computed(() => {
return router.getRoutes().filter((e) => e.meta?.isLink); return router.getRoutes().filter((e) => e.meta?.isLink);
}); });

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com * @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52 * @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com * @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-11-29 13:07:24 * @LastEditTime: 2022-11-29 13:44:40
* @FilePath: /fe-manage/src/api/config.js * @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
@@ -52,7 +52,10 @@ http.interceptors.response.use(
if (code === 0 || code === 200) { if (code === 0 || code === 200) {
return response; return response;
} else { } else {
window.open("https://u-pre.boe.com/web/", '_self'); if (code === 1000) {
window.open("https://u-pre.boe.com/web/", '_self');
}
// window.open("https://u-pre.boe.com/web/", '_self');
console.log("api %o", msg); console.log("api %o", msg);
} }
return response; return response;

File diff suppressed because it is too large Load Diff