|
|
|
@ -9,11 +9,16 @@ import lessonlist from './components/Lessonlist.vue' |
|
|
|
|
import Student1 from './components/Student1.vue' |
|
|
|
|
// import Class2 from './components/Class2.vue' |
|
|
|
|
// import Student2 from './components/Student2.vue' |
|
|
|
|
import { userNewLikeService, userLookService } from '@/api/user/user' |
|
|
|
|
import { |
|
|
|
|
userNewLikeService, |
|
|
|
|
userLookService, |
|
|
|
|
userMaxKnowService, |
|
|
|
|
} from '@/api/user/user' |
|
|
|
|
import useUserStore from '@/store/modules/user' |
|
|
|
|
import fe from '@/assets/images/fe.jpg' |
|
|
|
|
import { ref, onMounted } from 'vue' |
|
|
|
|
import { useRouter } from 'vue-router' |
|
|
|
|
// import { Picture } from 'element-plus/icons-vue' |
|
|
|
|
const router = useRouter() |
|
|
|
|
const userStore = useUserStore() |
|
|
|
|
const username = ref() |
|
|
|
@ -39,6 +44,14 @@ const courselist = ref([]) |
|
|
|
|
const img = ref() |
|
|
|
|
const courseName = ref() |
|
|
|
|
const courseTea = ref() |
|
|
|
|
//学习最多的知识点 |
|
|
|
|
const maxKnow = ref([]) |
|
|
|
|
const getmaxKnow = async () => { |
|
|
|
|
const res = await userMaxKnowService(userStore.data.id) |
|
|
|
|
maxKnow.value = res.data |
|
|
|
|
console.log(maxKnow.value, 'max') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
|
// getData() |
|
|
|
|
username.value = userStore.userName |
|
|
|
@ -60,16 +73,18 @@ onMounted(() => { |
|
|
|
|
// // console.log(res, '课程列表') |
|
|
|
|
// }) |
|
|
|
|
//最新收藏的课程 |
|
|
|
|
const res = userNewLikeService(userStore.data.id).then((res) => { |
|
|
|
|
console.log(res.data.id, '最新收藏的课程') |
|
|
|
|
userNewLikeService(userStore.data.id).then((res) => { |
|
|
|
|
console.log(res.data, '最新收藏的课程') |
|
|
|
|
courselist.value = res.data |
|
|
|
|
// console.log(courselist.value.id, 'course') |
|
|
|
|
img.value = res.data.img |
|
|
|
|
courseName.value = res.data.name |
|
|
|
|
courseTea.value = res.data.teacher |
|
|
|
|
// img.value = res.data.img |
|
|
|
|
// courseName.value = res.data.name |
|
|
|
|
// courseTea.value = res.data.teacher |
|
|
|
|
}) |
|
|
|
|
//echart图表 |
|
|
|
|
userLookService() |
|
|
|
|
//获取知识点 |
|
|
|
|
getmaxKnow() |
|
|
|
|
}) |
|
|
|
|
</script> |
|
|
|
|
<template> |
|
|
|
@ -111,8 +126,8 @@ onMounted(() => { |
|
|
|
|
style=" |
|
|
|
|
font-size: 14px; |
|
|
|
|
display: flex; |
|
|
|
|
margin: 0px auto; |
|
|
|
|
margin: 0px 30px; |
|
|
|
|
/* margin: 0px auto; */ |
|
|
|
|
margin: 0px 10px; |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
|
<conheader |
|
|
|
@ -121,8 +136,8 @@ onMounted(() => { |
|
|
|
|
></conheader> |
|
|
|
|
</a> |
|
|
|
|
<div class="con"> |
|
|
|
|
<p class="button" round v-for="item in 30" :key="item"> |
|
|
|
|
Spring clould |
|
|
|
|
<p class="button" round v-for="item in maxKnow" :key="item.id"> |
|
|
|
|
{{ item.label }} |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -152,9 +167,10 @@ onMounted(() => { |
|
|
|
|
<ul> |
|
|
|
|
<li class="lessonlist-item" v-for="item in 4" :key="item"> |
|
|
|
|
<img :src="fe" class="lessonlist-item-img" /> |
|
|
|
|
|
|
|
|
|
<div class="lessonlist-item-info"> |
|
|
|
|
<h5>{{ courseName }}</h5> |
|
|
|
|
<p>{{ courseTea }}</p> |
|
|
|
|
<h5>课程名称</h5> |
|
|
|
|
<p>教师</p> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
@ -171,11 +187,15 @@ onMounted(() => { |
|
|
|
|
</a> |
|
|
|
|
<div class="con"> |
|
|
|
|
<ul> |
|
|
|
|
<li class="lessonlist-item" v-for="item in courselist" :key="item"> |
|
|
|
|
<img :src="img" class="lessonlist-item-img" /> |
|
|
|
|
<li |
|
|
|
|
class="lessonlist-item" |
|
|
|
|
v-for="item in courselist" |
|
|
|
|
:key="item.id" |
|
|
|
|
> |
|
|
|
|
<img :src="item.img || fe" class="lessonlist-item-img" /> |
|
|
|
|
<div class="lessonlist-item-info"> |
|
|
|
|
<h5>{{ courseName }}</h5> |
|
|
|
|
<p>{{ courseTea }}</p> |
|
|
|
|
<h5>{{ item.name }}</h5> |
|
|
|
|
<p>{{ item.teacher }}</p> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
@ -227,10 +247,12 @@ onMounted(() => { |
|
|
|
|
justify-content: space-between; |
|
|
|
|
} |
|
|
|
|
.lesson { |
|
|
|
|
// background-color: pink; |
|
|
|
|
padding-top: 5px; |
|
|
|
|
background-color: pink; |
|
|
|
|
padding-top: 30px; |
|
|
|
|
// padding-bottom: 30px; |
|
|
|
|
padding: 30px 10px 0px 10px; |
|
|
|
|
margin-bottom: 16px; |
|
|
|
|
height: 290px; |
|
|
|
|
height: 317px; |
|
|
|
|
background: #ffffff; |
|
|
|
|
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.1); |
|
|
|
|
border-radius: 6px 6px 6px 6px; |
|
|
|
@ -261,6 +283,7 @@ onMounted(() => { |
|
|
|
|
line-height: 30px; |
|
|
|
|
margin: 5px 10px; |
|
|
|
|
border: 2px solid #ccc; |
|
|
|
|
width: 40%; |
|
|
|
|
} |
|
|
|
|
a { |
|
|
|
|
text-decoration: none; |
|
|
|
@ -313,13 +336,14 @@ ul { |
|
|
|
|
align-items: center; |
|
|
|
|
} |
|
|
|
|
.lessonlist-item-info { |
|
|
|
|
margin-left: 5px; |
|
|
|
|
margin-left: 15px; |
|
|
|
|
width: 80%; |
|
|
|
|
height: 40px; |
|
|
|
|
background-color: #ffffff; |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
justify-content: space-evenly; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
// align-items: flex-start; |
|
|
|
|
h3 { |
|
|
|
|
font-weight: bold; |
|
|
|
|
} |
|
|
|
|