ww 3 months ago
commit f98d241c38
  1. 5
      .env.development
  2. 11847
      pnpm-lock.yaml
  3. 2
      src/permission.ts
  4. 2
      src/router/index.ts
  5. 2
      src/router/routers.ts
  6. 24
      src/store/modules/user.ts
  7. 2
      src/views/login/index.vue
  8. 2
      src/views/portal/index.vue
  9. 14
      src/views/portal/view.vue

@ -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

File diff suppressed because it is too large Load Diff

@ -6,7 +6,7 @@ import permissionStore from '@/store/modules/permission'
//@ts-expect-error 修复ts校验
import nprogress from 'nprogress'
import 'nprogress/nprogress.css'
const userStore = useUserStore(pinia)
const userStore :any = useUserStore(pinia)
const usePermissionStore = permissionStore(pinia)
// const whitelist = ['/login', '/404']
router.beforeEach(async (to, form, next) => {

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

@ -273,7 +273,7 @@ export const constantRoute: any = [
},
{
path: '/portal',
component: () => import('@/layout/index.vue'),
component: () => import('@/views/portal/view.vue'),
name: 'Portal',
meta: {
title: '门户',

@ -11,6 +11,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,
@ -111,13 +112,22 @@ const useUserStore = defineStore('User', {
// @ts-expect-error
(this.userName = ''),
// @ts-expect-error
(this.avatar = '')
this.token = ''
this.routes = ''
usePermissionStore.removeRouter()
location.reload()
this.token = ''
// @ts-expect-error
this.routes = ''
usePermissionStore.removeRouter()
location.reload()
const router = useRouter()
console.log(router.getRoutes());
},
},
getters: {},
},
{
persist: true, // 持久化
},
getters: {},
})
)
export default useUserStore

@ -39,7 +39,7 @@
:rules="rules"
v-if="isRegister"
>
<h1>Hello</h1>
<h1>课图开源智慧课程管理系统</h1>
<div class="taggle">
<h2 @click="isToggle = true">账号</h2>
<h2 @click="isToggle = false">手机号</h2>

@ -26,7 +26,7 @@
</div>
</div>
<!-- <div class="inco"></div> -->
<h1>知识图谱</h1>
<h1>课图开源智慧课程管理系统首次开源</h1>
<!-- <p>(专业代码 080902H)</p> -->
</div>
<div class="container-box" ref="containerRef" @scroll="handleScroll">

@ -0,0 +1,14 @@
<template>
<div>
<router-view></router-view>
</div>
</template>
<script lang='ts' setup>
// import { onMounted, reactive, ref, toRefs, watch } from 'vue'
</script>
<style lang='scss' scoped>
</style>
Loading…
Cancel
Save