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

代码整理 hlab

上级 6f229625
无法预览此类型文件
<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 parmData">
<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>
</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 :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 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 cParmData" :key="index">
<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> -->
<p class="course-txt" v-html="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="cParmData.length==0" class="noSource">暂无最新教程数据</div>
</div>
</section>
</template>
<script>
//import { setEventByModuleCode } from '@/utils/index'
import GroupTitle from '@/components/business/group-title';
let mapDesc = ['', '课程名', '关键字', '一句话简介', '章', '节']
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() {
let cParamDataw = this.parmData.map(function(item){
let cItem = Object.assign({}, item)
cItem.name = cItem.name + ' (' + mapDesc[cItem.highLightField] + ')'
return cItem
})
return cParamDataw
},
// groupNum() {
// return this.parmData.length + ''
// }
},
components: {
GroupTitle
},
mounted() {
// this.getData()
// this.list = this.parmData;
},
// filters: {
// filterName(name, highLightField){
// return name + highLightField
// }
// },
methods: {
getDescByMap(index) {
},
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="hot-teacher">
<!-- <div :class="index>1 && (index+1 == cParmData.length)?'teacher-item item-end' : 'teacher-item'" :key="index" -->
<div :class="index>1 && (index+1 == cParmData.length)?'teacher-item item-end' : 'teacher-item'" :key="index"
v-for="(item,index) in cParmData" @click="goToPage(item)">
<div class="teacher-itemimg">
<img :src="item.courseInfoUrl"/>
</div>
<div class="five-text">
<div class="teacher-itemname fs14 ellipsis-2" >
<span v-show="item.typeName" class="teacher-itemname-tag">{{item.typeName}}</span>
<span class="teacher-itemname-name" v-html="item.highLightName"></span>
</div>
<div class="fs13 ellipsis-1" >
<span class="five-text-shourtcut">{{item.shortcut}}</span>
</div>
<div class="fs13 five-text-teacher">
<img src="../../images/teacher-icon.png" /><span class="five-text-teacher-name" v-for="(doctor, dIndex) in item.doctors" :key="dIndex">
{{doctor.doctorName}}
<!-- {{item.doctors[0].doctorName}} -->
</span>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
//import { setEventByModuleCode } from '@/utils/index'
import {
m_search_result_course_detail1,
m_search_result_course_order,
m_search_result_course_more,
m_search_result_course_top
} from '@/utils/buryingPoint'
import GroupTitle from '@/components/business/group-title';
let mapDesc = ['', '课程名', '关键字', '一句话简介', '章', '节']
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.map(function(item){
let cItem = Object.assign({}, item)
if(cItem.highLightField) {
cItem.highLightName = cItem.highLightName + ' (' + mapDesc[cItem.highLightField] + ')'
}
return cItem
})
},
// groupNum() {
// return this.parmData.length + ''
// }
},
components: {
GroupTitle
},
mounted() {
// this.getData()
// this.list = this.parmData;
},
// filters: {
// filterName(name, highLightField){
// return name + highLightField
// }
// },
methods: {
getDescByMap(index) {
},
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';
.course-list {
margin: 0 px2rem(15px);
&-item {
display: flex;
flex-direction: row;
img {
height: px2rem(56px);
width: px2rem(100px);
margin-right: px2rem(10px);
border-radius: px2rem(6px);
}
&-desc {
display: flex;
flex-direction: column;
position: relative;
// span {
// display: inline-flex;
// }
&-type {
display: inline-flex;
height: px2rem(18px);
width: px2rem(30px);
padding: 0 px2rem(2px);
margin-right: px2rem(5px);
font-size: px2rem(11px);
border-radius: px2rem(2px);
background-color: #6A9FE9;
color: #fff;
}
&-name {
display: inline-flex;
font-size: px2rem(16px);
height: px2rem(16px);
width: px2rem(200px);
line-height: px2rem(16px);
color: #333333;
}
}
}
}
</style>
<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(106px);
position: relative;
margin: px2rem(4px) 0 px2rem(15px);
padding-top: px2rem(4px);
&:not(:last-child) {
border-bottom: 1px solid RGBA(240, 240, 240, 1);
}
.teacher-itemimg {
width: px2rem(100px);
height: px2rem(56px);
margin-right: px2rem(10px);
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);
&-shourtcut {
font-size: px2rem(14px);
color: #777;
}
&-teacher {
margin-top: px2rem(4px);
height: px2rem(20px);
line-height: px2rem(20px);
margin-left: px2rem(40px);
img {
width: px2rem(10px);
height: px2rem(10px);
margin-right: px2rem(2px);
color: #777;
}
&-name {
// margin-left:40px;
// padding-top:10px;
margin-left: 0 !important;
padding-left: 0;
font-size: px2rem(13px);
color: #999;
}
}
}
.teacher-itemname {
color: RGBA(102, 102, 102, 1);
height: px2rem(36px);
line-height: px2rem(19px);
font-size: px2rem(13px);
margin-bottom: px2rem(5px);
&-tag {
vertical-align: top;
height: px2rem(20px);
line-height: px2rem(20px);
padding: px2rem(2px) px2rem(3px) px2rem(1px);
border-radius: px2rem(2px);
font-size: px2rem(12px);
color: #fff;
background: rgba(106,159,233,1);
}
&-name {
height: px2rem(18px);
line-height: px2rem(18px);
font-size: px2rem(16px);
color: #333;
}
}
.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(92px);
}
}
.ellipsis-1 {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 1;
white-space: nowrap;
}
.ellipsis-2 {
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
// white-space: nowrap;
}
</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>
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
}, },
created() { created() {
let _self = this; let _self = this;
window.__getUserInfo = function(params){ window.__getUserInfo_HL = function(params){
_self.token = params.userToken _self.token = params.userToken
_self.getData() _self.getData()
} }
...@@ -151,7 +151,7 @@ export default { ...@@ -151,7 +151,7 @@ export default {
}, },
getUserInfo: function () { getUserInfo: function () {
// alert('in hist getUserInfo') // alert('in hist getUserInfo')
rocNative.getUserInfo({'__funcName': '__getUserInfo'}) rocNative.getUserInfo({'__funcName': '__getUserInfo_HL'})
}, },
confirmDelete() { confirmDelete() {
this.showConfirm = true this.showConfirm = true
......
<template>
<div id="search-top" :style="{height:menuptop}">
<div class="search-menu">
<div class="search-transparent search">
<input type="search" :class="isTransparent?'search-transparent':''" class="input" v-model="searchVal" :placeholder="placeholder" :disabled="disabled" />
<img class="search-img" src='../../images/search-grey.png'>
</div>
<div class="bgFill" :style="{height:ptop}"></div>
<div class="fixBox">
<div class="header-right" @click="goToPage">
取消
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data(){
return {
placeholder: '即将上线,敬请期待',
disabled: 'disabled',
searchVal: '',
isTransparent: false, //更改颜色 背景
isMax: false,//消息数量是否大于99
count: '',
isShowMsg: true,
ptop: 0,
menuptop: 0,
popHeight: 0
}
},
props:{
msgCount:{
type:String,
default:''
},
statusBarHeight:{
type:Number,
default:0
},
searchFix:{
type: Boolean,
default: false,
}
},
watch:{
// searchFix:function(n){
// if(n){
// alert(this.searchFix)
// }
// }
},
created(){
let _this = this;
window.__getStatusBarHeight = function(parm){
//lert(parm.statusBarHeight)
if(window.__isAndroid){
_this.popHeight = parseInt(parm.statusBarHeight)/2.5
}else{
_this.popHeight = parm.statusBarHeight
}
_this.ptop = _this.popHeight+'px';
_this.menuptop = _this.popHeight+'px'
// alert(parm.statusBarHeight);
}
this.getStatusHight()
},
mounted(){
// this.getStatusHight();
// if(window.__isAndroid){
// this.popHeight = this.statusBarHeight/2
// }else{
// this.popHeight = this.statusBarHeight
// }
// this.count = this.msgCount;
// this.ptop = this.popHeight+7+'px';
// this.menuptop = this.popHeight+7+'px'
// console.log(this.statusBarHeight);
// if(this.msgCount == ''){
// this.isShowMsg = false
// }
// if(this.count>=99){
// this.count += '+';
// this.isMax = true
// }
},
methods: {
getStatusHight(){
rocNative.getStatusBarHeight({
__funcName: '__getStatusBarHeight'
})
},
goToPage(){
// alert("000");
this.$emit('setAppMsg',false)
this.pageBurialPoin({
menuLevel:1,
menuCode:'m_home',
functionCode:'f_notification',
actionCode:'c_notification',
})
rocNative.readMessage();
}
},
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.search-transparent{
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.5);
color: #fff;
}
.search-transparent::-webkit-input-placeholder{
color:#fff;
}
.white{
color: #fff;
}
.header-right{
width: px2rem(20px);
height: px2rem(20px);
// position: relative;
// margin-top: px2rem(5px);
float: right;
font-size: px2rem(5px);
// img {
// width: 100%;
// height: 100%;
// display: block;
// }
}
.bgFill{
background: inherit;
height: 20px;
}
.fs30{
font-size: px2rem(15px);
}
.gxy-study{
margin-right: px2rem(19px);
}
.gxy{
font-size: px2rem(25px);
margin: px2rem(25px) 0 px2rem(11px) 0;
}
.header{
width: 100%;
/*//height: px2rem(50px);*/
position: relative;
}
.fixed {
.search-menu{
position: fixed;
z-index: 110;
top:0;
left: 0;
}
.fixBox{
background: #44A99B;
height:px2rem(30px);
padding:0 px2rem(25px);
/* padding-top: px2rem(7px)*/
}
.bgFill{
background: #44A99B;
}
.search-transparent::-webkit-input-placeholder{
color:#666;
}
.search{
border-color:#ddd;
}
.info-count{
background: #FB5B52;
color: #fff
}
}
.fixBox{
padding:0 px2rem(25px);
height: px2rem(30px);
/* padding-top: px2rem(7px)*/
}
.search-menu{
width: 100%;
position: absolute;
}
.search{
width: px2rem(290px);
height: px2rem(30px);
border-radius: px2rem(19px);
float: left;
}
.input{
outline: none;
border: none;
float: left;
font-size: px2rem(13px);
margin: px2rem(6px) 0 px2rem(6px) px2rem(15px);
line-height: px2rem(18px);
width: 80%;
}
.search-img{
width: px2rem(16px);
height: px2rem(16px);
margin: px2rem(6px) px2rem(15px) px2rem(9px) 0;
float: right;
}
.info-count{
position:absolute;
top: -(px2rem(5px));
left: (px2rem(10px));
/*max-width: px2rem(25px);*/
padding:0 px2rem(3px);
height: px2rem(15px);
line-height: px2rem(15px);
border-radius: px2rem(15px);
text-align: center;
font-size:px2rem(12px);
font-weight: bold;
background-color: #fff;
color: RGBA(53, 134, 126, 1);
}
.num-min{
max-width: px2rem(25px);
min-width: px2rem(15px);
/*padding:0;*/
}
.num-max{
width: auto;
/* background-color: RGBA(251, 91, 82, 1);
color: #fff;*/
}
.hot-tag{
width: 100%;
height: px2rem(150px);
}
.hotTagTitle{
font-size: px2rem(18px);
padding: px2rem(73px) px2rem(15px);
float: left;
background-color: #fff;
}
.cource{
width: 100%;
height: px2rem(350px);
}
.font-title{
font-size: px2rem(18px);
padding: 0 0 px2rem(21px) px2rem(15px);
float: left;
width: 100%;
text-align: left;
}
.title{
font-size: px2rem(16px);
}
.cource-left{
float: left;
padding-left: px2rem(15px);
}
.need-left{
float: left;
padding: 0 0 px2rem(40px) px2rem(15px);
}
.cource-time{
float: left;
}
.cource-img{
width: px2rem(170px);
height: px2rem(96px);
margin-bottom: px2rem(10px);
}
.cource-more{
font-size: px2rem(15px);
color: #999999;
}
.need{
width: 100%;
height: px2rem(325px);
margin-top: px2rem(35px);
}
</style>
<template>
<section :style="{'line-width':lineWidth, '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'
},
borderStyle: {
type: String,
default: 'solid'
},
borderColor: {
type: String,
default: '#e7e7e7'
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
// @import '../../style/global.scss';
</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>
<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.appImageUrl">
<span class="learn-p">{{item.joinNum}}人已学</span>
<!-- <span class="learn-p">{{item.joinNum | yLocalString}}人已学</span> -->
</div>
<div class="tea-txt">
<div class="tea-name" v-html="item.highLightName">{{item.name}}</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>
...@@ -40,7 +40,6 @@ export default { ...@@ -40,7 +40,6 @@ export default {
data() { data() {
return { return {
topTitle: '讲师集', topTitle: '讲师集',
isScroll: false,
token: '', token: '',
list: [], list: [],
isShowCount: true, isShowCount: true,
...@@ -92,20 +91,6 @@ export default { ...@@ -92,20 +91,6 @@ export default {
} }
}, },
methods: { 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){ goToPage(item){
let _this = this, let _this = this,
......
...@@ -2,7 +2,7 @@ import App from '../App' ...@@ -2,7 +2,7 @@ import App from '../App'
const search = r => require.ensure([], () => r(require('../views/search-index')), 'search') const search = r => require.ensure([], () => r(require('../views/search-index')), 'search')
const result = r => require.ensure([], () => r(require('../views/result')), 'result') const result = r => require.ensure([], () => r(require('../views/result')), 'result')
const details = r => require.ensure([], () => r(require('../views/teacher-details')), 'details') // const details = r => require.ensure([], () => r(require('../views/teacher-details')), 'details')
export default [{ export default [{
path: '/', path: '/',
...@@ -23,10 +23,6 @@ export default [{ ...@@ -23,10 +23,6 @@ export default [{
{ {
path: '/result', path: '/result',
component: result component: result
},
{
path: '/details',
component: details
} }
] ]
}] }]
module.exports = {
// 搜索首页
m_search_search: {
menuCode: 'm_search',
menuLevel: 2,
functionCode: 'f_search',
actionCode: 'c_search',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'f_home',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_history_search_hs: {
menuCode: 'm_search',
menuLevel: 2,
functionCode: 'f_history_search',
actionCode: 'c_history_search',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'f_home',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_history_search_db: {
menuCode: 'm_search',
menuLevel: 2,
functionCode: 'f_history_search',
actionCode: 'c_delete_button',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'f_home',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_history_search_d: {
menuCode: 'm_search',
menuLevel: 2,
functionCode: 'f_history_search',
actionCode: 'c_delete',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'f_home',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_history_search_da: {
menuCode: 'm_search',
menuLevel: 2,
functionCode: 'f_history_search',
actionCode: 'c_delete_all',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'f_home',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_history_search_dc: {
menuCode: 'm_search',
menuLevel: 2,
functionCode: 'f_history_search',
actionCode: 'c_delete_confirm',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'f_home',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_history_hot_search: {
menuCode: 'm_search',
menuLevel: 2,
functionCode: 'f_hot_search',
actionCode: 'c_hot_search',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'f_home',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_history_no_search_result_d: {
menuCode: 'm_search',
menuLevel: 2,
functionCode: 'f_no_search_result',
actionCode: 'c_detail',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'f_home',
params: '',
session: '',
createdTime: new Date().getTime(),
},
// 暂时不做
m_search_history_no_search_result_m: {
menuCode: 'm_search',
menuLevel: 2,
functionCode: 'f_no_search_result',
actionCode: 'c_more',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'f_home',
params: '',
session: '',
createdTime: new Date().getTime(),
},
// 搜索结果
m_search_result_tab_switch: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_tab_switch',
actionCode: 'c_switch',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
// 综合
m_search_result_colligation_detail: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_colligation',
actionCode: 'c_detail',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_colligation_all: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_colligation',
actionCode: 'c_all',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_colligation_top: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_colligation',
actionCode: 'c_top',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
// 课程
m_search_result_course_detail: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_course',
actionCode: 'c_detail',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_course_order: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_course',
actionCode: 'c_order',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_course_more: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_course',
actionCode: 'c_more',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_course_top: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_course',
actionCode: 'c_top',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
// 五分钟
m_search_result_five_minutes_detail: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_five_minutes',
actionCode: 'c_detail',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_five_minutes_order: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_five_minutes',
actionCode: 'c_order',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_five_minutes_top: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_five_minutes',
actionCode: 'c_top',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
// 讲师
m_search_result_lecturer_detail: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_lecturer',
actionCode: 'c_detail',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_lecturer_order: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_lecturer',
actionCode: 'c_order',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_lecturer_top: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_lecturer',
actionCode: 'c_top',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
// 健康漫画
m_search_result_health_cartoon_detail: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_health_cartoon',
actionCode: 'c_detail',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_health_cartoon_order: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_health_cartoon',
actionCode: 'c_order',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
m_search_result_health_cartoon_top: {
menuCode: 'm_search_result',
menuLevel: 3,
functionCode: 'f_health_cartoon',
actionCode: 'c_top',
labelId: '',
labelValue: '',
duration: 1,
menuFromCode: 'm_search',
params: '',
session: '',
createdTime: new Date().getTime(),
},
}
\ No newline at end of file
...@@ -4,33 +4,37 @@ ...@@ -4,33 +4,37 @@
e.rocNative = { e.rocNative = {
// 参数说明 e:回传回来的移动端服务名称; t:前端自己传递的回调JS方法 // 参数说明 e:回传回来的移动端服务名称; t:前端自己传递的回调JS方法
__nativeCall: function (e, t, n) { __nativeCall: function (e, t, n) {
if(t == '__refresh'){ if( window[t] ){
__refresh(n) window[t](n)
}
if(t == '__getUserInfo'){
__getUserInfo(n);
}
if(t == '__getUserInfo_S'){
__getUserInfo_S(n)
}
if(t == '__getUserInfo_CA'){
__getUserInfo_CA(n)
}
if(t == '__getStatusBarHeight'){
__getStatusBarHeight(n);
}
if(t == 'pauseAudioView'){
__pauseAudioView(n);
}
if(t == 'playAudioView'){
__playAudioView(n);
}
if(t == 'closeAudioView'){
__closeAudioView(n);
}
if(t == '__isFirstTime'){
window.__isFirstTime(n)
} }
// if(t == '__refresh'){
// __refresh(n)
// }
// if(t == '__getUserInfo'){
// __getUserInfo(n);
// }
// if(t == '__getUserInfo_S'){
// __getUserInfo_S(n)
// }
// if(t == '__getUserInfo_CA'){
// __getUserInfo_CA(n)
// }
// if(t == '__getStatusBarHeight'){
// __getStatusBarHeight(n);
// }
// if(t == 'pauseAudioView'){
// __pauseAudioView(n);
// }
// if(t == 'playAudioView'){
// __playAudioView(n);
// }
// if(t == 'closeAudioView'){
// __closeAudioView(n);
// }
// if(t == '__isFirstTime'){
// window.__isFirstTime(n)
// }
}, },
__callNative: function (t, a, o) { __callNative: function (t, a, o) {
"function" == typeof o && (n++ , i[n] = o); "function" == typeof o && (n++ , i[n] = o);
......
<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 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:{
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>
<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>
<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>
<!-- <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 :parmData="adjustList"/>
</article>
<!-- 有结果页面 -->
<article v-show="showTab1 || showTab2 || showTab3 || showTab4" style="position:relative;">
<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="fixed-split-line"></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 {
// token: '',
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,
adjustList: []
}
},
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)
let _this = this;
window.__getUserInfo = function(params){
_this.token = params.userToken
// _this.SET_USER_INFO(params)
_this.search()
_this.getAdjustData()
}
if(window.__isWeb) {
_this.getAdjustData()
_this.search()
}
window.__refresh = function(){
_this.getUserInfo()
}
},
mounted(){
// this.search()
// this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
},
methods: {
showAllItem(index) {
console.log(typeof index)
this.navIndex = index
},
// 搜索结果
search() {
this.showLoading = true
let _this = this,
para = {
searchCategory: '1,2,3,4',
searchValue: _this.searchText,
keywordColor: 'rgba(244,122,72,1)',
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;
},
//为您推荐
getAdjustData(){
this.adjustList = []
let _this = this,
parm = {
pageNo: 1,
pageSize: 10,
token: _this.token,
setEntry: 'headers',
}
_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
// }
}
})
},
getUserInfo: function () {
rocNative.getUserInfo({'__funcName': '__getUserInfo'})
}
},
}
</script>
<style >
.mint-search {
position: fixed;
top: 0px;
z-index: 3 !important;
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: 3;
}
.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 {
width: 100%;
height: px2rem(57px);
display: flex;
position: fixed;
top: px2rem(60px);
left: 0;
z-index: 2;
flex-direction: row;
// border-bottom: 1px solid #E7E7E7;
background: #fff;
// margin-top: 10px;
margin-bottom: 6px;
&-item {
display: inline-flex;
margin: px2rem(25px) px2rem(15px) px2rem(-1px);
padding-bottom: px2rem(11px);
font-size: px2rem(14px);
color: #666;
}
.bt-2 {
color: #449284;
border-bottom: px2rem(2px) solid #449284;
}
}
.list-container {
margin: 0;
padding-top: px2rem(120px);
}
.fixed-split-line {
position: fixed;
width: 100%;
top: 117px;
z-index: 1;
border-bottom: 1px solid #e7e7e7;
}
.mt-80 {
padding-top: px2rem(80px);
}
.mt-100 {
margin-top: px2rem(112px);
}
</style>
<template>
<section>
<form @submit.prevent="search" class="search-form">
<mt-search v-model="searchText" ></mt-search>
<span class="onCancle"></span>
<button v-show="false" type="submit" />
</form>
<!-- 没有结果页面 -->
<article v-show="!(showTab1 || showTab2 || showTab3 || showTab4)" class="mt-80">
<section></section>
<NoResultPage/>
<SplitLine borderWidth="3px"/>
<CourseAdjust :parmData="adjustList"/>
</article>
<!-- 有结果页面 -->
<article id="navbar-container-wrapper" v-show="showTab1 || showTab2 || showTab3 || showTab4" style="position:relative;">
<div class="navbar-container" >
<div class="navbar-container-item" v-show="showTab0" :class="{'bt-2': navIndex === '0'}" @click="tabClick('0')">综合</div>
<div class="navbar-container-item" v-show="showTab1" :class="{'bt-2': navIndex === '1'}" @click="tabClick('1')">课程</div>
<div class="navbar-container-item" v-show="showTab2" :class="{'bt-2': navIndex === '2'}" @click="tabClick('2')">五分钟医学院</div>
<div class="navbar-container-item" v-show="showTab3" :class="{'bt-2': navIndex === '3'}" @click="tabClick('3')">讲师</div>
<div class="navbar-container-item" v-show="showTab4" :class="{'bt-2': navIndex === '4'}" @click="tabClick('4')">健康漫画</div>
</div>
<div class="fixed-split-line"></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"/>
<BackTop ref="refBackTop" @backTop="backTop" v-show="isShowTop" />
</section>
</template>
<script>
import {
m_search_search,
m_search_result_tab_switch
} from '@/utils/buryingPoint'
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'
import BackTop from '@/components/common/backTop'
export default {
data() {
return {
isShowTop: false,
// token: '',
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,
adjustList: []
}
},
components: {
SplitLine,
NoMoreItem,
ShowAllItem,
GroupTitle,
CourseList,
CourseAdjust,
FiveMinutes,
TeacherList,
HealthComics,
NoResultPage,
Loading,
ConfirmTip,
BackTop
},
watch: {
// selected(val) {
// this.showIndex(val)
// // this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
// }
},
created(){
this.searchText = this.$route.query.searchText || ''
// this.searchText = escape(this.$route.query.searchText || '')
console.log(this.searchText)
let _this = this;
window.__getUserInfo = function(params){
_this.token = params.userToken
// _this.SET_USER_INFO(params)
_this.search()
_this.getAdjustData()
}
if(window.__isWeb) {
_this.search()
}
window.__refresh = function(){
_this.getUserInfo()
}
window.addEventListener('scroll', this.scrollFun);
},
mounted(){
this.getUserInfo()
// this.searchAll(this.searchText, '1', 'contentAppModels', 'contentAppModelsAll')
},
methods: {
showAllItem(index) {
console.log(typeof index)
this.navIndex = index
this.pageBurialPoin({
...m_search_result_tab_switch,
labelValue: index,
createdTime: new Date().getTime(),
})
},
// 搜索结果
search() {
this.pageBurialPoin({
...m_search_search,
labelValue: this.searchText,
createdTime: new Date().getTime(),
})
this.showLoading = true
let str2 = (this.searchText || '').replace(/[\-\_\,\!\|\~\`\(\)\#\$\%\^\&\*\{\}\:\;\"\L\<\>\?]/g, '');// 去掉特殊字符
let _this = this,
para = {
searchCategory: '1,2,3,4',
searchValue: str2,
keywordColor: 'rgba(244,122,72,1)',
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;
},
//为您推荐
getAdjustData(){
this.adjustList = []
let _this = this,
parm = {
pageNo: 1,
pageSize: 10,
token: _this.token,
setEntry: 'headers',
}
_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
// }
}
})
},
getUserInfo: function () {
rocNative.getUserInfo({'__funcName': '__getUserInfo'})
},
scrollFun() {
let navConWrapDom = document.querySelector('#navbar-container-wrapper')
let navConWrapDomOT = document.querySelector('#navbar-container-wrapper').offsetParent.offsetTop;
let scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
console.log('this' ,this, scrollTop > 50)
if(scrollTop > 2){
this.isShowTop = true
} else {
this.isShowTop = false
}
console.log(navConWrapDomOT)
console.log(scrollTop)
},
backTop() {
this.isShowTop = false
},
tabClick(index) {
this.navIndex = index
this.$refs.refBackTop.backTop()
}
},
}
</script>
<style >
/* .mint-search {
position: fixed;
top: 0px;
z-index: 3 !important;
height: 66px;
width: 100%;
border-bottom: 1px solid #E7E7E7 !important;
} */
.mint-search {
position: fixed;
top: 0px;
z-index: 3;
height: 66px;
width: 100%;
/* margin: 0 20px; */
border-bottom: 1px solid #E7E7E7 !important;
/* background-color: #fff; */
}
.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;
margin: 0 10px;
padding: 30px 10px 8px;
z-index: 3;
}
.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 {
color: #555555;
background: #F5F6F6;
}
</style>
<style lang="scss" scoped>
@import '../style/mixin.scss';
// .search-form {
// // position: relative;
// }
.navbar-container {
width: 100%;
height: px2rem(57px);
display: flex;
position: fixed;
top: px2rem(60px);
left: 0;
z-index: 2;
flex-direction: row;
// border-bottom: 1px solid #E7E7E7;
background: #fff;
// margin-top: 10px;
margin-bottom: 6px;
&-item {
display: inline-flex;
margin: px2rem(25px) px2rem(15px) px2rem(-1px);
padding-bottom: px2rem(11px);
font-size: px2rem(14px);
color: #666;
}
.bt-2 {
color: #449284;
border-bottom: px2rem(2px) solid #449284;
}
}
.list-container {
margin: 0;
padding-top: px2rem(120px);
}
.fixed-split-line {
position: fixed;
width: 100%;
top: 117px;
z-index: 1;
border-bottom: 1px solid #e7e7e7;
}
.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 @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 @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 {mapState, mapMutations} from 'vuex'
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';
export default {
data() {
return {
searchText: '',
token: ''
}
},
components: {
SearchHeader,
SplitLine,
HistoryLabels,
HotLabels
},
created(){
},
computed:{
...mapState([
'sousuo'
])
},
mounted(){
// let _self = this;
// window.__getUserInfo = function(params){
// _self.token = params.userToken
// // _self.SET_USER_INFO(params)
// _self.getData()
// }
// window.__refresh = function(){
// _self.getUserInfo()
// }
// window.__getStatusBarHeight = function(params){
// _self.SET_NAVBAR_HEIGHT(params)
// }
// window.__getStatusBarHeight = function(parm){
// //lert(parm.statusBarHeight)
// if(window.__isAndroid){
// _this.popHeight = parseInt(parm.statusBarHeight)/2.5
// }else{
// _this.popHeight = parm.statusBarHeight
// }
// _this.ptop = _this.popHeight+'px';
// _this.menuptop = _this.popHeight+'px'
// // alert(parm.statusBarHeight);
// }
// if(window.__isWeb) {
// _self.getData()
// }
// _self.getUserInfo()
// _self.getStatusBarHeight()
},
methods: {
...mapMutations([
'SET_USER_INFO', 'SET_NAVBAR_HEIGHT'
]),
// 跳转到结果页面,并
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
}
}
})
},
getUserInfo: function () {
rocNative.getUserInfo({'__funcName': '__getUserInfo'})
},
getStatusBarHeight: function () {
rocNative.getStatusBarHeight({'__funcName': '__getStatusBarHeight'})
}
},
}
</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/>
dev 环境
<img src="https://test1-file.yunqueyi.com/image/HJ_B001_YD_002_A.jpg" @click="gotoPage">
</div>
</template>
<script>
import {mapState, mapMutations} from 'vuex'
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';
export default {
data() {
return {
searchText: '',
token: ''
}
},
components: {
SearchHeader,
SplitLine,
HistoryLabels,
HotLabels
},
created(){
},
computed:{
...mapState([
'sousuo'
])
},
mounted(){
let _self = this;
window.__getUserInfo = function(params){
_self.token = params.userToken
// _self.SET_USER_INFO(params)
_self.getData()
}
// window.__refresh = function(){
// _self.getUserInfo()
// }
// window.__getStatusBarHeight = function(params){
// _self.SET_NAVBAR_HEIGHT(params)
// }
// window.__getStatusBarHeight = function(parm){
// //lert(parm.statusBarHeight)
// if(window.__isAndroid){
// _this.popHeight = parseInt(parm.statusBarHeight)/2.5
// }else{
// _this.popHeight = parm.statusBarHeight
// }
// _this.ptop = _this.popHeight+'px';
// _this.menuptop = _this.popHeight+'px'
// // alert(parm.statusBarHeight);
// }
// _self.getData()
// if(window.__isWeb) {
// _self.getData()
// }
_self.getUserInfo()
// _self.getStatusBarHeight()
},
methods: {
...mapMutations([
'SET_USER_INFO', 'SET_NAVBAR_HEIGHT'
]),
// 跳转到结果页面,并
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
}
}
})
},
getUserInfo: function () {
rocNative.getUserInfo({'__funcName': '__getUserInfo'})
},
getStatusBarHeight: function () {
rocNative.getStatusBarHeight({'__funcName': '__getStatusBarHeight'})
},
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.11.253:8019/#/search',
// "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
})
},
},
}
</script>
<style >
.mint-search {
position: fixed;
top: 0px;
z-index: 2;
height: 66px;
width: 100%;
/* margin: 0 20px; */
border-bottom: 1px solid #E7E7E7 !important;
background-color: #fff;
}
.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;
margin: 0 10px;
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 {
color: #555555;
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>
<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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册