提交 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 || []
} }
}) })
......
此差异已折叠。
<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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册