提交 c1a375d1 编写于 作者: chendeli's avatar chendeli

add

上级 121e9abc
<template> <template>
<div class="teach-top"> <div class="teach-top">
<span class="back"> <span class="back" @click="goBack">
<img src="../../images/left-icon.png"> <img src="../../images/left-icon.png">
</span> </span>
<div class="tc title">讲师集</div> <div class="tc title">{{parmObj}}</div>
<div class="tc count">290,099,120人学习 23,789,238人关注</div> <div class="tc count" v-if="isShowCount">{{studyCount.toLocaleString()}}人学习&nbsp;&nbsp;&nbsp;&nbsp;{{followCount.toLocaleString()}}人关注</div>
</div> </div>
</template> </template>
...@@ -12,98 +12,37 @@ ...@@ -12,98 +12,37 @@
export default { export default {
data () { data () {
return { return {
parmObj:''
} }
}, },
props:{ props:{
isFixed:{ isShowCount:{
default:false, default:false,
type:Boolean type:Boolean
}, },
followCount:{
type:Number,
default:0
},
studyCount:{
type:Number,
default:0
},
statusBarHeight:{ statusBarHeight:{
type:Number, type:Number,
default:0 default:0
}, },
}, },
mounted(){ mounted(){
this.parmObj = this.isShowCount ? '讲师集' : '讲师之'
///console.log(this.followCount);
}, },
methods: { methods: {
goBack(){
//跳转 this.$router.back(-1);
goToPage(item){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_recommend',
actionCode:'c_course',
labelId:item.id,
labelvalue:item.name,
})
let itemData={
"title":item.name,
"imageUrl":"",
"appModuleInfo":{
"code":"M200",
"type":4,
"name":"课程介绍页",
"paramFlag":1,
"paramList":[
{
"key":"className",
"value":"com.picahealth.yunque.activitys.courseplaynew.CourseIntroduceActivity###WeexCourseIntroViewController",
"type":4,
"seqNo":1
},
{
"key":"courseId",
"value":`${item.id}`,
"type":1,
"seqNo":2
}
]
}
};
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
}, },
//加载数据
getData(type){
let _this = this,
parm = {
pageNo:_this.pageNo,
pageSize:_this.pageSize,
token:_this.token,
setEntry: 'headers'
}
_this.GET('contents/courses/recommendCourseList',parm).then(function(res){
if(res.code === '000000'){
}else{
}
},function(){
})
}
} }
} }
</script> </script>
......
...@@ -24,7 +24,7 @@ module.exports = { ...@@ -24,7 +24,7 @@ module.exports = {
let dataStr = '' let dataStr = ''
let list = []; let list = [];
for (let attr in obj) { for (let attr in obj) {
if (obj.hasOwnProperty(attr)) { if (obj.hasOwnProperty(attr) && attr != 'data') {
list.push(attr + '=' + obj[attr]) list.push(attr + '=' + obj[attr])
} }
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
}); });
//alert(r); //alert(r);
if (e.__rocAndroid) { if (e.__rocAndroid) {
alert(r); // alert(r);
e.__rocAndroid.postMessage(r); e.__rocAndroid.postMessage(r);
// e.__isAndroid = true; // e.__isAndroid = true;
return true; return true;
......
...@@ -128,33 +128,30 @@ export default { ...@@ -128,33 +128,30 @@ export default {
} }
window.__getUserInfo = function(parm){ window.__getUserInfo = function(parm){
// alert("11111");
// alert(parm);
// let params = JSON.parse(parm);
_this.systemType = parm.systemType; _this.systemType = parm.systemType;
_this.appVersion = parm.appVersion; _this.appVersion = parm.appVersion;
_this.userToken = parm.userToken; _this.userToken = parm.userToken;
/// alert(parm.userToken);
if(!!_this.systemType && !!_this.appVersion){ if(!!_this.systemType && !!_this.appVersion){
_this.getSwiper(); _this.getSwiper();
} }
} }
window.__getStatusBarHeight = function(parm){ window.__getStatusBarHeight = function(parm){
_this.statusBarHeight = parm.statusBarHeight _this.statusBarHeight = parm.statusBarHeight
//alert(_this.statusBarHeight)
//alert("状态栏高度"+jp);
} }
}, },
mounted(){ mounted(){
this.listSwiper = [{"picturePath":"https://test-file.yunqueyi.com/image/jpeg/2018/04/18/20180418110556320-5fdbc235.jpg","pictureName":"云鹊医典","pictureIntro":"242","link":"https://test1-phome.yunqueyi.com/psa.js","moduleCode":"M015","type":4,"userRoleList":"R001,R002,R003,R004","params":"0","hasBannerDetail":0,"bannerPicPath":"https://test-file.yunqueyi.com/File/2.jpeg","shareUrl":"","medicalDisplayType":null,"param1":null,"param2":null},{"picturePath":"https://test-file.yunqueyi.com/image/png/2018/09/18/20180918152451538-0e8f6d4e.png","pictureName":"chc大会","pictureIntro":null,"link":"https://test1-phome.yunqueyi.com/chcNew.js","moduleCode":"M025","type":4,"userRoleList":"R001,R002,R003,R004","params":"https://test1-phome.yunqueyi.com/chcNew.js","hasBannerDetail":0,"bannerPicPath":"https://test-file.yunqueyi.comnull","shareUrl":"","medicalDisplayType":null,"param1":"chc大会阿萨德发","param2":"阿萨德飞机看看哈看电视发射的健康发哈思考多久发货咳嗽的好达克赛德啊"},{"picturePath":"https://test-file.yunqueyi.com/image/png/2018/10/16/20181016105038941-a77a2121.png","pictureName":"老年病竞赛","pictureIntro":null,"link":"https://dev-phome.yunqueyi.com/gdcHG.js","moduleCode":"M025","type":4,"userRoleList":"R001,R002,R003,R004","params":"https://dev-phome.yunqueyi.com/gdcHG.js","hasBannerDetail":0,"bannerPicPath":"https://test-file.yunqueyi.comnull","shareUrl":"","medicalDisplayType":null,"param1":null,"param2":null},{"picturePath":"https://test-file.yunqueyi.com/image/png/2018/10/15/20181015105400428-b0715da5.png","pictureName":"眼科专场","pictureIntro":null,"link":"https://test1-phome.yunqueyi.com/ykzc.js","moduleCode":"M025","type":4,"userRoleList":"R001,R002,R003,R004","params":"https://test1-phome.yunqueyi.com/ykzc.js","hasBannerDetail":0,"bannerPicPath":"https://test-file.yunqueyi.comnull","shareUrl":"","medicalDisplayType":null,"param1":null,"param2":null},{"picturePath":"https://test-file.yunqueyi.com/image/jpeg/2018/10/21/20181021141114910-4349f2bb.jfif","pictureName":"大赛","pictureIntro":null,"link":"https://dev-phome.yunqueyi.com/chcNew.js","moduleCode":"M025","type":4,"userRoleList":"R004","params":"https://dev-phome.yunqueyi.com/chcNew.js","hasBannerDetail":0,"bannerPicPath":"https://test-file.yunqueyi.comnull","shareUrl":"","medicalDisplayType":null,"param1":null,"param2":null},{"picturePath":"https://test-file.yunqueyi.com/image/png/2018/08/29/20180829153915489-623841ff.png","pictureName":"让前沿科技助力智慧管理","pictureIntro":null,"link":"https://test1-phome.yunqueyi.com/psa.js","moduleCode":"M025","type":4,"userRoleList":"R001,R002,R003,R004","params":"https://test1-phome.yunqueyi.com/psa.js","hasBannerDetail":0,"bannerPicPath":"https://test-file.yunqueyi.comnull","shareUrl":"","medicalDisplayType":null,"param1":null,"param2":null},{"picturePath":"https://test-file.yunqueyi.com/image/jpeg/2018/10/17/2018101713591225-9fd47e86.jpg","pictureName":"CHC测试大赛风采回顾风采","pictureIntro":null,"link":"https://test-file.yunqueyi.comnull","moduleCode":"M027","type":4,"userRoleList":"R004","params":"0","hasBannerDetail":0,"bannerPicPath":"https://test-file.yunqueyi.comnull","shareUrl":"","medicalDisplayType":null,"param1":"CHC测试大赛风采回顾风采","param2":"2018年8月由中华医学会、国家心血管中心等联合主办的中国心脏大会 (CHC) 在京举行。\n本次大会汇集了国内外心血管领域的顶尖专家,对心血管科各个疾病的最新临床研究进展,做了精彩的学术报告和经验分享。"},{"picturePath":"https://test-file.yunqueyi.com/image/png/2018/10/16/20181016134846454-1b78fd74.png","pictureName":"学霸带你来学习","pictureIntro":null,"link":"https://test-file.yunqueyi.comnull","moduleCode":"M020","type":4,"userRoleList":"R001,R002,R003,R004","params":"https://test1-phome.yunqueyi.com/comp.js","hasBannerDetail":0,"bannerPicPath":"https://test-file.yunqueyi.comnull","shareUrl":"","medicalDisplayType":null,"param1":null,"param2":null},{"picturePath":"https://test-file.yunqueyi.com/image/png/2018/09/27/20180927140657640-d507fd69.png","pictureName":"奥测未来,精准之测","pictureIntro":null,"link":"https://test1-phome.yunqueyi.com/nde.js","moduleCode":"M025","type":4,"userRoleList":"R001,R002,R003,R004","params":"https://test1-phome.yunqueyi.com/nde.js","hasBannerDetail":0,"bannerPicPath":"https://test-file.yunqueyi.comnull","shareUrl":"","medicalDisplayType":null,"param1":null,"param2":null},{"picturePath":"https://test-file.yunqueyi.com/image/jpeg/2018/10/15/2018101513463874-239e7499.jpg","pictureName":"链接测试","pictureIntro":null,"link":"http://10.177.10.121:8080/web/index.html#/gpranking","moduleCode":"","type":1,"userRoleList":"R001,R002,R003,R004","params":"0","hasBannerDetail":0,"bannerPicPath":"https://test-file.yunqueyi.comnull","shareUrl":"","medicalDisplayType":null,"param1":null,"param2":null}]
window.addEventListener('scroll', this.scrollFun); window.addEventListener('scroll', this.scrollFun);
this.getUserInfo(); this.getUserInfo();
this.getStatusHight(); this.getStatusHight();
this.getUpdateData(); this.getUpdateData();
this.getMiddel(); this.getMiddel();
// this.getSwiper();
}, },
beforeDestroyed(){ beforeDestroyed(){
...@@ -350,18 +347,30 @@ export default { ...@@ -350,18 +347,30 @@ export default {
//获取轮播图数据 //获取轮播图数据
getSwiper(){ getSwiper(){
//version=3.7.3&systemType=3&token=364ED1F1C8064CEBABF745CFFFDE18CF // let version = '3.7.3',
// systemType = 3,
// token = '364ED1F1C8064CEBABF745CFFFDE18CF'
let _this = this, let _this = this,
para = { para = {
version:_this.appVersion, version:_this.appVersion,
systemType:_this.systemType, systemType:_this.systemType,
token:_this.userToken token:_this.userToken,
data:{
setEntry: 'headers'
}
} }
//alert("000"); // para = {
// version:version,
this.GET('contents/carusels/home', para).then(res => { // systemType:systemType,
// token:token,
// //setEntry: 'headers',
// data:{
// setEntry: 'headers'
// }
// }
this.API_GET('contents/carusels/home', para).then(res => {
if(res.respCode == '200'){ if(res.respCode == '200'){
///alert("res");
_this.listSwiper = res.pcfList || [] _this.listSwiper = res.pcfList || []
} }
}) })
......
...@@ -4,27 +4,73 @@ ...@@ -4,27 +4,73 @@
<div class="teach-opt"> <div class="teach-opt">
<div class="tea-detail"> <div class="tea-detail">
<div class="head-img">
<img :src="doctorParm.doctor.app_image_url">
</div>
<p class="detail-name">{{doctorParm.doctor.name}}</p>
<p class="detail-intr">
{{doctorParm.doctor.title}}
</p>
<div class="detail-info">
<div class="info-item">
<span class="detail-count">{{doctorParm.studyCount}}</span>
<p>学习人数</p>
</div>
<div class="info-item">
<span class="detail-count">{{doctorParm.followCount}}</span>
<p>关注人数</p>
</div>
</div>
</div> </div>
<div class="teach-title">课程教学</div> <div class="tea-new-title plr15">新课上线</div>
<div class="opt-span"> <div class="tea-new-line plr15">
<span class="">人气 <div class="item-new-box">
<img src="../../images/sort-d.png"> <div class="item-line" v-for="(item,index) in newsList">
<div class="line-img">
<img :src="item.imageUrl">
<span class="tag">{{item.structureName}}</span>
<span class="line-play" @click="goToPage(item)">
<img src="../../images/grey-play.png">
</span>
</div>
<div class="line-name">
{{item.courseName}}
</div>
<div class="line-info">
<span>{{item.publishTime}} | {{item.joinNum}}人已学</span>
<span @click="collectFun(item.favorFlag,item.courseId)" :class="item.favorFlag == 2 ? 'btn collect' : 'btn collected'">
{{item.favorFlag == 2?'收藏':'已收藏'}}
</span>
<!-- <span class='btn collected'>已收藏</span> -->
</div>
</div>
<div class="no-more" v-if="newsList.length == 0">暂无数据</div>
</div>
</div>
<div class="grey-box"></div>
<div class="teach-title plr15">课程教学</div>
<div class="opt-span plr15">
<span class="" @click="sortFun">学习人数
<img src="../../images/sort-d.png" v-if="dir == 2">
<img src="../../images/sort-u.png" v-if="dir == 1">
</span> </span>
</div> </div>
<div class="teach-list"> <div class="teach-list plr15">
<div :class="index%2==1?'list-item mr0':'list-item'" v-for="(item,index) in list"> <div :class="index%2==1?'list-item mr0':'list-item'" v-for="(item,index) in list">
<div class="tea-img"> <div class="tea-img">
<img src="../../images/552064153@2x.png"> <img :src="item.imageUrl">
<span class="learn-p">477人已学</span> <span class="learn-p">{{item.joinNum}}人已学</span>
</div> </div>
<div class="tea-txt"> <div class="tea-txt">
<p class="tea-name">吴金韵</p> <!-- <p class="tea-name">{{item.doctorName}}</p> -->
<div class="tea-position"> <div class="tea-position">
上海复旦大学医学院 {{item.courseName}}
</div> </div>
</div> </div>
</div> </div>
<div class="no-more" v-if="list.length == 0">暂无数据</div>
</div> </div>
</div> </div>
</section> </section>
...@@ -38,24 +84,157 @@ export default { ...@@ -38,24 +84,157 @@ export default {
}, },
data(){ data(){
return { return {
list:[{},{},{}] list:[],
newsList:[],
dir:2,
doctorId:'',
doctorParm:{
studyCount:0,
followCount:0,
doctor:{
app_image_url:'',
name:'',
title:'',
}
}
} }
}, },
mounted(){ mounted(){
this.doctorId = this.$route.query.id;
this.getBaseData();
this.getNewClass();
this.getCourse();
}, },
computed:{ computed:{
}, },
methods:{ methods:{
//跳转
goToPage(item){
let itemData={
"title":item.name,
"imageUrl":"",
"appModuleInfo":{
"code":"M200",
"type":4,
"name":"课程介绍页",
"paramFlag":1,
"paramList":[
{
"key":"className",
"value":"com.picahealth.yunque.activitys.courseplaynew.CourseIntroduceActivity###WeexCourseIntroViewController",
"type":4,
"seqNo":1
},
{
"key":"courseId",
"value":`${item.courseId}`,
"type":1,
"seqNo":2
}
]
}
};
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
collectFun(status,id){
let _this = this,
parm = {
token:this.token,
type:status,
courseId:id,
setEntry: 'headers'
}
_this.POST('contents/favors',parm).then(function(res){
if(res.code === '000000'){
status = status == 1 ? 2 : 1;
_this.handelData(id,status);
}
})
},
handelData(id,status){
let d = this.newsList;
for(let i=0;i<d.length;i++){
if(id == d[i].courseId){
d[i].favorFlag = status;
}
}
},
sortFun(){
this.dir = this.dir == 2 ? 1 : 2;
this.getCourse();
},
//课程教学
getCourse(){
let _this = this,
para = {
token:_this.token,
setEntry: 'headers'
}
let url = '/contents/courseDoctor/courseList/'+_this.doctorId+'/orderby/1/dir/'+_this.dir;
this.GET(url, para).then(res => {
if(res.code == '000000'){
_this.list = res.data || [];
}
})
},
//新课程
getNewClass(){
let _this = this,
para = {
token:_this.token,
setEntry: 'headers'
}
let url = '/contents/courseDoctor/latestCourseList/'+_this.doctorId;
this.GET(url, para).then(res => {
if(res.code == '000000'){
_this.newsList = res.data || [];
}
})
},
//基础信息
getBaseData(){
let _this = this,
para = {
token:_this.token,
setEntry: 'headers'
}
let url = '/contents/courseDoctor/doctorDetail/'+_this.doctorId;
this.GET(url, para).then(res => {
if(res.code == '000000'){
_this.doctorParm = {
followCount:res.data.followCount,
studyCount:res.data.studyCount,
doctor:res.data.doctor
}
}
})
}
} }
} }
</script> </script>
<style> <style>
body{background: #fff} body{background: #fff;height: auto;}
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
body{background: #fff} body{background: #fff}
...@@ -71,26 +250,174 @@ body{background: #fff} ...@@ -71,26 +250,174 @@ body{background: #fff}
@include sc(0.6rem, #666); @include sc(0.6rem, #666);
} }
.tea-detail{ .tea-detail{
height: px2rem(127px); height: px2rem(154px);
position: absolute; position: absolute;
width: 100%; width: 100%;
left: 0; left: 0;
top:-(px2rem(77px)); top:-(px2rem(64px));
z-index: 10; z-index: 10;
@include bis('../../images/detaiBg.png'); @include bis('../../images/detaiBg.png');
.head-img{
width: px2rem(45px);
height: px2rem(45px);
border-radius: 100%;
margin: -(px2rem(10px)) auto 0;
background: #D8D8D8;
text-align: center;
img{
width: px2rem(35px);
height: px2rem(38px);
margin-top:px2rem(5px);
border-radius: 50%;
}
}
.detail-name{
margin-top:px2rem(3px);
line-height: px2rem(20px);
font-size: px2rem(14px);
color:#333;
text-align: center;
}
.detail-intr{
text-align: center;
line-height: px2rem(17px);
font-size: px2rem(12px);
color:#666;
}
.detail-info{
overflow: hidden;
margin-top: px2rem(12px);
.info-item{
width: 50%;
float: left;
text-align: center;
span{
line-height: px2rem(20px);
font-size: px2rem(14px);
color:#333;
}
p{
line-height: px2rem(17px);
font-size: px2rem(12px);
color:#666;
}
}
}
} }
.tea-new-title{
font-size: px2rem(18px);
margin: px2rem(15px) 0;
color:#333;
}
.tea-new-line.plr15{padding-left:px2rem(17px);}
.tea-new-line{
width: 100%;
overflow: hidden;
overflow-x: scroll;
-webkit-tap-highlight-color:rgba(0,0,0,0);
outline: 0;
-webkit-overflow-scrolling : touch;
.item-new-box{
width: px2rem(1000px);
}
.item-line{
width: px2rem(345px);
padding-bottom: px2rem(23px);
float: left;
margin-right: px2rem(10px);
.line-img{
width: px2rem(345px);
height: px2rem(191px);
position: relative;
.line-play{
position: absolute;
width: px2rem(60px);
height: px2rem(60px);
left:50%;
top:50%;
margin:-(px2rem(30px)) 0 0 -(px2rem(30px));
}
.tag{
display: inline-block;
background: #fff;
border:1px solid #C3DCFB;
position: absolute;
top:px2rem(5px);
left: px2rem(5px);
font-size: px2rem(10px);
line-height: px2rem(16px);
padding: 0 px2rem(10px);
border-radius: px2rem(2px);
color:#4A87D4;
}
img{
width: 100%;
height:100%;
}
}
.line-name{
margin-top: px2rem(10px);
font-size: px2rem(16px);
line-height: px2rem(16px);
width: 100%;
overflow: hidden;
height: px2rem(16px);
color:#333;
}
.line-info{
overflow: hidden;
margin-top: px2rem(10px);
span{
display: inline-block;
font-size: px2rem(12px);
color: #999;
line-height: px2rem(18px);
float: left;
}
.btn{
color:#666;
background: #F7F8F9;
padding: 0 px2rem(5px);
float: right;
margin-right: px2rem(5px);
}
.collected{
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
}
}
.grey-box{
width: 100%;
height: px2rem(6px);
background: #F8F8F8;
}
.plr15{
padding-right: px2rem(15px);
padding-left: px2rem(15px);
}
.teach-opt{ .teach-opt{
padding:px2rem(26px) px2rem(15px) px2rem(15px) px2rem(15px); padding:px2rem(90px) 0 px2rem(30px) 0;
position: relative; position: relative;
.teach-title{ .teach-title{
font-size: px2rem(18px); font-size: px2rem(18px);
padding-bottom: px2rem(15px); padding-bottom: px2rem(15px);
padding-top: px2rem(15px);
color:#333; color:#333;
} }
.teach-list{ .teach-list{
overflow: hidden; overflow: hidden;
} }
.no-more{
text-align: center;
color:#999;
font-size: px2rem(12px);
}
.opt-span{ .opt-span{
span{ span{
color:#449284; color:#449284;
...@@ -124,7 +451,7 @@ body{background: #fff} ...@@ -124,7 +451,7 @@ body{background: #fff}
.tea-img{ .tea-img{
width: px2rem(170px); width: px2rem(170px);
height: px2rem(83px); height: px2rem(96px);
position: relative; position: relative;
img{ img{
...@@ -156,9 +483,10 @@ body{background: #fff} ...@@ -156,9 +483,10 @@ body{background: #fff}
padding: px2rem(7px) 0 px2rem(3px) 0; padding: px2rem(7px) 0 px2rem(3px) 0;
} }
.tea-position{ .tea-position{
height: px2rem(30px); height: px2rem(38px);
font-size: px2rem(12px); font-size: px2rem(14px);
line-height: px2rem(15px); line-height: px2rem(19px);
color:#333;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
......
<template> <template>
<section class="font-style"> <section class="font-style">
<teacherTop></teacherTop> <teacherTop :isShowCount="isShowCount" :studyCount="studyCount" :followCount="followCount"></teacherTop>
<div class="teach-opt"> <div class="teach-opt">
<div class="teach-title">讲师名录</div> <div class="teach-title">讲师名录</div>
<div class="opt-span"> <div class="opt-span">
<span class="">人气 <span class="" @click="sortFun">人气
<img src="../../images/sort-d.png"> <img src="../../images/sort-d.png" v-if="dir == 1">
<img src="../../images/sort-u.png" v-if="dir == 2">
</span> </span>
</div> </div>
<div class="teach-list"> <div class="teach-list">
<div :class="index%2==1?'list-item mr0':'list-item'" v-for="(item,index) in list"> <div :class="index%2==1?'list-item mr0':'list-item'" v-for="(item,index) in list" @click="goToDetail(item.doctorId)">
<div class="tea-img"> <div class="tea-img">
<img src="../../images/552064153@2x.png"> <img :src="item.doctorImg">
<span class="learn-p">477人已学</span> <span class="learn-p">{{item.joinNum}}人已学</span>
</div> </div>
<div class="tea-txt"> <div class="tea-txt">
<p class="tea-name">吴金韵</p> <p class="tea-name">{{item.doctorName}}</p>
<div class="tea-position"> <div class="tea-position">
上海复旦大学医学院 {{item.doctorHospital}}
</div> </div>
</div> </div>
</div> </div>
...@@ -34,17 +35,53 @@ export default { ...@@ -34,17 +35,53 @@ export default {
}, },
data(){ data(){
return { return {
list:[{},{},{}] list:[{},{},{}],
isShowCount:true,
followCount:0,
studyCount:0,
col:1, //0综合,1人气,2资源数,3姓名首字母
dir:2,//1:正序 2:逆序
} }
}, },
mounted(){ mounted(){
this.getData();
}, },
computed:{ computed:{
}, },
methods:{ methods:{
goToDetail(id){
this.$router.push({
path: '/teachersDetail',
query:{
id:id
}
})
},
//排序
sortFun(){
this.dir = this.dir == 1 ? 2 : 1;
this.getData()
},
getData(){
let _this = this,
para = {
token:_this.token,
setEntry: 'headers'
}
let url = '/contents/courseDoctor/getAllTeacher/orderby/'+_this.col+'/dir/'+_this.dir
this.GET(url, para).then(res => {
if(res.code == '000000'){
_this.list = res.data.teacherList || [];
_this.followCount = res.data.followCount || 0;
_this.studyCount = res.data.studyCount || 0;
}
})
}
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册