路由变动

This commit is contained in:
JenniferW 2025-11-26 15:03:37 +08:00
parent 7bbcff0dc7
commit 88abfab093
3 changed files with 64 additions and 52 deletions

View File

@ -60,13 +60,13 @@ export const constantRoutes = [
{ {
path: '', path: '',
component: Layout, component: Layout,
redirect: 'index', redirect: 'search',
children: [ children: [
{ {
path: '/index', path: '/search',
component: () => import('@/views/index.vue'), component: () => import('@/views/order/intention/search.vue'),
name: 'Index', name: 'Search',
meta: { title: '首页', icon: 'dashboard', affix: true } // meta: { title: '首页', icon: 'dashboard', affix: true }
} }
] ]
}, },
@ -99,10 +99,8 @@ export const constantRoutes = [
} }
] ]
} }
// 业务路由(订单管理、系统管理等)将从后端动态获取
]; ];
// 动态路由将从后端接口获取,不再在此处定义
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),

View File

@ -87,7 +87,7 @@ service.interceptors.response.use(res => {
ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
isRelogin.show = false; isRelogin.show = false;
useUserStore().logOut().then(() => { useUserStore().logOut().then(() => {
location.href = '/index'; location.href = '';
}) })
}).catch(() => { }).catch(() => {
isRelogin.show = false; isRelogin.show = false;

View File

@ -2,22 +2,36 @@
<div class="wscn-http404-container"> <div class="wscn-http404-container">
<div class="wscn-http404"> <div class="wscn-http404">
<div class="pic-404"> <div class="pic-404">
<img class="pic-404__parent" src="@/assets/404_images/404.png" alt="404"> <img
<img class="pic-404__child left" src="@/assets/404_images/404_cloud.png" alt="404"> class="pic-404__parent"
<img class="pic-404__child mid" src="@/assets/404_images/404_cloud.png" alt="404"> src="@/assets/404_images/404.png"
<img class="pic-404__child right" src="@/assets/404_images/404_cloud.png" alt="404"> alt="404"
/>
<img
class="pic-404__child left"
src="@/assets/404_images/404_cloud.png"
alt="404"
/>
<img
class="pic-404__child mid"
src="@/assets/404_images/404_cloud.png"
alt="404"
/>
<img
class="pic-404__child right"
src="@/assets/404_images/404_cloud.png"
alt="404"
/>
</div> </div>
<div class="bullshit"> <div class="bullshit">
<div class="bullshit__oops"> <div class="bullshit__oops">404错误!</div>
404错误!
</div>
<div class="bullshit__headline"> <div class="bullshit__headline">
{{ message }} {{ message }}
</div> </div>
<div class="bullshit__info"> <div class="bullshit__info">
对不起您正在寻找的页面不存在尝试检查URL的错误然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容 对不起您正在寻找的页面不存在尝试检查URL的错误然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容
</div> </div>
<router-link to="/index" class="bullshit__return-home"> <router-link to="/search" class="bullshit__return-home">
返回首页 返回首页
</router-link> </router-link>
</div> </div>
@ -27,8 +41,8 @@
<script setup> <script setup>
let message = computed(() => { let message = computed(() => {
return '找不到网页!' return "找不到网页!";
}) });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>