|
|
@@ -3,31 +3,32 @@
|
|
|
<Breadcrumb />
|
|
|
<div class="flex-between">
|
|
|
<div class="detail_right">
|
|
|
- <div class="padding16 bg_color_fff border_radius_10">
|
|
|
+ <div class="padding16 bg_color_fff border_radius_10 box_shadow_card">
|
|
|
<div class="gap10">
|
|
|
<div class="line_vertical"></div>
|
|
|
<div class="font_size20 bold">课程笔记列表</div>
|
|
|
</div>
|
|
|
- <div class="flex-between mt10 course_List"
|
|
|
- :class="{'active': item === 1}"
|
|
|
- v-for="item in 5" :key="item">
|
|
|
- <img src="" alt="" style="width: 160px; height: 90px;" class="border_radius_8 bg_color_f5">
|
|
|
+ <div class="flex-between mt10 course_List cursor-pointer"
|
|
|
+ @click="selectedItem = item"
|
|
|
+ :class="{'active': item.courseId === selectedItem.courseId}"
|
|
|
+ v-for="item in list" :key="item">
|
|
|
+ <img :src="item.coverImageUrl" alt="" style="width: 160px; height: 90px;" class="border_radius_8 bg_color_f5">
|
|
|
<div class="flex_1 ml20">
|
|
|
- <div class="font_size18 bold">课程笔记标题</div>
|
|
|
- <div class="font_size14 line2 gray mt10">- 本文介绍两款开源的密码破解工具John the Ripp...</div>
|
|
|
+ <div class="font_size18 bold">{{ item.courseTitle }}</div>
|
|
|
+ <div class="font_size14 line2 gray mt10">{{ item.courseIntro }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="flex_1 ml20 fit_content">
|
|
|
- <noteList />
|
|
|
+ <div class="flex_1 ml20 fit_content bg_color_fff border_radius_10 padding16 box_shadow_card">
|
|
|
+ <Xuxibiji :info="selectedItem" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
-
|
|
|
-import noteList from '@/pages/LearnNote/components/noteList.vue'
|
|
|
+import Xuxibiji from '@/pages/LearningSystem/components/xuxibiji.vue'
|
|
|
+import { getCourseList } from '@/api/course.js'
|
|
|
|
|
|
|
|
|
import { ref, onMounted } from 'vue'
|
|
|
@@ -35,23 +36,29 @@ import { useRoute } from 'vue-router'
|
|
|
import { useAppStore } from '@/pinia/appStore'
|
|
|
const appStore = useAppStore()
|
|
|
const route = useRoute()
|
|
|
-const query = route.query;
|
|
|
-const learnNoteId = ref(query.learnNoteId || '');
|
|
|
-const learnNoteDetail = ref({})
|
|
|
+const list = ref({})
|
|
|
+const selectedItem = ref({})
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
- // getLearnNoteDetailFn();
|
|
|
+ getList();
|
|
|
});
|
|
|
-const getLearnNoteDetailFn = async () => {
|
|
|
- getLearnNoteDetail({learnNoteId: learnNoteId.value}).then(res => {
|
|
|
+const getList = async () => {
|
|
|
+ getCourseList({}).then(res => {
|
|
|
if(res.code === 200){
|
|
|
console.log(res)
|
|
|
- learnNoteDetail.value = res.data || {};
|
|
|
+ list.value = res.rows || [];
|
|
|
+ if(list.value.length > 0){
|
|
|
+ selectedItem.value = list.value[0]
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
.LearnNote{
|
|
|
+ .detail_right{
|
|
|
+ max-height: calc(100% - 100px);
|
|
|
+ }
|
|
|
.course_List{
|
|
|
padding: 16px;
|
|
|
border-radius: 16px;
|