From 79505bbd4c57159c6fd176eb41365976c4ab09fe Mon Sep 17 00:00:00 2001 From: ww Date: Thu, 20 Jun 2024 18:36:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/type/types.ts | 1 + src/store/modules/user.ts | 7 +- src/views/courseResources/index.vue | 3 - src/views/home/components/Class1.vue | 4 +- src/views/home/components/Class2.vue | 4 +- src/views/home/components/Info.vue | 136 +++++++++++-------------- src/views/home/components/Status.vue | 8 +- src/views/home/components/Student1.vue | 2 +- src/views/home/components/Student2.vue | 2 +- src/views/home/index.vue | 51 +++++----- 10 files changed, 96 insertions(+), 122 deletions(-) diff --git a/src/store/modules/type/types.ts b/src/store/modules/type/types.ts index 5fb276d..09bdbc7 100644 --- a/src/store/modules/type/types.ts +++ b/src/store/modules/type/types.ts @@ -7,4 +7,5 @@ export interface LoginStoreType { routes: string phone: string userInfo: object + data: object } diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 601dc1a..87ca52a 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -32,12 +32,13 @@ const useUserStore = defineStore( avatar: '', // 用户头像 routes: '', userInfo: {}, // 当前用户相关信息 + data: {}, } }, actions: { // 登录事件 async userLogin(data: loginType) { - console.log(data, 'pinia') + // console.log(data, 'pinia') const res: loginResponseType = await userLoginService(data).catch( (error) => { ElMessage.error(error.response.data.message) @@ -94,8 +95,8 @@ const useUserStore = defineStore( if (result.code === 200) { const res = await userIdenService(result.data.id) this.userInfo = res.data - console.log(this.userInfo, 'this.userInfo') - + // console.log(this.userInfo, 'this.userInfo') + this.data = result.data console.log(result, '123') this.userName = result.data.username // this.avatar = result.data.checkUser.avatar diff --git a/src/views/courseResources/index.vue b/src/views/courseResources/index.vue index 63abe81..549e518 100644 --- a/src/views/courseResources/index.vue +++ b/src/views/courseResources/index.vue @@ -268,11 +268,8 @@ ul { li { transition: filter 0.3s; /* 添加过渡动画 */ flex: 0 0 20%; -<<<<<<< HEAD -======= flex-direction: column; align-items: center; ->>>>>>> f6dea2720fd0ad6ab62f53607d894cd0c406cb6d margin-bottom: 10px; padding: 10px; box-sizing: border-box; diff --git a/src/views/home/components/Class1.vue b/src/views/home/components/Class1.vue index 15f461f..2473ab3 100644 --- a/src/views/home/components/Class1.vue +++ b/src/views/home/components/Class1.vue @@ -24,9 +24,9 @@ const courses = [ ]