|
|
@@ -2,7 +2,7 @@ import { createRouter, createWebHistory } from '@ionic/vue-router'
|
|
|
import TabsPage from '../views/TabsPage.vue'
|
|
|
import { Page } from './Page'
|
|
|
import { useUserStore } from '../stores/user'
|
|
|
-import { Dialog } from 'vant'
|
|
|
+import { showConfirmDialog } from 'vant'
|
|
|
|
|
|
const router = createRouter({
|
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
|
|
@@ -66,12 +66,18 @@ const router = createRouter({
|
|
|
{
|
|
|
path: '/productList',
|
|
|
name: 'productList',
|
|
|
- component: () => import('@/views/ProductListPage.vue')
|
|
|
+ component: () => import('@/views/ProductListPage.vue'),
|
|
|
+ meta: {
|
|
|
+ pageType: Page.Every
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
path: '/productDetail',
|
|
|
name: 'productDetail',
|
|
|
- component: () => import('@/views/ProductDetailPage.vue')
|
|
|
+ component: () => import('@/views/ProductDetailPage.vue'),
|
|
|
+ meta: {
|
|
|
+ pageType: Page.Every
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
})
|
|
|
@@ -86,7 +92,8 @@ router.beforeEach((to, from, next) => {
|
|
|
next()
|
|
|
})
|
|
|
.catch(() => {
|
|
|
- Dialog.confirm({
|
|
|
+ console.log('37366')
|
|
|
+ showConfirmDialog({
|
|
|
title: '提示',
|
|
|
message: '用户未登录,是否立即登录'
|
|
|
})
|