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