ww 3 months ago
commit f98d241c38
  1. 5
      .env.development
  2. 11849
      pnpm-lock.yaml
  3. 2
      src/permission.ts
  4. 2
      src/router/index.ts
  5. 2
      src/router/routers.ts
  6. 14
      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_ 为前缀才能暴露给外部读取 # 变量必须以 VITE_ 为前缀才能暴露给外部读取
NODE_ENV = 'development' NODE_ENV = 'development'
VITE_APP_TITLE = '无糖运营平台' VITE_APP_TITLE = '无糖运营平台'
VITE_APP_BASE_API = 'http://127.0.0.1:8080' # 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://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校验 //@ts-expect-error 修复ts校验
import nprogress from 'nprogress' import nprogress from 'nprogress'
import 'nprogress/nprogress.css' import 'nprogress/nprogress.css'
const userStore = useUserStore(pinia) const userStore :any = useUserStore(pinia)
const usePermissionStore = permissionStore(pinia) const usePermissionStore = permissionStore(pinia)
// const whitelist = ['/login', '/404'] // const whitelist = ['/login', '/404']
router.beforeEach(async (to, form, next) => { router.beforeEach(async (to, form, next) => {

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

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

@ -11,6 +11,7 @@ import { GET_TKOEN, SET_TKOEN, REMOVE_TOKEN } from '@/utils/token'
// 引入常量路由 // 引入常量路由
import { constantRoute } from '@/router/routers' import { constantRoute } from '@/router/routers'
import permissionStore from './permission' import permissionStore from './permission'
import {useRouter} from 'vue-router'
// 引入路由 // 引入路由
import { import {
userLoginService, userLoginService,
@ -111,13 +112,22 @@ const useUserStore = defineStore('User', {
// @ts-expect-error // @ts-expect-error
(this.userName = ''), (this.userName = ''),
// @ts-expect-error // @ts-expect-error
(this.avatar = '')
this.token = '' this.token = ''
// @ts-expect-error
this.routes = '' this.routes = ''
usePermissionStore.removeRouter() usePermissionStore.removeRouter()
location.reload() location.reload()
const router = useRouter()
console.log(router.getRoutes());
}, },
}, },
getters: {}, getters: {},
}) },
{
persist: true, // 持久化
},
)
export default useUserStore export default useUserStore

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

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