@@ -4,9 +4,13 @@
<!-- < text style = "color: #666;font-size: 30rpx;" > 筛选 < / text > -- >
< image src = "../../static/images/filter.png" style = "width: 36upx;height: 36upx;vertical-align: middle;" > < / image >
< / view >
< u-popup :show = "filterShow" mode = "right" @close ="closeFilter" :safeAreaInsetTop = "true" :closeable = "true" >
< view : style = "`width: ${filterWidth};padding-top: 5px;`" style = "height: 100vh; overflow: auto; ">
<!-- $ { filterWidth } -- >
< u-popup :show = "filterShow" mode = "center" @close ="closeFilter" :safeAreaInsetTop = "true" :closeable = "false ">
< view :style = "{width:filterWidth}" style = "height: 100vh;padding-top: 32upx; overflow: auto;position: relative;" >
< view v-if = "type==1" >
< view class = "filter-title-top" >
< u-icon @click ="filterShow = false" class = "icon" name = "arrow-left" color = "#333333" size = "20" > < / u-icon > 课程分类
< / view >
< view class = "filter-item" >
< view v-if = "noOrder" class="filter-title" > 排序 < / view >
< view v-if = "noOrder" class="filter-body" >
@@ -15,28 +19,28 @@
< / view >
< view class = "filter-title" > 授课方式 < / view >
< view class = "filter-body" >
<!-- < view class = "filter-option" :class = "{'filter-checked':course.courseType==10}" @click ="setCourseFilter('courseType',10)" > 微课 < / view > - - >
< view class = "filter-option" :class = "{'filter-checked':course.courseType==20}" @click ="setCourseFilter('courseType',20)" > 录播课 < / view >
< view class = "filter-option" :class = "{'filter-checked':course.courseType==30}" @click ="setCourseFilter('courseType',30)" > 线下课 < / view >
< view class = "filter-option" :class = "{'filter-checked':course.courseType==40}" @click ="setCourseFilter('courseType',40)" > 学习项目 < / view >
< / view >
< ! - - < view class = "filter-title" > 应用场景 < / view >
< view class = "filter-body" >
< view class = "filter-option"
v-for = "scence in courseScenceList"
:key = "scence.id"
:class = "{'filter-checked':checkScence(scence)}"
@click ="setCourseFilter('scence',scence)" > {{ scence.name }} < / view >
< / view > - - >
< view class = "filter-title" > 内容分类 < / view >
< view class = "filter-title" style = "margin-top: 10upx;" > 内容分类 < / view >
< view class = "filter-body" >
< view class = "filter-option"
v-for = "sysType in courseSysTypeTree"
:key = "sysType.id"
:class = "{'filter-checked':course.sysType1.id==sysType.id}"
@click ="setCourseFilter('sysType1',sysType)" > {{ sysType.name }} < / view >
< ! - - < view class = "filter-option" @click ="moreFilters('sysTypeMore',0)" > 更多 < / view > - - >
< view class = "filter-option" @click ="toNewLink" > U选小课堂 < / view >
< ! - - < view class = "filter-option" @click ="toNewLink" > U选小课堂 < / view > - - >
< / view >
< view class = "sys-type" v-if = "sysTypeTow.length > 0" >
< text class = "sys-type-name" > { { course . sysType1 . name } } < / text >
< view class = "sys-type-tow" >
< text class = "type-option" v-for = "tow in sysTypeTow" :key="tow.id" :class="{'filter-checked':course.sysType2.id==tow.id}" @click="setCourseFilter('sysType2',tow)" > {{ tow.name }} < / text >
< / view >
< view class = "sys-type-three" >
< text class = "type-option-three" v-for = "three in sysTypeThree" :key="three.id" :class="{'filter-checked':course.sysType3.id==three.id}" @click="setCourseFilter('sysType3',three)" > {{ three.name }} < / text >
< / view >
< / view >
< / view >
< / view >
@@ -69,8 +73,8 @@
< / view >
< / view >
< view class = "filter-footer" >
< view class = "filter-footer-reset" @click ="resetCourseFilter()" > 重 置 < / view >
< view class = "filter-footer-submit" @click ="submit()" > 确 定 < / view >
<!-- < view class = "filter-footer-reset" @click ="resetCourseFilter()" > 重 置 < / view > - - >
< view class = "filter-footer-submit" @click ="submit()" > 选择好了 , 返回课程列表页 < / view >
< / view >
< / view >
< / u -popup >
@@ -89,21 +93,27 @@
type : {
type : Number ,
required : true
} ,
filterWidth : {
type : String ,
default : '100%'
}
} ,
data ( ) {
return {
courseSysTypeTree : [ ] ,
courseScenceList : [ ] ,
filterShow : fals e, //是否显示过虑器
filterWidth: '300px',
filterShow : tru e, //是否显示过虑器
// filterWidth: '300px',
sysTypeTow : [ ] ,
sysTypeThree : [ ] ,
course : {
orderType : - 1 , //表未选中,排序,最新,最热
courseType : - 1 , //表未选中
scenes : [ ] ,
sysType1 : '' ,
sysType2 : '' ,
sysType3 : ''
sysType1 : { } ,
sysType2 : { } ,
sysType3 : { }
} ,
article : {
orderType : - 1
@@ -116,7 +126,7 @@
}
} ,
mounted ( ) {
this . filterWidth= ( this . $width - 100 ) + 'px' ; //右边出来的抽屉宽度控制
// this. filterWidth=(this.$width-100)+'px'; //右边出来的抽屉宽度控制
this . loadData ( ) ;
} ,
computed : {
@@ -249,6 +259,15 @@
} else if ( strType == 'sysType1' ) {
this . course . sysType1 = value ;
this . sysTypeTow = value . children ;
this . course . sysType2 = { } ;
this . course . sysType3 = { } ;
} else if ( strType == 'sysType2' ) {
this . course . sysType2 = value ;
this . sysTypeThree = value . children ;
this . course . sysType3 = { } ;
} else if ( strType == 'sysType3' ) {
this . course . sysType3 = value ;
}
} ,
moreFilters ( ) {
@@ -368,56 +387,117 @@
< style lang = "scss" scoped >
/ deep / . u - popup _ _content {
border - radius : 17 px 0 0 rpx 17 px ;
width : 100 % ;
// border-radius: 17px 0 0rpx 17px;
}
/ deep / . u - icon _ _icon {
top : 0 px ! important ;
}
. filter - title - top {
height : 150 upx ;
line - height : 150 upx ;
text - align : center ;
font - size : 36 upx ;
font - weight : 600 ;
color : # 333333 ;
position : relative ;
. icon {
position : absolute ;
top : 50 upx ;
left : 40 upx ;
}
}
. filter - item {
padding : 10 upx ;
. filter - title {
padding : 10 upx 18 upx ;
color : # 2 d2d2d ;
font - size : 28 rpx ;
color : # 333333 ;
font - size : 3 2rpx ;
font - weight : bold ;
}
. sys - type {
margin : 20 upx ;
padding : 28 upx 20 upx ;
background : # F7F7F7 ;
border - radius : 8 upx ;
. sys - type - name {
margin - left : 12 upx ;
font - size : 28 upx ;
color : # 333333 ;
}
. filter - checked {
color : # 387 DF7 ! important ;
}
. sys - type - tow {
margin - top : 40 upx ;
. type - option {
display : inline - block ;
height : 60 upx ;
background : # FFFFFF ;
border - radius : 34 upx ;
line - height : 60 upx ;
text - align : center ;
color : # 666666 ;
font - size : 28 upx ;
padding : 6 upx 36 upx ;
margin - right : 28 upx ;
margin - bottom : 28 upx ;
}
}
. sys - type - three {
display : flex ;
flex - wrap : wrap ;
justify - content : space - around ;
. type - option - three {
font - size : 28 upx ;
color : # 666666 ;
}
}
}
. filter - body {
padding : 10 upx 55 upx ;
padding : 10 upx 32 upx ;
// text-align: center;
// display: flex;
display: flex ;
justify - content : space - between ;
flex - wrap : wrap ;
. filter - option {
// font-weight: 620;
// background-color: #000000;
background - color : # f9f9f9 ;
border - radius : 45 rpx ;
background - color : # F7F7F7 ;
border - radius : 3 4rpx ;
// border: 1px solid #cacaca;
padding : 12 upx 12 upx ;
padding : 12 upx 50 upx ;
display : inline - block ;
height : 64 rpx ;
height : 60 rpx ;
text - align : center ;
width: 190 rpx ;
// width: 180rpx;
font - size : 26 rpx ;
color : # 1 d1d1d ;
margin : 10 upx ;
color : # 666666 ;
margin - bottom : 10 upx ;
margin - top : 10 upx ;
box - sizing : border - box ;
}
. filter - checked {
background- color : # feeae9;
color : # e2331e ;
margin: 10 upx ;
box - sizing : border - box ;
height: 64 rpx ;
border: 1 rpx solid # e2331e;
// background-color:# feeae9;
color : # 387 DF7 ;
// margin: 10upx ;
// box-sizing: border-box;
// height: 64rpx;
// border: 1rpx solid # e2331e;
}
}
}
. filter - footer {
display : flex ;
justify - content : center ;
margin - top : 84 upx ;
padding - bottom : 30 upx ;
padding - top : 20 upx ;
. filter - footer - reset {
margin : 10 upx ;
border : 1 px solid # FFB30F ;
color : # FFB30F ;
@@ -427,13 +507,16 @@
border - radius : 40 upx ;
}
. filter - footer - submit {
marg in: 1 0upx ;
font - size : 24 rpx ;
background - color : # FFB30F ;
color : # FFFFFF ;
padding : 20 upx 80 upx ;
padd ing : 0 68 upx ;
// width: 236px;
height : 96 upx ;
line - height : 96 upx ;
text - align : center ;
borde r - radius : 40 upx ;
background : linea r - g radient ( 112 deg , # 5491 FD 0 % , # 2 A58FA 100 % ) ;
border - radius : 48 upx ;
font - size : 28 upx ;
font - weight : 600 ;
color : # FFFFFF ;
}
}
< / style >