From b86def187bb9a6a15f3545a8f3979af732b6d4c9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BA=8E=E9=B9=8F=E9=A3=9E?=
<14315049+Hld-yupengfei@user.noreply.gitee.com>
Date: Wed, 19 Jun 2024 09:35:02 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=97=A0=E6=B3=95=E5=88=87?=
=?UTF-8?q?=E6=8D=A2=E9=A1=B5=E9=9D=A2=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.vscode/extensions.json | 3 +-
src/api/courseChaptersApi.ts | 35 ++++--
src/views/MyCourseStudy/ContainerCla.vue | 43 +++----
src/views/MyCourseStudy/ContainerKno.vue | 61 +++++-----
src/views/MyCourseStudy/courseCollections.vue | 106 ++++++++++++------
5 files changed, 147 insertions(+), 101 deletions(-)
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index c0a6e5a..b7b60da 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,3 +1,4 @@
{
- "recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
+ "recommendations": [
+ "Vue.volar""]
}
diff --git a/src/api/courseChaptersApi.ts b/src/api/courseChaptersApi.ts
index 10135cd..6254975 100644
--- a/src/api/courseChaptersApi.ts
+++ b/src/api/courseChaptersApi.ts
@@ -1,22 +1,37 @@
import request from '@/utils/request'
+
+/**
+ * 课程收藏获取资源
+ */
+export function getAssApi(params: {
+ page: number,
+ pageSize: number,
+ resourceIdList: string,
+ type: 1 | 2 | 3 | 4 | 5
+}) {
+ return request.get('/Favour/get', {
+ params
+ })
+}
+
/**
* 请求视频资源
* @param par
*/
-export function aaaApi(par:any){
- if(par)return request.get(`url${par}`)
- else return request.get(`url`)
-
+export function aaaApi(par: any) {
+ if (par) return request.get(`url${par}`)
+ else return request.get(`url`)
+
}
-export const uploadFile = (data:any) => {
- return request({
- url:'/upload',
- method:"POST",
- data
- })
+export const uploadFile = (data: any) => {
+ return request({
+ url: '/upload',
+ method: "POST",
+ data
+ })
}
diff --git a/src/views/MyCourseStudy/ContainerCla.vue b/src/views/MyCourseStudy/ContainerCla.vue
index 090e6b4..8288c9f 100644
--- a/src/views/MyCourseStudy/ContainerCla.vue
+++ b/src/views/MyCourseStudy/ContainerCla.vue
@@ -27,15 +27,9 @@
-
+
@@ -48,24 +42,22 @@ const container = ref()
function handleResize() {
const style = getComputedStyle(container.value)
const width = Number(style.width.slice(0, -2))
- if (width >= 350 * 4.5)
- container.value.style.gridTemplateColumns = 'repeat(4, 350px)'
- else container.value.style.gridTemplateColumns = 'repeat(auto-fill, 350px)'
+ if (width >= 350 * 4.5) container.value.style.gridTemplateColumns = "repeat(4, 350px)"
+ else container.value.style.gridTemplateColumns = "repeat(auto-fill, 350px)"
}
function debounce(func: any, delay: any) {
let timer: any
return function () {
- clearTimeout(timer)
+ clearTimeout(timer);
timer = setTimeout(() => {
// @ts-ignore
- func.apply(this, arguments)
- }, delay)
- }
+ func.apply(this, arguments);
+ }, delay);
+ };
}
const deHR = debounce(handleResize, 500)
-const myObserver = new ResizeObserver(deHR)
+const myObserver = new ResizeObserver((deHR))
onMounted(() => myObserver.observe(container.value))
-onBeforeUnmount(myObserver.disconnect)
// ===============================
const total = ref(0)
const datalist = ref([
@@ -104,10 +96,7 @@ const getDatalist = async () => {
params.value,
)
datalist.value = res.data.records
- console.log('datalist ' + datalist.value[0].name)
total.value = res.data.total
- console.log('pages ' + total.value)
- console.log('datalist ' + datalist.value[0].img)
}
getDatalist()
@@ -132,7 +121,7 @@ const handleCurrentChange = (page: any) => {
justify-content: center;
}
-.example-pagination-block + .example-pagination-block {
+.example-pagination-block+.example-pagination-block {
margin-top: 10px;
}
@@ -191,7 +180,7 @@ const handleCurrentChange = (page: any) => {
border-bottom: 1px solid rgb(217, 217, 217);
}
-.ClassImg > img {
+.ClassImg>img {
width: 100%;
height: 180px;
}
@@ -225,14 +214,14 @@ const handleCurrentChange = (page: any) => {
justify-content: space-around;
}
-.Con > h3 {
+.Con>h3 {
margin-left: 15px;
font-size: 25px;
font-weight: 600;
cursor: pointer;
}
-.Con > p {
+.Con>p {
margin-left: 15px;
margin-top: 5px;
font-size: 13px;
@@ -240,14 +229,14 @@ const handleCurrentChange = (page: any) => {
cursor: pointer;
}
-.Con > p > span {
+.Con>p>span {
margin-left: 5px;
margin-right: 5px;
color: rgb(94, 188, 231);
font-weight: 600;
}
-.Con > button {
+.Con>button {
width: 45px;
height: 20px;
font-size: 9px;
diff --git a/src/views/MyCourseStudy/ContainerKno.vue b/src/views/MyCourseStudy/ContainerKno.vue
index e7d5dc4..3001dfa 100644
--- a/src/views/MyCourseStudy/ContainerKno.vue
+++ b/src/views/MyCourseStudy/ContainerKno.vue
@@ -1,32 +1,35 @@
-
-
-
-
-
-
-
课程名称
-
第{{ item_3 }}章-xxxx
+
+
+
+
+
+
+
课程名称
+
第{{ item_3 }}章-xxxx
+
+
+
+
+
+
+
+ -
+ 知识点知识点知识点{{ item }}
+ ×
+
+
+
+
+
-
-
-
-
-
-
- -
- 知识点知识点知识点{{ item }}
-
×
-
-
-
-
-
-
-
+
-
+
+
\ No newline at end of file
diff --git a/src/views/MyCourseStudy/courseCollections.vue b/src/views/MyCourseStudy/courseCollections.vue
index 3916d9d..9561848 100644
--- a/src/views/MyCourseStudy/courseCollections.vue
+++ b/src/views/MyCourseStudy/courseCollections.vue
@@ -1,12 +1,6 @@
-
+
@@ -69,17 +63,28 @@
-
+
-
视频名称-----{{ item }}
+
{{ item }}
+
+ 点击播放
+
+
+ 点击开了一个弹框
+
+
+
+
@@ -92,8 +97,8 @@
文本名称-----{{ item }}
-
+
-
+
@@ -128,33 +126,73 @@