develoop
JayChou 3 months ago
parent 739b07b103
commit 5285bec5e1
  1. 5
      .env.development
  2. 2
      src/router/index.ts
  3. 4
      src/store/modules/user.ts

@ -1,5 +1,6 @@
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
NODE_ENV = 'development'
VITE_APP_TITLE = '无糖运营平台'
VITE_APP_BASE_API = 'http://127.0.0.1:8080'
# VITE_APP_BASE_API = 'http://39.106.16.162:8080'
# VITE_APP_BASE_API = 'http://127.0.0.1:8080'
VITE_APP_BASE_API = 'http://39.106.16.162:8080'
http://localhost:5173/#/courseResourcesManagement/courseResources

@ -14,7 +14,7 @@ const routerList = [
]
const router = createRouter({
history: createWebHashHistory(),
routes: [...routerList, ...constantRoute],
routes: [...routerList],
scrollBehavior() {
return {
left: 0,

@ -13,6 +13,7 @@ import { GET_TKOEN, SET_TKOEN, REMOVE_TOKEN } from '@/utils/token'
// 引入常量路由
import { constantRoute } from '@/router/routers'
import permissionStore from './permission'
import {useRouter} from 'vue-router'
// 引入路由
import {
userLoginService,
@ -145,6 +146,9 @@ const useUserStore = defineStore(
this.routes = ''
usePermissionStore.removeRouter()
location.reload()
const router = useRouter()
console.log(router.getRoutes());
},
},
getters: {},

Loading…
Cancel
Save