提交 d26cdd04 编写于 作者: 杨广俊's avatar 杨广俊

讲师集页面开发

上级 5d74c46b
<template>
<section>
<article class="group-title-title">
<span>{{groupTitle}}</span>
</article>
<article class="group-title">
<article v-show="showOrder" class="group-title-order">
<div @click="order(1)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 1}">按名首字母</span>
<img class="first-name" src="../../images/sousuo/sort-down.png" v-show="showOrderIndex === 1"/>
</div>
<div @click="order(2)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 2}">最新课程</span>
<img src="../../images/sousuo/sort-down.png" v-show="showOrderIndex === 2"/>
</div>
<div @click="order(3)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 3}">资源数</span>
<img class="course-num" src="../../images/sousuo/sort-down.png" v-show="showOrderIndex === 3"/>
</div>
<div @click="order(4)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 4}">热门</span>
<img class="hot-degree" src="../../images/sousuo/sort-down.png" v-show="showOrderIndex === 4"/>
</div>
</article>
</article>
</section>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
data() {
return {
showOrderIndex: 1
}
},
props: {
groupTitle: {
type: String,
default: '课程'
},
isShowNum: {
type: Boolean,
default: true
},
groupNum: {
type: String,
default: "0"
},
showTitle: {
type: Boolean,
default: true
},
showOrder: {
type: Boolean,
default: true
}
},
computed: {
...mapGetters({
orderNum: 'orderNum'
})
},
watch: {
orderNum(val) {
this.showOrderIndex = 1
}
},
methods: {
toggle() {
this.showTitle = !showTitle
this.showOrder = !showOrder
},
order(index) {
this.showOrderIndex = index
this.$emit('order', index)
},
// resetShowOrderIndex(){
// this.showOrderIndex = 1
// }
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.group-title {
margin-left: px2rem(15px);
display: flex;
flex-direction: row;
&-order {
display: flex;
flex-direction: row;
padding: px2rem(10px) 0 px2rem(10px);
font-size: px2rem(13px);
&-item {
position: relative;
span {
margin-right: px2rem(30px);
}
img {
position: absolute;
top: px2rem(2px);
left: px2rem(51px);
height: px2rem(15px);
width: px2rem(15px);
}
}
}
.first-name {
left: px2rem(63px);
}
.course-num {
left: px2rem(37px);
}
.hot-degree {
left: px2rem(25px);
}
.active {
color: #449284;
}
&-title {
padding: 0 px2rem(15px);
span {
font-size: px2rem(18px);
font-weight: 500;
color: #28344C;
}
}
}
</style>
<template>
<section>
<article class="group-title-title">
<span>{{groupTitle}}</span>
</article>
<article>
<select name="regionName" id="1">
<option value="1">上海</option>
<option value="2">北京</option>
<option value="3">广州</option>
</select>
</article>
<article class="group-title">
<article v-show="showOrder" class="group-title-order">
<div @click="order(1)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 1}">按名首字母</span>
<img class="first-name" src="../../images/sousuo/sort-down.png" v-show="showOrderIndex === 1"/>
</div>
<div @click="order(2)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 2}">最新课程</span>
<img src="../../images/sousuo/sort-down.png" v-show="showOrderIndex === 2"/>
</div>
<div @click="order(3)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 3}">资源数</span>
<img class="course-num" src="../../images/sousuo/sort-down.png" v-show="showOrderIndex === 3"/>
</div>
<div @click="order(4)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 4}">热门</span>
<img class="hot-degree" src="../../images/sousuo/sort-down.png" v-show="showOrderIndex === 4"/>
</div>
</article>
</article>
</section>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
data() {
return {
showOrderIndex: 1
}
},
props: {
groupTitle: {
type: String,
default: '课程'
},
isShowNum: {
type: Boolean,
default: true
},
groupNum: {
type: String,
default: "0"
},
showTitle: {
type: Boolean,
default: true
},
showOrder: {
type: Boolean,
default: true
}
},
computed: {
...mapGetters({
orderNum: 'orderNum'
})
},
watch: {
orderNum(val) {
this.showOrderIndex = 1
}
},
methods: {
toggle() {
this.showTitle = !showTitle
this.showOrder = !showOrder
},
order(index) {
this.showOrderIndex = index
this.$emit('order', index)
},
// resetShowOrderIndex(){
// this.showOrderIndex = 1
// }
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.group-title {
margin-left: px2rem(15px);
display: flex;
flex-direction: row;
&-order {
display: flex;
flex-direction: row;
padding: px2rem(10px) 0 px2rem(10px);
font-size: px2rem(13px);
&-item {
position: relative;
span {
margin-right: px2rem(30px);
}
img {
position: absolute;
top: px2rem(2px);
left: px2rem(51px);
height: px2rem(15px);
width: px2rem(15px);
}
}
}
.first-name {
left: px2rem(63px);
}
.course-num {
left: px2rem(37px);
}
.hot-degree {
left: px2rem(25px);
}
.active {
color: #449284;
}
&-title {
padding: 0 px2rem(15px);
span {
font-size: px2rem(18px);
font-weight: 500;
color: #28344C;
}
}
}
</style>
此差异已折叠。
<template>
<section>
<GroupTitle groupTitle="讲师" :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder" @order="orderAction"/>
<GroupTitle groupTitle="全部讲师" :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder" @order="orderAction"/>
<div class="font-style">
<div class="teach-opt">
<div class="teach-list">
......@@ -34,7 +34,7 @@ import {
m_search_result_lecturer_order,
m_search_result_lecturer_top,
} from '@/utils/buryingPoint'
import GroupTitle from '@/components/business/group-title';
import GroupTitle from '@/componentsn/business/group-title';
export default {
data() {
return {
......
<template>
<div class="hot-teacher" id="hot-teacher-id">
<div class="titleTop">
<span class="title">{{title}}</span>
<!-- <div class="get-more gray fs11" @click="goToPage('','list')">
更多<img src="../../images/right-throw.png" class="thorw-icon"/>
</div> -->
</div>
<div class="tea-list">
<div class="tea-listbox">
<div class="tea-item" :key="index" v-for="(item,index) in parmData" @click="goToPage(item)">
<div class="head-pic">
<img class="tea-itemimg" v-lazy="item.avatarImageUrl"/>
</div>
<span class="tea-itemname">{{item.name}}</span>
</div>
</div>
</div>
</div>
</template>
<script>
// import { setEventByModuleCode } from '@/utils/index'
import { jumpWebPageUrl } from '@/utils/index'
export default {
data(){
return {
title:'热门讲师',
list: [],
pageNo: 1,
pageSize: 10,
parmData: []
}
},
beforeMount(){
},
mounted(){
this.getData();
},
props:{
userToken:{
type:String,
default:''
}
},
methods: {
//跳转
goToPage(item,parm){
let _this = this,
url = '',action_code = '',label_id = '';
if(parm == 'list'){
url = jumpWebPageUrl+'teachers?userToken='+_this.userToken;
action_code = 'c_more'
}else{
url = jumpWebPageUrl+'teachersDetail?id='+item.id+"&from=appHome&userToken="+_this.userToken
action_code = 'c_teacher';
label_id = item.id;
}
let itemData={
"title":"",
"imageUrl":"",
"appModuleInfo":{
"code":"M300",
"type":4,
"name":"wwww",
"paramFlag":1,
"paramList":[
{
"key":"pageUrl",
"value": url,
"type":4,
"seqNo":1
},{
"key":"showTitle",
"value": false,
"type":1,
"seqNo":2
},{
"key":"title",
"value": '',
"type":1,
"seqNo":3
}
]
}
};
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: itemData.appModuleInfo.paramList
})
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_teacher',
actionCode:action_code,
labelId:label_id,
labelValue :item.name,
})
},
getData(){
let _this = this,
para = {
pageNo: this.pageNo,
pageSize: this.pageSize,
token: this.userToken,
setEntry: 'headers'
}
this.GET('contents/HomeLecturer/LecturerInformation', para).then(res => {
if(res.code == '000000'){
_this.parmData = (res.data && res.data.pCourseDoctorModels || []).slice()
}
})
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.hot-teacher{
width: 100%;
background-color: #fff;
padding: px2rem(15px);
.titleTop{
padding: 0 px2rem(15px) px2rem(15px) 0;
overflow: hidden;
height: px2rem(40px);
}
.title{
font-size: px2rem(18px);
float: left;
font-weight: bold;
}
.get-more{
border: 1px solid RGBA(169, 174, 183, 0.5);
border-radius: px2rem(16px);
padding: 0 px2rem(5px) 0 px2rem(6px);
vertical-align: middle;
display: inline-block;
float: right;
margin-top:px2rem(3px);
height: px2rem(16px);
line-height: px2rem(16px);
}
.thorw-icon{
width: px2rem(8px);
height: px2rem(8px);
}
.tea-list{
width: 100%;
overflow: hidden;
height: px2rem(115px);
overflow-x: scroll;
-webkit-tap-highlight-color:rgba(0,0,0,0);
outline: 0;
-webkit-overflow-scrolling : touch;
}
.tea-listbox{
width: 1100px;
clear: both;
}
.tea-item {
width: px2rem(105px);
height: px2rem(115px);
font-size: px2rem(13px);
padding-left: px2rem(20px);
// margin: 0 px2rem(19px) 0 0;
display: inline-block;
// position: relative;
float: left;
text-align: center;
.head-pic {
background: #ECECEC;
width: px2rem(60px);
height: px2rem(60px);
border-radius: 50%;
text-align: center;
display: inline-block;
}
.tea-itemimg{
width: px2rem(60px);
height: px2rem(60px);
border-radius: 50%;
}
.tea-itemname{
color: RGBA(102, 102, 102, 1);
margin-top: px2rem(4px);
font-size: px2rem(13px);
line-height: px2rem(19px);
height: px2rem(19px);
display: inline-block;
}
}
}
</style>
<template>
<div class="hot-teacher" id="famus-teacher">
<div class="titleTop">
<span class="title">{{title}}</span>
<!-- <div class="get-more gray fs11" @click="goToPage('','list')">
更多<img src="../../images/right-throw.png" class="thorw-icon"/>
</div> -->
</div>
<div class="tea-list">
<div class="tea-listbox">
<div class="tea-item" :key="index" v-for="(item,index) in parmData" @click="goToPage(item)">
<div class="head-pic">
<img class="tea-itemimg" v-lazy="item.avatarImageUrl"/>
<div class="hot-lect">
<span class="hot-lect-wrapper-title">热门讲师</span>
<div class="hot-lect-wrapper">
<div class="hot-lect-wrapper-list" >
<div class="hot-lect-wrapper-list-item" v-for="(item,index) in parmData" @click="goToPage(item)" :key="index">
<div class="lect-img">
<img v-lazy="item.avatarImageUrl"/>
<span class="disp-blc">
<span>邓轩东</span>
</span>
</div>
<span class="tea-itemname">{{item.name}}</span>
<span class="disp-blc lect-ks">中医风湿免疫内科</span>
<span class="disp-blc study-num">477人已学</span>
</div>
</div>
</div>
......@@ -21,7 +20,7 @@
<script>
// import { setEventByModuleCode } from '@/utils/index'
import { jumpWebPageUrl } from '@/utils/index'
import { jumpWebPageUrl } from '@/utils/index'
export default {
data(){
return {
......@@ -124,78 +123,91 @@ export default {
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.hot-teacher{
width: 100%;
background-color: #fff;
padding: px2rem(15px);
.titleTop{
padding: 0 px2rem(15px) px2rem(15px) 0;
overflow: hidden;
height: px2rem(40px);
}
.title{
font-size: px2rem(18px);
float: left;
font-weight: bold;
}
.get-more{
border: 1px solid RGBA(169, 174, 183, 0.5);
border-radius: px2rem(16px);
padding: 0 px2rem(5px) 0 px2rem(6px);
vertical-align: middle;
display: inline-block;
float: right;
margin-top:px2rem(3px);
height: px2rem(16px);
line-height: px2rem(16px);
}
.thorw-icon{
width: px2rem(8px);
height: px2rem(8px);
.hot-lect {
&-wrapper {
width: 100%;
overflow: hidden;
height: px2rem(115px);
// margin: 0 px2rem(15px);
overflow-x: scroll;
-webkit-tap-highlight-color:rgba(0,0,0,0);
outline: 0;
-webkit-overflow-scrolling : touch;
&-list {
display: flex;
flex-direction: columns;
width: px2rem(1200px);
height: px2rem(133px);
// margin: 0 px2rem(15px);
// padding: px2rem(4px) px2rem(4px);
&-item {
display: inline-block;
width: px2rem(105px);
height: px2rem(107px);
margin: px2rem(3px);
text-align: center;
background:rgba(255,255,255,1);
box-shadow: 0px 1px 6px 0px rgba(0,0,0,0.07);
border-radius: px2rem(3px);
span {
width: 100%;
font-size: px2rem(12px);
}
}
}
}
.lect-img {
position: relative;
top: 0;
left: 0;
img {
width: px2rem(60px);
height: px2rem(60px);
margin-top: px2rem(5px);
border-radius: 50%;
}
span {
display: inline-block;
position: absolute;
left: px2rem(14px);
top: px2rem(25px);
font-size: px2rem(12px);
span {
width: px2rem(50px);
height: px2rem(15px);
line-height: px2rem(15px);
border-radius: px2rem(8px);
font-size: px2rem(13px);
color: #fff;
background: #CEAE67;
}
}
}
}
.tea-list{
.disp-blc {
display: block;
}
.hot-lect-wrapper-title {
display: block;
width: 100%;
overflow: hidden;
height: px2rem(75px);
overflow-x: scroll;
-webkit-tap-highlight-color:rgba(0,0,0,0);
outline: 0;
-webkit-overflow-scrolling : touch;
padding: px2rem(15px);
font-size: px2rem(18px);
font-weight: 500;
color: #333;
}
.tea-listbox{
width: 1100px;
clear: both;
.disp-blc.lect-ks {
position: relative;
left: 0;
top: px2rem(-9px);
font-size: px2rem(12px);
color: #666;
}
.tea-item{
font-size: px2rem(13px);
margin: 0 px2rem(19px) 0 0;
display: inline-block;
.disp-blc.study-num {
position: relative;
float: left;
text-align: center;
.head-pic{
background: #ECECEC;
width: px2rem(50px);
height: px2rem(50px);
border-radius: 50%;
text-align: center;
}
.tea-itemimg{
width: px2rem(50px);
height: px2rem(50px);
border-radius: 50%;
}
.tea-itemname{
color: RGBA(102, 102, 102, 1);
margin-top: px2rem(4px);
font-size: px2rem(13px);
line-height: px2rem(19px);
height: px2rem(19px);
display: inline-block;
}
left: 0;
top: px2rem(-10px);
font-size: px2rem(11px);
color: #999;
}
}
</style>
<template>
<div class="main-body" ref="wrapper">
<section :class="isIntStyle">
<!-- <section class="home-header">
<section class="home-header">
<div class="home-topMenu">
<YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix"/>
</div>
......@@ -12,7 +12,7 @@
</mt-swipe-item>
</mt-swipe>
</div>
</section> -->
</section>
<section class="home-body">
<!--云雀名师-->
......@@ -220,12 +220,12 @@ export default {
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop
// var clientHeight = document.querySelector('#famus-teacher').clientHeight;
// this.scrollTimer = setTimeout(this.scrollEndFun, 200);
if(scrollTop > searchBox && scrollTop < adjustTop){
console.log(scrollTop,searchBox);
this.searchFix = true;
}else{
this.searchFix = false;
}
// if(scrollTop > searchBox && scrollTop < adjustTop){
// console.log(scrollTop,searchBox);
// this.searchFix = true;
// }else{
// this.searchFix = false;
// }
},
// 获取轮播图数据
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册