提交 3954c1f3 编写于 作者: guangjun.yang's avatar guangjun.yang

Merge branch 'Branch_tag-app-1128-sousuo' of...

Merge branch 'Branch_tag-app-1128-sousuo' of http://192.168.110.53/com.pica.cloud.education.frontend/pica.cloud.web-app into Branch_tag-app-1128-sousuo
{
"editor.fontSize": 18
}
\ No newline at end of file
......@@ -18,8 +18,8 @@ var webpackConfig = merge(baseWebpackConfig, {
//devtool: config.build.productionSourceMap ? '#source-map' : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].js'),
chunkFilename: utils.assetsPath('js/[name].[chunkhash].min.js')
filename: utils.assetsPath('js/[name].js?chunkhash=[chunkhash]'),
chunkFilename: utils.assetsPath('js/[name].[chunkhash].min.js?chunkhash=[chunkhash]')
},
vue: {
loaders: utils.cssLoaders({
......
......@@ -21,7 +21,7 @@ module.exports = {
env: {
NODE_ENV: '"development"'
},
port: 8009,
port: 8019,
assetsSubDirectory: 'static',
assetsPublicPath: '/',
// proxyTable: {
......
无法预览此类型文件
<template>
<div class="cource-teach" id="adjust-u">
<div :class="isFixed ? 'cource-header fixed' : 'cource-header'" :style="{height:menuptop}">
<div class="fixBox">
<div class="bgFill" :style="{height:ptop}"></div>
<div class="font-title">
{{title}}
</div>
</div>
</div>
<div class="couse-cont">
<div class="couse-list" v-infinite-scroll="loadMore" infinite-scroll-disabled="loading" infinite-scroll-distance="10" :style="'height:'+clientHeight">
<div :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index" v-for="(item,index) in list">
<div class="course-pic" @click="goToPage(item)">
<img v-lazy="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
<p class="course-txt">
{{item.name}}
</p>
<div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}}
</span>
</div>
</div>
</div>
<div class="loading-box" >
<span class="loading-more-txt" v-if="isLoading">努力加载中...</span>
<span class="no-more" v-if="noMore">没有更多了......</span>
</div>
</div>
<!-- <LOADING v-if="isShowLoading"></LOADING> -->
</div>
</template>
<script>
import { Loadmore,Spinner,InfiniteScroll } from 'mint-ui';
// import { setEventByModuleCode } from '@/utils/index'
// import LOADING from '../../components/common/loading-new';
export default {
data () {
return {
list:[],
pageNo:2,
isDisabled:false,
pageSize:10,
title:'为您推荐',
isCollected:'',
allLoaded:true,
loading:false,//是否滚动加载
isLoading:false,//加载中
noMore:false,
clientHeight:'auto',
isShowLoading:true,
menuHeight:0,
ptop:20,
popHeight:0,
menuptop:0,
isReauestBack:true,
}
},
props:{
isFixed:{
default:false,
type:Boolean
},
statusBarHeight:{
type:Number,
default:0
},
adjustPageNo:{
type:Number,
default:1
},
userToken:{
type:String,
default:''
},
parmData:{
type:Array,
default:[]
},
},
mounted(){
this.list = this.parmData;
this.$store.dispatch("setSource", []);
//this.pageNo = this.adjustPageNo;
// if(window.__isAndroid){
// this.popHeight = this.statusBarHeight/2
// }else{
// this.popHeight = this.statusBarHeight
// }
// this.menuHeight = this.popHeight + 7 + 40 + "px";
// this.ptop = this.popHeight + "px";
// this.getData();
},
created(){
let _this = this;
window.__getStatusBarHeight = function(parm){
if(window.__isAndroid){
_this.popHeight = parseInt(parm.statusBarHeight)/2
}else{
_this.popHeight = parm.statusBarHeight
}
_this.ptop = _this.popHeight+'px';
_this.menuptop = _this.popHeight+36+'px'
///alert(_this.menuptop);
}
this.getStatusHight()
},
watch:{
},
components:{
// LOADING
},
methods: {
getStatusHight(){
rocNative.getStatusBarHeight({
__funcName: '__getStatusBarHeight'
})
},
//跳转
goToPage(item){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_recommend',
actionCode:'c_course',
labelId:item.id,
labelValue :item.name,
})
this.pageNo = 1;
this.$emit("setRefrshParm",{isclick:true})
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
})
},
//滑动加载更多
loadMore(){
let _this = this;
if(_this.isReauestBack){
_this.isLoading = true;
//埋点
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_recommend',
actionCode:'c_load_more'
})
setTimeout(()=>{
_this.getData('loadMore');
},500)
}
},
//收藏 取消收藏
collectFun(status,id,name){
// alert(this.userToken);
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_recommend',
actionCode:'c_collect',
labelId:id,
labelValue :name,
})
let _this = this,
parm = {
token:_this.userToken,
type:status,
courseId:id,
setEntry: 'headers',
data:{
token:_this.userToken,
}
}
/// alert(this.token)
_this.POST('contents/favors',parm).then(function(res){
if(res.code === '000000'){
_this.handelData(id,status);
}else{
//alert(res.message);
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
})
},
handelData(id,status){
let d = this.list;
for(let i=0;i<d.length;i++){
if(id == d[i].id){
d[i].whetherFavors = status;
}
}
},
//加载数据
getData(type){
let _this = this,
parm = {
pageNo:_this.pageNo,
pageSize:_this.pageSize,
token:_this.userToken,
setEntry: 'headers'
}
_this.GET('contents/courses/recommendCourseList',parm).then(function(res){
if(res.code === '000000'){
if(res.data == null || res.data.length == 0){
res.data = [];
_this.isLoading = false;
_this.noMore = true;
_this.loading = true;
_this.isReauestBack = false;
}else{
_this.isReauestBack = true;
_this.list = [..._this.list ,...res.data];
_this.isLoading = true;
_this.noMore = false;
_this.loading = false;
_this.pageNo += 1;
}
}
})
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
img {
@include bis('../../images/evaluatBg.png');
}
.ellipsis{
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.couse-list{
overflow: hidden;
}
.bgFill{
background: inherit;
height: px2rem(20px);
}
.cource-teach .cource-header,.couse-cont{
padding:0 px2rem(15px);
}
.couse-cont{
}
.fixBox{
}
.cource-header{
/* margin: 0 0 px2rem(11px) 0;*/
/*height: px2rem(45px);*/
margin-bottom: px2rem(15px);
.font-title{
line-height: px2rem(36px);
height: px2rem(36px);
background: #fff;
}
}
.loading-box{
font-size: px2rem(16px);
padding:px2rem(10px) 0 px2rem(20px) 0;
text-align: center;
span{
color:#999;
}
}
.change-part{
margin-top:px2rem(10px);
float: right;
font-size:px2rem(11px);
line-height: px2rem(11px);
border:1px solid #A9AEB7;
border-radius: px2rem(9px);
vertical-align: middle;
padding: px2rem(3px) px2rem(5px) px2rem(4px) px2rem(6px);
img{
width: px2rem(12px);
height: px2rem(12px);
}
}
.fixed{
.fixBox{
position: fixed;
top:0;
left: 0;
width: 100%;
z-index: 112;
.font-title{
background: #44A99B;
padding:0 px2rem(15px);
color:#fff;
}
}
.bgFill{
background: #44A99B;
}
}
.course-item{
float: left;
margin-bottom: px2rem(19px);
margin-right: px2rem(5px);
}
.end-left{
margin-right: 0;
}
.course-pic{
width:px2rem(170px);
height:px2rem(95px);
border-radius: px2rem(3px);
position: relative;
.pic-tec{
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px);
}
.course-tag{
position: absolute;
display: inline-block;
top:px2rem(5px);
left: px2rem(5px);
line-height: px2rem(16px);
height:px2rem(16px);
color:#4A87D4;
padding: 0 px2rem(3px);
background: #FAFCFF;
border:1px solid #C3DCFB;
font-size: px2rem(10px);
border-radius: px2rem(2px);
}
}
.course-txt{
margin-top: px2rem(5px);
font-size: px2rem(14px);
line-height: px2rem(19px);
max-height: px2rem(38px);
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.course-opt{
font-size: px2rem(12px);
position: relative;
/*margin-top: px2rem(6px);*/
.opt-info{
color:#999;
}
.opt{
display: inline-block;
height: px2rem(18px);
line-height: px2rem(18px);
padding:0 px2rem(4px);
position: absolute;
right: 0;
top:0;
}
.collect{
background: #F7F8F9;
color: #666;
}
.collected{
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
.font-title{
font-size: px2rem(18px);
font-weight: bold;
color: #28344C
}
.title{
font-size: px2rem(16px);
text-align: left;
width: px2rem(170px);
max-height: px2rem(20px);
}
</style>
<template>
<div class="cource-teach" id="adjust-u">
<div :class="isFixed ? 'cource-header fixed' : 'cource-header'" :style="{height:menuptop}">
<div class="fixBox">
<div class="bgFill" :style="{height:ptop}"></div>
<div class="font-title">
{{title}}
</div>
</div>
</div>
<div class="couse-cont">
<div class="couse-list" v-infinite-scroll="loadMore" infinite-scroll-disabled="loading" infinite-scroll-distance="10" :style="'height:'+clientHeight">
<div :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index" v-for="(item,index) in list">
<div class="course-pic" @click="goToPage(item)">
<img :src="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
<p class="course-txt">
{{item.name}}
</p>
<div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}}
</span>
</div>
</div>
</div>
<div class="loading-box">
<span class="loading-more-txt" v-if="isLoading">努力加载中...</span>
<span class="no-more" v-if="noMore">没有更多了......</span>
</div>
</div>
<!-- <LOADING v-if="isShowLoading"></LOADING> -->
</div>
</template>
<script>
import {
Loadmore,
Spinner,
InfiniteScroll
} from 'mint-ui';
// import { setEventByModuleCode } from '@/utils/index'
// import LOADING from '../../components/common/loading-new';
export default {
data() {
return {
list: [],
pageNo: 2,
isDisabled: false,
pageSize: 10,
title: '为您推荐',
isCollected: '',
allLoaded: true,
loading: false, //是否滚动加载
isLoading: false, //加载中
noMore: false,
clientHeight: 'auto',
isShowLoading: true,
menuHeight: 0,
ptop: 20,
popHeight: 0,
menuptop: 0,
isReauestBack: true,
}
},
props: {
isFixed: {
default: false,
type: Boolean
},
statusBarHeight: {
type: Number,
default: 0
},
adjustPageNo: {
type: Number,
default: 1
},
userToken: {
type: String,
default: ''
},
parmData: {
type: Array,
default: () => []
},
},
mounted() {
this.list = this.parmData;
this.$store.dispatch("setSource", []);
//this.pageNo = this.adjustPageNo;
// if(window.__isAndroid){
// this.popHeight = this.statusBarHeight/2
// }else{
// this.popHeight = this.statusBarHeight
// }
// this.menuHeight = this.popHeight + 7 + 40 + "px";
// this.ptop = this.popHeight + "px";
// this.getData();
},
created() {
let _this = this;
window.__getStatusBarHeight = function (parm) {
if (window.__isAndroid) {
_this.popHeight = parseInt(parm.statusBarHeight) / 2
} else {
_this.popHeight = parm.statusBarHeight
}
_this.ptop = _this.popHeight + 'px';
_this.menuptop = _this.popHeight + 36 + 'px'
}
this.getStatusHight()
},
watch: {
},
components: {
// LOADING
},
methods: {
getStatusHight() {
rocNative.getStatusBarHeight({
__funcName: '__getStatusBarHeight'
})
},
//跳转
goToPage(item) {
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_recommend',
actionCode: 'c_course',
labelId: item.id,
labelValue: item.name,
})
this.pageNo = 1;
this.$emit("setRefrshParm", {
isclick: true
})
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
})
},
//滑动加载更多
loadMore() {
let _this = this;
if (_this.isReauestBack) {
_this.isLoading = true;
//埋点
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_recommend',
actionCode: 'c_load_more'
})
setTimeout(() => {
_this.getData('loadMore');
}, 500)
}
},
//收藏 取消收藏
collectFun(status, id, name) {
// alert(this.userToken);
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_recommend',
actionCode: 'c_collect',
labelId: id,
labelValue: name,
})
let _this = this,
parm = {
token: _this.userToken,
type: status,
courseId: id,
setEntry: 'headers',
data: {
token: _this.userToken,
}
}
/// alert(this.token)
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
_this.handelData(id, status);
} else {
//alert(res.message);
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
})
},
handelData(id, status) {
let d = this.list;
for (let i = 0; i < d.length; i++) {
if (id == d[i].id) {
d[i].whetherFavors = status;
}
}
},
//加载数据
getData(type) {
let _this = this,
parm = {
pageNo: _this.pageNo,
pageSize: _this.pageSize,
token: _this.userToken,
setEntry: 'headers'
}
_this.GET('contents/courses/recommendCourseList', parm).then(function (res) {
if (res.code === '000000') {
if (res.data == null || res.data.length == 0) {
res.data = [];
_this.isLoading = false;
_this.noMore = true;
_this.loading = true;
_this.isReauestBack = false;
} else {
_this.isReauestBack = true;
_this.list = [..._this.list, ...res.data];
_this.isLoading = true;
_this.noMore = false;
_this.loading = false;
_this.pageNo += 1;
}
}
})
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
img {
@include bis('../../images/evaluatBg.png');
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.couse-list {
overflow: hidden;
}
.bgFill {
background: inherit;
height: px2rem(20px);
}
.cource-teach .cource-header,
.couse-cont {
padding: 0 px2rem(15px);
}
.couse-cont {}
.fixBox {}
.cource-header {
/* margin: 0 0 px2rem(11px) 0;*/
/*height: px2rem(45px);*/
margin-bottom: px2rem(15px);
.font-title {
line-height: px2rem(36px);
height: px2rem(36px);
background: #fff;
}
}
.loading-box {
font-size: px2rem(16px);
padding: px2rem(10px) 0 px2rem(20px) 0;
text-align: center;
span {
color: #999;
}
}
.change-part {
margin-top: px2rem(10px);
float: right;
font-size: px2rem(11px);
line-height: px2rem(11px);
border: 1px solid #A9AEB7;
border-radius: px2rem(9px);
vertical-align: middle;
padding: px2rem(3px) px2rem(5px) px2rem(4px) px2rem(6px);
img {
width: px2rem(12px);
height: px2rem(12px);
}
}
.fixed {
.fixBox {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 112;
.font-title {
background: #44A99B;
padding: 0 px2rem(15px);
color: #fff;
}
}
.bgFill {
background: #44A99B;
}
}
.course-item {
float: left;
margin-bottom: px2rem(19px);
margin-right: px2rem(5px);
}
.end-left {
margin-right: 0;
}
.course-pic {
width: px2rem(170px);
height: px2rem(95px);
border-radius: px2rem(3px);
position: relative;
.pic-tec {
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px);
}
.course-tag {
position: absolute;
display: inline-block;
top: px2rem(5px);
left: px2rem(5px);
line-height: px2rem(16px);
height: px2rem(16px);
color: #4A87D4;
padding: 0 px2rem(3px);
background: #FAFCFF;
border: 1px solid #C3DCFB;
font-size: px2rem(10px);
border-radius: px2rem(2px);
}
}
.course-txt {
margin-top: px2rem(5px);
font-size: px2rem(14px);
line-height: px2rem(19px);
max-height: px2rem(38px);
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.course-opt {
font-size: px2rem(12px);
position: relative;
/*margin-top: px2rem(6px);*/
.opt-info {
color: #999;
}
.opt {
display: inline-block;
height: px2rem(18px);
line-height: px2rem(18px);
padding: 0 px2rem(4px);
position: absolute;
right: 0;
top: 0;
}
.collect {
background: #F7F8F9;
color: #666;
}
.collected {
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
.font-title {
font-size: px2rem(18px);
font-weight: bold;
color: #28344C
}
.title {
font-size: px2rem(16px);
text-align: left;
width: px2rem(170px);
max-height: px2rem(20px);
}
</style>
......@@ -5,19 +5,19 @@
<!--展示形式 左一 右二-->
<div class="teacher-item space-between">
<div class="category-left" @click="goToPage(leftObj)">
<img class="category-img" v-lazy="leftObj.imageUrl"/>
<img class="category-img" :src="leftObj.imageUrl"/>
</div>
<div class="category-right">
<div class="right-img" @click="goToPage(rightTop)">
<img class="category-img" v-lazy="rightTop.imageUrl"/>
<img class="category-img" :src="rightTop.imageUrl"/>
</div>
<div class="right-img mt5" @click="goToPage(rightBottom)">
<img class="category-img" v-lazy="rightBottom.imageUrl"/>
<img class="category-img" :src="rightBottom.imageUrl"/>
</div>
</div>
</div>
<div class="holder-img" @click="goToPage(rightBp)">
<img v-lazy="rightBp.imageUrl" class="category-img"/>
<img :src="rightBp.imageUrl" class="category-img"/>
</div>
</div>
</template>
......
......@@ -5,19 +5,19 @@
<!--展示形式 左一 右二-->
<div class="teacher-item space-between">
<div class="category-left" @click="goToPage(parmData[0])">
<img class="category-img" v-lazy="parmData[0].imageUrl"/>
<img class="category-img" :src="parmData[0].imageUrl"/>
</div>
<div class="category-right">
<div class="right-img" @click="goToPage(parmData[1])">
<img class="category-img" v-lazy="parmData[1].imageUrl"/>
<img class="category-img" :src="parmData[1].imageUrl"/>
</div>
<div class="right-img mt5" @click="goToPage(parmData[2])">
<img class="category-img" v-lazy="parmData[2].imageUrl"/>
<img class="category-img" :src="parmData[2].imageUrl"/>
</div>
</div>
</div>
<div class="holder-img" @click="goToPage(parmData[3])">
<img v-lazy="parmData[3].imageUrl" class="category-img"/>
<img :src="parmData[3].imageUrl" class="category-img"/>
</div>
</div>
</template>
......
<template>
<div class="hot-teacher" >
<div class="space-between" id="fiveBoxMenu">
<img class="img" src="../../images/mins.png"/>
<div @click="goToPage('')" class="five-more gray fs11">
更多<img src="../../images/right-throw.png" class="thorw-icon"/>
<div class="hot-teacher">
<div class="space-between" id="fiveBoxMenu">
<img class="img" src="../../images/mins.png"/>
<div @click="goToPage('')" class="five-more gray fs11">
更多<img src="../../images/right-throw.png" class="thorw-icon"/>
</div>
</div>
<div :class="index>1 && (index+1 == list.length)?'teacher-item item-end' : 'teacher-item'" :key="index" v-for="(item,index) in list" @click="goToPage(item)">
<div class="teacher-itemimg">
<img v-lazy="item.appImageUrl"/>
<img :src="item.appImageUrl"/>
</div>
<div class="five-text">
<div class="teacher-itemname fs14">{{item.title}}</div>
<div class="five-tag fs11">
<span class="m-tag">#{{item.categoryName}}</span>
<span class="m-play" @click.stop="playFun(item)">
<div class="five-text">
<div class="teacher-itemname fs14">{{item.title}}</div>
<div class="five-tag fs11">
<span class="m-tag">#{{item.categoryName}}</span>
<span class="m-play" @click.stop="playFun(item)">
<div class="play-opt play-start" v-show="item['play'] =='1'">
<span></span>
<span></span>
<span></span>
</div>
<div class="play-opt play-stop" v-show="item.play == '2'">
<span></span>
<span></span>
<span></span>
</div>
<img class="five-radio" src="../../images/play.png" v-if="item.play == '0'"/>
<span></span>
<span></span>
</div>
<div class="play-opt play-stop" v-show="item.play == '2'">
<span></span>
<span></span>
<span></span>
</div>
<img class="five-radio" src="../../images/play.png" v-if="item.play == '0'"/>
</span>
</div>
</div>
</div>
</div>
</template>
<script>
import { pageJumpUrl} from '@/utils/index'
import {
pageJumpUrl
} from '@/utils/index'
export default {
name: 'YqyFiveMinutes',
data(){
data() {
return {
list:[],
isPlay:false,
id:''
list: [],
isPlay: false,
id: ''
}
},
props:{
parmData:{
type:Array,
default:[]
props: {
parmData: {
type: Array,
default: () => []
}
},
created(){
created() {
let _this = this;
//暂停
window.__pauseAudioView = function(parm){
window.__pauseAudioView = function (parm) {
_this.changePlay(_this.id,'2');
_this.changePlay(_this.id, '2');
}
//开始
window.__playAudioView = function(parm){
_this.changePlay(_this.id,'1');
window.__playAudioView = function (parm) {
_this.changePlay(_this.id, '1');
}
window.__closeAudioView = function(parm){
_this.changePlay(_this.id,'0');
window.__closeAudioView = function (parm) {
_this.changePlay(_this.id, '0');
}
},
mounted(){
},
mounted() {
//console.log(this.parmData);
this.list = this.parmData;
},
methods: {
goToPage(item){
goToPage(item) {
let obj = {
}
///console.log(item);
let url = pageJumpUrl();
// console.log(url.pageListUrl);
let itemData={
"imageUrl":"",
"appModuleInfo":{
"code":"M200",
"type":4,
"name":"课程介绍页",
"paramFlag":1,
"paramList":[]
// console.log(url.pageListUrl);
let itemData = {
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": []
}
};
if(!!item){
if (!!item) {
obj = {
menuLevel:1,
menuCode:'m_home',
functionCode:'f_five_minutes',
actionCode:'c_content',
labelId:item.id,
labelValue :item.title,
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_content',
labelId: item.id,
labelValue: item.title,
}
itemData.title = item.name;
itemData.appModuleInfo["paramList"] = [
{
"key":"className",
"value":'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type":4,
"seqNo":1
itemData.appModuleInfo["paramList"] = [{
"key": "className",
"value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
},
{
"key":"id",
"value":`${item.id}`,
"type":1,
"seqNo":2
"key": "id",
"value": `${item.id}`,
"type": 1,
"seqNo": 2
}
]
}else{
} else {
obj = {
menuLevel:1,
menuCode:'m_home',
functionCode:'f_five_minutes',
actionCode:'c_all'
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_all'
}
itemData.appModuleInfo.paramList = [
{
"key":"className",
"value":'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type":4,
"seqNo":1
}
]
itemData.appModuleInfo.paramList = [{
"key": "className",
"value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
}]
}
this.pageBurialPoin(obj)
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
changePlay(id,str){
changePlay(id, str) {
//play : 1播放 2:暂停 0:初始状态
for(let i=0;i<this.list.length;i++){
if(id == this.list[i].id){
if(str == '1'){
for (let i = 0; i < this.list.length; i++) {
if (id == this.list[i].id) {
if (str == '1') {
this.list[i].play = '1';
}else if(str == '2'){
} else if (str == '2') {
this.list[i].play = '2';
// alert(str)
}else if(str == '0'){
// alert(str)
} else if (str == '0') {
this.list[i].play = '0';
}
}else{
} else {
this.list[i].play = '0';
}
}
},
playFun(item){
playFun(item) {
this.id = item.id;//保存id
this.changePlay(item.id,'1');
this.id = item.id; //保存id
this.changePlay(item.id, '1');
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_five_minutes',
actionCode:'c_play',
labelId:item.id,
labelValue :item.title,
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_play',
labelId: item.id,
labelValue: item.title,
})
rocNative.openFiveMintusAudio({
categoryName: item.categoryName,
......@@ -185,37 +184,41 @@ export default {
id: item.id,
filePath: item.filePath,
title: item.title,
size:item.size,
size: item.size,
isPlay: true,
fileType: item.fileType,
totalTime: item.totalTime
})
}
},
}
</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{
.hot-teacher {
width: 100%;
background-color: #fff;
padding: 0 px2rem(15px) 0;
margin-top:px2rem(15px);
.img{
margin-top: px2rem(15px);
.img {
width: px2rem(109px);
height: px2rem(22px);
}
.thorw-icon{
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.five-more{
.five-more {
border: 1px solid RGBA(169, 174, 183, 1);
border-radius: px2rem(16px);
height: px2rem(16px);
......@@ -223,148 +226,192 @@ export default {
padding: 0 px2rem(5px) 0 px2rem(6px);
vertical-align: middle;
}
.teacher-item{
.teacher-item {
width: 100%;
height: px2rem(85px);
position: relative;
margin-top: px2rem(20px);
&:not(:last-child){
&:not(:last-child) {
border-bottom: 1px solid RGBA(240, 240, 240, 1);
}
.teacher-itemimg{
.teacher-itemimg {
width: px2rem(60px);
height: px2rem(60px);
border-radius: px2rem(3px);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(0, 78, 64, 0.1);
float: left;
img{
width:100%;
img {
width: 100%;
height: 100%;
display: inline-block;
border-radius: px2rem(3px);
}
}
.five-text{
margin-left:px2rem(70px);
.five-text {
margin-left: px2rem(70px);
height: px2rem(38px);
}
.teacher-itemname{
.teacher-itemname {
color: RGBA(102, 102, 102, 1);
height: px2rem(38px);
line-height: px2rem(19px);
font-size: px2rem(14px);
margin-bottom: px2rem(5px);
}
.five-tag{
.five-tag {
position: relative;
padding-right: px2rem(25px);
.m-tag{
.m-tag {
height: px2rem(17px);
line-height: px2rem(17px);
padding: 0 px2rem(5px);
color: #BF9E15;
border-radius: 0 px2rem(3px) px2rem(3px) px2rem(3px);
background: #FFFDFA;
/* background-color: px2rem(17px);*/
border:1px solid #FAE5AF;
/* background-color: px2rem(17px);*/
border: 1px solid #FAE5AF;
}
}
.m-play{
.m-play {
width: px2rem(28px);
height: px2rem(28px);
display: inline-block;
position:absolute;
position: absolute;
right: 0;
bottom: 0;
.play-stop{
}
.play-opt{
position:relative;
.play-stop {}
.play-opt {
position: relative;
width: px2rem(28px);
height: px2rem(28px);
border:1px solid #56c3bb;
border-radius:50%;
span{
width:px2rem(3px);
border: 1px solid #56c3bb;
border-radius: 50%;
span {
width: px2rem(3px);
height: px2rem(5px);
bottom:px2rem(5px);
position:absolute;
background:#56c3bb;
bottom: px2rem(5px);
position: absolute;
background: #56c3bb;
border-radius: 2px 2px 0 0;
}
}
.play-stop{
span:first-child{
left:px2rem(8px);
.play-stop {
span:first-child {
left: px2rem(8px);
height: px2rem(5px);
}
span:nth-child(2){
left:px2rem(12px);
height: px2rem(15px);
span:nth-child(2) {
left: px2rem(12px);
height: px2rem(15px);
}
span:nth-child(3){
left:px2rem(16px);
height: px2rem(10px);
span:nth-child(3) {
left: px2rem(16px);
height: px2rem(10px);
}
}
.play-start{
span{
-webkit-animation: bodong 0.5s infinite ease-in-out alternate;
animation: bodong 0.5s infinite ease-in-out alternate;
.play-start {
span {
-webkit-animation: bodong 0.5s infinite ease-in-out alternate;
animation: bodong 0.5s infinite ease-in-out alternate;
}
span:first-child{
left:px2rem(8px);
-webkit-animation-delay:.1s;
animation-delay:.1s;
span:first-child {
left: px2rem(8px);
-webkit-animation-delay: .1s;
animation-delay: .1s;
}
span:nth-child(2){
left:px2rem(12px);
-webkit-animation-delay:.3s;
animation-delay:.3s;
span:nth-child(2) {
left: px2rem(12px);
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
span:nth-child(3){
left:px2rem(16px);
-webkit-animation-delay:.5s;
animation-delay:.5s;
span:nth-child(3) {
left: px2rem(16px);
-webkit-animation-delay: .5s;
animation-delay: .5s;
}
@-webkit-keyframes bodong{
0%{height:px2rem(5px); }
30%{height:px2rem(10px);}
60%{height:px2rem(15px);}
80%{height:px2rem(10px);}
100%{height:px2rem(5px);}
@-webkit-keyframes bodong {
0% {
height: px2rem(5px);
}
30% {
height: px2rem(10px);
}
60% {
height: px2rem(15px);
}
80% {
height: px2rem(10px);
}
100% {
height: px2rem(5px);
}
}
@keyframes bodong{
0%{height:px2rem(5px); }
30%{height:px2rem(10px);}
60%{height:px2rem(15px);}
80%{height:px2rem(10px);}
100%{height:px2rem(5px);}
@keyframes bodong {
0% {
height: px2rem(5px);
}
30% {
height: px2rem(10px);
}
60% {
height: px2rem(15px);
}
80% {
height: px2rem(10px);
}
100% {
height: px2rem(5px);
}
}
}
img{
img {
width: 100%;
height: 100%;
display: block;
}
}
}
.item-end{
.item-end {
height: px2rem(60px);
}
}
......
<template>
<section>
<GroupTitle groupTitle="5分钟医学院" groupNum="10"/>
<div class="hot-teacher">
<!-- <div class="space-between" id="fiveBoxMenu">
<img class="img" src="../../images/mins.png"/>
<div @click="goToPage('')" class="five-more gray fs11">
更多<img src="../../images/right-throw.png" class="thorw-icon"/>
</div>
</div> -->
<div :class="index>1 && (index+1 == list.length)?'teacher-item item-end' : 'teacher-item'" :key="index" v-for="(item,index) in list" @click="goToPage(item)">
<div class="teacher-itemimg">
<img v-lazy="item.appImageUrl"/>
</div>
<div class="five-text">
<div class="teacher-itemname fs14">{{item.title}}</div>
<div class="five-tag fs11">
<span class="m-tag">#{{item.categoryName}}</span>
<span class="m-play" @click.stop="playFun(item)">
<div class="play-opt play-start" v-show="item['play'] =='1'">
<span></span>
<span></span>
<span></span>
</div>
<div class="play-opt play-stop" v-show="item.play == '2'">
<span></span>
<span></span>
<span></span>
</div>
<img class="five-radio" src="../../images/play.png" v-if="item.play == '0'"/>
</span>
</div>
</div>
</div>
</div>
<ShowAllItem />
<NoMoreItem v-show="false" />
<SplitLine borderWidth="3px" />
</section>
</template>
<script>
import { pageJumpUrl } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
import NoMoreItem from '@/components/business/no-more-item';
import ShowAllItem from '@/components/business/show-all-item';
import SplitLine from '@/components/business/split-line';
export default {
name: 'YqyFiveMinutes',
data() {
return {
list: [],
isPlay: false,
id: ''
}
},
components: {
GroupTitle,
NoMoreItem,
ShowAllItem,
SplitLine
},
// props: {
// parmData: {
// type: Array,
// default: () => []
// }
// },
created() {
let _this = this;
//暂停
window.__pauseAudioView = function (parm) {
_this.changePlay(_this.id, '2');
}
//开始
window.__playAudioView = function (parm) {
_this.changePlay(_this.id, '1');
}
window.__closeAudioView = function (parm) {
_this.changePlay(_this.id, '0');
}
},
mounted() {
//console.log(this.parmData);
// this.list = this.parmData;
this.getFiveData()
},
methods: {
goToPage(item) {
let obj = {
}
///console.log(item);
let url = pageJumpUrl();
// console.log(url.pageListUrl);
let itemData = {
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": []
}
};
if (!!item) {
obj = {
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_content',
labelId: item.id,
labelValue: item.title,
}
itemData.title = item.name;
itemData.appModuleInfo["paramList"] = [{
"key": "className",
"value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
},
{
"key": "id",
"value": `${item.id}`,
"type": 1,
"seqNo": 2
}
]
} else {
obj = {
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_all'
}
itemData.appModuleInfo.paramList = [{
"key": "className",
"value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
}]
}
this.pageBurialPoin(obj)
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
changePlay(id, str) {
//play : 1播放 2:暂停 0:初始状态
for (let i = 0; i < this.list.length; i++) {
if (id == this.list[i].id) {
if (str == '1') {
this.list[i].play = '1';
} else if (str == '2') {
this.list[i].play = '2';
// alert(str)
} else if (str == '0') {
this.list[i].play = '0';
}
} else {
this.list[i].play = '0';
}
}
},
playFun(item) {
this.id = item.id; //保存id
this.changePlay(item.id, '1');
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_play',
labelId: item.id,
labelValue: item.title,
})
rocNative.openFiveMintusAudio({
categoryName: item.categoryName,
appImageUrl: item.appImageUrl,
publishTime: item.publishTime,
id: item.id,
filePath: item.filePath,
title: item.title,
size: item.size,
isPlay: true,
fileType: item.fileType,
totalTime: item.totalTime
})
},
//五分钟医学院
getFiveData() {
let _this = this,
parm = {
pageNo: 1,
pageSize: 4,
data: {
setEntry: 'headers'
}
}
this.API_GET('contents/fiveMinutes/contents', parm).then(res => {
if (res.respCode == '200') {
_this.list = _this.handelFive(res.fiveMinutesMedicalContentList) || []
}
})
},
//处理五分钟数据 初始化播放状态
handelFive(d) {
for (let i = 0; i < d.length; i++) {
d[i].play = '0';
}
return d;
}
},
}
</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: 0 px2rem(15px) 0;
.img {
width: px2rem(109px);
height: px2rem(22px);
}
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.five-more {
border: 1px solid RGBA(169, 174, 183, 1);
border-radius: px2rem(16px);
height: px2rem(16px);
line-height: px2rem(16px);
padding: 0 px2rem(5px) 0 px2rem(6px);
vertical-align: middle;
}
.teacher-item {
width: 100%;
height: px2rem(75px);
position: relative;
margin-top: px2rem(4px);
margin: px2rem(4px) 0 px2rem(15px);
&:not(:last-child) {
border-bottom: 1px solid RGBA(240, 240, 240, 1);
}
.teacher-itemimg {
width: px2rem(60px);
height: px2rem(60px);
border-radius: px2rem(3px);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(0, 78, 64, 0.1);
float: left;
img {
width: 100%;
height: 100%;
display: inline-block;
border-radius: px2rem(3px);
}
}
.five-text {
margin-left: px2rem(70px);
height: px2rem(38px);
}
.teacher-itemname {
color: RGBA(102, 102, 102, 1);
height: px2rem(38px);
line-height: px2rem(19px);
font-size: px2rem(14px);
margin-bottom: px2rem(5px);
}
.five-tag {
position: relative;
padding-right: px2rem(25px);
.m-tag {
height: px2rem(17px);
line-height: px2rem(17px);
padding: 0 px2rem(5px);
color: #BF9E15;
border-radius: 0 px2rem(3px) px2rem(3px) px2rem(3px);
background: #FFFDFA;
/* background-color: px2rem(17px);*/
border: 1px solid #FAE5AF;
}
}
.m-play {
width: px2rem(28px);
height: px2rem(28px);
display: inline-block;
position: absolute;
right: 0;
bottom: 0;
.play-opt {
position: relative;
width: px2rem(28px);
height: px2rem(28px);
border: 1px solid #56c3bb;
border-radius: 50%;
span {
width: px2rem(3px);
height: px2rem(5px);
bottom: px2rem(5px);
position: absolute;
background: #56c3bb;
border-radius: 2px 2px 0 0;
}
}
.play-stop {
span:first-child {
left: px2rem(8px);
height: px2rem(5px);
}
span:nth-child(2) {
left: px2rem(12px);
height: px2rem(15px);
}
span:nth-child(3) {
left: px2rem(16px);
height: px2rem(10px);
}
}
.play-start {
span {
-webkit-animation: bodong 0.5s infinite ease-in-out alternate;
animation: bodong 0.5s infinite ease-in-out alternate;
}
span:first-child {
left: px2rem(8px);
-webkit-animation-delay: .1s;
animation-delay: .1s;
}
span:nth-child(2) {
left: px2rem(12px);
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
span:nth-child(3) {
left: px2rem(16px);
-webkit-animation-delay: .5s;
animation-delay: .5s;
}
@-webkit-keyframes bodong {
0% {
height: px2rem(5px);
}
30% {
height: px2rem(10px);
}
60% {
height: px2rem(15px);
}
80% {
height: px2rem(10px);
}
100% {
height: px2rem(5px);
}
}
@keyframes bodong {
0% {
height: px2rem(5px);
}
30% {
height: px2rem(10px);
}
60% {
height: px2rem(15px);
}
80% {
height: px2rem(10px);
}
100% {
height: px2rem(5px);
}
}
}
img {
width: 100%;
height: 100%;
display: block;
}
}
}
.item-end {
height: px2rem(60px);
}
}
</style>
......@@ -10,7 +10,7 @@
<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"/>
<img class="tea-itemimg" :src="item.avatarImageUrl"/>
</div>
<span class="tea-itemname">{{item.name}}</span>
</div>
......
......@@ -10,7 +10,7 @@
<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"/>
<img class="tea-itemimg" :src="item.avatarImageUrl"/>
</div>
<span class="tea-itemname">{{item.name}}</span>
</div>
......
......@@ -2,7 +2,7 @@
<div class="banner-box">
<div class="banner space-between">
<div :class="index+1==parmData.length ?'banner-item item-end' : 'banner-item'" :key="index" v-for="(item,index) in parmData" @click="goToPage(item)">
<img class="banner-img" v-lazy="item.imageUrl"/>
<img class="banner-img" :src="item.imageUrl"/>
<span class="banner-text fs24">
{{item.name}}
<!-- <i></i> -->
......
......@@ -2,7 +2,7 @@
<div :class="searchFix?'header fixed' : 'header' " id="search-top" :style="{height:menuptop}">
<div class="search-menu">
<div :class="isTransparent?'search-transparent':'bgWhite'" class="search">
<input type="search" :class="isTransparent?'search-transparent':''" class="input" v-model="searchVal" :placeholder="placeholder" :disabled="disabled" />
<input type="search" :class="isTransparent?'search-transparent':''" class="input" v-model="searchVal" :placeholder="placeholder" @click="goToPage"/>
<img v-if="searchFix" class="search-img" src='../../images/search-grey.png'>
<img v-else class="search-img" src='../../images/search-white.png'>
</div>
......@@ -103,15 +103,19 @@ export default {
},
goToPage(){
// alert("000");
this.$emit('setAppMsg',false)
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_notification',
actionCode:'c_notification',
this.$router.push({
path: '/search'
})
rocNative.readMessage();
// alert("000");
// this.$emit('setAppMsg',false)
// this.$emit('jumpToSS',false)
// this.pageBurialPoin({
// menuLevel:1,
// menuCode:'m_home',
// functionCode:'f_notification',
// actionCode:'c_notification',
// })
// rocNative.readMessage();
}
},
......
......@@ -3,7 +3,7 @@
<div class="top-evaluat" v-if="isShow">
<div class="evaluat-info">
<span class="evaluat-icon">
<img v-lazy='parmObj.avatarImageUrl'/>
<img :src='parmObj.avatarImageUrl'/>
</span>
<span class="evaluat-persent">您的学习速度战胜了本院内{{setStyle(parmObj.gradePKToHospital)}}%的医生</span>
</div>
......
......@@ -5,7 +5,7 @@
</div>
<div class="teacher-item space-between">
<div class="tea-itemImg">
<img v-lazy="resourceData.img"/>
<img :src="resourceData.img"/>
</div>
<div class="five-text">
<div class="tea-itemname fw fs30">{{resourceData.name}}</div>
......
......@@ -2,7 +2,7 @@
<div class="hot-teacher">
<div :style="{'text-align': direction}" class="title">{{title}}</div>
<div class="teacher-item" :key="index" v-for="(item,index) in hotTeachers">
<img class="tea-itemimg" v-lazy="item.img"/>
<img class="tea-itemimg" :src="item.img"/>
<span class="tea-itemname">{{item.name}}</span>
<span class="tea-hospital">{{item.hospital}}</span>
</div>
......
......@@ -3,7 +3,7 @@
<div :style="{'text-align': direction}" class="hotTagTitle">{{resourceData.title}}</div>
<mt-swipe :show-indicators="false" :auto="0">
<mt-swipe-item>
<img class="newClassImg" v-lazy="resourceData.item[0].img"/>
<img class="newClassImg" :src="resourceData.item[0].img"/>
<div class="fs32">{{resourceData.item[0].title}}</div>
<div class="space-between">
<div>
......@@ -16,7 +16,7 @@
</div>
</mt-swipe-item>
<mt-swipe-item v-if="resourceData.item[1]">
<img class="newClassImg" v-lazy="resourceData.item[1].img"/>
<img class="newClassImg" :src="resourceData.item[1].img"/>
<div class="fs32">{{resourceData.item[1].title}}</div>
<div class="space-between">
<div>
......@@ -29,7 +29,7 @@
</div>
</mt-swipe-item>
<mt-swipe-item v-if="resourceData.item[2]">
<img class="newClassImg" v-lazy="resourceData.item[2].img"/>
<img class="newClassImg" :src="resourceData.item[2].img"/>
<div class="fs32">{{resourceData.item[2].title}}</div>
<div class="space-between">
<div>
......
......@@ -13,7 +13,7 @@
<div class="couse-list">
<div :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index" v-for="(item,index) in parmData">
<div class="course-pic" @click="goToPage(item)">
<img v-lazy="item.courseInfoUrl" class="pic-tec" />
<img :src="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
<p class="course-txt">
......@@ -53,7 +53,7 @@ export default {
props:{
parmData:{
type:Array,
default:[]
default: () => []
},
userToken:{
type:String,
......
<template>
<section>
<GroupTitle groupNum="6" />
<div class="cource-teach">
<div class="couse-list">
<div
:class="index % 2 == 1 ? 'course-item end-left' : 'course-item'"
v-show="index < 4" v-for="(item, index) in parmData" :key="index">
<div class="course-pic" @click="goToPage(item)">
<img v-lazy="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
<p class="course-txt">
{{item.name}}
</p>
<div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}}
</span>
</div>
</div>
</div>
<div v-if="parmData.length==0" class="noSource">暂无最新教程数据</div>
</div>
<ShowAllItem />
<NoMoreItem v-show="false" />
<SplitLine borderWidth="3px" />
</section>
</template>
<script>
//import { setEventByModuleCode } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
import NoMoreItem from '@/components/business/no-more-item';
import ShowAllItem from '@/components/business/show-all-item';
import SplitLine from '@/components/business/split-line';
export default {
name: 'YqyTeacherList',
data() {
return {
list: [],
title: '最新课程',
pageNo: 1,
pageSize: 6,
parmData: []
}
},
components: {
GroupTitle,
NoMoreItem,
ShowAllItem,
SplitLine
},
mounted() {
this.getData()
//this.list = this.parmData;
},
props: {
userToken: {
type: String,
default: ''
},
},
methods: {
//跳转
goToPage(item) {
this.$emit("setRefrshParm", {
isclick: true
})
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_course',
labelId: item.id,
labelValue: item.name,
})
let itemData = {};
if (item == '') {
itemData = {
"title": item.name,
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "className",
"value": "com.picahealth.yunque.activitys.famousteacherschool.AllDiseaseActivity###MicroProfessionMoreTableController",
"type": 4,
"seqNo": 1
},
{
"key": "disCategoryId",
"value": '-1',
"type": 1,
"seqNo": 2
}
]
}
};
} else {
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
})
},
//收藏 取消收藏
collectFun(status, id, name) {
// alert(this.userToken)
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: id,
labelValue: name,
})
let _this = this,
parm = {
token: _this.userToken,
type: status,
courseId: id,
setEntry: 'headers',
data: {
token: _this.userToken,
}
}
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
_this.handelData(id, status);
} else {
//alert(res.message);
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
})
},
handelData(id, status) {
let d = this.parmData;
for (let i = 0; i < d.length; i++) {
if (id == d[i].id) {
d[i].whetherFavors = status;
}
}
},
getData() {
//alert("最新课程");
let _this = this,
parm = {
pageNo: _this.pageNo,
pageSize: _this.pageSize,
token: _this.userToken,
setEntry: 'headers'
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation', parm).then(function (res) {
if (res.code === '000000') {
_this.parmData = res.data.contentAppModels || [];
}
})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/global.scss';
@import '../../style/mixin.scss';
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.couse-list {
overflow: hidden;
}
.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);
font-size: px2rem(11px);
}
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.noSource {
text-align: center;
font-size: px2rem(13px);
padding: px2rem(13px) 0;
color: #999;
}
.cource-teach {
padding: 0 px2rem(15px);
}
.course-item {
float: left;
margin-bottom: px2rem(19px);
margin-right: px2rem(5px);
}
.end-left {
margin-right: 0;
}
.course-pic {
width: px2rem(170px);
height: px2rem(95px);
border-radius: px2rem(3px);
position: relative;
.pic-tec {
width: 100%;
height: 100%;
border-radius: px2rem(3px);
display: block;
}
.course-tag {
position: absolute;
display: inline-block;
top: px2rem(5px);
left: px2rem(5px);
line-height: px2rem(16px);
height: px2rem(16px);
color: #4A87D4;
padding: 0 px2rem(3px);
background: #FAFCFF;
border: 1px solid #C3DCFB;
font-size: px2rem(10px);
border-radius: px2rem(2px);
}
}
.course-txt {
margin-top: px2rem(5px);
font-size: px2rem(14px);
line-height: px2rem(19px);
max-height: px2rem(38px);
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.opt-info {
color: #999;
}
.course-opt {
font-size: px2rem(12px);
/* margin-top: px2rem(6px);*/
position: relative;
.opt {
display: inline-block;
top: 0;
right: 0;
position: absolute;
height: px2rem(18px);
line-height: px2rem(18px);
padding: 0 px2rem(4px);
}
.collect {
background: #F7F8F9;
color: #666;
}
.collected {
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
.title {
font-size: px2rem(18px);
height: px2rem(18px);
margin: 0 0 px2rem(21px) 0;
font-weight: bold;
color: #28344C
}
</style>
......@@ -5,19 +5,19 @@
<!--展示形式 左一 右二-->
<div class="teacher-item space-between">
<div class="category-left">
<img class="category-img1" v-lazy="resourceData.item.pic1.right"/>
<img class="category-img1" :src="resourceData.item.pic1.right"/>
</div>
<div class="category-right">
<div class="right-img">
<img class="category-img" v-lazy="resourceData.item.pic2.bg"/>
<img class="category-img" :src="resourceData.item.pic2.bg"/>
</div>
<div class="right-img mt5">
<img class="category-img" v-lazy="resourceData.item.pic3.bg"/>
<img class="category-img" :src="resourceData.item.pic3.bg"/>
</div>
</div>
</div>
<di class="holder-img">
<img v-lazy="resourceData.item.pic3.bg" class="category-img"/>
<img :src="resourceData.item.pic3.bg" class="category-img"/>
</di>
</div>
</template>
......
......@@ -8,7 +8,7 @@
</div>
<div class="teacher-item space-between" :key="index" v-for="(item,index) in hotTeachers">
<div class="teacher-itemimg">
<img v-lazy="item.img"/>
<img :src="item.img"/>
</div>
<div class="five-text">
<div class="teacher-itemname fs14">{{item.name}}</div>
......
......@@ -2,7 +2,7 @@
<div class="banner-box">
<div class="banner space-between">
<div :class="index+1==resourceData.length ?'banner-item item-end' : 'banner-item'" :key="index" v-for="(item,index) in resourceData">
<!-- <img class="bannerImg" v-lazy="item.img"/> -->
<!-- <img class="bannerImg" :src="item.img"/> -->
<img class="banner-img" src="../../images/Shape@2x.png"/>
<span class="banner-text fs24">
{{item.name}}<i></i>
......
......@@ -5,7 +5,7 @@
</div>
<div class="teacher-item space-between">
<div class="tea-itemImg">
<img v-lazy="resourceData.img"/>
<img :src="resourceData.img"/>
</div>
<div class="five-text">
<div class="tea-itemname fw fs30">{{resourceData.name}}</div>
......
......@@ -2,7 +2,7 @@
<div class="hot-teacher">
<div :style="{'text-align': direction}" class="title">{{title}}</div>
<div class="teacher-item" :key="index" v-for="(item,index) in hotTeachers">
<img class="tea-itemimg" v-lazy="item.img"/>
<img class="tea-itemimg" :src="item.img"/>
<span class="tea-itemname">{{item.name}}</span>
<span class="tea-hospital">{{item.hospital}}</span>
</div>
......
......@@ -3,7 +3,7 @@
<div :style="{'text-align': direction}" class="hotTagTitle">{{resourceData.title}}</div>
<mt-swipe :show-indicators="false" :auto="0">
<mt-swipe-item>
<img class="newClassImg" v-lazy="resourceData.item[0].img"/>
<img class="newClassImg" :src="resourceData.item[0].img"/>
<div class="fs32">{{resourceData.item[0].title}}</div>
<div class="space-between">
<div>
......@@ -16,7 +16,7 @@
</div>
</mt-swipe-item>
<mt-swipe-item v-if="resourceData.item[1]">
<img class="newClassImg" v-lazy="resourceData.item[1].img"/>
<img class="newClassImg" :src="resourceData.item[1].img"/>
<div class="fs32">{{resourceData.item[1].title}}</div>
<div class="space-between">
<div>
......@@ -29,7 +29,7 @@
</div>
</mt-swipe-item>
<mt-swipe-item v-if="resourceData.item[2]">
<img class="newClassImg" v-lazy="resourceData.item[2].img"/>
<img class="newClassImg" :src="resourceData.item[2].img"/>
<div class="fs32">{{resourceData.item[2].title}}</div>
<div class="space-between">
<div>
......
<template>
<section>
<GroupTitle groupTitle="大家在看" :isShowNum="isShowNum"/>
<div class="cource-teach" id="adjust-u">
<!-- <div :class="isFixed ? 'cource-header fixed' : 'cource-header'" :style="{height:menuptop}">
<div class="fixBox">
<div class="bgFill" :style="{height:ptop}"></div>
<div class="font-title">
{{title}}
</div>
</div>
</div> -->
<div class="couse-cont">
<!-- <div class="couse-list" v-infinite-scroll="loadMore" infinite-scroll-disabled="loading" infinite-scroll-distance="10" :style="'height:'+clientHeight"> -->
<div class="couse-list" infinite-scroll-disabled="loading" infinite-scroll-distance="10" :style="'height:'+clientHeight">
<div v-show="index < 4" :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index" v-for="(item,index) in list">
<div class="course-pic" @click="goToPage(item)">
<img v-lazy="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
<p class="course-txt">
{{item.name}}
</p>
<div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}}
</span>
</div>
</div>
</div>
<!-- <div class="loading-box">
<span class="loading-more-txt" v-if="isLoading">努力加载中...</span>
<span class="no-more" v-if="noMore">没有更多了......</span>
</div> -->
</div>
<!-- <LOADING v-if="isShowLoading"></LOADING> -->
</div>
</section>
</template>
<script>
import {
Loadmore,
Spinner,
InfiniteScroll
} from 'mint-ui';
import GroupTitle from '@/components/business/group-title';
// import { setEventByModuleCode } from '@/utils/index'
// import LOADING from '../../components/common/loading-new';
export default {
data() {
return {
isShowNum: false,
list: [],
pageNo: 2,
isDisabled: false,
pageSize: 10,
title: '为您推荐',
isCollected: '',
allLoaded: true,
loading: false, //是否滚动加载
isLoading: false, //加载中
noMore: false,
clientHeight: 'auto',
isShowLoading: true,
menuHeight: 0,
ptop: 20,
popHeight: 0,
menuptop: 0,
isReauestBack: true,
}
},
props: {
isFixed: {
default: false,
type: Boolean
},
statusBarHeight: {
type: Number,
default: 0
},
adjustPageNo: {
type: Number,
default: 1
},
userToken: {
type: String,
default: ''
},
parmData: {
type: Array,
default: () => []
},
},
mounted() {
this.list = this.parmData;
this.$store.dispatch("setSource", []);
//this.pageNo = this.adjustPageNo;
// if(window.__isAndroid){
// this.popHeight = this.statusBarHeight/2
// }else{
// this.popHeight = this.statusBarHeight
// }
// this.menuHeight = this.popHeight + 7 + 40 + "px";
// this.ptop = this.popHeight + "px";
// this.getData();
},
created() {
let _this = this;
window.__getStatusBarHeight = function (parm) {
if (window.__isAndroid) {
_this.popHeight = parseInt(parm.statusBarHeight) / 2
} else {
_this.popHeight = parm.statusBarHeight
}
_this.ptop = _this.popHeight + 'px';
_this.menuptop = _this.popHeight + 36 + 'px'
}
this.getStatusHight()
},
watch: {
},
components: {
GroupTitle
// LOADING
},
methods: {
getStatusHight() {
rocNative.getStatusBarHeight({
__funcName: '__getStatusBarHeight'
})
},
//跳转
goToPage(item) {
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_recommend',
actionCode: 'c_course',
labelId: item.id,
labelValue: item.name,
})
this.pageNo = 1;
this.$emit("setRefrshParm", {
isclick: true
})
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
})
},
//滑动加载更多
loadMore() {
let _this = this;
if (_this.isReauestBack) {
_this.isLoading = true;
//埋点
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_recommend',
actionCode: 'c_load_more'
})
setTimeout(() => {
_this.getData('loadMore');
}, 500)
}
},
//收藏 取消收藏
collectFun(status, id, name) {
// alert(this.userToken);
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_recommend',
actionCode: 'c_collect',
labelId: id,
labelValue: name,
})
let _this = this,
parm = {
token: _this.userToken,
type: status,
courseId: id,
setEntry: 'headers',
data: {
token: _this.userToken,
}
}
/// alert(this.token)
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
_this.handelData(id, status);
} else {
//alert(res.message);
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
})
},
handelData(id, status) {
let d = this.list;
for (let i = 0; i < d.length; i++) {
if (id == d[i].id) {
d[i].whetherFavors = status;
}
}
},
//加载数据
getData(type) {
let _this = this,
parm = {
pageNo: _this.pageNo,
pageSize: _this.pageSize,
token: _this.userToken,
setEntry: 'headers'
}
_this.GET('contents/courses/recommendCourseList', parm).then(function (res) {
if (res.code === '000000') {
if (res.data == null || res.data.length == 0) {
res.data = [];
_this.isLoading = false;
_this.noMore = true;
_this.loading = true;
_this.isReauestBack = false;
} else {
_this.isReauestBack = true;
_this.list = [..._this.list, ...res.data];
_this.isLoading = true;
_this.noMore = false;
_this.loading = false;
_this.pageNo += 1;
}
}
})
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
img {
@include bis('../../images/evaluatBg.png');
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.couse-list {
overflow: hidden;
}
.bgFill {
background: inherit;
height: px2rem(20px);
}
.cource-teach .cource-header,
.couse-cont {
padding: 0 px2rem(15px);
}
.couse-cont {}
.fixBox {}
.cource-header {
/* margin: 0 0 px2rem(11px) 0;*/
/*height: px2rem(45px);*/
margin-bottom: px2rem(15px);
.font-title {
line-height: px2rem(36px);
height: px2rem(36px);
background: #fff;
}
}
.loading-box {
font-size: px2rem(16px);
padding: px2rem(10px) 0 px2rem(20px) 0;
text-align: center;
span {
color: #999;
}
}
.change-part {
margin-top: px2rem(10px);
float: right;
font-size: px2rem(11px);
line-height: px2rem(11px);
border: 1px solid #A9AEB7;
border-radius: px2rem(9px);
vertical-align: middle;
padding: px2rem(3px) px2rem(5px) px2rem(4px) px2rem(6px);
img {
width: px2rem(12px);
height: px2rem(12px);
}
}
.fixed {
.fixBox {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 112;
.font-title {
background: #44A99B;
padding: 0 px2rem(15px);
color: #fff;
}
}
.bgFill {
background: #44A99B;
}
}
.course-item {
float: left;
margin-bottom: px2rem(19px);
margin-right: px2rem(5px);
}
.end-left {
margin-right: 0;
}
.course-pic {
width: px2rem(170px);
height: px2rem(95px);
border-radius: px2rem(3px);
position: relative;
.pic-tec {
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px);
}
.course-tag {
position: absolute;
display: inline-block;
top: px2rem(5px);
left: px2rem(5px);
line-height: px2rem(16px);
height: px2rem(16px);
color: #4A87D4;
padding: 0 px2rem(3px);
background: #FAFCFF;
border: 1px solid #C3DCFB;
font-size: px2rem(10px);
border-radius: px2rem(2px);
}
}
.course-txt {
margin-top: px2rem(5px);
font-size: px2rem(14px);
line-height: px2rem(19px);
max-height: px2rem(38px);
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.course-opt {
font-size: px2rem(12px);
position: relative;
/*margin-top: px2rem(6px);*/
.opt-info {
color: #999;
}
.opt {
display: inline-block;
height: px2rem(18px);
line-height: px2rem(18px);
padding: 0 px2rem(4px);
position: absolute;
right: 0;
top: 0;
}
.collect {
background: #F7F8F9;
color: #666;
}
.collected {
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
.font-title {
font-size: px2rem(18px);
font-weight: bold;
color: #28344C
}
.title {
font-size: px2rem(16px);
text-align: left;
width: px2rem(170px);
max-height: px2rem(20px);
}
</style>
<template>
<section>
<GroupTitle :groupNum="groupNum" />
<div class="cource-teach">
<div class="couse-list">
<div
:class="index % 2 == 1 ? 'course-item end-left' : 'course-item'"
v-for="(item, index) in parmData" :key="index">
<div class="course-pic" @click="goToPage(item)">
<img v-lazy="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
<p class="course-txt">
{{item.name}}
</p>
<div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}}
</span>
</div>
</div>
</div>
<div v-if="parmData.length==0" class="noSource">暂无最新教程数据</div>
</div>
</section>
</template>
<script>
//import { setEventByModuleCode } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
export default {
name: 'CourseList',
data() {
return {
list: [],
title: '最新课程',
pageNo: 1,
pageSize: 6,
needShow: true
// parmData: []
}
},
props: {
userToken: {
type: String,
default: ''
},
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
}
},
computed: {
cParmData() {
return this.parmData
},
// groupNum() {
// return this.parmData.length + ''
// }
},
components: {
GroupTitle
},
mounted() {
// this.getData()
// this.list = this.parmData;
},
methods: {
showAllItem(index) {
// this.needShow = !this.needShow
},
//跳转
goToPage(item) {
this.$emit("setRefrshParm", {
isclick: true
})
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_course',
labelId: item.id,
labelValue: item.name,
})
let itemData = {};
if (item == '') {
itemData = {
"title": item.name,
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "className",
"value": "com.picahealth.yunque.activitys.famousteacherschool.AllDiseaseActivity###MicroProfessionMoreTableController",
"type": 4,
"seqNo": 1
},
{
"key": "disCategoryId",
"value": '-1',
"type": 1,
"seqNo": 2
}
]
}
};
} else {
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
})
},
//收藏 取消收藏
collectFun(status, id, name) {
// alert(this.userToken)
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: id,
labelValue: name,
})
let _this = this,
parm = {
token: _this.userToken,
type: status,
courseId: id,
setEntry: 'headers'
}
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
_this.handelData(id, status);
} else {
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
})
},
handelData(id, status) {
let d = this.parmData;
for (let i = 0; i < d.length; i++) {
if (id == d[i].id) {
d[i].whetherFavors = status;
}
}
},
getData() {
//alert("最新课程");
let _this = this,
parm = {
pageNo: _this.pageNo,
pageSize: _this.pageSize,
token: _this.userToken,
setEntry: 'headers'
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation', parm).then(function (res) {
if (res.code === '000000') {
_this.parmData = res.data.contentAppModels || [];
}
})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/global.scss';
@import '../../style/mixin.scss';
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.couse-list {
overflow: hidden;
}
.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);
font-size: px2rem(11px);
}
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.noSource {
text-align: center;
font-size: px2rem(13px);
padding: px2rem(13px) 0;
color: #999;
}
.cource-teach {
padding: 0 px2rem(15px);
}
.course-item {
float: left;
margin-bottom: px2rem(19px);
margin-right: px2rem(5px);
}
.end-left {
margin-right: 0;
}
.course-pic {
width: px2rem(170px);
height: px2rem(95px);
border-radius: px2rem(3px);
position: relative;
.pic-tec {
width: 100%;
height: 100%;
border-radius: px2rem(3px);
display: block;
}
.course-tag {
position: absolute;
display: inline-block;
top: px2rem(5px);
left: px2rem(5px);
line-height: px2rem(16px);
height: px2rem(16px);
color: #4A87D4;
padding: 0 px2rem(3px);
background: #FAFCFF;
border: 1px solid #C3DCFB;
font-size: px2rem(10px);
border-radius: px2rem(2px);
}
}
.course-txt {
margin-top: px2rem(5px);
font-size: px2rem(14px);
line-height: px2rem(19px);
max-height: px2rem(38px);
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.opt-info {
color: #999;
}
.course-opt {
font-size: px2rem(12px);
/* margin-top: px2rem(6px);*/
position: relative;
.opt {
display: inline-block;
top: 0;
right: 0;
position: absolute;
height: px2rem(18px);
line-height: px2rem(18px);
padding: 0 px2rem(4px);
}
.collect {
background: #F7F8F9;
color: #666;
}
.collected {
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
.title {
font-size: px2rem(18px);
height: px2rem(18px);
margin: 0 0 px2rem(21px) 0;
font-weight: bold;
color: #28344C
}
</style>
<template>
<section>
<GroupTitle :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder"/>
<div class="cource-teach">
<div class="couse-list">
<div
:class="index % 2 == 1 ? 'course-item end-left' : 'course-item'"
v-for="(item, index) in parmData" :key="index">
<div class="course-pic" @click="goToPage(item)">
<img v-lazy="item.courseInfoUrl" class="pic-tec" />
<span class="course-tag">{{item.disName}}</span>
</div>
<p class="course-txt">
{{item.name}}
</p>
<div class="course-opt">
<span class="opt-info">{{!item.showTime ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span :class="item.whetherFavors==2?'opt collect':'opt collected'"@click="collectFun(item.whetherFavors,item.id,item.name)">
{{item.whetherFavors==2?'收藏':'已收藏'}}
</span>
</div>
</div>
</div>
<div v-if="parmData.length==0" class="noSource">暂无最新教程数据</div>
</div>
</section>
</template>
<script>
//import { setEventByModuleCode } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
export default {
name: 'CourseList',
data() {
return {
list: [],
title: '最新课程',
pageNo: 1,
pageSize: 6,
needShow: true
// parmData: []
}
},
props: {
userToken: {
type: String,
default: ''
},
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
},
showTitle: {
type: Boolean,
default: true
},
showOrder: {
type: Boolean,
default: false
}
},
computed: {
cParmData() {
return this.parmData
},
// groupNum() {
// return this.parmData.length + ''
// }
},
components: {
GroupTitle
},
mounted() {
// this.getData()
// this.list = this.parmData;
},
methods: {
showAllItem(index) {
// this.needShow = !this.needShow
},
//跳转
goToPage(item) {
this.$emit("setRefrshParm", {
isclick: true
})
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_course',
labelId: item.id,
labelValue: item.name,
})
let itemData = {};
if (item == '') {
itemData = {
"title": item.name,
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "className",
"value": "com.picahealth.yunque.activitys.famousteacherschool.AllDiseaseActivity###MicroProfessionMoreTableController",
"type": 4,
"seqNo": 1
},
{
"key": "disCategoryId",
"value": '-1',
"type": 1,
"seqNo": 2
}
]
}
};
} else {
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
})
},
//收藏 取消收藏
collectFun(status, id, name) {
// alert(this.userToken)
status = status == 1 ? 2 : 1;
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: id,
labelValue: name,
})
let _this = this,
parm = {
token: _this.userToken,
type: status,
courseId: id,
setEntry: 'headers'
}
_this.POST('contents/favors', parm).then(function (res) {
if (res.code === '000000') {
_this.handelData(id, status);
} else {
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
})
},
handelData(id, status) {
let d = this.parmData;
for (let i = 0; i < d.length; i++) {
if (id == d[i].id) {
d[i].whetherFavors = status;
}
}
},
getData() {
//alert("最新课程");
let _this = this,
parm = {
pageNo: _this.pageNo,
pageSize: _this.pageSize,
token: _this.userToken,
setEntry: 'headers'
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation', parm).then(function (res) {
if (res.code === '000000') {
_this.parmData = res.data.contentAppModels || [];
}
})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/global.scss';
@import '../../style/mixin.scss';
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.couse-list {
overflow: hidden;
}
.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);
font-size: px2rem(11px);
}
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.noSource {
text-align: center;
font-size: px2rem(13px);
padding: px2rem(13px) 0;
color: #999;
}
.cource-teach {
padding: 0 px2rem(15px);
}
.course-item {
float: left;
margin-bottom: px2rem(19px);
margin-right: px2rem(5px);
}
.end-left {
margin-right: 0;
}
.course-pic {
width: px2rem(170px);
height: px2rem(95px);
border-radius: px2rem(3px);
position: relative;
.pic-tec {
width: 100%;
height: 100%;
border-radius: px2rem(3px);
display: block;
}
.course-tag {
position: absolute;
display: inline-block;
top: px2rem(5px);
left: px2rem(5px);
line-height: px2rem(16px);
height: px2rem(16px);
color: #4A87D4;
padding: 0 px2rem(3px);
background: #FAFCFF;
border: 1px solid #C3DCFB;
font-size: px2rem(10px);
border-radius: px2rem(2px);
}
}
.course-txt {
margin-top: px2rem(5px);
font-size: px2rem(14px);
line-height: px2rem(19px);
max-height: px2rem(38px);
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
width: px2rem(170px);
}
.opt-info {
color: #999;
}
.course-opt {
font-size: px2rem(12px);
/* margin-top: px2rem(6px);*/
position: relative;
.opt {
display: inline-block;
top: 0;
right: 0;
position: absolute;
height: px2rem(18px);
line-height: px2rem(18px);
padding: 0 px2rem(4px);
}
.collect {
background: #F7F8F9;
color: #666;
}
.collected {
color: #F47A48;
background: RGBA(244, 122, 72, 0.04);
}
}
.title {
font-size: px2rem(18px);
height: px2rem(18px);
margin: 0 0 px2rem(21px) 0;
font-weight: bold;
color: #28344C
}
</style>
<template>
<section>
<GroupTitle groupTitle="5分钟医学院" :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder"/>
<div class="hot-teacher">
<div :class="index>1 && (index+1 == parmData.length)?'teacher-item item-end' : 'teacher-item'" :key="index"
v-for="(item,index) in parmData" @click="goToPage(item)">
<div class="teacher-itemimg">
<img v-lazy="item.appImageUrl"/>
</div>
<div class="five-text">
<div class="teacher-itemname fs14">{{item.title}}</div>
<div class="five-tag fs11">
<span class="m-tag">#{{item.categoryName}}</span>
<span class="m-play" @click.stop="playFun(item)">
<div class="play-opt play-start" v-show="item['play'] =='1'">
<span></span>
<span></span>
<span></span>
</div>
<div class="play-opt play-stop" v-show="item.play == '2'">
<span></span>
<span></span>
<span></span>
</div>
<img class="five-radio" src="../../images/play.png" v-if="item.play == '0'"/>
</span>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
import { pageJumpUrl } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
export default {
name: 'YqyFiveMinutes',
data() {
return {
// list: [],
isPlay: false,
id: ''
}
},
components: {
GroupTitle
},
props: {
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
},
showTitle: {
type: Boolean,
default: true
},
showOrder: {
type: Boolean,
default: false
}
},
computed: {
// compParmData() {
// return this.handelFive(this.parmData)
// }
},
// watch: {
// parmData: {
// handler(curVal, oldVal){
// return curVal
//        },
//        deep: true
// }
// },
created() {
let _this = this;
//暂停
window.__pauseAudioView = function (parm) {
_this.changePlay(_this.id, '2');
}
//开始
window.__playAudioView = function (parm) {
_this.changePlay(_this.id, '1');
}
window.__closeAudioView = function (parm) {
_this.changePlay(_this.id, '0');
}
},
mounted() {
// this.getFiveData()
},
methods: {
goToPage(item) {
let obj = {
}
///console.log(item);
// let url = pageJumpUrl();
// console.log(url.pageListUrl);
let itemData = {
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": []
}
};
if (!!item) {
obj = {
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_content',
labelId: item.id,
labelValue: item.title,
}
itemData.title = item.name;
itemData.appModuleInfo["paramList"] = [{
"key": "className",
"value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
},
{
"key": "id",
"value": `${item.id}`,
"type": 1,
"seqNo": 2
}
]
} else {
obj = {
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_all'
}
itemData.appModuleInfo.paramList = [{
"key": "className",
"value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
}]
}
this.pageBurialPoin(obj)
let paramList = this.setEventByModuleCode(itemData);
// alert(itemData.appModuleInfo.code)
// alert(JSON.stringify(paramList))
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
changePlay(id, str) {
//play : 1播放 2:暂停 0:初始状态
for (let i = 0; i < this.parmData.length; i++) {
if (id == this.parmData[i].id) {
if (str == '1') {
this.parmData[i].play = '1';
} else if (str == '2') {
this.parmData[i].play = '2';
// alert(str)
} else if (str == '0') {
this.parmData[i].play = '0';
}
} else {
this.parmData[i].play = '0';
}
}
},
playFun(item) {
console.log('sssss', item)
this.id = item.id; //保存id
this.changePlay(item.id, '1');
this.pageBurialPoin({
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_play',
labelId: item.id,
labelValue: item.title,
})
rocNative.openFiveMintusAudio({
categoryName: item.categoryName,
appImageUrl: item.appImageUrl,
publishTime: item.publishTime,
id: item.id,
filePath: item.filePath,
title: item.title,
size: item.size,
isPlay: true,
fileType: item.fileType,
totalTime: item.totalTime
})
},
//五分钟医学院
getFiveData() {
let _this = this,
parm = {
pageNo: 1,
pageSize: 4,
data: {
setEntry: 'headers'
}
}
this.API_GET('contents/fiveMinutes/contents', parm).then(res => {
if (res.respCode == '200') {
_this.list = _this.handelFive(res.fiveMinutesMedicalContentList) || []
}
})
},
//处理五分钟数据 初始化播放状态
handelFive(d) {
for (let i = 0; i < d.length; i++) {
d[i].play = '0';
}
return d;
}
},
}
</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: 0 px2rem(15px) 0;
.img {
width: px2rem(109px);
height: px2rem(22px);
}
.thorw-icon {
width: px2rem(8px);
height: px2rem(8px);
}
.five-more {
border: 1px solid RGBA(169, 174, 183, 1);
border-radius: px2rem(16px);
height: px2rem(16px);
line-height: px2rem(16px);
padding: 0 px2rem(5px) 0 px2rem(6px);
vertical-align: middle;
}
.teacher-item {
width: 100%;
height: px2rem(75px);
position: relative;
margin-top: px2rem(4px);
margin: px2rem(4px) 0 px2rem(15px);
&:not(:last-child) {
border-bottom: 1px solid RGBA(240, 240, 240, 1);
}
.teacher-itemimg {
width: px2rem(60px);
height: px2rem(60px);
border-radius: px2rem(3px);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(0, 78, 64, 0.1);
float: left;
img {
width: 100%;
height: 100%;
display: inline-block;
border-radius: px2rem(3px);
}
}
.five-text {
margin-left: px2rem(70px);
height: px2rem(38px);
}
.teacher-itemname {
color: RGBA(102, 102, 102, 1);
height: px2rem(38px);
line-height: px2rem(19px);
font-size: px2rem(14px);
margin-bottom: px2rem(5px);
}
.five-tag {
position: relative;
padding-right: px2rem(25px);
.m-tag {
height: px2rem(17px);
line-height: px2rem(17px);
padding: 0 px2rem(5px);
color: #BF9E15;
border-radius: 0 px2rem(3px) px2rem(3px) px2rem(3px);
background: #FFFDFA;
/* background-color: px2rem(17px);*/
border: 1px solid #FAE5AF;
}
}
.m-play {
width: px2rem(28px);
height: px2rem(28px);
display: inline-block;
position: absolute;
right: 0;
bottom: 0;
.play-opt {
position: relative;
width: px2rem(28px);
height: px2rem(28px);
border: 1px solid #56c3bb;
border-radius: 50%;
span {
width: px2rem(3px);
height: px2rem(5px);
bottom: px2rem(5px);
position: absolute;
background: #56c3bb;
border-radius: 2px 2px 0 0;
}
}
.play-stop {
span:first-child {
left: px2rem(8px);
height: px2rem(5px);
}
span:nth-child(2) {
left: px2rem(12px);
height: px2rem(15px);
}
span:nth-child(3) {
left: px2rem(16px);
height: px2rem(10px);
}
}
.play-start {
span {
-webkit-animation: bodong 0.5s infinite ease-in-out alternate;
animation: bodong 0.5s infinite ease-in-out alternate;
}
span:first-child {
left: px2rem(8px);
-webkit-animation-delay: .1s;
animation-delay: .1s;
}
span:nth-child(2) {
left: px2rem(12px);
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
span:nth-child(3) {
left: px2rem(16px);
-webkit-animation-delay: .5s;
animation-delay: .5s;
}
@-webkit-keyframes bodong {
0% {
height: px2rem(5px);
}
30% {
height: px2rem(10px);
}
60% {
height: px2rem(15px);
}
80% {
height: px2rem(10px);
}
100% {
height: px2rem(5px);
}
}
@keyframes bodong {
0% {
height: px2rem(5px);
}
30% {
height: px2rem(10px);
}
60% {
height: px2rem(15px);
}
80% {
height: px2rem(10px);
}
100% {
height: px2rem(5px);
}
}
}
img {
width: 100%;
height: 100%;
display: block;
}
}
}
.item-end {
height: px2rem(60px);
}
}
</style>
<template>
<section class="group-title">
<span class="group-title-name">{{groupTitle}} </span>
<span v-show="isShowNum"> ({{groupNum}})</span>
</section>
</template>
<script>
export default {
data() {
return {
}
},
props: {
groupTitle: {
type: String,
default: '课程'
},
isShowNum: {
type: Boolean,
default: true
},
groupNum: {
type: String,
default: "0"
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.group-title {
margin-left: px2rem(15px);
display: flex;
flex-direction: row;
&-name {
margin-right: px2rem(6px);
}
span {
padding: px2rem(20px) 0 px2rem(15px);
font-size: px2rem(18px);
font-weight: 500;
color: #28344C;
}
}
</style>
<template>
<section class="group-title">
<article v-show="showTitle" class="group-title-title">
<span>{{groupTitle}} </span>
<span v-show="isShowNum"> ({{groupNum}})</span>
</article>
<article v-show="showOrder" class="group-title-order">
<div @click="order(1)" class="group-title-order-item">
<span :class="{'active': showOrderIndex === 1}">学习人数</span>
<img 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>
</article>
</section>
</template>
<script>
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: false
}
},
methods: {
toggle() {
this.showTitle = !showTitle
this.showOrder = !showOrder
},
order(index) {
this.showOrderIndex = index
this.$emit('order', index)
}
}
}
</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(20px) 0 px2rem(15px);
font-size: px2rem(13px);
&-item {
position: relative;
span {
margin-right: px2rem(20px);
}
img {
position: absolute;
top: px2rem(2px);
left: px2rem(51px);
height: px2rem(15px);
width: px2rem(15px);
}
}
}
.active {
color: #449284;
}
&-title {
padding: px2rem(20px) 0 px2rem(15px);
font-size: px2rem(18px);
font-weight: 500;
color: #28344C;
}
}
</style>
<template>
<section>
<GroupTitle groupTitle="健康漫画" :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder"/>
<div class="font-style">
<div class="teach-opt">
<div class="teach-list">
<div :class="index%2==1 ? 'list-item mr0':'list-item'"
v-for="(item, index) in parmData" :key="index"
@click="goToPage(item)">
<div class="tea-img" :style="'background:'+ item.bgColor">
<img v-lazy="item.imageUrl">
<!-- <span class="learn-p">{{item.joinNum}}人已学</span> -->
<!-- <span class="learn-p">{{item.joinNum | yLocalString}}人已学</span> -->
</div>
<div class="tea-txt">
<!-- <div class="tea-name">{{item.doctorName}}</div> -->
<div class="tea-position">
{{item.headerName}}
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
// import teacherTop from '../../components/teachers/teach-top-new';
// import {
// teacher_back,
// fast_sicon,
// hot_teacher,
// screen,
// teacher,
// teacherother
// } from '../../utils/buryingPoint';
import GroupTitle from '@/components/business/group-title';
export default {
components: {
GroupTitle
},
props: {
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
},
showTitle: {
type: Boolean,
default: true
},
showOrder: {
type: Boolean,
default: false
}
},
computed: {
// groupNum() {
// return this.parmData.length + ''
// }
},
data() {
return {
topTitle: '讲师集',
isScroll: false,
token: '',
list: [],
isShowCount: true,
followCount: 0,
studyCount: 0,
col: 1, //0综合,1人气,2资源数,3姓名首字母
dir: 2, //1:正序 2:逆序
}
},
mounted() {
let _this = this
this.token = this.$route.query.userToken || this.$route.query.token
// this.getUserInfo()
// this.getData();
// window.__getUserInfo = function(parm){
// // alert('in __getUserInfo')
// _this.token = parm.userToken || _this.$route.query.token;
// this.getData();
// }
window.__refresh = function (parm) {
_this.getData();
}
window.addEventListener('scroll', this.handleScroll)
},
methods: {
handleScroll: function () {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
if (scrollTop > 25) {
this.isScroll = true;
} else {
this.isScroll = false;
}
},
//获取版本号
getUserInfo() {
rocNative.getUserInfo({
__funcName: '__getUserInfo'
})
},
goToPage(item) {
let obj = {
}
console.log(item);
// let url = pageJumpUrl();
// console.log(url.pageListUrl);
let itemData = {
"imageUrl": "",
"appModuleInfo": {
"code": "M200",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": []
}
};
obj = {
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_content',
labelId: item.id,
labelValue: item.title,
}
itemData.title = item.name;
itemData.appModuleInfo["paramList"] = [{
"key": "className",
"value": 'com.picahealth.yunque.activitys.webs.CaricatureDetailActivity###EducationDetailViewController',
// "value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
},
{
"key": "id",
"value": `${item.id}`,
"type": 1,
"seqNo": 2
}
]
this.pageBurialPoin(obj)
let paramList = this.setEventByModuleCode(itemData);
// alert(itemData.appModuleInfo.code)
// alert(JSON.stringify(paramList))
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
goToDetail(item) {
let _this = this;
this.$router.push({
path: '/teachersDetail',
query: {
id: item.doctorId,
token: _this.token
}
})
// this.appBuryingPointEntrust({
// ...teacher,
// labelId: item.doctorId,
// labelValue: item.doctorName
// })
},
// 埋点
appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val)
},
//排序
sortFun() {
this.dir = this.dir == 1 ? 2 : 1;
this.getData()
},
randomBg(d) {
for (let i = 0; i < d.length; i++) {
if (i % 4 == 0) {
d[i].bgColor = '#EBF6F1'
} else if (i % 4 == 1) {
d[i].bgColor = '#EDF3FA'
} else if (i % 4 == 2) {
d[i].bgColor = '#F0F0FA'
} else if (i % 4 == 3) {
d[i].bgColor = '#F6EFE6'
}
}
/// console.log(d);
},
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;
if (_this.list.length > 0) {
_this.randomBg(_this.list);
}
}
})
// this.appBuryingPointEntrust({
// ...teacher,
// labelId: _this.dir,
// labelValue: _this.dir === 1 ? '升序' : '降序'
// })
}
}
}
</script>
<style>
body {
background: #fff
}
</style>
<style lang="scss" scoped>
body {
background: #fff
}
@import '../../style/mixin';
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
width: 100%;
overflow: hidden;
@include sc(0.6rem, #666);
}
.teach-opt {
padding: 0 px2rem(15px) px2rem(15px) px2rem(15px);
.teach-title {
font-size: px2rem(18px);
// padding-bottom: px2rem(0px);
color: #333;
}
.teach-list {
margin-top: px2rem(-14px);
overflow: hidden;
}
.opt-span {
span {
color: #449284;
font-size: px2rem(13px);
display: inline-block;
vertical-align: middle;
height: px2rem(10px);
line-height: px2rem(10px);
img {
display: inline-block;
width: px2rem(15px);
height: px2rem(15px);
vertical-align: middle;
}
}
}
.list-item {
width: px2rem(170px);
margin-right: px2rem(5px);
margin-top: px2rem(15px);
border-radius: 0 0 px2rem(3px) px2rem(3px);
float: left;
box-shadow: 0 px2rem(4px) px2rem(6px) RGBA(0, 0, 0, 0.06);
}
.mr0 {
margin-right: 0
}
.tea-txt {
padding: px2rem(5px) px2rem(7px);
}
.tea-img {
width: px2rem(170px);
height: px2rem(125px);
position: relative;
border-radius: px2rem(3px) px2rem(3px) 0 0;
img {
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px) px2rem(3px) 0 0;
}
.learn-p {
padding-left: px2rem(5px);
position: absolute;
width: 100%;
left: 0;
bottom: 0;
background: #333;
background: -webkit-linear-gradient(left, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: -o-linear-gradient(right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: -moz-linear-gradient(right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: linear-gradient(to right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
color: #fff;
font-size: px2rem(11px);
height: px2rem(20px);
line-height: px2rem(20px);
}
}
.tea-name {
padding: 0;
color: #333;
font-size: px2rem(14px);
font-weight: 500;
}
.tea-position {
height: px2rem(53px);
padding: px2rem(7px) px2rem(0px) px2rem(10px);
line-height: px2rem(15px);
font-size: px2rem(14px);
font-weight: 400;
color: #333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
}
.home-header {
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.logo_img {
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
</style>
<template>
<article v-if="allLabels && allLabels.length > 0" class="history-labels">
<section class="history-labels-title">
<span>{{title}}</span>
<span v-show="showDelete" class="history-labels-title-all">
<span @click="showConfirm=true">全部删除</span><span>|</span><span @click="toggleDelete">取消</span>
</span>
<img @click="toggleDelete" v-show="!showDelete" src="../../images/sousuo/recicle.png" alt="删除">
</section>
<section class="history-labels-item"
@click="searchAction(item.keyword)"
v-for="(item, index) in allLabels" :key="index" >
<span class="history-labels-item-name">
<span>{{item.keyword}}</span>
<img @click="deleteLabels(false, index)" v-show="showDelete"
src="../../images/sousuo/delete.png" alt=""
>
</span>
</section>
<ConfirmTip v-show="showConfirm" @cancle="showConfirm=false" @confirm="confirm"/>
</article>
</template>
<script>
import ConfirmTip from '@/components/common/confirm-tip'
export default {
name: 'HistoryLabels',
props: {
// allLabels: {
// type: Array
// },
title: {
type: String,
default: '历史搜索'
}
},
components: {
ConfirmTip
},
data () {
return {
allLabels: [],
showDelete: false,
showConfirm: false
}
},
mounted(){
this.getData()
},
methods: {
searchAction(searchText) {
if(this.showDelete) return
this.$router.push({
path: '/result',
query: {
searchText: searchText
}
})
},
// 获取历史搜索
getData() {
let _this = this,
para = {
token: _this.token,
setEntry: 'headers'
}
let url = 'contents/searchHistory/listHistory'
this.GET(url, para).then(res => {
if (res.code == '000000') {
this.allLabels = res.data.list
console.log(res)
}
})
},
// 删除关键词
deleteLabels(isAll, index=0, length=1) {
let _this = this,
para = {
token: _this.token,
setEntry: 'headers',
keywordIds: []
};
let url = 'contents/searchHistory/deleteHistory'
if (isAll) {
para.keywordIds = this.allLabels.map(element => {
return element.id
});
} else {
para.keywordIds.push(this.allLabels[index].id)
}
this.POST(url, para).then(res => {
if (res.code == '000000') {
// this.allLabels = res.data.list
this.allLabels.splice(index, para.keywordIds.length)
}
})
},
confirm() {
this.deleteLabels(true)
},
toggleDelete() {
this.showDelete = !this.showDelete
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.history-labels {
width: 100%;
padding: 0 px2rem(15px) 0;
margin-bottom: px2rem(6px);
background-color: #fff;
&-title {
display: inline-flex;
width: 100%;
align-items: center;
justify-content: space-between;
span {
font-size: px2rem(12px);
color: #666;
}
img {
width: px2rem(20px);
height: px2rem(20px);
padding: px2rem(4px);
}
&-all {
span {
padding: px2rem(4px) px2rem(5px);
font-size: px2rem(12px);
color: #999;
}
}
}
&-item {
display: inline-flex;
height: px2rem(30px);
margin: px2rem(0px) px2rem(15px) 0 0;
text-align: center;
align-items: center;
&-name {
position: relative;
top: 0;
left: 0;
padding: px2rem(6px) px2rem(15px) px2rem(8px);
border-radius: px2rem(15px);
background-color: #F8F8F8;
color: #999;
font-size: px2rem(13px);
img {
position: absolute;
top: px2rem(-10px);
right: px2rem(-10px);
width: px2rem(20px);
height: px2rem(20px);
padding: px2rem(4px);
}
}
}
}
</style>
<template>
<article class="history-search">
<header class="history-search-title">
<span>历史搜索</span>
<img src="../../images/search-grey.png" alt="删除">
</header>
<section class="history-search-content">
<span v-for="(item, index) in sourceData" :key="index">{{item.name}}</span>
</section>
</article>
</template>
<script>
export default {
props: {
sourceData: {
type: Array,
default: () => [{name:'222'},{name:'222'},{name:'222'},{name:'222'},{name:'222'},{name:'222'},{name:'222'}]
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
// @import '../../style/global.scss';
.history-search {
margin: px2rem(15px);
&-title {
width: 100%;
justify-content: space-between;
display: inline-flex;
span {
padding: px2rem(4px) px2rem(4px);
font-size: px2rem(12px);
color: 6;
}
}
&-content {
}
}
</style>
<template>
<article v-if="allLabels && allLabels.length > 0" class="history-labels">
<section class="history-labels-title">
<span>{{title}}</span>
</section>
<section class="history-labels-item" @click="hotLabel(item.resourceType, item.structureId, item.resourceUrl, item.labelName, item)" v-for="(item, index) in allLabels" :key="index">
<span class="history-labels-item-name">{{item.keyword}}</span>
</section>
</article>
</template>
<script>
import {
mapMutations
} from 'vuex'
export default {
name: 'HotLabels',
props: {
title: {
type: String,
default: '热门搜索'
}
},
data() {
return {
allLabels: []
}
},
mounted() {
this.getData()
},
methods: {
// ...mapMutations([
// 'SET_CLEAR_VUEX'
// ]),
hotLabel(val, id, url, name, item) {
this.$emit('hotLabel', id, name)
//讲师集
switch (val) {
case 1:
this.SET_CLEAR_VUEX()
this.jumpToCourse(item.resourceId);
break;
case 2:
this.SET_CLEAR_VUEX()
//window.location.href=url;
this.jumpToCartoon(url, name)
break;
case 3:
this.SET_CLEAR_VUEX()
this.$router.push({
path: '/lecturer',
query: {
id: id
}
})
break;
default:
break;
}
},
dispatchEventByModuleCode(itemData) {
let modeCode = itemData.appModuleInfo.code
let paramList = itemData.appModuleInfo.paramList ? itemData.appModuleInfo.paramList : ''
if (modeCode === 'M001' || modeCode === 'M002' || modeCode === 'M003') {
paramList = ''
} else if (modeCode === 'M100' || modeCode === 'M300') {
let urlPara = this.getUrlPara(paramList)
paramList[0].value += urlPara
}
if (typeof paramList === 'string' && !paramList) {
paramList = []
}
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
//跳到相应的课程
jumpToCourse(id) {
let itemData = {
"title": "测试课介绍页",
"imageUrl": "https://test-file.yunqueyi.com/image/jpeg/2018/09/18/20180918103322254-f8bba621.jpg",
"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": `${id}`,
"type": 1,
"seqNo": 2
}
]
}
};
this.dispatchEventByModuleCode(itemData);
},
// 跳到漫画详情页
jumpToCartoon(url, name) {
let itemData = {
"title": "测试课介绍页",
"imageUrl": "https://test-file.yunqueyi.com/image/jpeg/2018/09/18/20180918103322254-f8bba621.jpg",
"appModuleInfo": {
"code": "M300",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": [{
"key": "pageUrl",
"value": url,
"type": 4,
"seqNo": 1
}, {
"key": "showTitle",
"value": true,
"type": 1,
"seqNo": 2
}, {
"key": "title",
"value": name,
"type": 1,
"seqNo": 2
}]
}
};
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: itemData.appModuleInfo.paramList
})
},
// 获取历史搜索
getData() {
let _this = this,
para = {
type: 2,
token: _this.token,
setEntry: 'headers'
}
let url = '/contents/searchKeyword/listKeywords'
this.GET(url, para).then(res => {
if (res.code == '000000') {
this.allLabels = res.data
console.log(res)
}
})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.history-labels {
width: 100%;
padding: 0 px2rem(15px) 0;
margin-bottom: px2rem(6px);
background-color: #fff;
&-title {
display: inline-flex;
width: 100%;
align-items: center;
justify-content: space-between;
span {
font-size: px2rem(12px);
color: #666;
}
img {
width: px2rem(20px);
height: px2rem(20px);
padding: px2rem(4px);
}
}
&-item {
display: inline-flex;
height: px2rem(30px);
margin: px2rem(0px) px2rem(15px) 0 0;
text-align: center;
align-items: center;
&-name {
padding: px2rem(6px) px2rem(15px) px2rem(8px);
border-radius: px2rem(15px);
background-color: #F8F8F8;
color: #999;
font-size: px2rem(13px);
}
}
}
</style>
<template>
<section class="no-more">
<span class="no-more-sub"></span>
<span class="no-more-text">{{noMoreText}}</span>
<span class="no-more-sub"></span>
</section>
</template>
<script>
export default {
data() {
return {
noMoreText: '已经到底了'
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.no-more {
display: flex;
height: px2rem(41px);
flex-direction: row;
justify-content: center;
align-items: center;
background:rgba(248,248,248,1);
&-sub {
width: px2rem(13px);
// height: px2rem(26px);
border: px2rem(1px) solid rgba(200,200,200,1);
border-bottom: 0;
}
&-text {
padding: 0 px2rem(4px);
font-size: px2rem(11px);
color: #B3B3B3;
}
}
</style>
<template>
<section class="no-result">
<img src="../../images/sousuo/search-big.png" alt="">
<p>没有找到相关内容</p>
<p>您可以修改条件后重新搜索</p>
</section>
</template>
<script>
export default {
data() {
return {
}
},
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
.no-result {
height: px2rem(180px);
margin-top: px2rem(0px);
text-align: center;
img {
width: px2rem(100px);
height: px2rem(100px);
}
p {
font-size: px2rem(15px);
color: #999;
}
}
</style>
<template>
<article class="search-wrapper">
<section class="search-wrapper-input">
<img src='../../images/search-grey.png'>
<input value="搜索疾病、课程、讲师"/>
<!-- <form action="" @submit.stop.prevent="search"> -->
<img src='../../images/search-grey.png'>
<input type="search" v-model="currentText2" @keydown.enter="search"/>
<!-- <button type="submit" v-show="false"/> -->
<!-- </form> -->
</section>
<section class="search-wrapper-cancle">
<span>取消</span>
<span @click="cancel">取消</span>
</section>
</article>
</template>
<script>
export default {
data() {
return {
currentText2: ''
}
},
props: {
searchText: {
type: String,
default: ''
}
},
computed: {
currentText: {
get: function(){
return this.searchText
},
set: function(val) {
this.currentText2 = val
}
}
},
// watch: {
// searchText(val) {
// this.currentText = val
// console.log(val)
// }
// },
mounted() {
// this.getData()
},
methods: {
// 取消
cancel() {
console.log('in cancel')
this.currentText = ''
},
// 搜索
search() {
console.log(this.currentText2)
this.$emit('search', this.currentText2)
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
// @import '../../style/global.scss';
.search-wrapper {
display: flex;
position: relative;
position: fixed;
top: 0;
left: 0;
z-index: 2;
width: 100%;
flex-direction: row;
padding: px2rem(20px) px2rem(10px) px2rem(10px) px2rem(15px);
text-align: center;
align-items: center;
background: #fff;
border-bottom: 1px solid #F8F8F8;
&-input {
width: px2rem(290px);
height: px2rem(30px);
......@@ -40,21 +83,27 @@ export default {
background: rgba(245, 246, 246, 1);
img {
position: relative;
top: px2rem(-18px);
top: px2rem(-13px);
left: px2rem(0px);
width: px2rem(14px);
height: px2rem(14px);
}
input {
position: relative;
top: px2rem(-20px);
top: px2rem(-15px);
left: px2rem(-8px);
width: px2rem(240px);
height: px2rem(30px);
line-height: px2rem(30px);
text-decoration-color: #bbb;
color: #bbb;
color: #666;
font-size: px2rem(13px);
font-weight: 400;
background: rgba(245, 246, 246, 1);
user-select: all;
&[type="search"]::-webkit-search-cancel-button{
display: none;
}
}
}
&-cancle {
......
<template>
<article v-if="allTags&&allTags.length>0" class="search-tag search-label">
<article v-if="allLabels && allLabels.length > 0" class="search-tag search-label">
<!-- <section :style="{'text-align': direction}" class="search-tag-title">
{{title}}
</section> -->
......@@ -10,7 +10,7 @@
<div class="search-tag-item"
@click="hotLabel(item.resourceType, item.structureId, item.resourceUrl, item.labelName, item)"
v-for="(item, index) in allTags" :key="index" >
v-for="(item, index) in allLabels" :key="index" >
<span class="item-name">{{item.doctorName}}</span>
</div>
</article>
......@@ -21,7 +21,7 @@ import {mapMutations} from 'vuex'
export default {
name: 'YqyHotLabel',
props: {
allTags: {
allLabels: {
type: Array
},
direction: {
......
<template>
<section class="show-wrapper">
<article class="show-wrapper-all" :class="{'border-top': showTopBorder}">
<span class="show-wrapper-all-item" @click="showAllItem">{{noMoreText}}</span>
</article>
</section>
</template>
<script>
export default {
data() {
return {
}
},
props: {
showTopBorder: {
type: Boolean,
default: true
},
noMoreText: {
type: String,
default: '查看全部'
},
itemIndex: {
type: String,
default: '0'
}
},
methods: {
showAllItem() {
this.$emit('showAllItem', this.itemIndex)
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
// @import '../../style/global.scss';
.show-wrapper {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
&-all {
height: px2rem(40px);
width: px2rem(345px);
&-item {
display: block;
margin-top: px2rem(11px);
text-align: center;
font-size: px2rem(11px);
color: #999999;
}
}
}
.border-top {
border-top: px2rem(1px) solid rgba(240,240,240,1);
}
</style>
<template>
<section :style="{'line-width':lineWidth, 'border-color': borderColor, 'border-style': borderStyle, 'border-width': borderWidth}">
<section style="border-bottom: 0" :style="{'border-color': borderColor, 'border-style': borderStyle, 'border-width': borderWidth}">
</section>
</template>
<script>
export default {
props: {
lineWidth: {
type: String,
default: 'px2rem(375px)'
},
borderWidth: {
type: String,
default: '1px'
default: '0.5px'
},
borderStyle: {
type: String,
......@@ -20,13 +16,12 @@ export default {
},
borderColor: {
type: String,
default: '#e7e7e7'
default: '#F8F8F8'
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
// @import '../../style/global.scss';
......
<template>
<section class="font-style">
<teacherTop :backMethod="backMethod" :isScroll="isScroll" :isJSJ="false"></teacherTop>
<div class="teach-opt">
<div class="tea-detail">
<div class="head-img">
<img :src="doctorParm.doctor.avatar_image_url">
</div>
<p class="detail-name">{{doctorParm.doctor.name}}</p>
<p class="detail-intr" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">
{{doctorParm.doctor.hospital}} {{doctorParm.doctor.title}}
</p>
<div class="detail-info">
<div class="info-item">
<span class="detail-count">{{doctorParm.studyCount.toLocaleString()}}</span>
<p>学习人数</p>
</div>
<div class="info-item">
<span class="detail-count">{{doctorParm.followCount.toLocaleString()}}</span>
<p>关注人数</p>
</div>
</div>
</div>
<div class="tea-new-title plr15">新课上线</div>
<div class="tea-new-line plr15">
<div class="item-new-box">
<div class="item-line" v-for="(item,index) in newsList" :key="index">
<div class="line-img" @click="goToPage(item)">
<img :src="item.imageUrl">
<span class="tag" v-show="item.structureName">{{item.structureName}}</span>
<span class="line-play" @click.stop="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.toLocaleString()}}人已学</span>
<span @click.stop="collectFun(item.favorFlag,item.courseId, item.courseName)" :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>
</div>
<div class="teach-list plr15">
<div :class="index%2==1?'list-item mr0':'list-item'"
v-for="(item,index) in list" @click="goToPage(item)" :key="index">
<div class="tea-img">
<img :src="item.imageUrl">
<span class="learn-p">{{item.joinNum.toLocaleString()}}人已学</span>
</div>
<div class="tea-txt">
<!-- <p class="tea-name">{{item.doctorName}}</p> -->
<div class="tea-position">
{{item.courseName}}
</div>
</div>
</div>
<div class="no-more" v-if="list.length == 0">暂无数据</div>
</div>
</div>
</section>
</template>
<script>
import teacherTop from '../../components/teachers/teach-top';
import {teacher,teacher_info_collect} from '../../utils/buryingPoint';
export default {
components:{
teacherTop
},
data(){
return {
isScroll:false,
backMethod: 'inner',
list: [],
newsList: [],
dir: 2,
doctorId: '',
doctorParm: {
studyCount: 0,
followCount: 0,
doctor: {
app_image_url: '',
avatar_image_url: '',
name: '',
title: ''
}
},
token: null
}
},
mounted(){
// alert(this.$route.query)
let _this = this
this.doctorId = this.$route.query.id;
this.token = this.$route.query.userToken || this.$route.query.token
this.token = this.token || '4A96FD82B250491683D17888482A1F96' || 'A76D20BE3C79409C9520AB5A997737DF',
this.backMethod = this.$route.query.from === 'appHome' ? 'native' : 'inner'
this.getBaseData();
this.getNewClass();
this.getCourse();
window.__refresh = function() {
// alert('in __refresh')
_this.getBaseData();
_this.getNewClass();
_this.getCourse();
}
window.addEventListener('scroll',this.handleScroll)
},
computed: {
},
methods:{
handleScroll: function(){
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
if(scrollTop > 25){
this.isScroll = true;
}else{
this.isScroll = false;
}
},
//跳转
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(flag, id, name){
// let flag = this.resourceData.item[val].favorFlag;
flag = flag == 1 ? 2 : 1;
let _this = this,
para = {
type: flag,
courseId: id,
token: this.token || '4A96FD82B250491683D17888482A1F96' || 'A76D20BE3C79409C9520AB5A997737DF',
setEntry: 'headers'
}
// alert('para.token: ' + para.token)
this.POST(`contents/diagnosis/favors`, para).then( res => {
// alert(JSON.stringify(res))
if(res.code === '000000'){
_this.handelData(id, flag);
} else {
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
// this.resourceData.item[val].favorFlag = res.code=='000000'?(flag==1? 2:1):flag;
})
// this.$emit('collect',val,this.resourceData.item[val].favorFlag,id,name)
},
// collectFunOld(status, id, courseName){
// status = status == 1 ? 2 : 1;
// let _this = this,
// parm = {
// token: _this.token || '4A96FD82B250491683D17888482A1F96' || 'A76D20BE3C79409C9520AB5A997737DF',
// type: status,
// courseId: id,
// setEntry: 'headers'
// }
// alert(JSON.stringify(parm))
// // alert(this.token)
// _this.POST('contents/favors',parm).then(function(res){
// alert(JSON.stringify(res))
// if(res.code === '000000'){
// _this.handelData(id,status);
// } else {
// rocNative.showNativeToast({
// message: '请先登录'
// })
// }
// })
// this.appBuryingPointEntrust({
// ...teacher_info_collect,
// labelId: id,
// labelValue: courseName
// })
// },
// 埋点
appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val)
},
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 || [];
}
})
this.appBuryingPointEntrust({
...teacher,
labelId: _this.dir,
labelValue: _this.dir === 1 ? '升序' : '降序'
})
},
//新课程
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>
<style>
body{background: #fff;height: auto;}
</style>
<style lang="scss" scoped>
body{background: #fff}
@import '../../style/mixin';
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
width: 100%;
overflow: hidden;
@include sc(0.6rem, #666);
}
.tea-detail{
height: px2rem(154px);
position: absolute;
width: 100%;
left: 0;
top:-(px2rem(64px));
z-index: 10;
@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(45px);
height: px2rem(45px);
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);
height: px2rem(17px);
overflow: hidden;
width: 90%;
margin:0 auto;
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;
height: px2rem(273px);
.item-new-box{
width: px2rem(10000000px);
}
.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%;
border-radius: px2rem(6px);
margin-right: px2rem(17px);
}
}
.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);
}
.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{
padding:px2rem(90px) 0 px2rem(30px) 0;
position: relative;
.teach-title{
font-size: px2rem(18px);
padding-bottom: px2rem(15px);
padding-top: px2rem(15px);
color:#333;
}
.teach-list{
overflow: hidden;
}
.no-more{
text-align: center;
color:#999;
font-size: px2rem(12px);
}
.opt-span{
span{
color:#449284;
font-size: px2rem(13px);
display: inline-block;
vertical-align: middle;
height: px2rem(15px);
line-height: px2rem(15px);
img{
display: inline-block;
width: px2rem(15px);
height: px2rem(15px);
vertical-align: middle;
}
}
}
.list-item{
width: px2rem(170px);
margin-right: px2rem(5px);
margin-top: px2rem(15px);
float: left;
box-shadow: 0 px2rem(4px) px2rem(6px) RGBA(0, 0, 0, 0.06);
}
.mr0{
margin-right: 0
}
.tea-txt{
padding:px2rem(7px);
}
.tea-img{
width: px2rem(170px);
height: px2rem(96px);
position: relative;
img{
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px) px2rem(3px) 0 0 ;
}
.learn-p{
padding-left: px2rem(5px);
position: absolute;
width: 100%;
left:0;
bottom: 0;
background: #333;
background: -webkit-linear-gradient(left, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
background: -o-linear-gradient(right, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
background: -moz-linear-gradient(right, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
background: linear-gradient(to right, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
color:#fff;
font-size: px2rem(11px);
height: px2rem(20px);
line-height: px2rem(20px);
}
}
.tea-name{
color:#333;
font-size: px2rem(14px);
padding: px2rem(7px) 0 px2rem(3px) 0;
}
.tea-position{
height: px2rem(38px);
font-size: px2rem(14px);
line-height: px2rem(19px);
color:#333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
}
.home-header {
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.logo_img{
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
</style>
<template>
<section class="font-style">
<teacherTop :topTitle="topTitle" :isScroll="isScroll" :isShowCount="isShowCount" :studyCount="studyCount" :followCount="followCount"></teacherTop>
<div class="teach-opt">
<div class="teach-title">讲师名录</div>
<div class="opt-span">
<span class="" @click="sortFun">人气
<img src="../../images/sort-u.png" v-if="dir == 1">
<img src="../../images/sort-d.png" v-if="dir == 2">
</span>
</div>
<div class="teach-list">
<div :class="index%2==1?'list-item mr0':'list-item'" v-for="(item, index) in list"
@click="goToDetail(item)" :key="index">
<div class="tea-img" :style="'background:'+ item.bgColor">
<img :src="item.doctorImg">
<span class="learn-p">{{item.joinNum | yLocalString}}人已学</span>
</div>
<div class="tea-txt">
<div class="tea-name">{{item.doctorName}}</div>
<div class="tea-position">
{{item.doctorHospital}}
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
import teacherTop from '../../components/teachers/teach-top-new';
import {teacher_back,fast_sicon,hot_teacher,screen,teacher,teacherother} from '../../utils/buryingPoint';
export default {
components:{
teacherTop
},
data(){
return {
topTitle: '讲师集',
isScroll:false,
token: '',
list:[],
isShowCount:true,
followCount:0,
studyCount:0,
col:1, //0综合,1人气,2资源数,3姓名首字母
dir:2,//1:正序 2:逆序
}
},
mounted(){
let _this = this
this.token = this.$route.query.userToken || this.$route.query.token
// this.getUserInfo()
this.getData();
// window.__getUserInfo = function(parm){
// // alert('in __getUserInfo')
// _this.token = parm.userToken || _this.$route.query.token;
// this.getData();
// }
window.__refresh = function(parm){
_this.getData();
}
window.addEventListener('scroll',this.handleScroll)
},
computed:{
},
methods:{
handleScroll:function(){
var scrollTop=window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
if(scrollTop > 25){
this.isScroll = true;
}else{
this.isScroll = false;
}
},
//获取版本号
getUserInfo(){
rocNative.getUserInfo({
__funcName: '__getUserInfo'
})
},
goToDetail(item){
let _this = this;
this.$router.push({
path: '/teachersDetail',
query:{
id: item.doctorId,
token: _this.token
}
})
this.appBuryingPointEntrust({
...teacher,
labelId: item.doctorId,
labelValue: item.doctorName
})
},
// 埋点
appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val)
},
//排序
sortFun(){
this.dir = this.dir == 1 ? 2 : 1;
this.getData()
},
randomBg(d){
for(let i=0;i<d.length;i++){
if(i%4 == 0){
d[i].bgColor = '#EBF6F1'
}else if(i%4 == 1){
d[i].bgColor = '#EDF3FA'
}else if(i%4 == 2){
d[i].bgColor = '#F0F0FA'
}else if(i%4 == 3){
d[i].bgColor = '#F6EFE6'
}
}
/// console.log(d);
},
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;
if(_this.list.length>0){
_this.randomBg(_this.list);
}
}
})
this.appBuryingPointEntrust({
...teacher,
labelId: _this.dir,
labelValue: _this.dir === 1 ? '升序' : '降序'
})
}
}
}
</script>
<style>
body{background: #fff}
</style>
<style lang="scss" scoped>
body{background: #fff}
@import '../../style/mixin';
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
width: 100%;
overflow: hidden;
@include sc(0.6rem, #666);
}
.teach-opt{
padding:px2rem(26px) px2rem(15px) px2rem(15px) px2rem(15px);
.teach-title{
font-size: px2rem(18px);
// padding-bottom: px2rem(0px);
color:#333;
}
.teach-list{
overflow: hidden;
}
.opt-span{
span{
color:#449284;
font-size: px2rem(13px);
display: inline-block;
vertical-align: middle;
height: px2rem(10px);
line-height: px2rem(10px);
img{
display: inline-block;
width: px2rem(15px);
height: px2rem(15px);
vertical-align: middle;
}
}
}
.list-item{
width: px2rem(170px);
margin-right: px2rem(5px);
margin-top: px2rem(15px);
border-radius: 0 0 px2rem(3px) px2rem(3px) ;
float: left;
box-shadow: 0 px2rem(4px) px2rem(6px) RGBA(0, 0, 0, 0.06);
}
.mr0{
margin-right: 0
}
.tea-txt{
padding:px2rem(5px) px2rem(7px) ;
}
.tea-img{
width: px2rem(170px);
height: px2rem(83px);
position: relative;
border-radius: px2rem(3px) px2rem(3px) 0 0 ;
img{
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px) px2rem(3px) 0 0 ;
}
.learn-p{
padding-left: px2rem(5px);
position: absolute;
width: 100%;
left:0;
bottom: 0;
background: #333;
background: -webkit-linear-gradient(left, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
background: -o-linear-gradient(right, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
background: -moz-linear-gradient(right, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
background: linear-gradient(to right, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
color:#fff;
font-size: px2rem(11px);
height: px2rem(20px);
line-height: px2rem(20px);
}
}
.tea-name{
padding: 0;
color:#333;
font-size: px2rem(14px);
font-weight: 500;
}
.tea-position{
height: px2rem(30px);
font-size: px2rem(12px);
line-height: px2rem(15px);
color: #666;
font-weight: 400;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
}
.home-header {
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.logo_img{
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
</style>
<template>
<section>
<GroupTitle groupTitle="讲师" :groupNum="groupNum" />
<div class="font-style">
<div class="teach-opt">
<div class="teach-list">
<div :class="index%2==1?'list-item mr0':'list-item'"
v-for="(item, index) in parmData" :key="index"
@click="goToDetail(item)">
<div class="tea-img" :style="'background:'+ item.bgColor">
<img :src="item.doctorImg">
<span class="learn-p">{{item.joinNum}}人已学</span>
<!-- <span class="learn-p">{{item.joinNum | yLocalString}}人已学</span> -->
</div>
<div class="tea-txt">
<div class="tea-name">{{item.doctorName}}</div>
<div class="tea-position">
{{item.doctorHospital}}
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
// import teacherTop from '../../components/teachers/teach-top-new';
// import {
// teacher_back,
// fast_sicon,
// hot_teacher,
// screen,
// teacher,
// teacherother
// } from '../../utils/buryingPoint';
import GroupTitle from '@/components/business/group-title';
export default {
components: {
GroupTitle
},
data() {
return {
topTitle: '讲师集',
isScroll: false,
token: '',
list: [],
isShowCount: true,
followCount: 0,
studyCount: 0,
col: 1, //0综合,1人气,2资源数,3姓名首字母
dir: 2, //1:正序 2:逆序
}
},
props: {
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
}
},
mounted() {
let _this = this
this.token = this.$route.query.userToken || this.$route.query.token
// this.getUserInfo()
// this.getData();
// window.__getUserInfo = function(parm){
// // alert('in __getUserInfo')
// _this.token = parm.userToken || _this.$route.query.token;
// this.getData();
// }
window.__refresh = function (parm) {
_this.getData();
}
window.addEventListener('scroll', this.handleScroll)
},
computed: {
// groupNum() {
// return this.parmData.length + ''
// }
},
methods: {
handleScroll: function () {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
if (scrollTop > 25) {
this.isScroll = true;
} else {
this.isScroll = false;
}
},
//获取版本号
getUserInfo() {
rocNative.getUserInfo({
__funcName: '__getUserInfo'
})
},
goToDetail(item) {
let _this = this;
this.$router.push({
path: '/details',
query: {
id: item.doctorId,
token: _this.token
}
})
// this.appBuryingPointEntrust({
// ...teacher,
// labelId: item.doctorId,
// labelValue: item.doctorName
// })
},
// 埋点
appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val)
},
//排序
sortFun() {
this.dir = this.dir == 1 ? 2 : 1;
this.getData()
},
randomBg(d) {
for (let i = 0; i < d.length; i++) {
if (i % 4 == 0) {
d[i].bgColor = '#EBF6F1'
} else if (i % 4 == 1) {
d[i].bgColor = '#EDF3FA'
} else if (i % 4 == 2) {
d[i].bgColor = '#F0F0FA'
} else if (i % 4 == 3) {
d[i].bgColor = '#F6EFE6'
}
}
/// console.log(d);
},
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;
if (_this.list.length > 0) {
_this.randomBg(_this.list);
}
}
})
// this.appBuryingPointEntrust({
// ...teacher,
// labelId: _this.dir,
// labelValue: _this.dir === 1 ? '升序' : '降序'
// })
}
}
}
</script>
<style>
body {
background: #fff
}
</style>
<style lang="scss" scoped>
body {
background: #fff
}
@import '../../style/mixin';
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
width: 100%;
overflow: hidden;
@include sc(0.6rem, #666);
}
.teach-opt {
padding: 0 px2rem(15px) px2rem(15px) px2rem(15px);
.teach-title {
font-size: px2rem(18px);
// padding-bottom: px2rem(0px);
color: #333;
}
.teach-list {
margin-top: px2rem(-14px);
overflow: hidden;
}
.opt-span {
span {
color: #449284;
font-size: px2rem(13px);
display: inline-block;
vertical-align: middle;
height: px2rem(10px);
line-height: px2rem(10px);
img {
display: inline-block;
width: px2rem(15px);
height: px2rem(15px);
vertical-align: middle;
}
}
}
.list-item {
width: px2rem(170px);
margin-right: px2rem(5px);
margin-top: px2rem(15px);
border-radius: 0 0 px2rem(3px) px2rem(3px);
float: left;
box-shadow: 0 px2rem(4px) px2rem(6px) RGBA(0, 0, 0, 0.06);
}
.mr0 {
margin-right: 0
}
.tea-txt {
padding: px2rem(5px) px2rem(7px);
}
.tea-img {
width: px2rem(170px);
height: px2rem(83px);
position: relative;
border-radius: px2rem(3px) px2rem(3px) 0 0;
img {
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px) px2rem(3px) 0 0;
}
.learn-p {
padding-left: px2rem(5px);
position: absolute;
width: 100%;
left: 0;
bottom: 0;
background: #333;
background: -webkit-linear-gradient(left, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: -o-linear-gradient(right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: -moz-linear-gradient(right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: linear-gradient(to right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
color: #fff;
font-size: px2rem(11px);
height: px2rem(20px);
line-height: px2rem(20px);
}
}
.tea-name {
padding: 0;
color: #333;
font-size: px2rem(14px);
font-weight: 500;
}
.tea-position {
height: px2rem(30px);
font-size: px2rem(12px);
line-height: px2rem(15px);
color: #666;
font-weight: 400;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
}
.home-header {
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.logo_img {
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
</style>
<template>
<section>
<GroupTitle groupTitle="讲师" :groupNum="groupNum" :showTitle="showTitle" :showOrder="showOrder"/>
<div class="font-style">
<div class="teach-opt">
<div class="teach-list">
<div :class="index%2==1?'list-item mr0':'list-item'"
v-for="(item, index) in parmData" :key="index"
@click="goToDetail(item)">
<div class="tea-img" :style="'background:'+ item.bgColor">
<img :src="item.doctorImg">
<span class="learn-p">{{item.joinNum}}人已学</span>
<!-- <span class="learn-p">{{item.joinNum | yLocalString}}人已学</span> -->
</div>
<div class="tea-txt">
<div class="tea-name">{{item.doctorName}}</div>
<div class="tea-position">
{{item.doctorHospital}}
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
// import {
// teacher_back,
// fast_sicon,
// hot_teacher,
// screen,
// teacher,
// teacherother
// } from '../../utils/buryingPoint';
import GroupTitle from '@/components/business/group-title';
export default {
components: {
GroupTitle
},
data() {
return {
topTitle: '讲师集',
isScroll: false,
token: '',
list: [],
isShowCount: true,
followCount: 0,
studyCount: 0,
col: 1, //0综合,1人气,2资源数,3姓名首字母
dir: 2, //1:正序 2:逆序
}
},
props: {
parmData: {
type: Array,
default: () => []
},
groupNum: {
type: String,
default: '0'
},
showTitle: {
type: Boolean,
default: true
},
showOrder: {
type: Boolean,
default: false
}
},
mounted() {
let _this = this
this.token = this.$route.query.userToken || this.$route.query.token
// this.getUserInfo()
// this.getData();
// window.__getUserInfo = function(parm){
// // alert('in __getUserInfo')
// _this.token = parm.userToken || _this.$route.query.token;
// this.getData();
// }
window.__refresh = function (parm) {
_this.getData();
}
window.addEventListener('scroll', this.handleScroll)
},
computed: {
// groupNum() {
// return this.parmData.length + ''
// }
},
methods: {
handleScroll: function () {
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
if (scrollTop > 25) {
this.isScroll = true;
} else {
this.isScroll = false;
}
},
//获取版本号
getUserInfo() {
rocNative.getUserInfo({
__funcName: '__getUserInfo'
})
},
goToDetail(item) {
let _this = this;
this.$router.push({
path: '/details',
query: {
id: item.doctorId,
token: _this.token
}
})
// this.appBuryingPointEntrust({
// ...teacher,
// labelId: item.doctorId,
// labelValue: item.doctorName
// })
},
// 埋点
appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val)
},
//排序
sortFun() {
this.dir = this.dir == 1 ? 2 : 1;
this.getData()
},
randomBg(d) {
for (let i = 0; i < d.length; i++) {
if (i % 4 == 0) {
d[i].bgColor = '#EBF6F1'
} else if (i % 4 == 1) {
d[i].bgColor = '#EDF3FA'
} else if (i % 4 == 2) {
d[i].bgColor = '#F0F0FA'
} else if (i % 4 == 3) {
d[i].bgColor = '#F6EFE6'
}
}
/// console.log(d);
},
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;
if (_this.list.length > 0) {
_this.randomBg(_this.list);
}
}
})
// this.appBuryingPointEntrust({
// ...teacher,
// labelId: _this.dir,
// labelValue: _this.dir === 1 ? '升序' : '降序'
// })
}
}
}
</script>
<style>
body {
background: #fff
}
</style>
<style lang="scss" scoped>
body {
background: #fff
}
@import '../../style/mixin';
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
width: 100%;
overflow: hidden;
@include sc(0.6rem, #666);
}
.teach-opt {
padding: 0 px2rem(15px) px2rem(15px) px2rem(15px);
.teach-title {
font-size: px2rem(18px);
// padding-bottom: px2rem(0px);
color: #333;
}
.teach-list {
margin-top: px2rem(-14px);
overflow: hidden;
}
.opt-span {
span {
color: #449284;
font-size: px2rem(13px);
display: inline-block;
vertical-align: middle;
height: px2rem(10px);
line-height: px2rem(10px);
img {
display: inline-block;
width: px2rem(15px);
height: px2rem(15px);
vertical-align: middle;
}
}
}
.list-item {
width: px2rem(170px);
margin-right: px2rem(5px);
margin-top: px2rem(15px);
border-radius: 0 0 px2rem(3px) px2rem(3px);
float: left;
box-shadow: 0 px2rem(4px) px2rem(6px) RGBA(0, 0, 0, 0.06);
}
.mr0 {
margin-right: 0
}
.tea-txt {
padding: px2rem(5px) px2rem(7px);
}
.tea-img {
width: px2rem(170px);
height: px2rem(83px);
position: relative;
border-radius: px2rem(3px) px2rem(3px) 0 0;
img {
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px) px2rem(3px) 0 0;
}
.learn-p {
padding-left: px2rem(5px);
position: absolute;
width: 100%;
left: 0;
bottom: 0;
background: #333;
background: -webkit-linear-gradient(left, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: -o-linear-gradient(right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: -moz-linear-gradient(right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
background: linear-gradient(to right, RGBA(0, 0, 0, 0.2), RGBA(0, 0, 0, 0));
color: #fff;
font-size: px2rem(11px);
height: px2rem(20px);
line-height: px2rem(20px);
}
}
.tea-name {
padding: 0;
color: #333;
font-size: px2rem(14px);
font-weight: 500;
}
.tea-position {
height: px2rem(30px);
font-size: px2rem(12px);
line-height: px2rem(15px);
color: #666;
font-weight: 400;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
}
.home-header {
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.logo_img {
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
</style>
<template>
<section class="xb-pop-wrap">
<div v-if="show" class="img-content">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/xbdzz/xb_pop.png"/>
<span @click="goSearch"></span>
<img class="close" @click="close" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/xbdzz/xb_close.png"/>
</div>
<div v-if="show" @click="close" class="shadow"></div>
</section>
</template>
<script>
export default {
data() {
return {
show: true
}
},
methods: {
// 关闭xb弹框
close() {
this.show = false
},
// 去看看
goSearch() {
this.$router.push({path:'xb',query:{pop:true}})
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.xb-pop-wrap {
.img-content {
position: fixed;
left: px2rem(61px);
top: px2rem(192px);
z-index: 9999999999;
width: px2rem(250px);
img {
width: 100%;
}
img.close {
display: block;
width: px2rem(30px);
margin: 0 auto;
}
span {
position: absolute;
left: px2rem(46px);
bottom: px2rem(41px);
display: block;
width: px2rem(158px);
height: px2rem(46px);
}
}
.shadow {
position: fixed;
left: 0;
top: 0;
z-index: 999999999;
background: #000;
opacity: 0.5;
width: 100%;
height: 100%;
}
}
</style>
<template>
<section class="loader loader--style3" title="2">
<div class="loader-mask"></div>
<article class="confirm-content">
<span class="confirm-content-title">{{confirmTitle}}</span>
<div class="confirm-content-split"></div>
<div class="confirm-content-btn">
<span class="confirm-content-btn-confirm" @click="confirm">{{confirmBtnText}}</span>
<span class="confirm-content-btn-split"></span>
<span class="confirm-content-btn-concle" @click="cancle">{{concleBtnText}}</span>
</div>
</article>
</section>
</template>
<script>
export default {
data() {
return {
}
},
props: {
confirmTitle: {
type: String,
default: '确认删除所有搜索历史'
},
confirmBtnText: {
type: String,
default: '删除'
},
concleBtnText: {
type: String,
default: '再想想'
}
},
methods: {
confirm() {
this.$emit('confirm')
},
cancle() {
this.$emit('cancle')
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.loader {
&-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 100;
background: rgba(205,205,205, 0.6);
}
.confirm-content {
position: absolute;
top: px2rem(280px);
left: px2rem(52.5px);
z-index: 101;
width: px2rem(270px);
height: px2rem(116px);
border-radius: px2rem(6px);
text-align: center;
font-weight: 400;
background: #fff;
&-title {
display: inline-flex;
height: px2rem(70px);
line-height: px2rem(70px);
font-size: px2rem(17px);
color: rgba(102,102,102,1);
}
&-split {
border-top: 1px solid #F0F0F0;
}
&-btn {
display: flex;
padding-top: px2rem(14px);
justify-content: center;
font-size: px2rem(15px);
&-confirm {
color: #999;
}
&-split {
margin: 0 px2rem(50px);
border-left: 1px solid #F0F0F0;
}
&-concle {
color: #4A9E8F;
}
}
}
}
</style>
<template>
<div class="loader loader--style3" title="2">
<div class="loader-mask"></div>
<svg version="1.1" id="loader-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="40px" height="40px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
<animateTransform attributeType="xml"
attributeName="transform"
type="rotate"
from="0 25 25"
to="360 25 25"
dur="0.6s"
repeatCount="indefinite"/>
</path>
</svg>
</div>
</template>
<style lang="scss" scoped>
@import '../../style/mixin';
.loader {
margin: 0 0 2em;
height: 100px;
width: 20%;
text-align: center;
padding: 1em;
margin: 0 auto 1em;
display: inline-block;
vertical-align: top;
&-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 100;
background: rgba(205,205,205, 0.8);
}
svg {
position: absolute;
top: px2rem(280px);
left: px2rem(166px);
z-index: 101;
}
}
svg path, svg rect{
fill: #449284;
}
</style>
<template>
<div class="up-maps-loading" v-show="lock">
<img src="../../images/loading-new.png">&nbsp;正在加载
<div class="loader loader--style3" title="2">
<div class="loader-mask"></div>
<svg version="1.1" id="loader-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="40px" height="40px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve">
<path fill="#000" d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z">
<animateTransform attributeType="xml"
attributeName="transform"
type="rotate"
from="0 25 25"
to="360 25 25"
dur="0.6s"
repeatCount="indefinite"/>
</path>
</svg>
</div>
</template>
<script>
export default {
data(){
return{
positionY: 0,
timer: null,
lock:true
}
},
mounted(){
// this.timer = setInterval(() => {
// this.positionY ++;
// }, 600)
},
// beforeDestroy(){
// clearInterval(this.timer);
// }
}
</script>
</template>
<style lang="scss" scoped>
@import '../../style/mixin';
.up-maps-loading{
margin: 10px 0;
text-align: center;
line-height: 20px;
}
.up-maps-loading>img{
display: inline-block;
margin: 0 auto;
width: 20px;
height: auto;
animation: circle 1s infinite linear;
-webkit-animation: circle 1s infinite linear;
.loader {
&-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 100;
background: rgba(205,205,205, 0.8);
}
svg {
position: absolute;
top: px2rem(280px);
left: px2rem(166px);
z-index: 101;
}
}
svg path, svg rect{
fill: #449284;
}
</style>
......@@ -48,7 +48,8 @@
}
.load_img{
@include wh(100%, 100%);
background: url(../../images/icon_loading.png) no-repeat 0 0;
// background: url(../../images/icon_loading.png) no-repeat 0 0;
background: url(../../images/loading-new.png) no-repeat 0 0;
background-size: 2.5rem auto;
transform: translateY(0px);
animation: load .6s infinite ease-in-out;
......
......@@ -3,7 +3,7 @@
<ul v-load-more="loaderMore" v-if="shopListArr.length" type="1">
<router-link :to="{path: 'shop', query:{geohash, id: item.id}}" v-for="item in shopListArr" tag='li' :key="item.id" class="shop_li">
<section>
<img v-lazy="imgBaseUrl + item.image_path" class="shop_img">
<img :src="imgBaseUrl + item.image_path" class="shop_img">
</section>
<hgroup class="shop_right">
<header class="shop_detail_header">
......
......@@ -12,7 +12,7 @@
<div class="recommends">
<div class="recommend-item" v-for="(course,index) in courses" :key="index">
<div class="top-sec">
<img class="recommend-image" v-lazy="course.imgUrl" alt="">
<img class="recommend-image" :src="course.imgUrl" alt="">
<div
class="recommend-course-tag"
:class="{'active':hasCourseTag=='true','left-tag':tagPosition=='left','right-tag':tagPosition=='right'}"
......
......@@ -2,7 +2,7 @@
<div class="info">
<!-- 左侧头像 -->
<div class="info-profile">
<img v-lazy="profileImage" alt="">
<img :src="profileImage" alt="">
</div>
<!-- 右侧个人信息 -->
<div class="info-detail">
......
......@@ -11,7 +11,7 @@
<div class="recommends">
<div class="recommend-item" v-for="(recommend,index) in recommends" :key="index">
<div class="top-sec">
<img class="recommend-image" v-lazy="recommend.imgUrl" alt="">
<img class="recommend-image" :src="recommend.imgUrl" alt="">
<div
class="recommend-course-tag"
:class="{'active':hasCourseTag=='true','left-tag':tagPosition=='left','right-tag':tagPosition=='right'}"
......
<template>
<div class="wrapper" :class="{active:isScroll}">
<!-- <div class="status-bar"></div> -->
<div class="top-header" :class="{active:isScroll}">
<div class="content left-icon" @click="goBack()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png" alt="">
</div>
<div v-if="isScroll && isJSJ" class="content title" :class="{active:isScroll}">讲师集</div>
<div v-if="isScroll && !isJSJ" class="content title" :class="{active:isScroll}">云鹊医讲师</div>
<!-- <div class="content right-icon" @click="share()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon.png" alt="">
</div> -->
</div>
</div>
</template>
<script>
import {teacher_back} from '../../utils/buryingPoint.js';
// import {shareUrl} from '@/utils/index'
import {shareUrl} from '../../utils/index.js'
export default {
name:'MyHeader',
props:{
isOpacity:{
type:Boolean,
default:true
},
isScroll:{
type:Boolean,
default:false
},
isShare:{
type:Boolean,
default:true
},
doctorId:{
type:String,
default:""
},
backMethod: {
type: String,
default: 'native'
},
isJSJ: {
type: Boolean,
default: true
}
},
computed: {
topTitle2() {
return this.topTitle
}
},
mounted(){
// console.log(this.isShare);
console.log(shareUrl);
console.log(`${shareUrl}`+'?doctorId='+this.doctorId)
},
methods:{
// backPre(){
// if(this.backMethod === 'inner') {
// this.$router.go(-1)
// } else {
// rocNative.goBack()
// }
// },
goBack(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
share(){
rocNative.shareWechat({
title1:'个人评价',
title2:'个人评价出现了喔',
shareUrl:`${shareUrl}gpr#/home`+'?doctorId='+this.doctorId,
type:6,
shareImageUrl:'https://file.yunqueyi.com/logo.png?version='+new Date().getTime(),
shareId:0
})
this.buryingPointShare();
},
/////////埋点//////////
//返回
buryingPointBack:function(){
rocNative.appBuryingPointEntrust({
...teacher_back,
functionCode:'f_gpranking',
actionCode:'c_back',
labelValue:'返回',
createdTime:new Date().getTime()
})
},
//分享
buryingPointShare:function(){
rocNative.appBuryingPointEntrust({
...teacher_back,
functionCode:'f_gpranking',
actionCode:'c_share',
labelValue:'分享',
createdTime:new Date().getTime()
})
},
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.wrapper{
position:fixed;
top: 0;
width:100%;
z-index:100000000;
/**************表头******************/
.top-header{
display:flex;
display:-webkit-flex;
flex-direction: row;
// justify-content:center;//这个会整体居中,但是使用一些左右不等的margin时,会影响效果
align-items:center;
width:100%;
height:px2rem(45px);//header高度
margin-top:px2rem(25px);///////////statusbar高度!!!!!!!!!!!!!!!!!!!!!默认使用此高度
}
.top-header.active{
// margin-top:0;
border-bottom:px2rem(2px) solid #e7e7e7;
background-color:#fff;
}
.top-header .left-icon{
margin-left:px2rem(15px);
}
.top-header .title{
width:px2rem(116px);
height:px2rem(18px);
line-height:px2rem(18px);
margin-left:px2rem(90px);
text-align:center;
color:#fff;
font-size:px2rem(18px);
}
.top-header .title.active{
color:#000;
}
.top-header .right-icon{
margin-left:px2rem(95px);
}
.top-header .left-icon img,.top-header .right-icon img{
display:block;//这样其外的div可以正好将其包裹住
width:px2rem(25px);
height:px2rem(25px);
}
}
.wrapper.active{
background-color:#fff;
// background-color:rgba(0,0,0,0.84);
// background-color:rgba(255,255,255,0.34)
}
</style>
<template>
<div>
<back-header :isScroll="isScroll" :backMethod="backMethod" :isJSJ="isJSJ"></back-header>
<div class="teach-top">
<div class="tc title">{{parmObj}}</div>
<div class="tc count" v-if="isShowCount">{{studyCount.toLocaleString()}}人学习&nbsp;&nbsp;&nbsp;&nbsp;{{followCount.toLocaleString()}}人关注</div>
</div>
</div>
</template>
<script>
import BackHeader from '../../components/teachers/back-header';
export default {
data () {
return {
bgColor:'#fff',
parmObj:''
}
},
components:{
BackHeader
},
props:{
isShowCount: {
default:false,
type:Boolean
},
followCount: {
type:Number,
default:0
},
studyCount: {
type:Number,
default:0
},
statusBarHeight: {
type:Number,
default:0
},
isScroll:{
type: Boolean,
default: false
},
backMethod: {
type: String,
default: 'native'
},
isJSJ: {
type: Boolean,
default: true
}
},
mounted(){
this.parmObj = this.isShowCount ? '讲师集' : '云鹊医讲师'
},
methods: {
backPre(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.pt150 {
margin-top: px2rem(150px)
}
.teach-top{
width: 100%;
height: px2rem(145px);
// @include bis('../../images/treatmentHeaderTop.png');
@include bis('../../images/treatmentHeaderTop.png');
.tc{
text-align: center;
}
.back{
position: fixed;
z-index: 110;
left:px2rem(18px);
top: px2rem(25px);
display: inline-block;
width: px2rem(50px);
height: px2rem(50px);
img{
width: px2rem(25px);
height: px2rem(25px);
}
}
.title{
font-size: px2rem(25px);
color: #fff;
padding: px2rem(45px) 0 px2rem(8px);
font-weight: 500
}
.count{
font-size: px2rem(15px);
line-height: px2rem(21px);
color: #fff;
}
}
</style>
<template>
<div class="teach-top">
<span class="back" @click="backPre">
<!-- <img src="../../images/left-icon.png"> -->
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png">
</span>
<div class="tc title">{{parmObj}}</div>
<div class="tc count" v-if="isShowCount">{{studyCount.toLocaleString()}}人学习&nbsp;&nbsp;&nbsp;&nbsp;{{followCount.toLocaleString()}}人关注</div>
</div>
</template>
<script>
export default {
data () {
return {
parmObj:''
}
},
props:{
isShowCount: {
default:false,
type:Boolean
},
followCount: {
type:Number,
default:0
},
studyCount: {
type:Number,
default:0
},
statusBarHeight: {
type:Number,
default:0
},
backMethod: {
type: String,
default: 'native'
}
},
mounted(){
this.parmObj = this.isShowCount ? '讲师集' : '云鹊医讲师'
},
methods: {
backPre(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.teach-top{
width: 100%;
height: px2rem(185px);
position: relative;
@include bis('../../images/headerTop.png');
.tc{
text-align: center;
}
.back{
position: fixed;
z-index: 110;
left:px2rem(18px);
top: px2rem(25px);
display: inline-block;
width: px2rem(50px);
height: px2rem(50px);
img{
width: px2rem(25px);
height: px2rem(25px);
}
}
.title{
font-size: px2rem(25px);
color: #fff;
padding: px2rem(55px) 0 px2rem(8px) 0;
font-weight: 500
}
.count{
font-size: px2rem(15px);
line-height: px2rem(21px);
color: #fff;
}
}
</style>
<template>
<div>
<back-header :isScroll="isScroll" :backMethod="backMethod" :isJSJ="isJSJ"></back-header>
<div class="teach-top">
<!-- <div class="teach-top" :class="{'pt150': isScroll}"> -->
<!-- <div class="back" v-if="isScroll" @click="backPre" style="flex-direction:row;width:100%;">
<img src="../../images/left-icon.png">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png">
<span style="padding-bottom:10px;">dddd</span>
</div> -->
<!-- <TopNav :bgColor="bgColor" :title="navTitle" :isNavFix="isNavFix" :burialPoint="pointStyle"></TopNav> -->
<div class="tc title">{{parmObj}}</div>
<div class="tc count" v-if="isShowCount">{{studyCount.toLocaleString()}}人学习&nbsp;&nbsp;&nbsp;&nbsp;{{followCount.toLocaleString()}}人关注</div>
</div>
</div>
</template>
<script>
import BackHeader from '../../components/teachers/back-header';
export default {
data () {
return {
bgColor:'#fff',
parmObj:''
}
},
components:{
BackHeader
},
props:{
isShowCount: {
default:false,
type:Boolean
},
followCount: {
type:Number,
default:0
},
studyCount: {
type:Number,
default:0
},
statusBarHeight: {
type:Number,
default:0
},
isScroll:{
type: Boolean,
default: false
},
backMethod: {
type: String,
default: 'native'
},
isJSJ: {
type: Boolean,
default: true
}
},
mounted(){
this.parmObj = this.isShowCount ? '讲师集' : '云鹊医讲师'
},
methods: {
backPre(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.pt150 {
margin-top: px2rem(150px)
}
.teach-top{
width: 100%;
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.tc{
text-align: center;
}
.back{
position: fixed;
z-index: 110;
left:px2rem(18px);
top: px2rem(25px);
display: inline-block;
width: px2rem(50px);
height: px2rem(50px);
img{
width: px2rem(25px);
height: px2rem(25px);
}
}
.title{
font-size: px2rem(25px);
color: #fff;
padding: px2rem(55px) 0 px2rem(8px) 0;
font-weight: 500
}
.count{
font-size: px2rem(15px);
line-height: px2rem(21px);
color: #fff;
}
}
</style>
<template>
<div class="wrapper" :class="{active:isScroll}">
<!-- <div class="status-bar"></div> -->
<div class="top-header" :class="{active:isScroll}">
<div class="content left-icon" @click="backPre()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png" alt="">
</div>
<div v-if="isScroll" class="content title" :class="{active:isScroll}">{{title}}</div>
<div v-if="!showShare" class="content right-icon" @click="share()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon.png" alt="">
</div>
</div>
</div>
</template>
<script>
import {mapMutations} from 'vuex'
// import {shareUrl} from '@/utils/index'
import {shareUrl} from '../../utils/index.js'
export default {
name:'MyHeader',
props:{
isOpacity:{
type:Boolean,
default:true
},
isScroll:{
type:Boolean,
default:false
},
showShare:{
type: Boolean,
default:true
},
doctorId:{
type:String,
default:""
},
title:{
type: String,
default: ""
},
isWeb:{
type: Boolean
}
},
mounted(){
// console.log(this.isShare);
console.log(shareUrl);
console.log(`${shareUrl}`+'?doctorId='+this.doctorId)
},
methods:{
...mapMutations([
'SET_CLEAR_VUEX'
]),
backPre(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else {
rocNative.goBack()
}
},
goBack(){
this.$emit('goBack');
if (this.isWeb) {
this.$router.go(-1)
} else {
rocNative.goBack();
}
this.SET_CLEAR_VUEX()
rocNative.goBack();
},
share(){
rocNative.shareWechat({
title1:'个人评价',
title2:'个人评价出现了喔',
shareUrl:`${shareUrl}gpr#/home`+'?doctorId='+this.doctorId,
type:6,
shareImageUrl:'https://file.yunqueyi.com/logo.png?version='+new Date().getTime(),
shareId:0
})
this.buryingPointShare();
},
//分享
buryingPointShare:function(){
rocNative.appBuryingPointEntrust({
...point_granking,
functionCode:'f_gpranking',
actionCode:'c_share',
labelValue:'分享',
createdTime:new Date().getTime()
})
},
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.wrapper{
position:fixed;
width:100%;
z-index:100000000;
/**************表头******************/
.top-header{
display:flex;
display:-webkit-flex;
flex-direction: row;
// justify-content:center;//这个会整体居中,但是使用一些左右不等的margin时,会影响效果
align-items:center;
width:100%;
height:px2rem(45px);//header高度
margin-top:px2rem(25px);///////////statusbar高度!!!!!!!!!!!!!!!!!!!!!默认使用此高度
}
.top-header.active{
// margin-top:0;
border-bottom:px2rem(2px) solid #e7e7e7;
background-color:#fff;
}
.top-header .left-icon{
margin-left:px2rem(15px);
}
.top-header .title{
// width:px2rem(116px);
height:px2rem(18px);
line-height:px2rem(18px);
margin-left:px2rem(90px);
text-align:center;
color:#fff;
font-size:px2rem(18px);
}
.top-header .title.active{
color:#000;
}
.top-header .right-icon{
margin-left:px2rem(95px);
}
.top-header .left-icon img,.top-header .right-icon img{
display:block;//这样其外的div可以正好将其包裹住
width:px2rem(25px);
height:px2rem(25px);
}
}
.wrapper.active{
background-color:#fff;
// background-color:rgba(0,0,0,0.84);
// background-color:rgba(255,255,255,0.34)
}
</style>
......@@ -18,7 +18,7 @@ Vue.use(VueLazyload, {
preLoad: 3,
// loading: 'images/change.png',
// error: 'https://file.yunqueyi.com/File/course_doctor/2018-11/20/web_454.png',
error: require('./images/evaluatBg.png'),
error: require('./images/error.png'),
attempt: 1
// lazyComponent: true
})
......
......@@ -2,25 +2,32 @@ import App from '../App'
const index = r => require.ensure([], () => r(require('../views/index')), 'index')
const search = r => require.ensure([], () => r(require('../views/search-index')), 'search')
const result = r => require.ensure([], () => r(require('../views/result')), 'result')
const details = r => require.ensure([], () => r(require('../views/teacher-details')), 'details')
export default [{
path: '/',
component: App, //顶层路由,对应index.html
children: [ //二级路由。对应App.vue
//地址为空时跳转home页面
children: [
{
path: '',
redirect: '/index'
},
//首页城市列表页
{
path: '/index',
component: index
},
//首页城市列表页
{
path: '/search',
component: search
},
{
path: '/result',
component: result
},
{
path: '/details',
component: details
}
]
}]
* {
img {
-webkit-user-select: none;
-moz-user-select: none;
-o-user-select: none;
......
module.exports = {
//讲师集页面-糖尿病
teacher_back: {
menuCode: 'm_teacher_dm',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_teachertitle_dm',
actionCode: 'c_back',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
fast_sicon: {
menuCode: 'm_teacher_dm',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_teachertitle_dm',
actionCode: 'c_fast_sicon',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
hot_teacher: {
menuCode: 'm_teacher_dm',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_teachertitle_dm',
actionCode: 'c_hot_teacher',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
teacher: {
menuCode: 'm_teacher_dm',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_teacherdir_dm',
actionCode: 'c_teacher',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
activity_action: {
menuCode: 'm_teacher_dm',
menuToCode: '',
menuLevel: 4,
// functionCode:'f_activity',
// actionCode: 'c_project',
labelId: '',
labelValue: '',
duration: 1
},
teacherother: {
menuCode: 'm_teacher_dm',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_teacherother_dm',
actionCode: 'c_teacher',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
screen: {
menuCode: 'm_teacher_dm',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_teacherdir_dm',
actionCode: 'c_screen',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
//治疗药物集-糖尿病
medicine_back: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_teachertitle_dm',
actionCode: 'c_back',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
medicine_fast_open: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_teachertitle_dm',
actionCode: 'c_fast_open',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
medicine_hot_title: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_teachertitle_dm',
actionCode: 'c_hot_title',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
medicine_course: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_new_course',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
medicine_collect: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
medicine_collect: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
medicine_teach_course: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_course',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
medicine_teach_screen: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_course',
actionCode: 'c_screen',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
medicine_teach_more: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_course',
actionCode: 'c_more',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
medicine_need_course: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_recommend',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
medicine_need_change: {
menuCode: 'm_medicine_dm',
menuToCode: '',
menuLevel: 1,
functionCode: 'f_recommend',
actionCode: 'c_change',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
//讲师之详情页
teacher_info_back:{
menuCode: 'm_teacher_info',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_teacher_info',
actionCode: 'c_back',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
teacher_info_fast_sicon:{
menuCode: 'm_teacher_info',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_teacher_info',
actionCode: 'c_fast_sicon',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
teacher_info_new_course:{
menuCode: 'm_teacher_info',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_new_course',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
teacher_info_collect:{
menuCode: 'm_teacher_info',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
teacher_info_course:{
menuCode: 'm_teacher_info',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_course',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
teacher_info_screen:{
menuCode: 'm_teacher_info',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_course',
actionCode: 'c_screen',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
teacher_info_more:{
menuCode: 'm_teacher_info',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_course',
actionCode: 'c_more',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
teacher_info_other_course:{
menuCode: 'm_teacher_info',
menuToCode: '',
menuLevel: 4,
functionCode: 'f_course_other',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
//首页
illness_step_icon:{
menuCode: 'm_illness_dm',
menuToCode: '',
menuLevel: 2,
functionCode: 'f_dm',
actionCode: 'c_step_icon',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
illness_hot_title:{
menuCode: 'm_illness_dm',
menuToCode: '',
menuLevel: 2,
functionCode: 'f_dm',
actionCode: 'c_hot_title',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
illness_course:{
menuCode: 'm_illness_dm',
menuToCode: '',
menuLevel: 2,
functionCode: 'f_new_course',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
illness_collect:{
menuCode: 'm_illness_dm',
menuToCode: '',
menuLevel: 2,
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
illness_teach_course:{
menuCode: 'm_illness_dm',
menuToCode: '',
menuLevel: 2,
functionCode: 'f_course',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
illness_teach_more:{
menuCode: 'm_illness_dm',
menuToCode: '',
menuLevel: 2,
functionCode: 'f_course',
actionCode: 'c_more',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
illness_need_course:{
menuCode: 'm_illness_dm',
menuToCode: '',
menuLevel: 2,
functionCode: 'f_recommend',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
illness_need_change:{
menuCode: 'm_illness_dm',
menuToCode: '',
menuLevel: 2,
functionCode: 'f_recommend',
actionCode: 'c_change',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
//治疗页面
treat_back:{
menuCode: 'm_treat_dm',
menuToCode: '',
menuLevel: 3,
functionCode: 'f_dm',
actionCode: 'c_back',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
treat_fast_sicon:{
menuCode: 'm_treat_dm',
menuToCode: '',
menuLevel: 3,
functionCode: 'f_dm',
actionCode: 'c_fast_sicon',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
treat_step_icon:{
menuCode: 'm_treat_dm',
menuToCode: '',
menuLevel: 3,
functionCode: 'f_dm',
actionCode: 'c_step_icon',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
treat_hot_title:{
menuCode: 'm_treat_dm',
menuToCode: '',
menuLevel: 3,
functionCode: 'f_dm',
actionCode: 'c_hot_title',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
treat_course:{
menuCode: 'm_treat_dm',
menuToCode: '',
menuLevel: 3,
functionCode: 'f_new_course',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
treat_collect:{
menuCode: 'm_treat_dm',
menuToCode: '',
menuLevel: 3,
functionCode: 'f_new_course',
actionCode: 'c_collect',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
treat_teach_course:{
menuCode: 'm_treat_dm',
menuToCode: '',
menuLevel: 3,
functionCode: 'f_course',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
treat_teach_more:{
menuCode: 'm_treat_dm',
menuToCode: '',
menuLevel: 3,
functionCode: 'f_course',
actionCode: 'c_more',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
treat_need_course:{
menuCode: 'm_treat_dm',
menuToCode: '',
menuLevel: 3,
functionCode: 'f_recommend',
actionCode: 'c_course',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
},
treat_need_change:{
menuCode: 'm_treat_dm',
menuToCode: '',
menuLevel: 3,
functionCode: 'f_recommend',
actionCode: 'c_change',
labelId: '',
labelValue: '',
createdTime: new Date().getTime(),
duration: 1
}
}
\ No newline at end of file
......@@ -227,7 +227,10 @@ export function jumpEvaluatPage(){
}
// dev地址
const baseUrl = 'https://dev-sc.yunqueyi.com/'
// const baseUrl = 'http://192.168.140.14:10201/'
const baseUrl = 'http://10.177.10.110:10201/'
// const baseUrl = 'http://192.168.140.14:10201/'
// const baseUrl = 'https://dev-sc.yunqueyi.com/'
const apiUrl = 'https://dev-api.yunqueyi.com/'
const evaluatPageUrl = 'https://dev-phome.yunqueyi.com/gpr/#/home'
export const jumpWebPageUrl = 'https://dev-phome.yunqueyi.com/appl/#/'
......
......@@ -117,13 +117,9 @@ module.exports = {
return paramList;
},
// 通用GET请求
GET(api, para, callback,str) {
if(para.token){
para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC'
}
para.token = para.token || this.token || '4DB26DF025DA4289BDC4077AE28D921A'
let url = api + this.getUrlPara(para)
return fetch({
url: getBaseUrl(url),
......@@ -134,10 +130,7 @@ module.exports = {
// 通用POST请求
POST(api, para, callback) {
if(para.token){
para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC'
}
//para.token = para.token || this.token || 'EA67293E35C249C1832583F7AD2669EC' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
para.token = para.token || this.token || '4DB26DF025DA4289BDC4077AE28D921A'
return fetch({
url: getBaseUrl(api),
method: 'post',
......@@ -147,7 +140,7 @@ module.exports = {
// 通用GET请求
API_GET(api, para, callback) {
para.token = para.token || this.token || '625D128F3DBA486AABE7CBA9BDF90E69' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
para.token = para.token || this.token || '4DB26DF025DA4289BDC4077AE28D921A' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
let url = api + this.getUrlPara(para)
return fetch({
url: getApiUrl(url),
......@@ -158,7 +151,7 @@ module.exports = {
// 通用POST请求
API_POST(api, para, callback) {
para.token = para.token || this.token || '625D128F3DBA486AABE7CBA9BDF90E69' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
para.token = para.token || this.token || '4DB26DF025DA4289BDC4077AE28D921A' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
return fetch({
url: getApiUrl(api),
method: 'post',
......
......@@ -29,6 +29,9 @@
if(t == 'getToken'){
__getToken(n);
}
if(t == '__isFirstTime'){
window.__isFirstTime(n)
}
},
__callNative: function (t, a, o) {
"function" == typeof o && (n++ , i[n] = o);
......@@ -75,7 +78,7 @@
})
}
})
}("dispatchEventByModuleCode", "gotoAuthentication", "shareWechat", "backPreviousPage", "bindingWechat", "gotoLogin", "getDeviceInfo", "goBack", "appBuryingPointEntrust", "getAuthPermission", "getAppVersionCode", "getToken", "gotoNewActivity", "gotoNewActivityWithParams", "gotoNewWebActivity", "gotoYidianActivity", "readMessage", "openFiveMintusAudio", "getStatusBarSize", "showNativeDialog", "showNativeToast", "gotoViewTop", "appInit", "checkPermissions", "getStatusBarHeight","setTabMiniIcon","getUserInfo","pauseAudioView");
}("isFirstTime","setFirstTime","dispatchEventByModuleCode", "gotoAuthentication", "shareWechat", "backPreviousPage", "bindingWechat", "gotoLogin", "getDeviceInfo", "goBack", "appBuryingPointEntrust", "getAuthPermission", "getAppVersionCode", "getToken", "gotoNewActivity", "gotoNewActivityWithParams", "gotoNewWebActivity", "gotoYidianActivity", "readMessage", "openFiveMintusAudio", "getStatusBarSize", "showNativeDialog", "showNativeToast", "gotoViewTop", "appInit", "checkPermissions", "getStatusBarHeight","setTabMiniIcon","getUserInfo","pauseAudioView");
if (e.__rocAndroid) {
e.__isAndroid = true
e.__isIOS = false
......
<template>
<div class="main-body" ref="wrapper">
<section :class="isIntStyle">
<!--展开收起学习评价-->
<YqyTopEvaluat :isShowEvluat="isShowEvluat" v-if="isShowEvluat" :parmData="evaluctObj" v-on:evluatFun="getEluatFun"/>
<section class="home-header">
<div class="home-topMenu">
<YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix" v-on:setAppMsg="goAppMsg" @jumpToSS="jumpToSS"/>
</div>
<div class="swiper" style="padding-top:100px;">
<mt-swipe :auto="3000" :speed="speedSwiper" :stopPropagation="prevent">
<mt-swipe-item v-for="(item,index) in listSwiper" :key="index" >
<!-- <img :src="item.imageUrl" @click="goLinkByswiper(item)"/> -->
<img :src="item.imageUrl" @click="goLinkByswiper(item)"/>
</mt-swipe-item>
</mt-swipe>
</div>
</section>
<section class="home-body">
<YqyHomeBanner :userToken="userToken"/>
<div class="pathologic-list">
<div
v-for="(item, index) in listMiddle"
class="pathologic-item"
:style="index % 2 == 1 ? 'margin-right: 0' : ''"
@click="goToPatholo(item)"
:key="index">
<span class="pathologic-icon">
<img :src="item.imageUrl"/>
</span>
<!-- <span class="pathologic-txt fs14">{{item.name}}</span> -->
</div>
<div class="clear"></div>
</div>
<!--继续学习-->
<YqyHomeKeepon :parmData="keeponData" v-if="isShowKeep" v-on:hideKeepon="hideKeepon"/>
<div style="background:#333;">
<input type="search" @click="goToPage" />
</div>
<!--专题分类-->
<YqyCategoryThree1 />
<!--云雀名师-->
<YqyHomeAdv :userToken="userToken"/>
<!--最新课程-->
<YqyTeacherList :parmData="newsDatalist" :userToken="userToken" v-on:setRefrshParm="getRefrshParm"/>
<!--分钟医学院-->
<YqyFiveMinutes :parmData="fiveList" v-if="fiveList.length>0"/>
<!--为你推荐-->
<YqyHomeAdjust :isFixed="isFixed" :statusBarHeight="statusBarHeight" :parmData="adjustList" v-if="adjustList.length>0" :userToken="userToken" v-on:setRefrshParm="getRefrshParm" :adjustPageNo="adjustPageNo"/>
<!--返回顶部-->
<BackTop v-if="isShowBackTop"/>
<a class="news-update" @click="goAnchors" v-show="showNewCorse">
<span class="news-info">
{{updateStr}}个新内容
<i></i>
</span>
</a>
</section>
</section>
</div>
</template>
<script>
import { Swipe, SwipeItem ,Header} from 'mint-ui';
// import { setEventByModuleCode } from '@/utils/index'
// import pullRefresh from '../components/common/pullrefresh'
import {mapState, mapMutations} from 'vuex'
import BackTop from '../components/common/backTop';
import YqyTeacherList from '../components/business-new/yqy-teacher-list';
import YqyTopEvaluat from '../components/business-new/yqy-home-learn-evaluation';
import YqyHomeHeader from '../components/business-new/yqy-home-header';
import YqyHomeAdv from '../components/business-new/yqy-home-adv';
import YqyFiveMinutes from '../components/business-new/yqy-five-minutes';
import YqyCategoryThree1 from '../components/business-new/yqy-category-three-1';
import YqyHomeBanner from '../components/business-new/yqy-home-banner';
import YqyHomeKeepon from '../components/business-new/yqy-home-keepon';
import YqyHomePorter from '../components/business-new/yqy-home-porter';
import YqyHomeAdjust from '../components/business-new/yqy-adjust';
export default {
data(){
return {
wrapperHeight:0,
prevent:true,
topDistance:20,
allLoaded:false,
isAutoFill:false,
showNewCorse:false, // 是否显示新内容 默认不显示
isFixed:false,
isShowBackTop:false,
isShowEvluat:false, //是否显示下拉
evaluctObj:{}, //下拉数据
iconList:[], //icon数据
keeponData:{}, //继续学习
isShowKeep:false,
listCategory:[{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
}], //专题分类数据
yqDoctorList:[],//云雀名师数据
newsDatalist:[],//最新课程
fiveList:[],//五分钟医学院
adjustList:[],//为您推荐
isBodyPull:false,
speedSwiper:300,
stopPropagation:true,
isIntStyle:'',
listSwiper:[{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
}],//轮播图数据
listMiddle: [{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
}],//中间栏数据
scrollTimer:null,
scrollTop:0,
hideNewCourse:true,
updateTotal:0,
msgCount:'',
userToken:'',
searchFix:false,
statusBarHeight:0,
userMobile:'',
userToken:'',
isHeightFromApp:false,
isFirstPull:true,
updateStr:'',
isRefreshFromBack:false,
isRefrshMsg:false,
isFailSwiper:1,
isFailCatagory1:false,
isFailCatagory2:false,
isFailCatagory3:false,
isFailTeaches:false,
isFailFive:false,
adjustPageNo:1,
setTimer:null,
}
},
components:{
Header,
Swipe,
SwipeItem,
BackTop,
YqyTopEvaluat,
YqyTeacherList,
YqyHomeHeader,
YqyHomeAdv,
YqyFiveMinutes,
YqyCategoryThree1,
YqyHomeBanner,
YqyHomeKeepon,
YqyHomePorter,
YqyHomeAdjust
},
created () {
// alert(222)
let _this = this;
_this.initAll()
_this.getUserInfo();
window.__nativeCallMsg = function(params){
_this.msgCount = params.msgNum || '';
// alert(_this.msgCount);
}
window.__getToken = function(params){
//alert(params.userToken);
// _this.userToken = params.userToken
// _this.getUserInfo();
// _this.initByToken(params.userToken);
}
window.__refresh = function(params){
_this.adjustPageNo = 1;
if(_this.setTimer != null){
clearInterval(_this.setTimer);
_this.isShowEvluat = false;
_this.isIntStyle = '';
}
//alert(_this.isShowEvluat);
//返回
if(_this.isRefreshFromBack){
_this.getAdjustData(_this.userToken);
_this.getNewsData(_this.userToken);
} else if(_this.isShowEvluat && !_this.isRefreshFromBack){
_this.isIntStyle = 'font-style pull-down';
_this.fiveTimePull();
} else {
//alert("000")
_this.isIntStyle = '';
_this.isShowEvluat = false;
_this.getUserInfo();
}
}
// window.__getStatusBarHeight = function(parm){
// alert(JSON.stringify(parm))
// _this.statusBarHeight = parm.statusBarHeight;
// _this.isHeightFromApp = true;
// // alert(parm.statusBarHeight);
// }
// alert("token之前");
window.__getUserInfo = function(parm){
//alert(JSON.stringify(parm))
_this.systemType = parm.systemType;
_this.appVersion = parm.appVersion;
_this.token = parm.userToken;
_this.userToken = parm.userToken;
_this.userMobile = parm.userMobile;
if(parm.userMobile && parm.userMobile != ''){
_this.getKeepData(parm.userToken);
}
_this.initByToken(parm.userToken);
}
//_this.getStatusHight();
//
// _this.token = '593F679F62964076AF1C7489DA3343ED';
// _this.msgCount = '2'
// _this.isShowKeep = true;
// _this.isHeightFromApp = true;
// _this.getKeepData(_this.token);
_this.initByToken('593F679F62964076AF1C7489DA3343ED');
// _this.getIconData(_this.token);
// _this.isIntStyle = 'font-style pull-down';
// _this.fiveTimePull();
//_this.getUserInfo();
window.__isFirstTime = function(param) {
alert(JSON.stringify(param))
if(param.isFirst == 'true') {
alert(222)
rocNative.setFirstTime({
projectName: 'YQY_PROJECT_SOUSUO',
isFirst: 'false'
})
}
}
this.isFirstTime()
},
mounted(){
// this.wrapperHeight =document.documentElement.clientHeight - this.$refs.wrapper.getBoundingClientRect().top;
window.addEventListener('scroll', this.scrollFun);
},
beforeDestroyed(){
window.removeEventListener('scroll', this.scrollFun)
},
watch:{
//监听是否收起
isShowEvluat:function(n){
///alert(n);
if(!n && this.isIntStyle == 'font-style pull-up'){
rocNative.setTabMiniIcon({
tabIndex:3,
iconTitle:'学习评价',
iconColor:'',
isSet:true
})
}
}
},
methods:{
...mapMutations([
'SET_DATA'
]),
goToPage(){
this.$router.push({
path: '/search'
})
},
isFirstTime() {
rocNative.isFirstTime({
projectName: 'YQY_PROJECT_SOUSUO',
__funcName: '__isFirstTime'
})
},
jumpToSS() {
this.$router.push({
path:'/search'
})
},
goAppMsg(){
this.isRefrshMsg = true;
// alert(this.isRefrshMsg);
},
hideKeepon(){
this.isShowKeep = false;
},
getRefrshParm(obj){
this.isRefreshFromBack = obj.isclick;
},
//轮播图开始滚动
swiperFun(){
// var swiper = new Swiper('.swiper-container', {
// speed: 600,
//             //loop: true,
//             observer:true,
//             observeParents:true,
//             autoplayDisableOnInteraction : false,
//             autoplay:3000,
// pagination: '.pagination'
// });
},
loadTop(){
//location.reload();
this.$refs.loadmore.onTopLoaded();
},
initByToken(userToken){
this.getAdjustData(userToken);
this.getNewsData(userToken);
this.getEvaluctData(userToken);
},
initAll(){
this.getSwiper()
/// this.getUpdateData();
this.getMiddel();
this.getIconData();
this.getCategoryData();
this.getYqDoctorData();
this.getFiveData();
},
//获取状态栏高度
getStatusHight(){
rocNative.getStatusBarHeight({
__funcName: '__getStatusBarHeight'
})
},
getToken(){
rocNative.getToken({
__funcName: '__getToken'
})
},
//获取版本号
getUserInfo(){
rocNative.getUserInfo({
__funcName: '__getUserInfo'
})
},
//轮播图跳转
goLinkByswiper(itemData){
///alert("0000");
// console.log(item);
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_banner',
actionCode:'c_banner',
labelId:itemData.id,
labelValue:itemData.name
})
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
//获取评价
getEvaluctData(userToken){
//alert(userToken);
let _this = this, para = {
sysCode: 27,
token: userToken,
setEntry: 'headers',
data:{
token:userToken,
}
}
clearInterval(_this.setTimer);
_this.isShowEvluat = false;
_this.isIntStyle = ''
_this.GET('contents/gp/v1/homepage', para).then(res => {
if(res.code == '000000'){
// res.data = {
// avatarImageUrl: "https://test-file.yunqueyi.com/File/doctor_default.png",
// certificateAcquireNumOfHospital: 10,
// certificateAcquireNumOfSelf: 9,
// courseOverNumOfHospital: 10,
// courseOverNumOfSelf: 5,
// examOverNumOfHospital: 10,
// examOverNumOfSelf: 5,
// gradePKToHospital: 0.67,
// showFlag: true
// }
_this.evaluctObj = res.data || {};
if(res.data.certificateAcquireNumOfSelf == 0 && res.data.courseOverNumOfSelf == 0 && res.data.examOverNumOfSelf == 0){
_this.isShowEvluat = false;
}else{
_this.isShowEvluat = res.data.showFlag;
if(!_this.isShowEvluat){
_this.isIntStyle = ''
}else{
_this.fiveTimePull();
_this.isIntStyle = 'font-style pull-down'
}
}
}
if(!_this.isShowEvluat){
rocNative.setTabMiniIcon({
tabIndex:3,
iconTitle:'学习评价',
iconColor:'',
isSet:true
})
}
})
},
//获取小icon数据
getIconData(){
let _this = this,
para = {
category: 1,
position:1,
setEntry: 'headers',
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
_this.iconList = res.data && res.data.iconColumnInformationModels || []
}
})
},
//获取专题分类s数据
getCategoryData(){
let _this = this,
para = {
category: 1,
position:3,
setEntry: 'headers'
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
//console.log(res);
_this.listCategory = res.data && res.data.iconColumnInformationModels || [];
/// console.log(_this.list);
}
})
},
//继续学习数据
getKeepData(userToken){
let _this = this,
parm = {
token:userToken,
setEntry: 'headers',
data:{
token:userToken,
}
}
_this.GET('contents/courses/continueLearningCourse',parm).then(function(res){
if(res.code === '000000'){
_this.keeponData = res.data && res.data.continueLearningCourseModel || {};
if(_this.keeponData.remanentCourseNum == 0){
_this.isShowKeep = false;
}else{
_this.isShowKeep = _this.keeponData.showFlag ? true : false;
}
}
})
},
//云雀名师
getYqDoctorData(){
let _this = this,
para = {
pageNo:1,
pageSize:10,
setEntry: 'headers'
}
this.GET('contents/HomeLecturer/LecturerInformation', para).then(res => {
if(res.code == '000000'){
_this.yqDoctorList = res.data && res.data.pCourseDoctorModels || []
}
})
},
//最新课程
getNewsData(userToken){
this.newsDatalist = [];
let _this = this,
parm = {
pageNo:1,
pageSize:6,
token:userToken,
setEntry: 'headers',
data:{
token:userToken,
}
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation',parm).then(function(res){
if(res.code === '000000'){
_this.newsDatalist = res.data.contentAppModels || [];
//alert( _this.newsDatalist[0].joinNum)
if(_this.newsDatalist.length>0){
_this.userToken = userToken;
}
}
})
},
//五分钟医学院
getFiveData(){
let _this = this,
parm = {
pageNo: 1,
pageSize: 3,
data:{
setEntry: 'headers'
}
}
this.API_GET('contents/fiveMinutes/contents',parm).then(res => {
if(res.respCode == '200'){
_this.fiveList = _this.handelFive(res.fiveMinutesMedicalContentList) || []
}
})
},
//处理五分钟数据 初始化播放状态
handelFive(d){
for(let i=0;i<d.length;i++){
d[i].play = '0';
}
return d;
},
//为您推荐
getAdjustData(userToken){
this.adjustList = []
let _this = this,
parm = {
pageNo:1,
pageSize:10,
token:userToken,
setEntry: 'headers',
data:{
token:userToken,
}
}
_this.GET('contents/courses/recommendCourseList',parm).then(function(res){
if(res.code === '000000'){
_this.adjustList = res.data || [];
_this.adjustPageNo = 1;
_this.SET_DATA(_this.adjustList)
if(_this.adjustList.length>0){
_this.userToken = userToken
}
}
})
},
//有更新数据
getUpdateData(){
let _this = this,
para = {
setEntry: 'headers'
}
//alert("000");
this.GET('contents/courses/queryCourseCount', para).then(res => {
if(res.code == '000000'){
if(res.data != null){
// _this.updateTotal = res.data.courseCount + res.data.fiveHospCount || 0
// if(_this.updateTotal > 0){
// _this.showNewCorse = true;
// _this.updateStr = _this.updateTotal>9 ? '9+' : _this.updateTotal
// }else{
// _this.showNewCorse = false
// }
}
}
})
},
goAnchors(){
if(document.querySelector('#new-course')){
document.documentElement.scrollTop = document.querySelector('#new-course').offsetTop;
document.body.scrollTop = document.querySelector('#new-course').offsetTop;
}
this.hideNewCourse = false;
this.showNewCorse = false;
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_new_course',
actionCode:'c_newcourse_list',
})
},
scrollEndFun(){
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
// let newCourseTop = document.querySelector('#famus-teacher').offsetTop;
// let fivesTop = document.querySelector('#fiveBoxMenu').offsetTop;
if(this.scrollTop != scrollTop){
this.showNewCorse = false;
}else{
this.showNewCorse = this.updateTotal>0 ? true : false;
}
},
scrollFun(){
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
this.showNewCorse = false;
if(this.hideNewCourse){
this.scrollTop = scrollTop;
clearTimeout(this.scrollTimer);
this.scrollTimer = setTimeout(this.scrollEndFun, 200);
}
if( this.isIntStyle == 'font-style pull-down'){
this.isIntStyle = 'font-style pull-up';
clearInterval(this.setTimer)
this.isShowEvluat = false;
}
var adjustTop = 100;
//滚动条滚动到最新课程
var newCourseTop = document.querySelector('#famus-teacher').offsetTop;
var clientHeight = document.querySelector('#famus-teacher').clientHeight;
if(document.querySelector('#adjust-u')){
adjustTop = document.querySelector('#adjust-u').offsetTop;
}
var searchBox = document.querySelector('#search-top').offsetParent.offsetTop;
//console.log(searchBox);
if(scrollTop +clientHeight/2 >= newCourseTop){
//alert('scrollTop:'+scrollTop+'newCourseTop:'+newCourseTop);
//this.showNewCorse = false;
this.isShowBackTop = true;
}else{
this.isShowBackTop = false;
}
if(scrollTop+30 >= adjustTop){
this.isFixed = true;
this.searchFix = false;
}else{
this.isFixed = false;
}
if(scrollTop > searchBox){
//alert("000");
///console.log(scrollTop,searchBox);
this.searchFix = true;
}else{
this.searchFix = false;
}
},
//五秒之后收起
fiveTimePull(){
let _this = this;
_this.setTimer = setInterval(function(){
_this.isIntStyle = 'font-style pull-up';
_this.isShowEvluat = false;
///alert("0")
clearInterval(_this.setTimer)
},5000);
},
getEluatFun(obj){
///console.log(obj);
if(obj.isPull == '1'){
this.isIntStyle = 'font-style pull-down';
this.fiveTimePull()
}else if(obj.isPull == '2'){
this.isIntStyle = ''
}else if(obj.isPull == '0'){
this.isIntStyle = 'font-style pull-up'
}
},
//获取轮播图数据
getSwiper(){
let _this = this,
para = {
category:1,
position:4,
setEntry: 'headers',
data:{
setEntry: 'headers'
}
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
_this.listSwiper = res.data.iconColumnInformationModels || [];
_this.swiperFun();
}
if( _this.listSwiper.length == 0){
_this.isFailSwiper += 1;
}
_this.isFailSwiper = _this.listSwiper.length == 0 ? 2 : 1 ;
})
},
//中间栏数据
getMiddel(){
let _this = this,
para = {
category: 1,
position:2,
setEntry: 'headers',
// token:_this.token
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
// console.log(res);
_this.listMiddle = (res.data && res.data.iconColumnInformationModels || []).slice()
}
_this.isFailCatagory2 = _this.listMiddle.length == 0 ? true : false;
})
},
//中间栏跳转
goToPatholo(itemData){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_middle',
actionCode:'c_field',
labelId:itemData.id,
labelValue :itemData.name,
})
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
},
}
</script>
<style>
.swiper .mint-swipe-indicators{
right: 6px;
top:50%;
bottom: inherit;
left:inherit;
width:10px;
text-align: center;
transform: translateX(0%);
transform: translateY(-50%);
}
.swiper .mint-swipe-item img{
width: 100%;
height: 100%;
}
.swiper .mint-swipe-indicator{
width:2px;
height: 8px;
background: #fff;
opacity: 0.4;
float: left;
margin-top:3px;
}
.swiper .is-active{
opacity: 1;
}
.mint-loadmore-top .mint-loadmore-text{font-size: 12px;}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets{
width: 2px;
left: inherit;
transform: translateY(-50%);
position: absolute;
right: 6px;
top:50%;
}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{
width: 2px;
height: 7px;
background: #fff;
margin:6px 0 0 0;
float: left;
opacity: 0.4;
}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet-active{
opacity: 1
}
.banner-pagination{
width: 2px;
z-index: 100;
right: 10px;
top:10px;
position: absolute;
}
.swiper-pagination-bullet{
}
.swiper-slide img{
width: 100%;
height: 100%;
}
</style>
<style lang="scss" scoped>
@import '../style/mixin';
@import '../style/swiper.min.css';
img {
@include bis('../images/icon-p3-2.png');
}
.banner-container{
height: px2rem(210px)
}
.main-body{
position: relative;
}
.box-BG{
width: 100%;
height: 100%;
position: absolute;
top:0;
left: 0;
z-index: 10000
}
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
@include sc(0.6rem, #666);
}
.top-evaluat{
}
@keyframes myPullDown{
from {padding-top: 0;}
to {padding-top:px2rem(225px)}
}
@keyframes myPullUp{
from {padding-top: px2rem(225px);}
to {padding-top:0}
}
.pull-down{
-webkit-animation: myPullDown 1.2s;
animation: myPullDown 1.2s;
padding-top:px2rem(225px)
}
.pull-up{
-webkit-animation: myPullUp 1.2s;
animation: myPullUp 1.2s;
padding-top:0
}
.news-update{
display: block;
position: fixed;
background: #F9F6EF;
right: 0;
bottom: px2rem(140px);
height: px2rem(27px);
padding:0 px2rem(12px);;
line-height: px2rem(27px);
border:1px solid RGBA(162, 129, 60, 0.2);
font-size: px2rem(13px);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(202, 168, 97, 0.4);
border-radius: px2rem(14px) 0 0 px2rem(14px);
z-index: 101;
.news-info{
color: #A2813C;
position: relative;
display: inline-block;
i{
position: absolute;
right: -(px2rem(6px));
top:px2rem(4px);
display: inline-block;
width: px2rem(4px);
height: px2rem(4px);
border-radius: 100%;
background: #F47A48
}
}
}
.home-topMenu{
width: 100%;
text-align:center;
top:0;
position: absolute;
z-index: 10;
}
.home-header {
height: px2rem(202px);
background: #333;
.swiper{
height: 100%;
/* @include bis('../images/552064153@2x.png');*/
}
.logo_img{
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
.home-body{
background: #fff
}
.pathologic-list{
width: 100%;
height: px2rem(52px);
padding: 0 px2rem(15px);
margin-top: px2rem(15px);
.pathologic-item{
float: left;
width: 48%;
box-shadow: 0 px2rem(2px) px2rem(6px) RGBA(42, 94, 161, 0.15);
border-radius: px2rem(3px);
background: #fff;
/* padding: px2rem(12px) 0 px2rem(12px) 0;*/
margin-right: 4%;
text-align: center;
.pathologic-icon{
/* height: px2rem(20px);*/
img{
width: 100%;
height: px2rem(52px);
vertical-align: middle;
display: inline-block;
}
}
.pathologic-txt{
font-size: px2rem(14px);
line-height: px2rem(20px);
font-weight: 700;
display: inline-block;
vertical-align: middle;
}
}
.clear{
clear: both;
}
}
</style>
<template>
<div class="main-body" ref="wrapper">
<section :class="isIntStyle">
<!--展开收起学习评价-->
<YqyTopEvaluat :isShowEvluat="isShowEvluat" v-if="isShowEvluat" :parmData="evaluctObj" v-on:evluatFun="getEluatFun"/>
<section class="home-header">
<div class="home-topMenu">
<YqyHomeHeader :msgCount="msgCount" :searchFix="searchFix" v-on:setAppMsg="goAppMsg"/>
</div>
<div class="swiper">
<mt-swipe :auto="3000" :speed="speedSwiper" :stopPropagation="prevent">
<mt-swipe-item v-for="(item,index) in listSwiper" :key="index" >
<!-- <img v-lazy="item.imageUrl" @click="goLinkByswiper(item)"/> -->
<img :src="item.imageUrl" @click="goLinkByswiper(item)"/>
</mt-swipe-item>
</mt-swipe>
</div>
</section>
<section class="home-body">
<YqyHomeBanner :userToken="userToken"/>
<div class="pathologic-list">
<div
v-for="(item, index) in listMiddle"
class="pathologic-item"
:style="index % 2 == 1 ? 'margin-right: 0' : ''"
@click="goToPatholo(item)"
:key="index">
<span class="pathologic-icon">
<img :src="item.imageUrl"/>
</span>
<!-- <span class="pathologic-txt fs14">{{item.name}}</span> -->
</div>
<div class="clear"></div>
</div>
<!--继续学习-->
<YqyHomeKeepon :parmData="keeponData" v-if="isShowKeep" v-on:hideKeepon="hideKeepon"/>
<!--专题分类-->
<YqyCategoryThree1 />
<!--云雀名师-->
<YqyHomeAdv :userToken="userToken"/>
<!--最新课程-->
<YqyTeacherList :parmData="newsDatalist" :userToken="userToken" v-on:setRefrshParm="getRefrshParm"/>
<!--分钟医学院-->
<YqyFiveMinutes :parmData="fiveList" v-if="fiveList.length>0"/>
<!--为你推荐-->
<YqyHomeAdjust :isFixed="isFixed" :statusBarHeight="statusBarHeight" :parmData="adjustList" v-if="adjustList.length>0" :userToken="userToken" v-on:setRefrshParm="getRefrshParm" :adjustPageNo="adjustPageNo"/>
<!--返回顶部-->
<BackTop v-if="isShowBackTop"/>
<a class="news-update" @click="goAnchors" v-show="showNewCorse">
<span class="news-info">
{{updateStr}}个新内容
<i></i>
</span>
</a>
</section>
</section>
</div>
<template>
<section class="search-container">
<input type="search" @click="gotoPage"/>
<!-- <form @submit.prevent="search"> -->
<!-- <mt-search @onkeydown="gotoPage"></mt-search> -->
<!-- <button v-show="false" type="submit" /> -->
<!-- </form> -->
</section>
</template>
<script>
import { Swipe, SwipeItem ,Header} from 'mint-ui';
// import { setEventByModuleCode } from '@/utils/index'
// import pullRefresh from '../components/common/pullrefresh'
import {mapState, mapMutations} from 'vuex'
import BackTop from '../components/common/backTop';
import YqyTeacherList from '../components/business-new/yqy-teacher-list';
import YqyTopEvaluat from '../components/business-new/yqy-home-learn-evaluation';
import YqyHomeHeader from '../components/business-new/yqy-home-header';
import YqyHomeAdv from '../components/business-new/yqy-home-adv';
import YqyFiveMinutes from '../components/business-new/yqy-five-minutes';
import YqyCategoryThree1 from '../components/business-new/yqy-category-three-1';
import YqyHomeBanner from '../components/business-new/yqy-home-banner';
import YqyHomeKeepon from '../components/business-new/yqy-home-keepon';
import YqyHomePorter from '../components/business-new/yqy-home-porter';
import YqyHomeAdjust from '../components/business-new/yqy-adjust';
export default {
data(){
data() {
return {
wrapperHeight:0,
prevent:true,
topDistance:20,
allLoaded:false,
isAutoFill:false,
showNewCorse:false, // 是否显示新内容 默认不显示
isFixed:false,
isShowBackTop:false,
isShowEvluat:false, //是否显示下拉
evaluctObj:{}, //下拉数据
iconList:[], //icon数据
keeponData:{}, //继续学习
isShowKeep:false,
listCategory:[{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
}], //专题分类数据
yqDoctorList:[],//云雀名师数据
newsDatalist:[],//最新课程
fiveList:[],//五分钟医学院
adjustList:[],//为您推荐
isBodyPull:false,
speedSwiper:300,
stopPropagation:true,
isIntStyle:'',
listSwiper:[{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
}],//轮播图数据
listMiddle: [{
"imageUrl": require('../images/error.png')
},{
"imageUrl": require('../images/error.png')
}],//中间栏数据
scrollTimer:null,
scrollTop:0,
hideNewCourse:true,
updateTotal:0,
msgCount:'',
userToken:'',
searchFix:false,
statusBarHeight:0,
userMobile:'',
userToken:'',
isHeightFromApp:false,
isFirstPull:true,
updateStr:'',
isRefreshFromBack:false,
isRefrshMsg:false,
isFailSwiper:1,
isFailCatagory1:false,
isFailCatagory2:false,
isFailCatagory3:false,
isFailTeaches:false,
isFailFive:false,
adjustPageNo:1,
setTimer:null,
}
},
components:{
Header,
Swipe,
SwipeItem,
BackTop,
YqyTopEvaluat,
YqyTeacherList,
YqyHomeHeader,
YqyHomeAdv,
YqyFiveMinutes,
YqyCategoryThree1,
YqyHomeBanner,
YqyHomeKeepon,
YqyHomePorter,
YqyHomeAdjust
},
created () {
// alert(222)
let _this = this;
_this.initAll()
_this.getUserInfo();
window.__nativeCallMsg = function(params){
_this.msgCount = params.msgNum || '';
// alert(_this.msgCount);
}
window.__getToken = function(params){
//alert(params.userToken);
// _this.userToken = params.userToken
// _this.getUserInfo();
// _this.initByToken(params.userToken);
}
window.__refresh = function(params){
_this.adjustPageNo = 1;
if(_this.setTimer != null){
clearInterval(_this.setTimer);
_this.isShowEvluat = false;
_this.isIntStyle = '';
}
//alert(_this.isShowEvluat);
//返回
if(_this.isRefreshFromBack){
_this.getAdjustData(_this.userToken);
_this.getNewsData(_this.userToken);
} else if(_this.isShowEvluat && !_this.isRefreshFromBack){
_this.isIntStyle = 'font-style pull-down';
_this.fiveTimePull();
} else {
//alert("000")
_this.isIntStyle = '';
_this.isShowEvluat = false;
_this.getUserInfo();
}
}
// window.__getStatusBarHeight = function(parm){
// alert(JSON.stringify(parm))
// _this.statusBarHeight = parm.statusBarHeight;
// _this.isHeightFromApp = true;
// // alert(parm.statusBarHeight);
// }
// alert("token之前");
window.__getUserInfo = function(parm){
//alert(JSON.stringify(parm))
_this.systemType = parm.systemType;
_this.appVersion = parm.appVersion;
_this.token = parm.userToken;
_this.userToken = parm.userToken;
_this.userMobile = parm.userMobile;
if(parm.userMobile && parm.userMobile != ''){
_this.getKeepData(parm.userToken);
}
_this.initByToken(parm.userToken);
}
//_this.getStatusHight();
//
// _this.token = '593F679F62964076AF1C7489DA3343ED';
// _this.msgCount = '2'
// _this.isShowKeep = true;
// _this.isHeightFromApp = true;
// _this.getKeepData(_this.token);
_this.initByToken('593F679F62964076AF1C7489DA3343ED');
// _this.getIconData(_this.token);
// _this.isIntStyle = 'font-style pull-down';
// _this.fiveTimePull();
//_this.getUserInfo();
},
mounted(){
// this.wrapperHeight =document.documentElement.clientHeight - this.$refs.wrapper.getBoundingClientRect().top;
window.addEventListener('scroll', this.scrollFun);
},
beforeDestroyed(){
window.removeEventListener('scroll', this.scrollFun)
},
watch:{
//监听是否收起
isShowEvluat:function(n){
///alert(n);
if(!n && this.isIntStyle == 'font-style pull-up'){
rocNative.setTabMiniIcon({
tabIndex:3,
iconTitle:'学习评价',
iconColor:'',
isSet:true
created() {
window.__isFirstTime = function(param) {
if(param.isFirst == 'true') {
rocNative.setFirstTime({
projectName: 'YQY_PROJECT_SOUSUO',
isFirst: 'false'
})
}
}
// this.isFirstTime()
},
methods:{
...mapMutations([
'SET_DATA'
]),
goAppMsg(){
this.isRefrshMsg = true;
// alert(this.isRefrshMsg);
},
hideKeepon(){
this.isShowKeep = false;
},
getRefrshParm(obj){
this.isRefreshFromBack = obj.isclick;
},
//轮播图开始滚动
swiperFun(){
// var swiper = new Swiper('.swiper-container', {
// speed: 600,
//             //loop: true,
//             observer:true,
//             observeParents:true,
//             autoplayDisableOnInteraction : false,
//             autoplay:3000,
// pagination: '.pagination'
// });
},
loadTop(){
//location.reload();
this.$refs.loadmore.onTopLoaded();
},
initByToken(userToken){
methods: {
gotoPage() {
this.$router.push('/search')
},
gotoPage(item) {
let obj = {
}
console.log(item);
// let url = pageJumpUrl();
// console.log(url.pageListUrl);
let itemData = {
"imageUrl": "",
"appModuleInfo": {
"code": "M300",
"type": 4,
"name": "课程介绍页",
"paramFlag": 1,
"paramList": []
}
};
obj = {
menuLevel: 1,
menuCode: 'm_home',
functionCode: 'f_five_minutes',
actionCode: 'c_content',
labelId: item.id,
labelValue: item.title,
}
itemData.title = item.name;
itemData.appModuleInfo["paramList"] = [{
"key": "pageUrl",
"value": 'http://10.177.10.211:8019/#/search',
// "value": 'com.picahealth.yunque.activitys.music.WebMusicListActivity###FiveMinutesMedicalSchoolWebViewController',
"type": 4,
"seqNo": 1
}
]
this.getAdjustData(userToken);
this.getNewsData(userToken);
this.getEvaluctData(userToken);
},
// this.pageBurialPoin(obj)
initAll(){
this.getSwiper()
/// this.getUpdateData();
this.getMiddel();
this.getIconData();
this.getCategoryData();
this.getYqDoctorData();
this.getFiveData();
},
//获取状态栏高度
getStatusHight(){
rocNative.getStatusBarHeight({
__funcName: '__getStatusBarHeight'
})
},
getToken(){
rocNative.getToken({
__funcName: '__getToken'
})
},
//获取版本号
getUserInfo(){
rocNative.getUserInfo({
__funcName: '__getUserInfo'
})
},
//轮播图跳转
goLinkByswiper(itemData){
///alert("0000");
// console.log(item);
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_banner',
actionCode:'c_banner',
labelId:itemData.id,
labelValue:itemData.name
})
let paramList = this.setEventByModuleCode(itemData);
// alert(itemData.appModuleInfo.code)
// alert(JSON.stringify(paramList))
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
//获取评价
getEvaluctData(userToken){
//alert(userToken);
let _this = this, para = {
sysCode: 27,
token: userToken,
setEntry: 'headers',
data:{
token:userToken,
}
}
clearInterval(_this.setTimer);
_this.isShowEvluat = false;
_this.isIntStyle = ''
_this.GET('contents/gp/v1/homepage', para).then(res => {
if(res.code == '000000'){
// res.data = {
// avatarImageUrl: "https://test-file.yunqueyi.com/File/doctor_default.png",
// certificateAcquireNumOfHospital: 10,
// certificateAcquireNumOfSelf: 9,
// courseOverNumOfHospital: 10,
// courseOverNumOfSelf: 5,
// examOverNumOfHospital: 10,
// examOverNumOfSelf: 5,
// gradePKToHospital: 0.67,
// showFlag: true
// }
_this.evaluctObj = res.data || {};
if(res.data.certificateAcquireNumOfSelf == 0 && res.data.courseOverNumOfSelf == 0 && res.data.examOverNumOfSelf == 0){
_this.isShowEvluat = false;
}else{
_this.isShowEvluat = res.data.showFlag;
if(!_this.isShowEvluat){
_this.isIntStyle = ''
}else{
_this.fiveTimePull();
_this.isIntStyle = 'font-style pull-down'
}
}
}
if(!_this.isShowEvluat){
rocNative.setTabMiniIcon({
tabIndex:3,
iconTitle:'学习评价',
iconColor:'',
isSet:true
})
}
})
},
//获取小icon数据
getIconData(){
let _this = this,
para = {
category: 1,
position:1,
setEntry: 'headers',
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
_this.iconList = res.data && res.data.iconColumnInformationModels || []
}
isFirstTime() {
rocNative.isFirstTime({
projectName: 'YQY_PROJECT_SOUSUO',
__funcName: '__isFirstTime'
})
},
//获取专题分类s数据
getCategoryData(){
let _this = this,
para = {
category: 1,
position:3,
setEntry: 'headers'
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
//console.log(res);
_this.listCategory = res.data && res.data.iconColumnInformationModels || [];
/// console.log(_this.list);
}
})
},
//继续学习数据
getKeepData(userToken){
let _this = this,
parm = {
token:userToken,
setEntry: 'headers',
data:{
token:userToken,
}
}
_this.GET('contents/courses/continueLearningCourse',parm).then(function(res){
if(res.code === '000000'){
_this.keeponData = res.data && res.data.continueLearningCourseModel || {};
if(_this.keeponData.remanentCourseNum == 0){
_this.isShowKeep = false;
}else{
_this.isShowKeep = _this.keeponData.showFlag ? true : false;
}
}
})
},
//云雀名师
getYqDoctorData(){
let _this = this,
para = {
pageNo:1,
pageSize:10,
setEntry: 'headers'
}
this.GET('contents/HomeLecturer/LecturerInformation', para).then(res => {
if(res.code == '000000'){
_this.yqDoctorList = res.data && res.data.pCourseDoctorModels || []
}
})
},
//最新课程
getNewsData(userToken){
this.newsDatalist = [];
let _this = this,
parm = {
pageNo:1,
pageSize:6,
token:userToken,
setEntry: 'headers',
data:{
token:userToken,
}
}
_this.GET('/contents/HomeNewCourse/NewCourseInformation',parm).then(function(res){
if(res.code === '000000'){
_this.newsDatalist = res.data.contentAppModels || [];
//alert( _this.newsDatalist[0].joinNum)
if(_this.newsDatalist.length>0){
_this.userToken = userToken;
}
}
})
},
//五分钟医学院
getFiveData(){
let _this = this,
parm = {
pageNo: 1,
pageSize: 3,
data:{
setEntry: 'headers'
}
}
this.API_GET('contents/fiveMinutes/contents',parm).then(res => {
if(res.respCode == '200'){
_this.fiveList = _this.handelFive(res.fiveMinutesMedicalContentList) || []
}
})
},
//处理五分钟数据 初始化播放状态
handelFive(d){
for(let i=0;i<d.length;i++){
d[i].play = '0';
}
return d;
},
//为您推荐
getAdjustData(userToken){
this.adjustList = []
let _this = this,
parm = {
pageNo:1,
pageSize:10,
token:userToken,
setEntry: 'headers',
data:{
token:userToken,
}
}
_this.GET('contents/courses/recommendCourseList',parm).then(function(res){
if(res.code === '000000'){
_this.adjustList = res.data || [];
_this.adjustPageNo = 1;
_this.SET_DATA(_this.adjustList)
if(_this.adjustList.length>0){
_this.userToken = userToken
}
}
})
},
//有更新数据
getUpdateData(){
let _this = this,
para = {
setEntry: 'headers'
}
//alert("000");
this.GET('contents/courses/queryCourseCount', para).then(res => {
if(res.code == '000000'){
if(res.data != null){
// _this.updateTotal = res.data.courseCount + res.data.fiveHospCount || 0
// if(_this.updateTotal > 0){
// _this.showNewCorse = true;
// _this.updateStr = _this.updateTotal>9 ? '9+' : _this.updateTotal
// }else{
// _this.showNewCorse = false
// }
}
}
})
},
goAnchors(){
if(document.querySelector('#new-course')){
document.documentElement.scrollTop = document.querySelector('#new-course').offsetTop;
document.body.scrollTop = document.querySelector('#new-course').offsetTop;
}
this.hideNewCourse = false;
this.showNewCorse = false;
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_new_course',
actionCode:'c_newcourse_list',
})
},
scrollEndFun(){
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
// let newCourseTop = document.querySelector('#famus-teacher').offsetTop;
// let fivesTop = document.querySelector('#fiveBoxMenu').offsetTop;
if(this.scrollTop != scrollTop){
this.showNewCorse = false;
}else{
this.showNewCorse = this.updateTotal>0 ? true : false;
}
},
scrollFun(){
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
this.showNewCorse = false;
if(this.hideNewCourse){
this.scrollTop = scrollTop;
clearTimeout(this.scrollTimer);
this.scrollTimer = setTimeout(this.scrollEndFun, 200);
}
if( this.isIntStyle == 'font-style pull-down'){
this.isIntStyle = 'font-style pull-up';
clearInterval(this.setTimer)
this.isShowEvluat = false;
}
var adjustTop = 100;
//滚动条滚动到最新课程
var newCourseTop = document.querySelector('#famus-teacher').offsetTop;
var clientHeight = document.querySelector('#famus-teacher').clientHeight;
if(document.querySelector('#adjust-u')){
adjustTop = document.querySelector('#adjust-u').offsetTop;
}
var searchBox = document.querySelector('#search-top').offsetParent.offsetTop;
//console.log(searchBox);
if(scrollTop +clientHeight/2 >= newCourseTop){
//alert('scrollTop:'+scrollTop+'newCourseTop:'+newCourseTop);
//this.showNewCorse = false;
this.isShowBackTop = true;
}else{
this.isShowBackTop = false;
}
if(scrollTop+30 >= adjustTop){
this.isFixed = true;
this.searchFix = false;
}else{
this.isFixed = false;
}
if(scrollTop > searchBox){
//alert("000");
///console.log(scrollTop,searchBox);
this.searchFix = true;
}else{
this.searchFix = false;
}
},
//五秒之后收起
fiveTimePull(){
let _this = this;
_this.setTimer = setInterval(function(){
_this.isIntStyle = 'font-style pull-up';
_this.isShowEvluat = false;
///alert("0")
clearInterval(_this.setTimer)
},5000);
},
getEluatFun(obj){
///console.log(obj);
if(obj.isPull == '1'){
this.isIntStyle = 'font-style pull-down';
this.fiveTimePull()
}else if(obj.isPull == '2'){
this.isIntStyle = ''
}else if(obj.isPull == '0'){
this.isIntStyle = 'font-style pull-up'
}
},
//获取轮播图数据
getSwiper(){
let _this = this,
para = {
category:1,
position:4,
setEntry: 'headers',
data:{
setEntry: 'headers'
}
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
_this.listSwiper = res.data.iconColumnInformationModels || [];
_this.swiperFun();
}
if( _this.listSwiper.length == 0){
_this.isFailSwiper += 1;
}
_this.isFailSwiper = _this.listSwiper.length == 0 ? 2 : 1 ;
})
},
//中间栏数据
getMiddel(){
let _this = this,
para = {
category: 1,
position:2,
setEntry: 'headers',
// token:_this.token
}
this.GET('contents/HomeColumn/Information', para).then(res => {
if(res.code == '000000'){
// console.log(res);
_this.listMiddle = (res.data && res.data.iconColumnInformationModels || []).slice()
}
_this.isFailCatagory2 = _this.listMiddle.length == 0 ? true : false;
})
},
//中间栏跳转
goToPatholo(itemData){
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_middle',
actionCode:'c_field',
labelId:itemData.id,
labelValue :itemData.name,
})
let paramList = this.setEventByModuleCode(itemData);
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
jsonString: paramList
})
},
},
}
}
</script>
<style>
.swiper .mint-swipe-indicators{
right: 6px;
top:50%;
bottom: inherit;
left:inherit;
width:10px;
text-align: center;
transform: translateX(0%);
transform: translateY(-50%);
}
.swiper .mint-swipe-item img{
width: 100%;
height: 100%;
}
.swiper .mint-swipe-indicator{
width:2px;
height: 8px;
background: #fff;
opacity: 0.4;
float: left;
margin-top:3px;
}
.swiper .is-active{
opacity: 1;
}
.mint-loadmore-top .mint-loadmore-text{font-size: 12px;}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets{
width: 2px;
left: inherit;
transform: translateY(-50%);
position: absolute;
right: 6px;
top:50%;
}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet{
width: 2px;
height: 7px;
background: #fff;
margin:6px 0 0 0;
float: left;
opacity: 0.4;
}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet-active{
opacity: 1
}
.banner-pagination{
width: 2px;
z-index: 100;
right: 10px;
top:10px;
position: absolute;
}
.swiper-pagination-bullet{
}
.swiper-slide img{
width: 100%;
height: 100%;
}
<style >
.mint-search {
position: fixed;
top: 0px;
z-index: 2;
height: 66px;
width: 100%;
border-bottom: 1px solid #E7E7E7;
}
.mint-searchbar {
position: relative;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: #fff;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 30px 10px 8px;
z-index: 1;
}
.mint-searchbar-cancel {
margin-left: 10px;
font-size: 14px ;
color: #999;
text-decoration: none;
}
.mint-searchbar-inner {
background: #F5F6F6;
}
.mint-searchbar-core {
background: #F5F6F6;
}
</style>
<style lang="scss" scoped>
@import '../style/mixin';
@import '../style/swiper.min.css';
.banner-container{
height: px2rem(210px)
}
.main-body{
position: relative;
}
.box-BG{
width: 100%;
height: 100%;
position: absolute;
top:0;
left: 0;
z-index: 10000
}
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
@include sc(0.6rem, #666);
}
.top-evaluat{
}
@keyframes myPullDown{
from {padding-top: 0;}
to {padding-top:px2rem(225px)}
}
@keyframes myPullUp{
from {padding-top: px2rem(225px);}
to {padding-top:0}
}
.pull-down{
-webkit-animation: myPullDown 1.2s;
animation: myPullDown 1.2s;
padding-top:px2rem(225px)
}
.pull-up{
-webkit-animation: myPullUp 1.2s;
animation: myPullUp 1.2s;
padding-top:0
}
.news-update{
display: block;
position: fixed;
background: #F9F6EF;
right: 0;
bottom: px2rem(140px);
height: px2rem(27px);
padding:0 px2rem(12px);;
line-height: px2rem(27px);
border:1px solid RGBA(162, 129, 60, 0.2);
font-size: px2rem(13px);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(202, 168, 97, 0.4);
border-radius: px2rem(14px) 0 0 px2rem(14px);
z-index: 101;
.news-info{
color: #A2813C;
position: relative;
display: inline-block;
i{
position: absolute;
right: -(px2rem(6px));
top:px2rem(4px);
display: inline-block;
width: px2rem(4px);
height: px2rem(4px);
border-radius: 100%;
background: #F47A48
}
}
}
.home-topMenu{
width: 100%;
text-align:center;
top:0;
position: absolute;
z-index: 10;
}
.home-header {
height: px2rem(202px);
.swiper{
height: 100%;
/* @include bis('../images/552064153@2x.png');*/
}
.logo_img{
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
.home-body{
background: #fff
}
.pathologic-list{
width: 100%;
height: px2rem(52px);
padding: 0 px2rem(15px);
margin-top: px2rem(15px);
.pathologic-item{
float: left;
width: 48%;
box-shadow: 0 px2rem(2px) px2rem(6px) RGBA(42, 94, 161, 0.15);
border-radius: px2rem(3px);
background: #fff;
/* padding: px2rem(12px) 0 px2rem(12px) 0;*/
margin-right: 4%;
text-align: center;
.pathologic-icon{
/* height: px2rem(20px);*/
img{
width: 100%;
height: px2rem(52px);
vertical-align: middle;
display: inline-block;
}
}
.pathologic-txt{
font-size: px2rem(14px);
line-height: px2rem(20px);
font-weight: 700;
display: inline-block;
vertical-align: middle;
}
}
.clear{
clear: both;
<style lang="scss">
.search-container {
height: 200px;
text-align: center;
background-color: #E7E7E7;
padding-top: 60px;
input {
width: 320px;
padding: 4px 10px;
}
}
</style>
<template>
<section>
<SearchHeader @search="search" :searchText="searchText"/>
<!-- <SplitLine/> -->
<!-- 没有结果页面 -->
<section v-show="!(showTab1 || showTab2 || showTab3 || showTab4)" class="mt-80">
<section></section>
<NoResultPage/>
<SplitLine borderWidth="3px"/>
<CourseAdjust/>
</section>
<!-- 有结果页面 -->
<section v-show="showTab1 || showTab2 || showTab3 || showTab4" class="mt-100">
<mt-navbar v-model="selected" :fixed="true" style="top: 58px;">
<mt-tab-item v-show="showTab0" id="0">综合</mt-tab-item>
<mt-tab-item v-show="showTab1" id="1">课程</mt-tab-item>
<mt-tab-item v-show="showTab2" id="2">五分钟医学</mt-tab-item>
<mt-tab-item v-show="showTab3" id="3">讲师</mt-tab-item>
<mt-tab-item v-show="showTab4" id="4">健康漫画</mt-tab-item>
</mt-navbar>
<!-- tab-container -->
<mt-tab-container v-model="selected">
<mt-tab-container-item v-show="showTab0" id="0">
<!-- 课程 -->
<div v-show="showTab1">
<CourseList :parmData="contentAppModels" :groupNum="contentAppModelCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="1" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 五分钟医学 -->
<div v-show="showTab2">
<FiveMinutes :parmData="fiveMinutesMedicalContentList" :groupNum="fiveMinutesMedicalContentListCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="2" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 讲师 -->
<div v-show="showTab3">
<TeacherList :parmData="pCourseDoctorModels" :groupNum="pCourseDoctorModelCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="3" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 健康漫画 -->
<div v-show="showTab4">
<HealthComics :parmData="educationContents" :groupNum="educationContentCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="4" />
<NoMoreItem/>
</div>
</mt-tab-container-item>
<mt-tab-container-item v-show="showTab1" id="1">
<CourseList :parmData="contentAppModelsAll" :groupNum="contentAppModelCount"/>
<NoMoreItem/>
</mt-tab-container-item>
<mt-tab-container-item v-show="showTab2" id="2">
<FiveMinutes :parmData="fiveMinutesMedicalContentListAll" :groupNum="fiveMinutesMedicalContentListCount"/>
<NoMoreItem/>
</mt-tab-container-item>
<mt-tab-container-item v-show="showTab3" id="3">
<TeacherList :parmData="pCourseDoctorModelsAll" :groupNum="pCourseDoctorModelCount"/>
<NoMoreItem/>
</mt-tab-container-item>
<mt-tab-container-item v-show="showTab4" id="4">
<HealthComics :parmData="educationContentsAll" :groupNum="educationContentCount"/>
<NoMoreItem/>
</mt-tab-container-item>
</mt-tab-container>
</section>
</section>
</template>
<script>
import SearchHeader from '../components/business/search-header';
import SplitLine from '../components/business/split-line';
import NoMoreItem from '../components/business/no-more-item';
import ShowAllItem from '../components/business/show-all-item';
import GroupTitle from '../components/business/group-title';
import CourseList from '../components/business/course-list';
import FiveMinutes from '../components/business/five-minutes';
import TeacherList from '@/components/business/teacher-list';
import HealthComics from '@/components/business/health-comics';
import CourseAdjust from '../components/business/course-adjust';
import NoResultPage from '@/components/business/no-result-page'
import { Navbar, TabItem } from 'mint-ui';
export default {
data() {
return {
hasResult: true,
searchText: '',
selected: '0',
contentAppModelCount: '0',
contentAppModels: [],
contentAppModelsAll: [],
educationContentCount: '0',
educationContents: [],
educationContentsAll: [],
fiveMinutesMedicalContentListCount: '0',
fiveMinutesMedicalContentList: [],
fiveMinutesMedicalContentListAll: [],
pCourseDoctorModelCount: '0',
pCourseDoctorModels: [],
pCourseDoctorModelsAll: [],
showTab0: true,
showTab1: true,
showTab2: true,
showTab3: true,
showTab4: true
}
},
components: {
SearchHeader,
SplitLine,
Navbar,
TabItem,
NoMoreItem,
ShowAllItem,
GroupTitle,
CourseList,
CourseAdjust,
FiveMinutes,
TeacherList,
HealthComics,
NoResultPage
},
watch: {
selected(val) {
this.showIndex(val)
// this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
}
},
created(){
this.searchText = this.$route.query.searchText || ''
console.log(this.searchText)
},
mounted(){
this.search(this.searchText)
// this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
},
methods: {
showAllItem(index) {
console.log(index)
this.selected = index
},
// 搜索结果
search(searchText) {
this.showTab0 = true
this.showTab1 = true
this.showTab2 = true
this.showTab3 = true
this.showTab4 = true
let _this = this,
para = {
searchCategory: '1,2,3,4',
searchValue: searchText,
sortItem: 1,
pageNo: 1,
pageSize: 100,
token: _this.token,
setEntry: 'headers',
}
let url = 'contents/searchKeyword/searchContent'
this.GET(url, para).then(res => {
if (res.code == '000000') {
console.log(res)
// 课程
_this.contentAppModels = this.spliceCertenNumData(res.data.contentAppModels, 4)
_this.contentAppModelsAll = res.data.contentAppModels
_this.contentAppModelCount = res.data.contentAppModelCount + ''
if(res.data.contentAppModelCount === 0){
this.showTab1 = false
}
// 五分钟医学
_this.fiveMinutesMedicalContentList = this.spliceCertenNumData(res.data.fiveMinutesMedicalContentList, 4)
_this.fiveMinutesMedicalContentListAll = res.data.fiveMinutesMedicalContentList
_this.fiveMinutesMedicalContentListCount = res.data.fiveMinutesMedicalContentListCount + ''
if(res.data.fiveMinutesMedicalContentListCount === 0){
this.showTab2 = false
}
// 讲师
_this.pCourseDoctorModels = this.spliceCertenNumData(res.data.pCourseDoctorModels, 4)
_this.pCourseDoctorModelsAll = res.data.pCourseDoctorModels
_this.pCourseDoctorModelCount = res.data.pCourseDoctorModelCount + ''
if(res.data.pCourseDoctorModelCount === 0){
this.showTab3 = false
}
// 健康漫画
_this.educationContents = this.spliceCertenNumData(res.data.educationContents, 4)
_this.educationContentsAll = res.data.educationContents
_this.educationContentCount = res.data.educationContentCount + ''
if(res.data.educationContentCount === 0){
this.showTab4 = false
}
}
})
},
searchAll(searchText, searchCategory, receive, receiveList) {
let _this = this,
para = {
searchCategory: searchCategory,
searchValue: searchText,
sortItem: 1,
pageNo: 1,
pageSize: 100,
token: _this.token,
setEntry: 'headers',
}
let url = 'contents/searchKeyword/searchContent'
this.GET(url, para).then(res => {
if (res.code == '000000') {
// 课程
_this[receiveList] = res.data[receive]
}
})
},
showIndex(index) {
console.log(index)
},
spliceCertenNumData(oriData, num) {
let result = []
if (oriData.length === 0 || oriData.length < num) {
return oriData
} else {
for ( let i = 0; i < num; i ++){
result.push(oriData[i])
}
return result
}
console.log(result)
}
},
}
</script>
<style lang="scss">
@import '../style/mixin.scss';
.mint-tab-item-label {
color: inherit;
font-size: px2rem(14px);
line-height: 1;
}
.mint-navbar {
background-color: #fff;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
text-align: center;
border-bottom: px2rem(1px) solid #f0f0f0 !important;
}
.mint-navbar .mint-tab-item.is-selected {
border-bottom: px2rem(2px) solid #449284;
color: #449284;
margin-bottom: px2rem(-1px);
}
.mint-navbar .mint-tab-item {
padding: px2rem(19px) 0 px2rem(11px);
font-size: px2rem(14px);
}
</style>
<style lang="scss" scoped>
@import '../style/mixin.scss';
@import '../style/global.scss';
.mt-80 {
margin-top: px2rem(80px);
}
.mt-100 {
margin-top: px2rem(105px);
}
</style>
<template>
<section>
<!-- <SearchHeader @search="search" :searchText="searchText"/> -->
<!-- <form @submit="search">
<input type="search" v-model="searchText">
<button v-show="false" type="submit" />
</form> -->
<!-- <mt-search v-model="searchText" ></mt-search> -->
<form @submit.prevent="search">
<mt-search v-model="searchText" ></mt-search>
<button v-show="false" type="submit" />
</form>
<!-- <SplitLine/> -->
<!-- 没有结果页面 -->
<section v-show="!(showTab1 || showTab2 || showTab3 || showTab4)" class="mt-80">
<section></section>
<NoResultPage/>
<SplitLine borderWidth="3px"/>
<CourseAdjust/>
</section>
<!-- 有结果页面 -->
<section v-show="showTab1 || showTab2 || showTab3 || showTab4" class="mt-100">
<mt-navbar v-model="selected" :fixed="false" style="top: 66px;">
<mt-tab-item v-show="showTab0" id="0">综合</mt-tab-item>
<mt-tab-item v-show="showTab1" id="1">课程</mt-tab-item>
<mt-tab-item v-show="showTab2" id="2">五分钟医学</mt-tab-item>
<mt-tab-item v-show="showTab3" id="3">讲师</mt-tab-item>
<mt-tab-item v-show="showTab4" id="4">健康漫画</mt-tab-item>
</mt-navbar>
<!-- tab-container -->
<mt-tab-container v-model="selected">
<mt-tab-container-item v-show="showTab0" id="0">
<!-- 课程 -->
<div v-show="showTab1">
<CourseList :parmData="contentAppModels" :groupNum="contentAppModelCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="1" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 五分钟医学 -->
<div v-show="showTab2">
<FiveMinutes :parmData="fiveMinutesMedicalContentList" :groupNum="fiveMinutesMedicalContentListCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="2" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 讲师 -->
<div v-show="showTab3">
<TeacherList :parmData="pCourseDoctorModels" :groupNum="pCourseDoctorModelCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="3" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 健康漫画 -->
<div v-show="showTab4">
<HealthComics :parmData="educationContents" :groupNum="educationContentCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="4" />
</div>
<NoMoreItem/>
</mt-tab-container-item>
<mt-tab-container-item v-show="showTab1" id="1">
<CourseList :parmData="contentAppModelsAll" :groupNum="contentAppModelCount"/>
<NoMoreItem/>
</mt-tab-container-item>
<mt-tab-container-item v-show="showTab2" id="2">
<FiveMinutes :parmData="fiveMinutesMedicalContentListAll" :groupNum="fiveMinutesMedicalContentListCount"/>
<NoMoreItem/>
</mt-tab-container-item>
<mt-tab-container-item v-show="showTab3" id="3">
<TeacherList :parmData="pCourseDoctorModelsAll" :groupNum="pCourseDoctorModelCount"/>
<NoMoreItem/>
</mt-tab-container-item>
<mt-tab-container-item v-show="showTab4" id="4">
<HealthComics :parmData="educationContentsAll" :groupNum="educationContentCount"/>
<NoMoreItem/>
</mt-tab-container-item>
</mt-tab-container>
</section>
<Loading v-show="false"/>
</section>
</template>
<script>
import SearchHeader from '../components/business/search-header';
import SplitLine from '../components/business/split-line';
import NoMoreItem from '../components/business/no-more-item';
import ShowAllItem from '../components/business/show-all-item';
import GroupTitle from '../components/business/group-title';
import CourseList from '../components/business/course-list';
import FiveMinutes from '../components/business/five-minutes';
import TeacherList from '@/components/business/teacher-list';
import HealthComics from '@/components/business/health-comics';
import CourseAdjust from '../components/business/course-adjust';
import NoResultPage from '@/components/business/no-result-page'
import { Navbar, TabItem } from 'mint-ui';
import Loading from '@/components/common/loading-new'
export default {
data() {
return {
hasResult: true,
searchText: '',
selected: '0',
contentAppModelCount: '0',
contentAppModels: [],
contentAppModelsAll: [],
educationContentCount: '0',
educationContents: [],
educationContentsAll: [],
fiveMinutesMedicalContentListCount: '0',
fiveMinutesMedicalContentList: [],
fiveMinutesMedicalContentListAll: [],
pCourseDoctorModelCount: '0',
pCourseDoctorModels: [],
pCourseDoctorModelsAll: [],
showTab0: true,
showTab1: true,
showTab2: true,
showTab3: true,
showTab4: true
}
},
components: {
SearchHeader,
SplitLine,
Navbar,
TabItem,
NoMoreItem,
ShowAllItem,
GroupTitle,
CourseList,
CourseAdjust,
FiveMinutes,
TeacherList,
HealthComics,
NoResultPage,
Loading
},
watch: {
selected(val) {
this.showIndex(val)
// this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
}
},
created(){
this.searchText = this.$route.query.searchText || ''
console.log(this.searchText)
},
mounted(){
// this.search(this.searchText)
// this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
},
methods: {
showAllItem(index) {
console.log(index)
this.selected = index
},
// 搜索结果
search(searchText) {
let _this = this,
para = {
searchCategory: '1,2,3,4',
searchValue: _this.searchText,
sortItem: 1,
pageNo: 1,
pageSize: 100,
token: _this.token,
setEntry: 'headers',
}
let url = 'contents/searchKeyword/searchContent'
this.showTab0 = true
this.showTab1 = true
this.showTab2 = true
this.showTab3 = true
this.showTab4 = true
this.GET(url, para).then(res => {
_this.searchText = ''
_this.selected = '0'
if (res.code == '000000') {
console.log(res)
// 课程
_this.contentAppModels = this.spliceCertenNumData(res.data.contentAppModels, 4)
_this.contentAppModelsAll = res.data.contentAppModels
_this.contentAppModelCount = res.data.contentAppModelCount + ''
if(res.data.contentAppModelCount === 0){
this.showTab1 = false
}
// 五分钟医学
_this.fiveMinutesMedicalContentList = this.spliceCertenNumData(res.data.fiveMinutesMedicalContentList, 4)
_this.fiveMinutesMedicalContentListAll = this.handelFive(res.data.fiveMinutesMedicalContentList || [])
_this.fiveMinutesMedicalContentListCount = res.data.fiveMinutesMedicalContentListCount + ''
if(res.data.fiveMinutesMedicalContentListCount === 0){
this.showTab2 = false
}
// 讲师
_this.pCourseDoctorModels = this.spliceCertenNumData(res.data.pCourseDoctorModels, 4)
_this.pCourseDoctorModelsAll = res.data.pCourseDoctorModels
_this.pCourseDoctorModelCount = res.data.pCourseDoctorModelCount + ''
if(res.data.pCourseDoctorModelCount === 0){
this.showTab3 = false
}
// 健康漫画
_this.educationContents = this.spliceCertenNumData(res.data.educationContents, 4)
_this.educationContentsAll = res.data.educationContents
_this.educationContentCount = res.data.educationContentCount + ''
if(res.data.educationContentCount === 0){
this.showTab4 = false
}
}
})
},
searchAll(searchText, searchCategory, receive, receiveList) {
let _this = this,
para = {
searchCategory: searchCategory,
searchValue: searchText,
sortItem: 1,
pageNo: 1,
pageSize: 100,
token: _this.token,
setEntry: 'headers',
}
let url = 'contents/searchKeyword/searchContent'
this.GET(url, para).then(res => {
if (res.code == '000000') {
// 课程
_this[receiveList] = res.data[receive]
}
})
},
showIndex(index) {
console.log(index)
},
spliceCertenNumData(oriData, num) {
let result = []
if (oriData.length === 0 || oriData.length < num) {
return oriData
} else {
for ( let i = 0; i < num; i ++){
result.push(oriData[i])
}
return result
}
console.log(result)
},
handelFive(d) {
for (let i = 0; i < d.length; i++) {
d[i].play = '0';
}
return d;
}
},
}
</script>
<style >
.mint-search {
position: fixed;
top: 0px;
z-index: 20;
height: 66px;
width: 100%;
border-bottom: 1px solid #E7E7E7 !important;
}
.mint-searchbar {
position: relative;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: #fff;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 30px 10px 8px;
z-index: 1;
}
.mint-searchbar-cancel {
margin-left: 10px;
font-size: 14px ;
color: #999;
text-decoration: none;
}
.mint-searchbar-inner {
background: #F5F6F6;
/* border-radius: 15px; */
}
.mint-searchbar-core {
background: #F5F6F6;
}
</style>
<style lang="scss">
@import '../style/mixin.scss';
.mint-tab-item-label {
color: inherit;
font-size: px2rem(14px);
line-height: 1;
}
.mint-navbar {
background-color: #fff;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
text-align: center;
border-bottom: px2rem(1px) solid #f0f0f0 !important;
}
.mint-navbar .mint-tab-item.is-selected {
border-bottom: px2rem(2px) solid #449284;
color: #449284;
margin-bottom: px2rem(-1px);
}
.mint-navbar .mint-tab-item {
padding: px2rem(19px) 0 px2rem(11px);
font-size: px2rem(14px);
}
</style>
<style lang="scss" scoped>
@import '../style/mixin.scss';
@import '../style/global.scss';
.mt-80 {
margin-top: px2rem(80px);
}
.mt-100 {
margin-top: px2rem(112px);
}
</style>
<template>
<section>
<form @submit.prevent="search">
<mt-search v-model="searchText" ></mt-search>
<button v-show="false" type="submit" />
</form>
<!-- 没有结果页面 -->
<article v-show="!(showTab1 || showTab2 || showTab3 || showTab4)" class="mt-80">
<section></section>
<NoResultPage/>
<SplitLine borderWidth="3px"/>
<CourseAdjust/>
</article>
<!-- 有结果页面 -->
<article v-show="showTab1 || showTab2 || showTab3 || showTab4">
<div class="navbar-container" >
<div class="navbar-container-item" v-show="showTab0" :class="{'bt-2': navIndex === '0'}" @click="navIndex = '0'">综合</div>
<div class="navbar-container-item" v-show="showTab1" :class="{'bt-2': navIndex === '1'}" @click="navIndex = '1'">课程</div>
<div class="navbar-container-item" v-show="showTab2" :class="{'bt-2': navIndex === '2'}" @click="navIndex = '2'">五分钟医学院</div>
<div class="navbar-container-item" v-show="showTab3" :class="{'bt-2': navIndex === '3'}" @click="navIndex = '3'">讲师</div>
<div class="navbar-container-item" v-show="showTab4" :class="{'bt-2': navIndex === '4'}" @click="navIndex = '4'">健康漫画</div>
</div>
<div class="list-container" v-show="navIndex === '0' && showTab0">
<!-- 课程 -->
<div v-show="showTab1">
<CourseList :parmData="contentAppModels" :groupNum="contentAppModelCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="1" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 五分钟医学 -->
<div v-show="showTab2">
<FiveMinutes :parmData="fiveMinutesMedicalContentList" :groupNum="fiveMinutesMedicalContentListCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="2" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 讲师 -->
<div v-show="showTab3">
<TeacherList :parmData="pCourseDoctorModels" :groupNum="pCourseDoctorModelCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="3" />
<SplitLine borderWidth="3px"/>
</div>
<!-- 健康漫画 -->
<div v-show="showTab4">
<HealthComics :parmData="educationContents" :groupNum="educationContentCount"/>
<ShowAllItem @showAllItem="showAllItem" itemIndex="4" />
</div>
<NoMoreItem/>
</div>
<div class="list-container" v-show="navIndex === '1' && showTab1">
<CourseList :showTitle="showTitle" :showOrder="showOrder" :parmData="contentAppModelsAll" :groupNum="contentAppModelCount"/>
<NoMoreItem/>
</div>
<div class="list-container" v-show="navIndex === '2' && showTab2">
<FiveMinutes :showTitle="showTitle" :showOrder="showOrder" :parmData="fiveMinutesMedicalContentListAll" :groupNum="fiveMinutesMedicalContentListCount"/>
<NoMoreItem/>
</div>
<div class="list-container" v-show="navIndex === '3' && showTab3">
<TeacherList :showTitle="showTitle" :showOrder="showOrder" :parmData="pCourseDoctorModelsAll" :groupNum="pCourseDoctorModelCount"/>
<NoMoreItem/>
</div>
<div class="list-container" v-show="navIndex === '4' && showTab4">
<HealthComics :showTitle="showTitle" :showOrder="showOrder" :parmData="educationContentsAll" :groupNum="educationContentCount"/>
<NoMoreItem/>
</div>
</article>
<Loading v-show="showLoading"/>
</section>
</template>
<script>
import SplitLine from '../components/business/split-line';
import NoMoreItem from '../components/business/no-more-item';
import ShowAllItem from '../components/business/show-all-item';
import GroupTitle from '../components/business/group-title';
import CourseList from '../components/business/course-list';
import FiveMinutes from '../components/business/five-minutes';
import TeacherList from '@/components/business/teacher-list';
import HealthComics from '@/components/business/health-comics';
import CourseAdjust from '../components/business/course-adjust';
import NoResultPage from '@/components/business/no-result-page'
import Loading from '@/components/common/loading-new'
import ConfirmTip from '@/components/common/confirm-tip'
export default {
data() {
return {
navIndex: '0',
showLoading: false,
hasResult: true,
searchText: '',
// selected: '0',
contentAppModelCount: '0',
contentAppModels: [],
contentAppModelsAll: [],
educationContentCount: '0',
educationContents: [],
educationContentsAll: [],
fiveMinutesMedicalContentListCount: '0',
fiveMinutesMedicalContentList: [],
fiveMinutesMedicalContentListAll: [],
pCourseDoctorModelCount: '0',
pCourseDoctorModels: [],
pCourseDoctorModelsAll: [],
showTab0: true,
showTab1: true,
showTab2: true,
showTab3: true,
showTab4: true,
showTitle: false,
showOrder: true
}
},
components: {
SplitLine,
NoMoreItem,
ShowAllItem,
GroupTitle,
CourseList,
CourseAdjust,
FiveMinutes,
TeacherList,
HealthComics,
NoResultPage,
Loading,
ConfirmTip
},
watch: {
// selected(val) {
// this.showIndex(val)
// // this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
// }
},
created(){
this.searchText = this.$route.query.searchText || ''
console.log(this.searchText)
},
mounted(){
// this.search(this.searchText)
// this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
},
methods: {
showAllItem(index) {
console.log(typeof index)
this.navIndex = index
},
// 搜索结果
search(searchText) {
this.showLoading = true
let _this = this,
para = {
searchCategory: '1,2,3,4',
searchValue: _this.searchText,
sortItem: 1,
pageNo: 1,
pageSize: 100,
token: _this.token,
setEntry: 'headers',
}
let url = 'contents/searchKeyword/searchContent'
this.showTab0 = true
this.showTab1 = true
this.showTab2 = true
this.showTab3 = true
this.showTab4 = true
this.GET(url, para).then(res => {
this.showLoading = false
_this.searchText = ''
_this.navIndex = '0'
if (res.code == '000000') {
console.log(res)
// 课程
_this.contentAppModels = this.spliceCertenNumData(res.data.contentAppModels, 4)
_this.contentAppModelsAll = res.data.contentAppModels
_this.contentAppModelCount = res.data.contentAppModelCount + ''
if(res.data.contentAppModelCount === 0){
this.showTab1 = false
}
// 五分钟医学
_this.fiveMinutesMedicalContentList = this.spliceCertenNumData(res.data.fiveMinutesMedicalContentList, 4)
_this.fiveMinutesMedicalContentListAll = this.handelFive(res.data.fiveMinutesMedicalContentList || [])
_this.fiveMinutesMedicalContentListCount = res.data.fiveMinutesMedicalContentListCount + ''
if(res.data.fiveMinutesMedicalContentListCount === 0){
this.showTab2 = false
}
// 讲师
_this.pCourseDoctorModels = this.spliceCertenNumData(res.data.pCourseDoctorModels, 4)
_this.pCourseDoctorModelsAll = res.data.pCourseDoctorModels
_this.pCourseDoctorModelCount = res.data.pCourseDoctorModelCount + ''
if(res.data.pCourseDoctorModelCount === 0){
this.showTab3 = false
}
// 健康漫画
_this.educationContents = this.spliceCertenNumData(res.data.educationContents, 4)
_this.educationContentsAll = res.data.educationContents
_this.educationContentCount = res.data.educationContentCount + ''
if(res.data.educationContentCount === 0){
this.showTab4 = false
}
}
})
},
searchAll(searchText, searchCategory, receive, receiveList) {
let _this = this,
para = {
searchCategory: searchCategory,
searchValue: searchText,
sortItem: 1,
pageNo: 1,
pageSize: 100,
token: _this.token,
setEntry: 'headers',
}
let url = 'contents/searchKeyword/searchContent'
this.GET(url, para).then(res => {
if (res.code == '000000') {
// 课程
_this[receiveList] = res.data[receive]
}
})
},
showIndex(index) {
console.log(index)
},
spliceCertenNumData(oriData, num) {
let result = []
if (oriData.length === 0 || oriData.length < num) {
return oriData
} else {
for ( let i = 0; i < num; i ++){
result.push(oriData[i])
}
return result
}
console.log(result)
},
handelFive(d) {
for (let i = 0; i < d.length; i++) {
d[i].play = '0';
}
return d;
}
},
}
</script>
<style >
.mint-search {
position: fixed;
top: 0px;
z-index: 20;
height: 66px;
width: 100%;
border-bottom: 1px solid #E7E7E7 !important;
}
.mint-searchbar {
position: relative;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: #fff;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 30px 10px 8px;
z-index: 1;
}
.mint-searchbar-cancel {
margin-left: 10px;
font-size: 14px ;
color: #999;
text-decoration: none;
}
.mint-searchbar-inner {
background: #F5F6F6;
/* border-radius: 15px; */
}
.mint-searchbar-core {
background: #F5F6F6;
}
</style>
<style lang="scss" scoped>
@import '../style/mixin.scss';
.navbar-container {
display: flex;
position: fixed;
top: px2rem(60px);
left: 0;
z-index: 2;
flex-direction: row;
border-bottom: 1px solid #E7E7E7;
background: #fff;
padding-top: 10px;
margin-bottom: 6px;
&-item {
display: inline-flex;
margin: px2rem(15px) px2rem(15px) px2rem(-1px);
padding-bottom: px2rem(11px);
font-size: px2rem(14px);
color: #666;
}
.bt-2 {
color: #449284;
border-bottom: px2rem(3px) solid #449284;
}
}
.list-container {
margin: 0;
padding-top: px2rem(120px);
}
.mt-80 {
padding-top: px2rem(80px);
}
.mt-100 {
margin-top: px2rem(112px);
}
</style>
<template>
<div>
<!-- <SearchHeader @search="search" :searchText="searchText"/> -->
<form @submit.prevent="search">
<mt-search v-model="searchText" ></mt-search>
<button v-show="false" type="submit" />
</form>
<!-- <SplitLine /> -->
<div class="mt-100"></div>
<HistoryLabels/>
<HotLabels/>
</div>
</template>
<script>
import SearchHeader from '../components/business/search-header';
import SplitLine from '../components/business/split-line';
import HistoryLabels from '../components/business/history-labels';
import HotLabels from '../components/business/hot-labels';
// import { Search } from 'mint-ui';
export default {
data() {
return {
searchText: ''
}
},
components: {
SearchHeader,
SplitLine,
HistoryLabels,
HotLabels
},
created(){
},
mounted(){
this.getData()
},
methods: {
// 跳转到结果页面,并
search() {
if(!this.searchText) return;
this.$router.push({
path: '/result',
query: {
searchText: this.searchText
}
})
},
// 获取历史搜索
getData() {
let _this = this,
para = {
type: 1,
token: _this.token,
setEntry: 'headers'
}
let url = '/contents/searchKeyword/listKeywords'
this.GET(url, para).then(res => {
if (res.code == '000000') {
if (res.data && res.data.length) {
let index = Math.floor(Math.random() * res.data.length)
this.searchText = res.data[index].keyword
}
}
})
}
},
}
</script>
<style >
.mint-search {
position: fixed;
top: 0px;
z-index: 2;
height: 66px;
width: 100%;
border-bottom: 1px solid #E7E7E7 !important;
}
.mint-searchbar {
position: relative;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: #fff;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 30px 10px 8px;
z-index: 1;
}
.mint-searchbar-cancel {
margin-left: 10px;
font-size: 14px ;
color: #999;
text-decoration: none;
}
.mint-searchbar-inner {
background: #F5F6F6;
}
.mint-searchbar-core {
background: #F5F6F6;
}
</style>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../style/mixin.scss';
@import '../style/global.scss';
.mt-100 {
padding-top: px2rem(63px) !important;
}
</style>
<template>
<div>
<!-- <SearchHeader @search="search" :searchText="searchText"/> -->
<form @submit.prevent="search">
<mt-search v-model="searchText" ></mt-search>
<button v-show="false" type="submit" />
</form>
<!-- <SplitLine /> -->
<div class="mt-100"></div>
<HistoryLabels/>
<HotLabels/>
</div>
</template>
<script>
import SearchHeader from '../components/business/search-header';
import SplitLine from '../components/business/split-line';
import HistoryLabels from '../components/business/history-labels';
import HotLabels from '../components/business/hot-labels';
// import { Search } from 'mint-ui';
export default {
data() {
return {
searchText: ''
}
},
components: {
SearchHeader,
SplitLine,
HistoryLabels,
HotLabels
},
created(){
},
mounted(){
this.getData()
},
methods: {
// 跳转到结果页面,并
search() {
if(!this.searchText) return;
this.$router.push({
path: '/result',
query: {
searchText: this.searchText
}
})
},
// 获取历史搜索
getData() {
let _this = this,
para = {
type: 1,
token: _this.token,
setEntry: 'headers'
}
let url = '/contents/searchKeyword/listKeywords'
this.GET(url, para).then(res => {
if (res.code == '000000') {
if (res.data && res.data.length) {
let index = Math.floor(Math.random() * res.data.length)
this.searchText = res.data[index].keyword
}
}
})
}
},
}
</script>
<style >
.mint-search {
position: fixed;
top: 0px;
z-index: 2;
height: 66px;
width: 100%;
border-bottom: 1px solid #E7E7E7 !important;
}
.mint-searchbar {
position: relative;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: #fff;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 30px 10px 8px;
z-index: 1;
}
.mint-searchbar-cancel {
margin-left: 10px;
font-size: 14px ;
color: #999;
text-decoration: none;
}
.mint-searchbar-inner {
background: #F5F6F6;
}
.mint-searchbar-core {
background: #F5F6F6;
}
</style>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../style/mixin.scss';
@import '../style/global.scss';
.mt-100 {
padding-top: px2rem(63px) !important;
}
</style>
<template>
<div>
<SearchHeader/>
<SplitLine/>
<!-- <HistorySearch/> -->
<SearchLabel :allTags="allTags"/>
<SearchLabel title="热门搜索" :showDelete="false" :allTags="allTags"/>
<!-- <SearchHeader @search="search" :searchText="searchText"/> -->
<form @submit.prevent="search">
<mt-search v-model="searchText" ></mt-search>
<button v-show="false" type="submit" />
</form>
<!-- <SplitLine /> -->
<div class="mt-100"></div>
<HistoryLabels/>
<HotLabels/>
</div>
</template>
<script>
import SearchHeader from '../components/business/search-header';
import SplitLine from '../components/business/split-line';
import HistorySearch from '../components/business/history-search';
import SearchLabel from '../components/business/search-label';
import HistoryLabels from '../components/business/history-labels';
import HotLabels from '../components/business/hot-labels';
// import { Search } from 'mint-ui';
export default {
data(){
data() {
return {
showDelete: false,
allTags: [{"doctorId":452,"doctorName":"刘飞刘","doctorImg":"https://file.yunqueyi.com/File/course_doctor/2018-11/19/452.png","doctorAvatarImg":"https://file.yunqueyi.com/image/jpeg/2018/10/12/20181012134114808-5339c711.jpg","doctorHospital":"沈阳市第四人民医院","joinNum":818,"resourceNum":1,"structureId":132},{"doctorId":424,"doctorName":"阮园阮园阮园","doctorImg":"https://file.yunqueyi.com/File/course_doctor/2018-11/19/424.png","doctorAvatarImg":"https://file.yunqueyi.com/image/jpeg/2018/08/30/20180830111232896-de2f9015.jpg","doctorHospital":"浙江医院","joinNum":533,"resourceNum":2,"structureId":132},{"doctorId":351,"doctorName":"李翔李翔李翔","doctorImg":"https://file.yunqueyi.com/File/course_doctor/2018-11/19/351.png","doctorAvatarImg":"https://file.yunqueyi.com/File/course_doctor/2017-04/06/lixiang.jpg","doctorHospital":"解放军306医院全军糖尿病中心","joinNum":503,"resourceNum":2,"structureId":132},{"doctorId":360,"doctorName":"高蕾莉","doctorImg":"https://file.yunqueyi.com/File/course_doctor/2018-11/20/360.png","doctorAvatarImg":"https://file.yunqueyi.com/File/course_doctor/2018-11/20/web_360.png","doctorHospital":"北京大学人民医院","joinNum":376,"resourceNum":1,"structureId":132}]
searchText: ''
}
},
components: {
SearchHeader,
SplitLine,
HistorySearch,
SearchLabel
HistoryLabels,
HotLabels
},
created(){
},
mounted(){
this.getData()
},
methods: {
getStatusHight(){
rocNative.getStatusBarHeight({
__funcName: '__getStatusBarHeight'
})
// 跳转到结果页面,并
search() {
if(!this.searchText) return;
this.$router.push({
path: '/result',
query: {
searchText: this.searchText
}
})
},
goToPage(){
// alert("000");
this.$emit('setAppMsg',false)
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_notification',
actionCode:'c_notification',
// 获取历史搜索
getData() {
let _this = this,
para = {
type: 1,
token: _this.token,
setEntry: 'headers'
}
let url = '/contents/searchKeyword/listKeywords'
this.GET(url, para).then(res => {
if (res.code == '000000') {
if (res.data && res.data.length) {
let index = Math.floor(Math.random() * res.data.length)
this.searchText = res.data[index].keyword
}
}
})
rocNative.readMessage();
}
},
}
</script>
<style >
.mint-search {
position: fixed;
top: 0px;
z-index: 2;
height: 66px;
width: 100%;
border-bottom: 1px solid #E7E7E7 !important;
}
.mint-searchbar {
position: relative;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: #fff;
box-sizing: border-box;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
padding: 30px 10px 8px;
z-index: 1;
}
.mint-searchbar-cancel {
margin-left: 10px;
font-size: 14px ;
color: #999;
text-decoration: none;
}
.mint-searchbar-inner {
background: #F5F6F6;
}
.mint-searchbar-core {
background: #F5F6F6;
}
</style>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../style/mixin.scss';
@import '../style/global.scss';
.mt-100 {
padding-top: px2rem(63px) !important;
}
</style>
<template>
<section class="font-style">
<teacherTop :backMethod="backMethod" :isScroll="isScroll" :isJSJ="false"></teacherTop>
<div class="teach-opt">
<div class="tea-detail">
<div class="head-img">
<img :src="doctorParm.doctor.avatar_image_url">
</div>
<p class="detail-name">{{doctorParm.doctor.name}}</p>
<p class="detail-intr" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;">
{{doctorParm.doctor.hospital}} {{doctorParm.doctor.title}}
</p>
<div class="detail-info">
<div class="info-item">
<span class="detail-count">{{doctorParm.studyCount.toLocaleString()}}</span>
<p>学习人数</p>
</div>
<div class="info-item">
<span class="detail-count">{{doctorParm.followCount.toLocaleString()}}</span>
<p>关注人数</p>
</div>
</div>
</div>
<div class="tea-new-title plr15">新课上线</div>
<div class="tea-new-line plr15">
<div class="item-new-box">
<div class="item-line" v-for="(item,index) in newsList" :key="index">
<div class="line-img" @click="goToPage(item)">
<img :src="item.imageUrl">
<span class="tag" v-show="item.structureName">{{item.structureName}}</span>
<span class="line-play" @click.stop="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.toLocaleString()}}人已学</span>
<span @click.stop="collectFun(item.favorFlag,item.courseId, item.courseName)" :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>
</div>
<div class="teach-list plr15">
<div :class="index%2==1?'list-item mr0':'list-item'"
v-for="(item,index) in list" @click="goToPage(item)" :key="index">
<div class="tea-img">
<img :src="item.imageUrl">
<span class="learn-p">{{item.joinNum.toLocaleString()}}人已学</span>
</div>
<div class="tea-txt">
<!-- <p class="tea-name">{{item.doctorName}}</p> -->
<div class="tea-position">
{{item.courseName}}
</div>
</div>
</div>
<div class="no-more" v-if="list.length == 0">暂无数据</div>
</div>
</div>
</section>
</template>
<script>
import teacherTop from '../components/teachers/teach-top';
// import {teacher,teacher_info_collect} from '../utils/buryingPoint';
export default {
components:{
teacherTop
},
data(){
return {
isScroll:false,
backMethod: 'inner',
list: [],
newsList: [],
dir: 2,
doctorId: '',
doctorParm: {
studyCount: 0,
followCount: 0,
doctor: {
app_image_url: '',
avatar_image_url: '',
name: '',
title: ''
}
},
token: null
}
},
mounted(){
// alert(this.$route.query)
let _this = this
this.doctorId = this.$route.query.id;
this.token = this.$route.query.userToken || this.$route.query.token
this.token = this.token || '4A96FD82B250491683D17888482A1F96' || 'A76D20BE3C79409C9520AB5A997737DF',
this.backMethod = this.$route.query.from === 'appHome' ? 'native' : 'inner'
this.getBaseData();
this.getNewClass();
this.getCourse();
window.__refresh = function() {
// alert('in __refresh')
_this.getBaseData();
_this.getNewClass();
_this.getCourse();
}
window.addEventListener('scroll',this.handleScroll)
},
computed: {
},
methods:{
handleScroll: function(){
var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
if(scrollTop > 25){
this.isScroll = true;
}else{
this.isScroll = false;
}
},
//跳转
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(flag, id, name){
// let flag = this.resourceData.item[val].favorFlag;
flag = flag == 1 ? 2 : 1;
let _this = this,
para = {
type: flag,
courseId: id,
token: this.token || '4A96FD82B250491683D17888482A1F96' || 'A76D20BE3C79409C9520AB5A997737DF',
setEntry: 'headers'
}
// alert('para.token: ' + para.token)
this.POST(`contents/diagnosis/favors`, para).then( res => {
// alert(JSON.stringify(res))
if(res.code === '000000'){
_this.handelData(id, flag);
} else {
rocNative.showNativeToast({
message: '注册登陆后才能收藏哦'
})
}
// this.resourceData.item[val].favorFlag = res.code=='000000'?(flag==1? 2:1):flag;
})
// this.$emit('collect',val,this.resourceData.item[val].favorFlag,id,name)
},
// collectFunOld(status, id, courseName){
// status = status == 1 ? 2 : 1;
// let _this = this,
// parm = {
// token: _this.token || '4A96FD82B250491683D17888482A1F96' || 'A76D20BE3C79409C9520AB5A997737DF',
// type: status,
// courseId: id,
// setEntry: 'headers'
// }
// alert(JSON.stringify(parm))
// // alert(this.token)
// _this.POST('contents/favors',parm).then(function(res){
// alert(JSON.stringify(res))
// if(res.code === '000000'){
// _this.handelData(id,status);
// } else {
// rocNative.showNativeToast({
// message: '请先登录'
// })
// }
// })
// this.appBuryingPointEntrust({
// ...teacher_info_collect,
// labelId: id,
// labelValue: courseName
// })
// },
// 埋点
appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val)
},
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 || [];
}
})
// this.appBuryingPointEntrust({
// ...teacher,
// labelId: _this.dir,
// labelValue: _this.dir === 1 ? '升序' : '降序'
// })
},
//新课程
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>
<style>
body{background: #fff;height: auto;}
</style>
<style lang="scss" scoped>
body{background: #fff}
@import '../style/mixin';
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
width: 100%;
overflow: hidden;
@include sc(0.6rem, #666);
}
.tea-detail{
height: px2rem(154px);
position: absolute;
width: 100%;
left: 0;
top:-(px2rem(64px));
z-index: 10;
@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(45px);
height: px2rem(45px);
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);
height: px2rem(17px);
overflow: hidden;
width: 90%;
margin:0 auto;
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;
height: px2rem(273px);
.item-new-box{
width: px2rem(10000000px);
}
.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%;
border-radius: px2rem(6px);
margin-right: px2rem(17px);
}
}
.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);
}
.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{
padding:px2rem(90px) 0 px2rem(30px) 0;
position: relative;
.teach-title{
font-size: px2rem(18px);
padding-bottom: px2rem(15px);
padding-top: px2rem(15px);
color:#333;
}
.teach-list{
overflow: hidden;
}
.no-more{
text-align: center;
color:#999;
font-size: px2rem(12px);
}
.opt-span{
span{
color:#449284;
font-size: px2rem(13px);
display: inline-block;
vertical-align: middle;
height: px2rem(15px);
line-height: px2rem(15px);
img{
display: inline-block;
width: px2rem(15px);
height: px2rem(15px);
vertical-align: middle;
}
}
}
.list-item{
width: px2rem(170px);
margin-right: px2rem(5px);
margin-top: px2rem(15px);
float: left;
box-shadow: 0 px2rem(4px) px2rem(6px) RGBA(0, 0, 0, 0.06);
}
.mr0{
margin-right: 0
}
.tea-txt{
padding:px2rem(7px);
}
.tea-img{
width: px2rem(170px);
height: px2rem(96px);
position: relative;
img{
width: 100%;
height: 100%;
display: block;
border-radius: px2rem(3px) px2rem(3px) 0 0 ;
}
.learn-p{
padding-left: px2rem(5px);
position: absolute;
width: 100%;
left:0;
bottom: 0;
background: #333;
background: -webkit-linear-gradient(left, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
background: -o-linear-gradient(right, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
background: -moz-linear-gradient(right, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
background: linear-gradient(to right, RGBA(0, 0, 0, 0.2),RGBA(0, 0, 0, 0));
color:#fff;
font-size: px2rem(11px);
height: px2rem(20px);
line-height: px2rem(20px);
}
}
.tea-name{
color:#333;
font-size: px2rem(14px);
padding: px2rem(7px) 0 px2rem(3px) 0;
}
.tea-position{
height: px2rem(38px);
font-size: px2rem(14px);
line-height: px2rem(19px);
color:#333;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
}
.home-header {
height: px2rem(185px);
@include bis('../images/headerTop.png');
.logo_img{
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册