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 = [ ]