diff --git a/src/views/portal/course/Index.vue b/src/views/portal/course/Index.vue
index 5ee6caad..ecfcb5a7 100644
--- a/src/views/portal/course/Index.vue
+++ b/src/views/portal/course/Index.vue
@@ -2,7 +2,7 @@
+ @showClass="showClass">
@@ -11,7 +11,7 @@
>
+ @click="handleOptionClick(item, index)">
{{ item.name }}
>
@@ -35,15 +35,15 @@
{{ one.name }}
+ @click.stop="handleOptionClick(twoList, 2, one.children)"
+ :class="{ courseTwoActive: twoList.id == twoId || twoList.checked }" @mouseleave.stop="leaveIndex"
+ @mouseenter.stop="changeIndex(twoList.id)">
+ :disabled="!twoList.children.length" :open-delay="0" :close-delay="0" trigger="hover"
+ :visible-arrow="false" @hide="leaveIndex" @show="changeIndex(twoList.id)" transition="none">
{{
- twoList.name }}
-
+ twoList.name }}-
@@ -51,8 +51,8 @@
+ :key="threeList.id" @click.stop="handleOptionClick(threeList, 3, twoList.children)"
+ class="course-three">
{{ threeList.name }}
@@ -283,23 +283,23 @@
-->
-
+
+ :class="{ 'option-active': ctypeList[0].checked }">
录播课
+ :class="{ 'option-active': ctypeList[1].checked }">
线下课
+ :class="{ 'option-active': ctypeList[2].checked }">
学习项目
@@ -312,9 +312,9 @@
@@ -355,7 +355,7 @@
搜索条件:
+ :style="{ color: tag.type === 0 ? '#ff0000' : '' }">
{{ tag.tagName }}
@@ -370,11 +370,11 @@
最热
+ :class="{ actice: course.orderField == 'studys' }">最热
最新
+ :class="{ actice: course.orderField == 'publishTime' }">最新
好评率
+ :class="{ actice: course.orderField == 'score' }">好评率
共找到{{ count }}个结果
@@ -407,7 +407,7 @@
+ :disabled="!keyword.showTitle">
@@ -431,7 +431,7 @@
+ :praises="false" :shares="false" :views="false">
{{ toScore(cinfo.score) }}分
@@ -476,7 +476,7 @@
+ layout="total, prev, pager, next, jumper" @change-page="currentChange">
@@ -755,7 +755,7 @@ export default {
}
})
//初始化:获取最新前10个热点标签
- apiCourseTag.getHotTagList(null).then(rs => {
+ apiCourseTag.getHotTagList(null).then(rs => {
if (rs.status == 200) {
this.hotTagsList = rs.result.map(tag => ({
...tag,
@@ -1036,33 +1036,33 @@ export default {
this.searchData(1);
},
// 清除
-handleClearTags() {
- //清空所有的条件
- this.keyword = '';
- this.ctypeList.forEach(item => {
- item.checked = false;
- });
- this.hotTagsList.forEach(item => {
- item.checked = false;
- });
- this.course.tags = ''; // 清空标签ID
-
- // 添加清除三级分类的逻辑
- this.oneList.forEach(one => {
- one.checked = false;
- one.children.forEach(two => {
- two.checked = false;
- two.children.forEach(three => {
- three.checked = false;
+ handleClearTags() {
+ //清空所有的条件
+ this.keyword = '';
+ this.ctypeList.forEach(item => {
+ item.checked = false;
});
- });
- });
+ this.hotTagsList.forEach(item => {
+ item.checked = false;
+ });
+ this.course.tags = ''; // 清空标签ID
- // 清空导航标题
- this.navTitle = [];
+ // 添加清除三级分类的逻辑
+ this.oneList.forEach(one => {
+ one.checked = false;
+ one.children.forEach(two => {
+ two.checked = false;
+ two.children.forEach(three => {
+ three.checked = false;
+ });
+ });
+ });
- this.searchData();
-},
+ // 清空导航标题
+ this.navTitle = [];
+
+ this.searchData();
+ },
// 导航切换(录播课,线下课,学习项目)
handleTypeClick(item, list) {
item.checked = !item.checked;
@@ -1580,7 +1580,7 @@ handleClearTags() {
if (item.teacher) {
item.teacher = item.teacher.split(',').filter(itemValue => itemValue !== 'BOE教师').join(',');
// if (dotIdx > 0) {
- // item.teacher = item.teacher.substring(0, dotIdx);
+ // item.teacher = item.teacher.substring(0, dotIdx);
// }
}
if (item.teacher && item.teacher == 'BOE教师') {
@@ -1856,9 +1856,6 @@ handleClearTags() {
.topNav {
display: flex;
margin-bottom: 20px;
- height: auto;
- min-height: 80px;
- align-items: center;
.nav {
display: flex;
@@ -2336,8 +2333,8 @@ handleClearTags() {
margin-left: 15px;
font-size: 14px;
color: #3d3d3d;
- //cursor: pointer;
- //position: relative;
+ cursor: pointer;
+ position: relative;
}
.uxicon {
@@ -2468,8 +2465,6 @@ handleClearTags() {
background: #fff;
padding: 10px 25px;
border-radius: 8px;
- height: auto;
- min-height: 60px;
::v-deep .el-input {
width: 420px;
@@ -2593,8 +2588,7 @@ handleClearTags() {
color: #3d3d3d;
display: inline-block;
font-size: 14px;
- //margin: 0px 15px;
- font-weight: normal;
+ margin: 0px 15px;
}
.option-border {
@@ -2608,7 +2602,7 @@ handleClearTags() {
.option-active {
color: #387DF7;
}
- /* 项目简介 方法一:外部 CSS 类 */
+/* 项目简介 方法一:外部 CSS 类 */
::v-deep.el-dialog {
border-radius: 3% 3% 1% 1%;
padding: 0;
@@ -2636,16 +2630,10 @@ handleClearTags() {
/* ---end--- */
/* ---标签管理 added by zhengsongbo on 2025-08-01--- */
.search-div.nav {
- display: flex;
- flex-direction: column;
- height: auto;
- min-height: 100px;
-}
-.hot-tags-area {
+ display: block;
width: 100%;
- margin-top: 15px;
+ clear: both;
}
-
.option-item {
margin: 0px 5px;
}
@@ -2684,7 +2672,7 @@ a.custom2 {
.hot-tags-container {
display: inline-block;
- //white-space: nowrap;
+ white-space: nowrap;
overflow-x: auto;
vertical-align: top;
}
@@ -2717,6 +2705,16 @@ a.custom2 {
color: #387DF7 !important; // 匹配时的蓝色
}
+/* 添加热点标签容器样式,支持换行 */
+.hot-tags-wrapper {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 15px;
+ align-items: center;
+ padding-top: 2px;
+ //margin-left: 90px; /* 为"热点标签:"文本留出空间 */
+}
+
/* 调整option-item样式以适应换行布局 */
.option-item {
position: relative;
@@ -2747,32 +2745,5 @@ a.custom2 {
gap: 5px;
}
}
-
-.hot-tags-wrapper {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(120px, max-content));
- gap: 15px 20px;
- align-items: center;
- justify-items: start;
- width: 100%;
- padding: 10px 0;
-}
-.hot-tags-wrapper .option-item {
- position: relative;
- cursor: pointer;
- white-space: nowrap;
- padding: 5px 10px;
- text-align: center;
-}
-.course-tags {
- margin: 5px 0;
- min-height: 20px;
-}
-
-.course-tag-item {
- color: #333333;
-}
-.course-tag-item[style*="color: #387DF7"] {
- color: #387DF7 !important;
-}
+/* ---end--- */