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

代码整理

上级 d2270388
无法预览此类型文件
<template>
<section class="back-top">
<div class="back-btn" @click="backTop">
<img src="../../images/backTop.png"/>
<img src="../../images//backTop.png">
</div>
</section>
</template>
<script>
export default {
data(){
return{
objPoint:{}
}
export default {
data() {
return {
objPoint: {}
};
},
props:{
burialPoint:{
default:'',
type:String
props: {
burialPoint: {
default: "",
type: String
}
},
mounted(){
if(this.burialPoint == 'activity'){
mounted() {
if (this.burialPoint == "activity") {
this.objPoint = {
menuLevel:2,
menuFromCode:'m_home',
menuCode:'m_content_list',
functionCode:'f_activity',
actionCode:'c_top'
}
menuLevel: 2,
menuFromCode: "m_home",
menuCode: "m_content_list",
functionCode: "f_activity",
actionCode: "c_top"
};
}
},
methods: {
backTop:function(){
if(this.burialPoint == 'activity'){
backTop: function() {
if (this.burialPoint == "activity") {
this.pageBurialPoin(this.objPoint);
}
var osTop = document.documentElement.scrollTop || document.body.scrollTop;
if(osTop > 0){
if (osTop > 0) {
document.documentElement.scrollTop = document.body.scrollTop = 0;
}
}
},
}
};
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.back-btn{
@import "../../style/mixin";
.back-btn {
position: fixed;
width: px2rem(35px);
height: px2rem(35px);
right: px2rem(15px);
z-index: 100;
bottom: px2rem(80px);;
img{
bottom: px2rem(80px);
img {
width: 100%;
height: 100%;
display: block;
}
}
}
</style>
......@@ -3,11 +3,16 @@
<div class="search-menu">
<div class="bgFill" :style="{height:ptop}"></div>
<div class="fixBox">
<img @click="goBackHome" class="left-arror" :style="{top: bPtop}" src="../../images/lecturer/left-arror.png" alt="">
<img
@click="goBackHome"
class="left-arror"
:style="{top: bPtop}"
src="../../images//left-arror.png"
alt
>
<div :class="isTransparent?'search-transparent':'bgWhite'" class="search" @click="goSearch">
<!-- <img class="search-img-left" src="../../images/search-white.png"> -->
<span class="input">{{placeholder}}</span>
<img class="search-img" src="../../images/search-white.png">
<img class="search-img" src="../../images//search-white.png">
</div>
</div>
</div>
......@@ -42,27 +47,31 @@ export default {
let _this = this;
window.__getStatusBarHeight = function(parm) {
if (window.__isAndroid) {
_this.popHeight = parseInt(parm.statusBarHeight) / 2.5;
_this.popHeight = parseInt(parm.statusBarHeight) / 2.5
} else {
_this.popHeight = parm.statusBarHeight;
}
_this.ptop = _this.popHeight + "px";
_this.ptop = _this.popHeight + "px"
_this.bPtop = _this.popHeight + 2 + "px"
_this.menuptop = _this.popHeight + "px";
_this.menuptop = _this.popHeight + "px"
};
this.getStatusHight();
this.getStatusHight()
},
mounted() {},
methods: {
// 获取状态栏高度
getStatusHight() {
rocNative.getStatusBarHeight({
__funcName: "__getStatusBarHeight"
});
})
},
// 跳转到搜索项目
goSearch() {
let _this = this,
url = getWebPageUrl('sousuo/#/index');
url = getWebPageUrl("sousuo/#/index");
let itemData = {
title: "",
imageUrl: "",
......@@ -92,7 +101,7 @@ export default {
}
]
}
};
}
rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code,
......
......@@ -2,12 +2,15 @@
<div class="hot-lect">
<span class="hot-lect-wrapper-title">热门讲师</span>
<div class="hot-lect-wrapper">
<div class="hot-lect-wrapper-list" >
<div class="hot-lect-wrapper-list-item"
v-for="(item,index) in parmData" :key="index"
@click="gotoDetail(item)">
<div class="hot-lect-wrapper-list">
<div
class="hot-lect-wrapper-list-item"
v-for="(item,index) in parmData"
:key="index"
@click="gotoDetail(item)"
>
<div class="lect-img">
<img v-lazy="item.doctorAvatarImg" :key="item.doctorAvatarImg"/>
<img v-lazy="item.doctorAvatarImg" :key="item.doctorAvatarImg">
<span class="disp-blc">
<span :class="{'andriod-name': isAndroid}">{{item.doctorName}}</span>
</span>
......@@ -21,98 +24,93 @@
</template>
<script>
import { teacher } from '../../utils/buryingPoint';
import { teacher } from "../../utils/buryingPoint";
export default {
data() {
return {
title:'热门讲师',
title: "热门讲师",
list: [],
pageNo: 1,
pageSize: 10,
parmData: [],
isAndroid: false
}
},
beforeMount(){
};
},
mounted(){
this.isAndroid = window.__isAndroid
beforeMount() {},
mounted() {
this.isAndroid = window.__isAndroid;
this.getData();
},
props:{
userToken:{
type:String,
default:''
props: {
userToken: {
type: String,
default: ""
}
},
methods: {
// 跳转到详情页面
gotoDetail(item){
gotoDetail(item) {
this.$router.push({
path: '/teachersDetail',
path: "/teachersDetail",
query: {
id: item.doctorId
}
})
});
this.appBuryingPointEntrust({
...teacher,
labelId: item.doctorId,
labelValue: item.doctorName
})
});
},
//热门讲师
getData(){
getData() {
let _this = this,
para = {
pageNo: 1,
pageSize: 6,
setEntry: 'headers'
}
this.GET('contents/courseDoctor/v1/getHotTeacher', para).then(res => {
if(res.code == '000000'){
_this.parmData = res.data && res.data.list || []
setEntry: "headers"
};
this.GET("contents/courseDoctor/v1/getHotTeacher", para).then(res => {
if (res.code == "000000") {
_this.parmData = (res.data && res.data.list) || [];
}
})
});
},
// 埋点
appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val)
},
rocNative.appBuryingPointEntrust(val);
}
}
}
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.hot-lect {
@import "../../style/mixin.scss";
@import "../../style/global.scss";
.hot-lect {
&-wrapper {
width: 100%;
overflow: hidden;
height: px2rem(115px);
// margin: 0 px2rem(15px);
overflow-x: scroll;
-webkit-tap-highlight-color:rgba(0,0,0,0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
outline: 0;
-webkit-overflow-scrolling : touch;
-webkit-overflow-scrolling: touch;
&-list {
display: flex;
flex-direction: columns;
margin-left: px2rem(12px);
width: px2rem(666px);
height: px2rem(133px);
// margin: 0 px2rem(15px);
// padding: px2rem(4px) px2rem(4px);
&-item {
display: inline-block;
width: px2rem(105px);
height: px2rem(107px);
margin: px2rem(3px);
text-align: center;
background:rgba(255,255,255,1);
box-shadow: 0px 1px 6px 0px rgba(0,0,0,0.07);
background: rgba(255, 255, 255, 1);
box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.07);
border-radius: px2rem(3px);
span {
width: 100%;
......@@ -144,38 +142,37 @@ export default {
border-radius: px2rem(8px);
font-size: px2rem(13px);
color: #fff;
background: #CEAE67;
background: #ceae67;
}
}
}
}
.disp-blc {
}
.disp-blc {
display: block;
}
.hot-lect-wrapper-title {
}
.hot-lect-wrapper-title {
display: block;
width: 100%;
padding: px2rem(15px);
font-size: px2rem(18px);
font-weight: 500;
color: #333;
}
.disp-blc.lect-ks {
}
.disp-blc.lect-ks {
position: relative;
left: 0;
top: px2rem(-8px);
font-size: px2rem(12px);
color: #666;
}
.disp-blc.study-num {
}
.disp-blc.study-num {
position: relative;
left: 0;
top: px2rem(-10px);
font-size: px2rem(11px);
color: #999;
}
.andriod-name {
}
.andriod-name {
padding-top: px2rem(2px);
}
}
</style>
<template>
<section>
<!-- <article class="group-title-title">
<span class="group-title-title-main">{{groupTitle}}</span><span class="group-title-title-sub">专业领域的资深专家</span>
</article> -->
<article class="group-title">
<article v-show="showOrder" class="group-title-order">
<div @click="order(1, 'isLetterOrderDown', 'doctorFirstNameChar')"
:class="{'active': showOrderIndex === 1}" class="group-title-order-item">
<span>首字母</span>
<img class="first-name default" src="../../images/lecturer/sort-default.png" v-show="showOrderIndex !== 1"/>
<img class="first-name" src="../../images/lecturer/sort-down.png" v-show="isLetterOrderDown && showOrderIndex === 1"/>
<img class="first-name" src="../../images/lecturer/sort-up.png" v-show="!isLetterOrderDown && showOrderIndex === 1"/>
<img class="first-name default" :src="sortDefaultImg" v-show="showOrderIndex !== 1"/>
<img class="first-name" :src="sortDownImg" v-show="isLetterOrderDown && showOrderIndex === 1"/>
<img class="first-name" :src="sortUpImg" v-show="!isLetterOrderDown && showOrderIndex === 1"/>
</div>
<div @click="order(2, 'isNewCourseOrderDown', 'newTime')"
:class="{'active': showOrderIndex === 2}" class="group-title-order-item">
<span class="new-course">时间</span>
<img class="new-course-default" src="../../images/lecturer/sort-default.png" v-show="showOrderIndex !== 2"/>
<img class="new-course-img" src="../../images/lecturer/sort-down.png" v-show="isNewCourseOrderDown && showOrderIndex === 2"/>
<img class="new-course-img" src="../../images/lecturer/sort-up.png" v-show="!isNewCourseOrderDown && showOrderIndex === 2"/>
<img class="new-course-default" :src="sortDefaultImg" v-show="showOrderIndex !== 2"/>
<img class="new-course-img" :src="sortDownImg" v-show="isNewCourseOrderDown && showOrderIndex === 2"/>
<img class="new-course-img" :src="sortUpImg" v-show="!isNewCourseOrderDown && showOrderIndex === 2"/>
</div>
<div @click="order(3, 'isResourceNumOrderDown', 'resourceNum')"
:class="{'active': showOrderIndex === 3}" class="group-title-order-item">
<span>课程数</span>
<img class="course-num default" src="../../images/lecturer/sort-default.png" v-show="showOrderIndex !== 3"/>
<img class="course-num" src="../../images/lecturer/sort-down.png" v-show="isResourceNumOrderDown && showOrderIndex === 3"/>
<img class="course-num" src="../../images/lecturer/sort-up.png" v-show="!isResourceNumOrderDown && showOrderIndex === 3"/>
<img class="course-num default" :src="sortDefaultImg" v-show="showOrderIndex !== 3"/>
<img class="course-num" :src="sortDownImg" v-show="isResourceNumOrderDown && showOrderIndex === 3"/>
<img class="course-num" :src="sortUpImg" v-show="!isResourceNumOrderDown && showOrderIndex === 3"/>
</div>
<div @click="order(4, 'isHotOrderDown', 'totalNum')"
:class="{'active': showOrderIndex === 4}" class="group-title-order-item">
<span class="hot-degree-title">人气</span>
<img class="hot-degree default" src="../../images/lecturer/sort-default.png" v-show="showOrderIndex !== 4"/>
<img class="hot-degree" src="../../images/lecturer/sort-down.png" v-show="isHotOrderDown && showOrderIndex === 4"/>
<img class="hot-degree" src="../../images/lecturer/sort-up.png" v-show="!isHotOrderDown && showOrderIndex === 4"/>
<img class="hot-degree default" :src="sortDefaultImg" v-show="showOrderIndex !== 4"/>
<img class="hot-degree" :src="sortDownImg" v-show="isHotOrderDown && showOrderIndex === 4"/>
<img class="hot-degree" :src="sortUpImg" v-show="!isHotOrderDown && showOrderIndex === 4"/>
</div>
</article>
</article>
......@@ -48,6 +45,9 @@ export default {
isNewCourseOrderDown: true,
isResourceNumOrderDown: true,
isHotOrderDown: true,
sortDefaultImg: require('../../images//sort-default.png'),
sortDownImg: require('../../images//sort-down.png'),
sortUpImg: require('../../images//sort-up.png')
}
},
props: {
......@@ -109,10 +109,6 @@ export default {
border: 1px solid #F6F6F6;
border-radius: px2rem(25px);
background: #F6F6F6;
// border: 1px solid #449284;
// span {
// // margin-right: px2rem(30px);
// }
img {
position: absolute;
top: px2rem(4px);
......@@ -127,7 +123,7 @@ export default {
}
.first-name.default {
top: px2rem(6px);
left: px2rem(52px);
left: px2rem(53px);
height: px2rem(10px);
width: px2rem(10px);
}
......
<template>
<mt-popup
v-model="isShowSelection"
position="top"
>
<mt-popup v-model="isShowSelection" position="top">
<!-- <section v-show="isShowSelection" style="position:fixed;top:0;z-index:201;background:#fff;height:100%;overflow-x:auto;"> -->
<article class="lect-selection">
<section class="lect-selection-title">
<img @click="closeSelectedPage" src="../../images/lecturer/select-delete.png"/>
<img @click="closeSelectedPage" src="../../images//select-delete.png">
<span>{{selectedTitle}}</span>
<span class="no-content"></span>
</section>
......@@ -15,18 +12,18 @@
<section class="group-title-order">
<div @click="selectedType(1)" class="group-title-order-item">
<span :class="{'active': selectedTypeIndex === 1}">{{selectedTitleTitle}}</span>
<img v-show="selectedTypeIndex === 1" src="../../images/lecturer/select-up.png"/>
<img v-show="selectedTypeIndex !== 1" src="../../images/lecturer/select-down.png"/>
<img v-show="selectedTypeIndex === 1" src="../../images//select-up.png">
<img v-show="selectedTypeIndex !== 1" src="../../images//select-down.png">
</div>
<div @click="selectedType(2)" class="group-title-order-item">
<span :class="{'active': selectedTypeIndex === 2}">{{selectedLevelName}}</span>
<img v-show="selectedTypeIndex === 2" src="../../images/lecturer/select-up.png"/>
<img v-show="selectedTypeIndex !== 2" src="../../images/lecturer/select-down.png"/>
<img v-show="selectedTypeIndex === 2" src="../../images//select-up.png">
<img v-show="selectedTypeIndex !== 2" src="../../images//select-down.png">
</div>
<div @click="selectedType(3)" class="group-title-order-item">
<span :class="{'active': selectedTypeIndex === 3}">{{selectedDepartName}}</span>
<img v-show="selectedTypeIndex === 3" src="../../images/lecturer/select-up.png"/>
<img v-show="selectedTypeIndex !== 3" src="../../images/lecturer/select-down.png"/>
<img v-show="selectedTypeIndex === 3" src="../../images//select-up.png">
<img v-show="selectedTypeIndex !== 3" src="../../images//select-down.png">
</div>
</section>
</article>
......@@ -34,21 +31,33 @@
<article class="lect-selection-content-region" v-show="selectedTypeIndex === 1">
<table class="lect-selection-content-rp-tb">
<tr>
<td style="width: 40%" >
<td style="width: 40%">
<table class="lect-selection-content-rp-tb-left">
<tr v-for="(item, index) in allAreaList" :class="{'bg-white': selectedAreaIndex === index}" @click="selectAreaAction(item, index)" :key="index">
<td >{{item.name}}</td>
<tr
v-for="(item, index) in allAreaList"
:class="{'bg-white': selectedAreaIndex === index}"
@click="selectAreaAction(item, index)"
:key="index"
>
<td>{{item.name}}</td>
</tr>
</table>
</td>
<td style="width: 4%"></td>
<td class="lect-selection-content-rp-tb-tb" style="width: 55%" >
<table >
<tr v-for="(item, index) in allAreaSubList"
@click="selectAreaSubAction(item, index)" :key="index"
<td class="lect-selection-content-rp-tb-tb" style="width: 55%">
<table>
<tr
v-for="(item, index) in allAreaSubList"
@click="selectAreaSubAction(item, index)"
:key="index"
>
<td>{{item.name}}</td>
<td style="text-align: right;">
<img
v-show="item.name && selectedAreaSubIndex === index"
src="../../images//select-selected.png"
>
<td >{{item.name}}</td>
<td style="text-align: right;"><img v-show="item.name && selectedAreaSubIndex === index" src="../../images/lecturer/select-selected.png"/></td>
</td>
</tr>
</table>
</td>
......@@ -58,11 +67,20 @@
<article class="lect-selection-content-level" v-show="selectedTypeIndex === 2">
<table class="lect-selection-content-rp-tb">
<tr>
<td class="lect-selection-content-rp-tb-tb-2" >
<td class="lect-selection-content-rp-tb-tb-2">
<table>
<tr @click="selectLevelAction(item, index)" v-for="(item, index) in allLevelList" :key="index">
<td >{{item.value}}</td>
<td style="text-align: right;"><img v-show="selectedLevelIndex === index" src="../../images/lecturer/select-selected.png"/></td>
<tr
@click="selectLevelAction(item, index)"
v-for="(item, index) in allLevelList"
:key="index"
>
<td>{{item.value}}</td>
<td style="text-align: right;">
<img
v-show="selectedLevelIndex === index"
src="../../images//select-selected.png"
>
</td>
</tr>
</table>
</td>
......@@ -74,9 +92,18 @@
<tr>
<td class="lect-selection-content-rp-tb-tb-2">
<table>
<tr @click="selectDepartAction(item, index)" v-for="(item, index) in allDepartList" :key="index">
<td >{{item.name}}</td>
<td style="text-align: right;"><img v-show="selectedDepartIndex === index" src="../../images/lecturer/select-selected.png"/></td>
<tr
@click="selectDepartAction(item, index)"
v-for="(item, index) in allDepartList"
:key="index"
>
<td>{{item.name}}</td>
<td style="text-align: right;">
<img
v-show="selectedDepartIndex === index"
src="../../images//select-selected.png"
>
</td>
</tr>
</table>
</td>
......@@ -86,13 +113,10 @@
</section>
<!-- </section> -->
</mt-popup>
</template>
<script>
// import {mapState, mapMutations, mapActions} from 'vuex'
// import BackTop from '@/homecom/components/common/backTop';
export default {
data(){
data() {
return {
isShowSelection: false,
parmDataDoctList: [],
......@@ -106,92 +130,75 @@ export default {
selectedAreaSubIndex: 0,
selectedLevelIndex: 0,
selectedDepartIndex: 0,
selectedTitleTitle: '全国',
selectedAreaName: '全国',
selectedAreaSubName: '',
selectedLevelName: '全部等级',
selectedDepartName: '全部科室',
selectedTitleTitle: "全国",
selectedAreaName: "全国",
selectedAreaSubName: "",
selectedLevelName: "全部等级",
selectedDepartName: "全部科室",
provinceId: 0,
cProvinceId: 0, // 记录当前左边选择的省或者市
cityId: 0,
countyId: 0,
levelGrade : 0,
levelGrade: 0,
departmentId: 0,
oldProvinceId: 0,
oldCityId: 0,
oldCountyId: 0,
oldSelectedAreaSubIndex: 0,
oldCProvinceId: -1, // 记录之前左边选择的省或者市
}
},
props: {
// selectedTypeIndex: {
// type: Number,
// default: 1
// }
oldCProvinceId: -1 // 记录之前左边选择的省或者市
};
},
props: {},
computed: {
// isShowSelection() {
// return this.isShowSelection;
// },
selectedTitle() {
return this.selectedTypeIndex === 1 ? '选择地区' : this.selectedTypeIndex === 2 ? '选择等级' : '选择科室'
return this.selectedTypeIndex === 1
? "选择地区"
: this.selectedTypeIndex === 2
? "选择等级"
: "选择科室";
}
},
components:{
},
// computed: {
// selectedTitle() {
// return this.selectedTypeIndex === 1 ? '选择地区' : this.selectedTypeIndex === 2 ? '选择等级' : '选择科室'
// }
// },
beforeCreate() {
},
created () {
this.initAll()
components: {},
beforeCreate() {},
created() {
this.initAll();
},
beforeMount() {
},
mounted(){
},
beforeMount() {},
mounted() {},
beforeDestroyed(){
beforeDestroyed() {},
watch: {},
},
watch:{
},
methods:{
// ...mapActions({
// 'setAdjustList': 'setAdjustList'
// }),
methods: {
show() {
this.isShowSelection = true
this.isShowSelection = true;
},
selectedTypeFromTitle(index) {
this.selectedTypeIndex = index
this.isShowSelection = true
this.selectedTypeIndex = index;
this.isShowSelection = true;
},
closeSelectedPage() {
this.isShowSelection = false
this.isShowSelection = false;
},
selectedType(index) {
this.selectedTypeIndex = index
this.selectedTypeIndex = index;
// this.$emit('selectedType', index)
},
initAll(){
initAll() {
// this.getSwiper()
// this.getYqDoctorDataByCD()
this.getAreas()
this.getLevels()
this.getDeparts()
this.getAreas();
this.getLevels();
this.getDeparts();
},
//根据条件获取讲师列表
getYqDoctorDataByCD(){
getYqDoctorDataByCD() {
let _this = this,
para = {
provinceId: this.provinceId,
......@@ -199,123 +206,154 @@ export default {
countyId: this.countyId,
levelGrade: this.levelGrade,
departmentId: this.departmentId,
setEntry: 'headers'
}
this.GET('contents/courseDoctor/v1/getAllTeacher', para).then(res => {
if(res.code == '000000'){
setEntry: "headers"
};
this.GET("contents/courseDoctor/v1/getAllTeacher", para).then(res => {
if (res.code == "000000") {
// _this.parmDataDoctList = res.data && res.data.list || []
let selTitle = this.selectedAreaSubName || this.selectedAreaName
if (selTitle === '全部'){
selTitle = this.selectedAreaName
}
this.selectedTitleTitle = selTitle
this.$emit('selectedData',
res.data && res.data.list || [],
let selTitle = this.selectedAreaSubName || this.selectedAreaName;
if (selTitle === "全部") {
selTitle = this.selectedAreaName;
}
this.selectedTitleTitle = selTitle;
this.$emit(
"selectedData",
(res.data && res.data.list) || [],
selTitle,
this.selectedLevelName, this.selectedDepartName)
this.selectedLevelName,
this.selectedDepartName
);
}
})
});
},
// 获取所有区域数据
getAreas() {
let param = {
setEntry: 'headers'
}
this.GET('contents/courseDoctor/listAreas', param).then(res => {
if(res.code == '000000'){
this.allAreaList = this.handleAreaData(res.data && res.data.list || [])
this.allAreaSubList = this.allAreaList[0].cities
setEntry: "headers"
};
this.GET("contents/courseDoctor/listAreas", param).then(res => {
if (res.code == "000000") {
this.allAreaList = this.handleAreaData(
(res.data && res.data.list) || []
);
this.allAreaSubList = this.allAreaList[0].cities;
}
})
});
},
// 寻找数据最大值,用于定义表格高度
getMaxRowNum(orginAreaList) {
let maxRowNum = orginAreaList.length || 31
let maxRowNum = orginAreaList.length || 31;
orginAreaList.forEach((element, index) => {
// if (element.length > maxRowNum){
maxRowNum = element.cities.length > maxRowNum ? element.cities.length : maxRowNum
// }
})
return maxRowNum
maxRowNum =
element.cities.length > maxRowNum ? element.cities.length : maxRowNum;
});
return maxRowNum;
},
// 处理区域数据
handleAreaData (orginAreaList) {
let handleList = [], maxRowNum = this.getMaxRowNum(orginAreaList);
handleAreaData(orginAreaList) {
let handleList = [],
maxRowNum = this.getMaxRowNum(orginAreaList);
orginAreaList.forEach((element, index) => {
// debugger
if( index === 0 ){
handleList.push({id: element.id, name: element.name,
cities: this.decorateCitiesData({}, element.cities, maxRowNum + 1, false)})
if (index === 0) {
handleList.push({
id: element.id,
name: element.name,
cities: this.decorateCitiesData(
{},
element.cities,
maxRowNum + 1,
false
)
});
} else {
handleList.push({id: element.id, name: element.name,
cities: this.decorateCitiesData({id: 0, name: '全部', provinceId: element.id}, element.cities, maxRowNum)})
handleList.push({
id: element.id,
name: element.name,
cities: this.decorateCitiesData(
{ id: 0, name: "全部", provinceId: element.id },
element.cities,
maxRowNum
)
});
}
});
handleList.unshift({id:'-1',name:'全国',cities: this.decorateCitiesData({id: 0, name: '全国', provinceId: 0}, [], maxRowNum)})
handleList.unshift({
id: "-1",
name: "全国",
cities: this.decorateCitiesData(
{ id: 0, name: "全国", provinceId: 0 },
[],
maxRowNum
)
});
for (let i = orginAreaList.length; i < maxRowNum; i++) {
handleList.push({id:'',name:'',cities: []})
handleList.push({ id: "", name: "", cities: [] });
}
return handleList
return handleList;
},
// 装饰城市数据
decorateCitiesData(appendInitData, cities, dataNum = 31, needAppend = true) {
let appendCities = [], appendLength = dataNum - cities.length;
if(needAppend){
appendCities.unshift(appendInitData)
}
appendCities = appendCities.concat(cities)
for(let i = 0; i < appendLength; i ++){
appendCities.push({id: '', name: '', provinceId: ''})
}
return appendCities
decorateCitiesData(
appendInitData,
cities,
dataNum = 31,
needAppend = true
) {
let appendCities = [],
appendLength = dataNum - cities.length;
if (needAppend) {
appendCities.unshift(appendInitData);
}
appendCities = appendCities.concat(cities);
for (let i = 0; i < appendLength; i++) {
appendCities.push({ id: "", name: "", provinceId: "" });
}
return appendCities;
},
// 获取医院等级
getLevels() {
let param = {
setEntry: 'headers'
setEntry: "headers"
};
this.GET("contents/courseDoctor/listLevels", param).then(res => {
if (res.code == "000000") {
this.allLevelList = (res.data && res.data.list) || [];
this.allLevelList.unshift({ no: 0, value: "全部等级" });
}
this.GET('contents/courseDoctor/listLevels', param).then(res => {
if(res.code == '000000'){
this.allLevelList = res.data && res.data.list || []
this.allLevelList.unshift({no: 0, value: "全部等级"})
}
})
});
},
// 获取医院科室
getDeparts() {
let param = {
setEntry: 'headers'
}
this.GET('contents/courseDoctor/listDeparts', param).then(res => {
if(res.code == '000000'){
this.allDepartList = res.data && res.data.list || []
this.allDepartList.unshift({id: 0, name: "全部科室"})
setEntry: "headers"
};
this.GET("contents/courseDoctor/listDeparts", param).then(res => {
if (res.code == "000000") {
this.allDepartList = (res.data && res.data.list) || [];
this.allDepartList.unshift({ id: 0, name: "全部科室" });
}
})
});
},
// 选中省或直辖市
selectAreaAction(item, index) {
if (item.name) {
this.cProvinceId = item.id
this.selectedAreaIndex = index
this.$refs.tableWrapperRef.scrollTop = 0
this.cProvinceId = item.id;
this.selectedAreaIndex = index;
this.$refs.tableWrapperRef.scrollTop = 0;
if (this.oldCProvinceId == item.id) {
this.selectedAreaSubIndex = this.oldSelectedAreaSubIndex
this.selectedAreaSubIndex = this.oldSelectedAreaSubIndex;
} else {
this.selectedAreaSubIndex = -1
this.selectedAreaSubIndex = -1;
}
this.allAreaSubList = item.cities
this.selectedAreaName = item.name
this.allAreaSubList = item.cities;
this.selectedAreaName = item.name;
}
},
......@@ -323,226 +361,235 @@ export default {
selectAreaSubAction(item, index) {
// this.selectedAreaIndex = index
// this.allAreaSubList = item.cities
if(item.name){
this.selectedAreaSubName = item.name
this.selectedAreaSubIndex = index
this.oldSelectedAreaSubIndex = index
this.oldCProvinceId = this.cProvinceId
if(item.isMunicipality){
this.cityId = item.cityId || 0
this.countyId = item.id
this.provinceId = item.provinceId
this.oldProvinceId = item.provinceId
this.oldCityId = item.cityId
this.oldCountyId = item.id
if (item.name) {
this.selectedAreaSubName = item.name;
this.selectedAreaSubIndex = index;
this.oldSelectedAreaSubIndex = index;
this.oldCProvinceId = this.cProvinceId;
if (item.isMunicipality) {
this.cityId = item.cityId || 0;
this.countyId = item.id;
this.provinceId = item.provinceId;
this.oldProvinceId = item.provinceId;
this.oldCityId = item.cityId;
this.oldCountyId = item.id;
} else {
this.cityId = item.id
this.countyId = 0
this.provinceId = item.provinceId
this.oldProvinceId = item.provinceId
this.oldCityId = item.id
this.oldCountyId = 0
this.cityId = item.id;
this.countyId = 0;
this.provinceId = item.provinceId;
this.oldProvinceId = item.provinceId;
this.oldCityId = item.id;
this.oldCountyId = 0;
}
this.closeSelectedPage()
this.getYqDoctorDataByCD()
this.closeSelectedPage();
this.getYqDoctorDataByCD();
}
},
// 选中医院等级
selectLevelAction(item, index) {
this.selectedLevelIndex = index
this.selectedLevelName = item.value
this.levelGrade = item.no
this.closeSelectedPage()
this.getYqDoctorDataByCD()
this.selectedLevelIndex = index;
this.selectedLevelName = item.value;
this.levelGrade = item.no;
this.closeSelectedPage();
this.getYqDoctorDataByCD();
},
// 选中医院科室
selectDepartAction(item, index) {
this.selectedDepartIndex = index
this.selectedDepartName = item.name
this.departmentId = item.id
this.closeSelectedPage()
this.getYqDoctorDataByCD()
this.selectedDepartIndex = index;
this.selectedDepartName = item.name;
this.departmentId = item.id;
this.closeSelectedPage();
this.getYqDoctorDataByCD();
}
},
}
}
};
</script>
<style>
.mint-popup.mint-popup-top {
.mint-popup.mint-popup-top {
height: 100%;
z-index: 2001;
/* overflow: auto; */
}
.swiper .mint-swipe-indicators{
}
.swiper .mint-swipe-indicators {
right: 6px;
top:50%;
top: 50%;
bottom: inherit;
left:inherit;
width:10px;
left: inherit;
width: 10px;
text-align: center;
transform: translateX(0%);
transform: translateY(-50%);
}
.swiper .mint-swipe-item img{
}
.swiper .mint-swipe-item img {
width: 100%;
height: 100%;
}
.swiper .mint-swipe-indicator{
width:2px;
}
.swiper .mint-swipe-indicator {
width: 2px;
height: 8px;
background: #fff;
opacity: 0.4;
float: left;
margin-top:3px;
margin-top: 3px;
border-radius: 0;
}
.swiper .is-active{
}
.swiper .is-active {
opacity: 1;
}
.mint-loadmore-top .mint-loadmore-text{font-size: 12px;}
.banner-container.swiper-container-horizontal>.swiper-pagination-bullets{
}
.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{
top: 50%;
}
.banner-container.swiper-container-horizontal
> .swiper-pagination-bullets
.swiper-pagination-bullet {
width: 2px;
height: 7px;
background: #fff;
margin:6px 0 0 0;
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-container.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet-active{
opacity: 1
}
.banner-pagination{
.banner-pagination {
width: 2px;
z-index: 100;
right: 10px;
top:10px;
top: 10px;
position: absolute;
}
/* .swiper-pagination-bullet{
}
/* .swiper-pagination-bullet{
} */
.swiper-slide img{
.swiper-slide img {
width: 100%;
height: 100%;
}
}
</style>
<style lang="scss" scoped>
@import '../../style/mixin';
@import '../../style/swiper.min.css';
.banner-container{
height: px2rem(210px)
}
.main-body{
@import "../../style/mixin";
@import "../../style/swiper.min.css";
.banner-container {
height: px2rem(210px);
}
.main-body {
position: relative;
}
.box-BG{
}
.box-BG {
width: 100%;
height: 100%;
position: absolute;
top:0;
top: 0;
left: 0;
z-index: 10000
}
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
}
.font-style {
z-index: 10000;
}
.mint-header {
background-color: rgba($color: #000000, $alpha: 0);
}
.font-style {
@include sc(0.6rem, #666);
}
@keyframes myPullDown {
from {
padding-top: 0;
}
@keyframes myPullDown{
from {padding-top: 0;}
to {padding-top:px2rem(225px)}
to {
padding-top: px2rem(225px);
}
}
@keyframes myPullUp {
from {
padding-top: px2rem(225px);
}
@keyframes myPullUp{
from {padding-top: px2rem(225px);}
to {padding-top:0}
to {
padding-top: 0;
}
.pull-down{
}
.pull-down {
-webkit-animation: myPullDown 1.2s;
animation: myPullDown 1.2s;
padding-top:px2rem(225px)
}
.pull-up{
padding-top: px2rem(225px);
}
.pull-up {
-webkit-animation: myPullUp 1.2s;
animation: myPullUp 1.2s;
padding-top:0
}
.news-update{
padding-top: 0;
}
.news-update {
display: block;
position: fixed;
background: #F9F6EF;
background: #f9f6ef;
right: 0;
bottom: px2rem(140px);
height: px2rem(27px);
padding:0 px2rem(12px);;
padding: 0 px2rem(12px);
line-height: px2rem(27px);
border:1px solid RGBA(162, 129, 60, 0.2);
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;
.news-info {
color: #a2813c;
position: relative;
display: inline-block;
i{
i {
position: absolute;
right: -(px2rem(6px));
top:px2rem(4px);
top: px2rem(4px);
display: inline-block;
width: px2rem(4px);
height: px2rem(4px);
border-radius: 100%;
background: #F47A48
}
background: #f47a48;
}
}
.home-topMenu{
}
.home-topMenu {
width: 100%;
text-align:center;
top:0;
text-align: center;
top: 0;
position: absolute;
z-index: 10;
}
}
.home-header {
.home-header {
height: px2rem(234px); // banner图片变高了
// height: px2rem(210px);
.swiper{
.swiper {
height: 100%;
/* @include bis('../../images/552064153@2x.png');*/
/* @include bis('../../images/lect-bg.png');*/
}
.logo_img{
.logo_img {
height: px2rem(85px);
width: px2rem(345px);
text-align: center;
}
}
.home-body{
background: #fff
}
.pathologic-list{
}
.home-body {
background: #fff;
}
.pathologic-list {
width: 100%;
height: px2rem(52px);
padding: 0 px2rem(15px);
margin-top: px2rem(15px);
.pathologic-item{
.pathologic-item {
float: left;
width: 48%;
box-shadow: 0 px2rem(2px) px2rem(8px) rgba(49, 127, 119, 0.2);
......@@ -551,10 +598,10 @@ export default {
/* padding: px2rem(12px) 0 px2rem(12px) 0;*/
margin-right: 4%;
text-align: center;
.pathologic-icon{
.pathologic-icon {
height: px2rem(52px);
/* height: px2rem(20px);*/
img{
img {
width: 100%;
height: px2rem(52px);
padding-bottom: px2rem(8px);
......@@ -562,7 +609,7 @@ export default {
display: inline-block;
}
}
.pathologic-txt{
.pathologic-txt {
font-size: px2rem(14px);
line-height: px2rem(20px);
font-weight: 700;
......@@ -570,14 +617,13 @@ export default {
vertical-align: middle;
}
}
.clear{
.clear {
clear: both;
}
}
}
</style>
<style lang="scss" scoped>
@import '../../style/mixin';
@import "../../style/mixin";
.lect-selection-content {
width: px2rem(375px);
height: 81%;
......@@ -586,7 +632,7 @@ export default {
color: #666666;
margin-right: px2rem(15px);
width: px2rem(360px);
-webkit-overflow-scrolling : touch;
-webkit-overflow-scrolling: touch;
overflow: auto;
table {
width: 100%;
......@@ -597,9 +643,9 @@ export default {
&-left {
td {
padding-left: px2rem(15px);
border-bottom: 1px solid #F5F6F6;
border-bottom: 1px solid #f5f6f6;
}
background: #F5F6F6;
background: #f5f6f6;
}
tr {
height: px2rem(40px);
......
......@@ -3,55 +3,55 @@
<article class="group-title">
<section class="group-title-order">
<div @click="selectedType(1)" class="group-title-order-item">
<span>{{selectedAreaName}}</span><img src="../../images/lecturer/select-down.png"/>
<span>{{selectedAreaName}}</span>
<img src="../../images//select-down.png">
</div>
<div @click="selectedType(2)" class="group-title-order-item">
<span>{{selectedLevelName}}</span><img src="../../images/lecturer/select-down.png"/>
<span>{{selectedLevelName}}</span>
<img src="../../images//select-down.png">
</div>
<div @click="selectedType(3)" class="group-title-order-item">
<span>{{selectedDepartName}}</span><img src="../../images/lecturer/select-down.png"/>
<span>{{selectedDepartName}}</span>
<img src="../../images//select-down.png">
</div>
</section>
</article>
</section>
</template>
<script>
export default {
data() {
return {
selectedTypeIndex: 1
}
};
},
props: {
selectedAreaName: {
type: String,
default: '全国'
default: "全国"
},
selectedLevelName: {
type: String,
default: '全部等级'
default: "全部等级"
},
selectedDepartName: {
type: String,
default: '全部科室'
default: "全部科室"
}
},
computed: {
},
watch: {
},
computed: {},
watch: {},
methods: {
selectedType(index) {
this.selectedTypeIndex = index
this.$emit('selectedType', index)
},
this.selectedTypeIndex = index;
this.$emit("selectedType", index);
}
}
}
};
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import "../../style/mixin.scss";
.group-title {
display: flex;
......@@ -71,7 +71,7 @@ export default {
img {
position: relative;
top: px2rem(1px);
left: px2rem(1px);
left: px2rem(-1px);
height: px2rem(11px);
width: px2rem(11px);
}
......
<template>
<section class="group-title-title">
<span class="group-title-title-main">{{mainTitle}}</span><span class="group-title-title-sub">{{subTitle}}</span>
<span class="group-title-title-main">{{mainTitle}}</span>
<span class="group-title-title-sub">{{subTitle}}</span>
</section>
</template>
<script>
export default {
data() {
return {
}
return {};
},
props: {
mainTitle: {
type: String,
default: '全部讲师'
default: "全部讲师"
},
subTitle: {
type: String,
default: '专业领域的资深专家'
},
default: "专业领域的资深专家"
}
}
}
};
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import "../../style/mixin.scss";
.group-title {
height: px2rem(18px);
line-height: px2rem(18px);
......@@ -34,7 +33,7 @@ export default {
margin-right: px2rem(6px);
font-size: px2rem(18px);
font-weight: 500;
color: #28344C;
color: #28344c;
}
&-sub {
font-size: px2rem(15px);
......
<template>
<section>
<section>
<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 cParamData" :key="index"
@click="gotoDetail(item)">
<div
:class="index % 2 == 1 ? 'list-item mr0' : 'list-item'"
v-for="(item, index) in cParamData"
:key="index"
@click="gotoDetail(item)"
>
<div class="tea-img" :style="'background:'+ item.bgColor">
<img :src="item.doctorAvatarImg">
<span class="learn-p">{{item.totalNum | yLocalString}}人已学</span>
<span class="learn-p-cnum">课程: 共{{item.resourceNum}}</span>
<!-- <span class="learn-p">{{item.joinNum | yLocalString}}人已学</span> -->
</div>
<div class="tea-txt">
<div class="tea-name">
<span>{{item.doctorName}}</span>
<span class="tea-department">{{item.department}}</span>
</div>
<div class="tea-position">
{{item.doctorHospital}}
</div>
<div class="tea-position">{{item.doctorHospital}}</div>
</div>
</div>
<div class="no-content" v-show="!cParamData.length">
<img class="no-content-img" src="../../images/lecturer/no-content.png" alt=" ">
<img class="no-content-img" src="../../images//no-content.png" alt=" ">
<span class="no-content-desc">暂无相关内容</span>
</div>
</div>
</div>
</div>
</section>
</section>
</template>
<script>
import { teacher } from '../../utils/buryingPoint';
import { mapGetters } from 'vuex'
import { teacher } from "../../utils/buryingPoint";
import { mapGetters } from "vuex";
import YqyLecturerOrder from '@/components/business/yqy-lecturer-order';
import YqyLecturerOrder from "@/components/business/yqy-lecturer-order";
export default {
data() {
return {
topTitle: '讲师集',
token: '',
// list: [],
isShowCount: true,
followCount: 0,
studyCount: 0,
col: 1, //0综合,1人气,2资源数,3姓名首字母
dir: 2, //1:正序 2:逆序,
list: [],
}
list: []
};
},
components: {
YqyLecturerOrder
......@@ -60,68 +54,67 @@ export default {
default: () => []
}
},
mounted() {
},
mounted() {},
computed: {
cParamData() {
if (this.parmData && this.parmData.length) {
return this.randomBg(this.parmData)
return this.randomBg(this.parmData);
} else {
return this.randomBg(this.list)
return this.randomBg(this.list);
}
}
},
methods: {
// 跳转到详情页面
gotoDetail(item){
gotoDetail(item) {
this.$router.push({
path: '/teachersDetail',
path: "/teachersDetail",
query: {
id: item.doctorId
}
})
});
this.appBuryingPointEntrust({
...teacher,
labelId: item.doctorId,
labelValue: item.doctorName
})
});
},
// 随机生成背景颜色
randomBg(d) {
for (let i = 0; i < d.length; i++) {
if (i % 4 == 0) {
d[i].bgColor = '#EBF6F1'
d[i].bgColor = "#EBF6F1";
} else if (i % 4 == 1) {
d[i].bgColor = '#EDF3FA'
d[i].bgColor = "#EDF3FA";
} else if (i % 4 == 2) {
d[i].bgColor = '#F0F0FA'
d[i].bgColor = "#F0F0FA";
} else if (i % 4 == 3) {
d[i].bgColor = '#F6EFE6'
d[i].bgColor = "#F6EFE6";
}
}
return d
return d;
},
// 埋点
appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val)
},
rocNative.appBuryingPointEntrust(val);
}
}
}
};
</script>
<style>
body {
background: #fff
background: #fff;
}
</style>
<style lang="scss" scoped>
body {
background: #fff
background: #fff;
}
@import '../../style/mixin';
@import "../../style/mixin";
.no-content {
display: flex;
flex-direction: column;
......@@ -136,12 +129,12 @@ body {
line-height: px2rem(21px);
font-size: px2rem(15px);
font-weight: 400;
color:rgba(153,153,153,1);
color: rgba(153, 153, 153, 1);
}
}
.mint-header {
background-color: rgba($color: #000000, $alpha: 0)
background-color: rgba($color: #000000, $alpha: 0);
}
.font-style {
......@@ -193,7 +186,7 @@ body {
}
.mr0 {
margin-right: 0
margin-right: 0;
}
.tea-txt {
......@@ -220,7 +213,11 @@ body {
left: 0;
bottom: 0;
background: #333;
background: linear-gradient(to 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)
);
// background: linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,0.34) 100%);
color: #fff;
font-size: px2rem(11px);
......@@ -265,7 +262,7 @@ body {
.home-header {
height: px2rem(185px);
@include bis('../../images/headerTop.png');
@include bis("../../images//headerTop.png");
.logo_img {
height: px2rem(85px);
......
......@@ -115,15 +115,3 @@
</defs>
</svg>
</template>
\ No newline at end of file
<script>
export default {
}
</script>
<style lang="scss">
</style>
......@@ -3,45 +3,54 @@
<!-- <div class="status-bar"></div> -->
<div class="top-header" :class="{active:isScroll}">
<div class="content left-icon" @click="goBack()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png" alt="">
<img
v-if="!isScroll"
border="0"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon-white.png"
alt
>
<img
v-if="isScroll"
border="0"
src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png"
alt
>
</div>
<div v-if="isScroll && isJSJ" class="content title" :class="{active:isScroll}">讲师集</div>
<div v-if="isScroll && !isJSJ" class="content title" :class="{active:isScroll}">云鹊医讲师</div>
<!-- <div class="content right-icon" @click="share()">
<img v-if="!isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon.png" alt="">
</div> -->
</div>-->
</div>
</div>
</template>
<script>
import {teacher_back} from '../../utils/buryingPoint.js';
import { teacher_back } from "../../utils/buryingPoint.js";
// import {shareUrl} from '@/utils/index'
import {shareUrl} from '../../utils/index.js'
import { shareUrl } from "../../utils/index.js";
export default {
name:'MyHeader',
props:{
isOpacity:{
type:Boolean,
default:true
name: "MyHeader",
props: {
isOpacity: {
type: Boolean,
default: true
},
isScroll:{
type:Boolean,
default:false
isScroll: {
type: Boolean,
default: false
},
isShare:{
type:Boolean,
default:true
isShare: {
type: Boolean,
default: true
},
doctorId:{
type:String,
default:""
doctorId: {
type: String,
default: ""
},
backMethod: {
type: String,
default: 'native'
default: "native"
},
isJSJ: {
type: Boolean,
......@@ -50,111 +59,104 @@ export default {
},
computed: {
topTitle2() {
return this.topTitle
return this.topTitle;
}
},
mounted(){
},
methods:{
// backPre(){
// if(this.backMethod === 'inner') {
// this.$router.go(-1)
// } else {
// rocNative.goBack()
// }
// },
goBack(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
mounted() {},
methods: {
goBack() {
if (this.backMethod === "inner") {
this.$router.go(-1);
} else {
rocNative.goBack()
rocNative.goBack();
}
},
share(){
share() {
rocNative.shareWechat({
title1:'个人评价',
title2:'个人评价出现了喔',
shareUrl:`${shareUrl}gpr#/home`+'?doctorId='+this.doctorId,
type:6,
shareImageUrl:'https://file.yunqueyi.com/logo.png?version='+new Date().getTime(),
shareId:0
})
title1: "个人评价",
title2: "个人评价出现了喔",
shareUrl: `${shareUrl}gpr#/home` + "?doctorId=" + this.doctorId,
type: 6,
shareImageUrl:
"https://file.yunqueyi.com/logo.png?version=" + new Date().getTime(),
shareId: 0
});
this.buryingPointShare();
},
/////////埋点//////////
//返回
buryingPointBack:function(){
buryingPointBack: function() {
rocNative.appBuryingPointEntrust({
...teacher_back,
functionCode:'f_gpranking',
actionCode:'c_back',
labelValue:'返回',
createdTime:new Date().getTime()
})
functionCode: "f_gpranking",
actionCode: "c_back",
labelValue: "返回",
createdTime: new Date().getTime()
});
},
//分享
buryingPointShare:function(){
buryingPointShare: function() {
rocNative.appBuryingPointEntrust({
...teacher_back,
functionCode:'f_gpranking',
actionCode:'c_share',
labelValue:'分享',
createdTime:new Date().getTime()
})
},
functionCode: "f_gpranking",
actionCode: "c_share",
labelValue: "分享",
createdTime: new Date().getTime()
});
}
}
}
};
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.wrapper{
position:fixed;
@import "../../style/mixin";
.wrapper {
position: fixed;
top: 0;
width:100%;
z-index:100000000;
width: 100%;
z-index: 100000000;
/**************表头******************/
.top-header{
display:flex;
display:-webkit-flex;
.top-header {
display: flex;
display: -webkit-flex;
flex-direction: row;
// justify-content:center;//这个会整体居中,但是使用一些左右不等的margin时,会影响效果
align-items:center;
width:100%;
height:px2rem(45px);//header高度
margin-top:px2rem(25px);///////////statusbar高度!!!!!!!!!!!!!!!!!!!!!默认使用此高度
align-items: center;
width: 100%;
height: px2rem(45px); //header高度
margin-top: px2rem(
25px
); ///////////statusbar高度!!!!!!!!!!!!!!!!!!!!!默认使用此高度
}
.top-header.active{
.top-header.active {
// margin-top:0;
border-bottom:px2rem(2px) solid #e7e7e7;
background-color:#fff;
}
.top-header .left-icon{
margin-left:px2rem(15px);
border-bottom: px2rem(2px) solid #e7e7e7;
background-color: #fff;
}
.top-header .title{
width:px2rem(116px);
height:px2rem(18px);
line-height:px2rem(18px);
margin-left:px2rem(90px);
text-align:center;
color:#fff;
font-size:px2rem(18px);
.top-header .left-icon {
margin-left: px2rem(15px);
}
.top-header .title.active{
color:#000;
.top-header .title {
width: px2rem(116px);
height: px2rem(18px);
line-height: px2rem(18px);
margin-left: px2rem(90px);
text-align: center;
color: #fff;
font-size: px2rem(18px);
}
.top-header .right-icon{
margin-left:px2rem(95px);
.top-header .title.active {
color: #000;
}
.top-header .left-icon img,.top-header .right-icon img{
display:block;//这样其外的div可以正好将其包裹住
width:px2rem(25px);
height:px2rem(25px);
.top-header .right-icon {
margin-left: px2rem(95px);
}
.top-header .left-icon img,
.top-header .right-icon img {
display: block; //这样其外的div可以正好将其包裹住
width: px2rem(25px);
height: px2rem(25px);
}
.wrapper.active{
background-color:#fff;
// background-color:rgba(0,0,0,0.84);
// background-color:rgba(255,255,255,0.34)
}
}
.wrapper.active {
background-color: #fff;
}
</style>
\ No newline at end of file
<template>
<section class="back-top">
<div class="back-btn" @click="backTop">
<img src="../../images/backTop.png"/>
<img src="../../images//backTop.png">
</div>
</section>
</template>
<script>
export default {
data(){
return{
objPoint:{}
}
export default {
data() {
return {
objPoint: {}
};
},
props:{
burialPoint:{
default:'',
type:String
props: {
burialPoint: {
default: "",
type: String
}
},
mounted(){
if(this.burialPoint == 'activity'){
mounted() {
if (this.burialPoint == "activity") {
this.objPoint = {
menuLevel:2,
menuFromCode:'m_home',
menuCode:'m_content_list',
functionCode:'f_activity',
actionCode:'c_top'
}
menuLevel: 2,
menuFromCode: "m_home",
menuCode: "m_content_list",
functionCode: "f_activity",
actionCode: "c_top"
};
}
},
methods: {
backTop:function(){
if(this.burialPoint == 'activity'){
backTop: function() {
if (this.burialPoint == "activity") {
this.pageBurialPoin(this.objPoint);
}
var osTop = document.documentElement.scrollTop || document.body.scrollTop;
if(osTop > 0){
if (osTop > 0) {
document.documentElement.scrollTop = document.body.scrollTop = 0;
}
}
},
}
};
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.back-btn{
@import "../../style/mixin";
.back-btn {
position: fixed;
width: px2rem(35px);
height: px2rem(35px);
right: px2rem(15px);
z-index: 100;
bottom: px2rem(80px);;
img{
bottom: px2rem(80px);
img {
width: 100%;
height: 100%;
display: block;
}
}
}
</style>
\ No newline at end of file
......@@ -4,108 +4,110 @@
<div class="teach-top">
<!-- <div class="teach-top" :class="{'pt150': isScroll}"> -->
<!-- <div class="back" v-if="isScroll" @click="backPre" style="flex-direction:row;width:100%;">
<img src="../../images/left-icon.png">
<img src="../../images//left-icon.png">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png">
<span style="padding-bottom:10px;">dddd</span>
</div> -->
</div>-->
<!-- <TopNav :bgColor="bgColor" :title="navTitle" :isNavFix="isNavFix" :burialPoint="pointStyle"></TopNav> -->
<div class="tc title">{{parmObj}}</div>
<div class="tc count" v-if="isShowCount">{{studyCount.toLocaleString()}}人学习&nbsp;&nbsp;&nbsp;&nbsp;{{followCount.toLocaleString()}}人关注</div>
<div
class="tc count"
v-if="isShowCount"
>{{studyCount.toLocaleString()}}人学习&nbsp;&nbsp;&nbsp;&nbsp;{{followCount.toLocaleString()}}人关注</div>
</div>
</div>
</template>
<script>
// import BackHeader from '../../components/teachers/back-header';
import BackHeader from '../../components/teacher/back-header';
import BackHeader from "../../components/teacher/back-header";
export default {
data () {
data() {
return {
bgColor:'#fff',
parmObj:''
}
bgColor: "#fff",
parmObj: ""
};
},
components:{
components: {
BackHeader
},
props:{
props: {
isShowCount: {
default:false,
type:Boolean
default: false,
type: Boolean
},
followCount: {
type:Number,
default:0
type: Number,
default: 0
},
studyCount: {
type:Number,
default:0
type: Number,
default: 0
},
statusBarHeight: {
type:Number,
default:0
type: Number,
default: 0
},
isScroll:{
isScroll: {
type: Boolean,
default: false
},
backMethod: {
type: String,
default: 'native'
default: "native"
},
isJSJ: {
type: Boolean,
default: true
}
},
mounted(){
this.parmObj = this.isShowCount ? '讲师集' : '云鹊医讲师'
mounted() {
this.parmObj = this.isShowCount ? "讲师集" : "云鹊医讲师";
},
methods: {
backPre(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
backPre() {
if (this.backMethod === "inner") {
this.$router.go(-1);
} else {
rocNative.goBack()
rocNative.goBack();
}
},
}
}
}
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
@import "../../style/mixin.scss";
@import "../../style/global.scss";
.pt150 {
margin-top: px2rem(150px)
margin-top: px2rem(150px);
}
.teach-top{
.teach-top {
width: 100%;
height: px2rem(185px);
@include bis('../../images/headerTop.png');
.tc{
@include bis("../../images//headerTop.png");
.tc {
text-align: center;
}
.back{
.back {
position: fixed;
z-index: 110;
left:px2rem(18px);
left: px2rem(18px);
top: px2rem(25px);
display: inline-block;
width: px2rem(50px);
height: px2rem(50px);
img{
img {
width: px2rem(25px);
height: px2rem(25px);
}
}
.title{
.title {
font-size: px2rem(25px);
color: #fff;
padding: px2rem(55px) 0 px2rem(8px) 0;
font-weight: 500
font-weight: 500;
}
.count{
.count {
font-size: px2rem(15px);
line-height: px2rem(21px);
color: #fff;
......
<template>
<section :class="isNavFix ? 'nav-top fixed' : 'nav-top'">
<div class="nav-part" :style="'background:'+bgColor">
<div class="nav-title">
<span class="nav-back" @click="goBack">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png"/>
<!-- <img class="nav-back" src="../../images/grey-throw.png"/> -->
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png">
<!-- <img class="nav-back" src="../../images//grey-throw.png"/> -->
</span>
<!-- <span class="back" @click="goBack">
<img src="../../images/left-icon.png">
</span> -->
<img src="../../images//left-icon.png">
</span>-->
{{title}}
<!-- <span class="nav-share" @click="goShare">
<img src="../../images/Shape1@2x.png"/>
</span> -->
<img src="../../images//Shape1@2x.png"/>
</span>-->
</div>
</div>
</section>
</template>
<script>
export default {
data(){
return{
export default {
data() {
return {
// title:'测试',
content:'',
shareImageUrl:'',
}
content: "",
shareImageUrl: ""
};
},
props:{
bgColor:{//背景色
type:String,
default:''
props: {
bgColor: {
//背景色
type: String,
default: ""
},
title:{//标题
type:String,
default:'暂无数据'
title: {
//标题
type: String,
default: "暂无数据"
},
isNavFix:{//是否fix定位
type:Boolean,
default:true
isNavFix: {
//是否fix定位
type: Boolean,
default: true
},
burialPoint:{
default:'',
type:String
burialPoint: {
default: "",
type: String
},
backMethod: {
type: String,
default: 'native' // inner native
default: "native" // inner native
}
},
mounted(){
if(this.burialPoint == 'activity'){
mounted() {
if (this.burialPoint == "activity") {
this.objPoint = {
menuLevel:2,
menuFromCode:'m_home',
menuCode:'m_content_list',
functionCode:'f_activity',
actionCode:'c_last'
}
menuLevel: 2,
menuFromCode: "m_home",
menuCode: "m_content_list",
functionCode: "f_activity",
actionCode: "c_last"
};
}
},
methods: {
//返回
goBack(){
if(this.burialPoint == 'activity'){
goBack() {
if (this.burialPoint == "activity") {
this.pageBurialPoin(this.objPoint);
}
if ( this.backMethod === 'inner' ) {
if (this.backMethod === "inner") {
this.$router.back(-1);
} else {
rocNative.goBack();
......@@ -78,23 +77,24 @@
//rocNative.backPreviousPage();
},
//分享
goShare(){
let url = location.hef,_this = this;
goShare() {
let url = location.hef,
_this = this;
rocNative.shareWechat({
url:url,
title:_this.title,
content:_this.content,
shareImageUrl:_this.shareImageUrl
})
url: url,
title: _this.title,
content: _this.content,
shareImageUrl: _this.shareImageUrl
});
}
},
}
};
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.back{
@import "../../style/mixin";
.back {
position: absolute;
left:px2rem(18px);
left: px2rem(18px);
top: px2rem(25px);
display: inline-block;
width: px2rem(50px);
......@@ -103,18 +103,18 @@
width: px2rem(25px);
height: px2rem(25px);
}
}
.nav-top{
}
.nav-top {
height: px2rem(65px);
background: #fff;
color: #333;
position: relative;
z-index: 109;
.nav-back{
.nav-back {
display: inline-block;
position: absolute;
left: px2rem(16px);;
left: px2rem(16px);
top: 0;
height: px2rem(25px);
width: px2rem(25px);
......@@ -122,55 +122,51 @@
// -webkit-transform: (180deg);
// transform: rotate(180deg);
}
img{
img {
display: block;
width: 100%;
height: 100%
height: 100%;
}
.nav-icon{
.nav-icon {
display: inline-block;
width: 50px;
height: 50px;
svg{
svg {
stroke: #000;
fill: #0000ff;
}
}
.nav-share{
.nav-share {
position: absolute;
right: px2rem(8px);;
top:0;
right: px2rem(8px);
top: 0;
height: px2rem(25px);
width: px2rem(25px);
}
.nav-title{
.nav-title {
display: inline-block;
width: 100%;
/* padding:0 px2rem(33px);*/
position: relative;
}
.nav-part{
.nav-part {
width: 100%;
font-size: px2rem(18px);
text-align: center;
padding: px2rem(30px) 0 px2rem(10px) 0;
/* height: px2rem(25px);*/
}
}
.fixed{
.nav-part{
}
.fixed {
.nav-part {
position: fixed;
top:0;
top: 0;
left: 0;
border-bottom: 1px solid #E7E7E7;
border-bottom: 1px solid #e7e7e7;
/* height: px2rem(25px);*/
}
}
}
</style>
\ No newline at end of file
src/images/left-icon.png

250 字节 | W: | H:

src/images/left-icon.png

181 字节 | W: | H:

src/images/left-icon.png
src/images/left-icon.png
src/images/left-icon.png
src/images/left-icon.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -7,9 +7,7 @@ const mixins = require('@/utils/mixins');
import '@/utils/rem' // 引入自适应
import '@/utils/yqyServerRegister' // 移动端服务
import FastClick from 'fastclick'
// import Logger from './plugins/logger' // 日志插件
// import Swiper from './plugins/swiper.min.js'
import vueFilters from '@/utils/filter'
// 引入Mint
import Mint from 'mint-ui'
......@@ -23,21 +21,17 @@ Vue.use(Mint)
import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload, {
preLoad: 3,
// loading: 'images/change.png',
// loading: './images//change.png',
// error: 'https://file.yunqueyi.com/File/course_doctor/2018-11/20/web_454.png',
error: require('./images/error.png'),
error: require('./images//error.png'),
attempt: 1
// lazyComponent: true
})
Vue.filter('yLocalString', function(value){
var b = parseInt(value).toString();
if (b === 'NaN') return 0;
var len = b.length;
if (len <= 3) { return b; }
var r = len % 3;
return r > 0 ? b.slice(0, r) + "," + b.slice(r, len).match(/\d{3}/g).join(",") : b.slice(r, len).match(/\d{3}/g).join(",");
})
// 注册所有公用过滤器
for(let key in vueFilters) {
Vue.filter(key, vueFilters[key])
}
if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() {
......
import { formatTime } from './index'
const vueFilter = {
// 通用状态过滤器
formatStatus: function(value) {
return !value ? '正常' : '停用'
},
formatNumber: function(num, precision, separator) {
// 将数字转换成带千分位数字
formatNumber: function (num, precision, separator) {
var parts;
if (!isNaN(parseFloat(num)) && isFinite(num)) {
num = Number(num);
......@@ -16,6 +13,16 @@ const vueFilter = {
return parts.join('.');
}
return '';
},
// 将数字转换成带千分位数字
yLocalString: function (value) {
var b = parseInt(value).toString();
if (b === 'NaN') return 0;
var len = b.length;
if (len <= 3) { return b; }
var r = len % 3;
return r > 0 ? b.slice(0, r) + "," + b.slice(r, len).match(/\d{3}/g).join(",") : b.slice(r, len).match(/\d{3}/g).join(",");
}
}
......
......@@ -31,7 +31,7 @@
<img v-lazy="item.imageUrl" :key="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">
<img src="../../images//grey-play.png">
</span>
</div>
<div class="line-name">
......@@ -52,8 +52,8 @@
<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">
<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">
......@@ -305,7 +305,7 @@ export default {
left: 0;
top:-(px2rem(64px));
z-index: 10;
@include bis('../../images/detaiBg.png');
@include bis('../../images//detaiBg.png');
.head-img{
width: px2rem(45px);
height: px2rem(45px);
......@@ -548,7 +548,7 @@ export default {
}
.home-header {
height: px2rem(185px);
@include bis('../../images/headerTop.png');
@include bis('../../images//headerTop.png');
.logo_img{
height: px2rem(85px);
width: px2rem(345px);
......
......@@ -68,15 +68,15 @@ export default {
speedSwiper: 300,
//轮播图默认数据
listSwiper: [{
"imageUrl": require('../../images/lecturer/750420-1.png')
"imageUrl": require('../../images//banner-default.png')
},{
"imageUrl": require('../../images/lecturer/750420-1.png')
"imageUrl": require('../../images//banner-default.png')
},{
"imageUrl": require('../../images/lecturer/750420-1.png')
"imageUrl": require('../../images//banner-default.png')
},{
"imageUrl": require('../../images/lecturer/750420-1.png')
"imageUrl": require('../../images//banner-default.png')
},{
"imageUrl": require('../../images/lecturer/750420-1.png')
"imageUrl": require('../../images//banner-default.png')
}],
scrollTimer: null,
scrollTop: 0,
......@@ -473,7 +473,7 @@ export default {
// height: px2rem(210px);
.swiper{
height: 100%;
/* @include bis('../../../images/552064153@2x.png');*/
/* @include bis('../../../images//lect-bg.png');*/
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册