1405/05/29-add tv page
This commit is contained in:
@@ -60,7 +60,13 @@ _axios.interceptors.response.use(
|
||||
|
||||
if (response?.status === 401) {
|
||||
removeToken()
|
||||
if (router.currentRoute.value.name !== 'buyProduct') {
|
||||
const routeName = router.currentRoute.value.name
|
||||
const isPublicRoute =
|
||||
router.currentRoute.value.meta?.public === true ||
|
||||
['buyProduct', 'productDetail', 'about', 'cart', 'tvMonitor', 'login', '404'].includes(
|
||||
routeName as string,
|
||||
)
|
||||
if (!isPublicRoute) {
|
||||
await router.push({name: 'login'})
|
||||
}
|
||||
return Promise.reject(error)
|
||||
|
||||
Reference in New Issue
Block a user