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

代码整理

上级 d2270388
无法预览此类型文件
<template> <template>
<section class="back-top"> <section class="back-top">
<div class="back-btn" @click="backTop"> <div class="back-btn" @click="backTop">
<img src="../../images/backTop.png"/> <img src="../../images//backTop.png">
</div> </div>
</section> </section>
</template> </template>
<script> <script>
export default { export default {
data(){ data() {
return{ return {
objPoint:{} objPoint: {}
} };
}, },
props:{ props: {
burialPoint:{ burialPoint: {
default:'', default: "",
type:String type: String
} }
}, },
mounted(){ mounted() {
if(this.burialPoint == 'activity'){ if (this.burialPoint == "activity") {
this.objPoint = { this.objPoint = {
menuLevel:2, menuLevel: 2,
menuFromCode:'m_home', menuFromCode: "m_home",
menuCode:'m_content_list', menuCode: "m_content_list",
functionCode:'f_activity', functionCode: "f_activity",
actionCode:'c_top' actionCode: "c_top"
} };
} }
}, },
methods: { methods: {
backTop:function(){ backTop: function() {
if(this.burialPoint == 'activity'){ if (this.burialPoint == "activity") {
this.pageBurialPoin(this.objPoint); this.pageBurialPoin(this.objPoint);
} }
var osTop = document.documentElement.scrollTop || document.body.scrollTop; var osTop = document.documentElement.scrollTop || document.body.scrollTop;
if(osTop > 0){ if (osTop > 0) {
document.documentElement.scrollTop = document.body.scrollTop = 0; document.documentElement.scrollTop = document.body.scrollTop = 0;
} }
} }
},
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../style/mixin'; @import "../../style/mixin";
.back-btn{ .back-btn {
position: fixed; position: fixed;
width: px2rem(35px); width: px2rem(35px);
height: px2rem(35px); height: px2rem(35px);
right: px2rem(15px); right: px2rem(15px);
z-index: 100; z-index: 100;
bottom: px2rem(80px);; bottom: px2rem(80px);
img{ img {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
} }
</style> </style>
...@@ -3,11 +3,16 @@ ...@@ -3,11 +3,16 @@
<div class="search-menu"> <div class="search-menu">
<div class="bgFill" :style="{height:ptop}"></div> <div class="bgFill" :style="{height:ptop}"></div>
<div class="fixBox"> <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"> <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> <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> </div>
</div> </div>
...@@ -42,27 +47,31 @@ export default { ...@@ -42,27 +47,31 @@ export default {
let _this = this; let _this = this;
window.__getStatusBarHeight = function(parm) { window.__getStatusBarHeight = function(parm) {
if (window.__isAndroid) { if (window.__isAndroid) {
_this.popHeight = parseInt(parm.statusBarHeight) / 2.5; _this.popHeight = parseInt(parm.statusBarHeight) / 2.5
} else { } else {
_this.popHeight = parm.statusBarHeight; _this.popHeight = parm.statusBarHeight;
} }
_this.ptop = _this.popHeight + "px"; _this.ptop = _this.popHeight + "px"
_this.bPtop = _this.popHeight + 2 + "px" _this.bPtop = _this.popHeight + 2 + "px"
_this.menuptop = _this.popHeight + "px"; _this.menuptop = _this.popHeight + "px"
}; };
this.getStatusHight(); this.getStatusHight()
}, },
mounted() {}, mounted() {},
methods: { methods: {
// 获取状态栏高度
getStatusHight() { getStatusHight() {
rocNative.getStatusBarHeight({ rocNative.getStatusBarHeight({
__funcName: "__getStatusBarHeight" __funcName: "__getStatusBarHeight"
}); })
}, },
// 跳转到搜索项目
goSearch() { goSearch() {
let _this = this, let _this = this,
url = getWebPageUrl('sousuo/#/index'); url = getWebPageUrl("sousuo/#/index");
let itemData = { let itemData = {
title: "", title: "",
imageUrl: "", imageUrl: "",
...@@ -92,7 +101,7 @@ export default { ...@@ -92,7 +101,7 @@ export default {
} }
] ]
} }
}; }
rocNative.dispatchEventByModuleCode({ rocNative.dispatchEventByModuleCode({
modeCode: itemData.appModuleInfo.code, modeCode: itemData.appModuleInfo.code,
......
...@@ -2,12 +2,15 @@ ...@@ -2,12 +2,15 @@
<div class="hot-lect"> <div class="hot-lect">
<span class="hot-lect-wrapper-title">热门讲师</span> <span class="hot-lect-wrapper-title">热门讲师</span>
<div class="hot-lect-wrapper"> <div class="hot-lect-wrapper">
<div class="hot-lect-wrapper-list" > <div class="hot-lect-wrapper-list">
<div class="hot-lect-wrapper-list-item" <div
v-for="(item,index) in parmData" :key="index" class="hot-lect-wrapper-list-item"
@click="gotoDetail(item)"> v-for="(item,index) in parmData"
:key="index"
@click="gotoDetail(item)"
>
<div class="lect-img"> <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="disp-blc">
<span :class="{'andriod-name': isAndroid}">{{item.doctorName}}</span> <span :class="{'andriod-name': isAndroid}">{{item.doctorName}}</span>
</span> </span>
...@@ -21,98 +24,93 @@ ...@@ -21,98 +24,93 @@
</template> </template>
<script> <script>
import { teacher } from '../../utils/buryingPoint'; import { teacher } from "../../utils/buryingPoint";
export default { export default {
data() { data() {
return { return {
title:'热门讲师', title: "热门讲师",
list: [], list: [],
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
parmData: [], parmData: [],
isAndroid: false isAndroid: false
} };
},
beforeMount(){
}, },
mounted(){ beforeMount() {},
this.isAndroid = window.__isAndroid mounted() {
this.isAndroid = window.__isAndroid;
this.getData(); this.getData();
}, },
props:{ props: {
userToken:{ userToken: {
type:String, type: String,
default:'' default: ""
} }
}, },
methods: { methods: {
// 跳转到详情页面 // 跳转到详情页面
gotoDetail(item){ gotoDetail(item) {
this.$router.push({ this.$router.push({
path: '/teachersDetail', path: "/teachersDetail",
query: { query: {
id: item.doctorId id: item.doctorId
} }
}) });
this.appBuryingPointEntrust({ this.appBuryingPointEntrust({
...teacher, ...teacher,
labelId: item.doctorId, labelId: item.doctorId,
labelValue: item.doctorName labelValue: item.doctorName
}) });
}, },
//热门讲师 //热门讲师
getData(){ getData() {
let _this = this, let _this = this,
para = { para = {
pageNo: 1, pageNo: 1,
pageSize: 6, pageSize: 6,
setEntry: 'headers' setEntry: "headers"
} };
this.GET('contents/courseDoctor/v1/getHotTeacher', para).then(res => { this.GET("contents/courseDoctor/v1/getHotTeacher", para).then(res => {
if(res.code == '000000'){ if (res.code == "000000") {
_this.parmData = res.data && res.data.list || [] _this.parmData = (res.data && res.data.list) || [];
} }
});
})
}, },
// 埋点 // 埋点
appBuryingPointEntrust(val) { appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val) rocNative.appBuryingPointEntrust(val);
},
} }
} }
};
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../style/mixin.scss'; @import "../../style/mixin.scss";
@import '../../style/global.scss'; @import "../../style/global.scss";
.hot-lect { .hot-lect {
&-wrapper { &-wrapper {
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
height: px2rem(115px); height: px2rem(115px);
// margin: 0 px2rem(15px);
overflow-x: scroll; overflow-x: scroll;
-webkit-tap-highlight-color:rgba(0,0,0,0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
outline: 0; outline: 0;
-webkit-overflow-scrolling : touch; -webkit-overflow-scrolling: touch;
&-list { &-list {
display: flex; display: flex;
flex-direction: columns; flex-direction: columns;
margin-left: px2rem(12px); margin-left: px2rem(12px);
width: px2rem(666px); width: px2rem(666px);
height: px2rem(133px); height: px2rem(133px);
// margin: 0 px2rem(15px);
// padding: px2rem(4px) px2rem(4px);
&-item { &-item {
display: inline-block; display: inline-block;
width: px2rem(105px); width: px2rem(105px);
height: px2rem(107px); height: px2rem(107px);
margin: px2rem(3px); margin: px2rem(3px);
text-align: center; text-align: center;
background:rgba(255,255,255,1); background: rgba(255, 255, 255, 1);
box-shadow: 0px 1px 6px 0px rgba(0,0,0,0.07); box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.07);
border-radius: px2rem(3px); border-radius: px2rem(3px);
span { span {
width: 100%; width: 100%;
...@@ -144,38 +142,37 @@ export default { ...@@ -144,38 +142,37 @@ export default {
border-radius: px2rem(8px); border-radius: px2rem(8px);
font-size: px2rem(13px); font-size: px2rem(13px);
color: #fff; color: #fff;
background: #CEAE67; background: #ceae67;
} }
} }
} }
}
} .disp-blc {
.disp-blc {
display: block; display: block;
} }
.hot-lect-wrapper-title { .hot-lect-wrapper-title {
display: block; display: block;
width: 100%; width: 100%;
padding: px2rem(15px); padding: px2rem(15px);
font-size: px2rem(18px); font-size: px2rem(18px);
font-weight: 500; font-weight: 500;
color: #333; color: #333;
} }
.disp-blc.lect-ks { .disp-blc.lect-ks {
position: relative; position: relative;
left: 0; left: 0;
top: px2rem(-8px); top: px2rem(-8px);
font-size: px2rem(12px); font-size: px2rem(12px);
color: #666; color: #666;
} }
.disp-blc.study-num { .disp-blc.study-num {
position: relative; position: relative;
left: 0; left: 0;
top: px2rem(-10px); top: px2rem(-10px);
font-size: px2rem(11px); font-size: px2rem(11px);
color: #999; color: #999;
} }
.andriod-name { .andriod-name {
padding-top: px2rem(2px); padding-top: px2rem(2px);
} }
</style> </style>
<template> <template>
<section> <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 class="group-title">
<article v-show="showOrder" class="group-title-order"> <article v-show="showOrder" class="group-title-order">
<div @click="order(1, 'isLetterOrderDown', 'doctorFirstNameChar')" <div @click="order(1, 'isLetterOrderDown', 'doctorFirstNameChar')"
:class="{'active': showOrderIndex === 1}" class="group-title-order-item"> :class="{'active': showOrderIndex === 1}" class="group-title-order-item">
<span>首字母</span> <span>首字母</span>
<img class="first-name default" src="../../images/lecturer/sort-default.png" v-show="showOrderIndex !== 1"/> <img class="first-name default" :src="sortDefaultImg" v-show="showOrderIndex !== 1"/>
<img class="first-name" src="../../images/lecturer/sort-down.png" v-show="isLetterOrderDown && showOrderIndex === 1"/> <img class="first-name" :src="sortDownImg" v-show="isLetterOrderDown && showOrderIndex === 1"/>
<img class="first-name" src="../../images/lecturer/sort-up.png" v-show="!isLetterOrderDown && showOrderIndex === 1"/> <img class="first-name" :src="sortUpImg" v-show="!isLetterOrderDown && showOrderIndex === 1"/>
</div> </div>
<div @click="order(2, 'isNewCourseOrderDown', 'newTime')" <div @click="order(2, 'isNewCourseOrderDown', 'newTime')"
:class="{'active': showOrderIndex === 2}" class="group-title-order-item"> :class="{'active': showOrderIndex === 2}" class="group-title-order-item">
<span class="new-course">时间</span> <span class="new-course">时间</span>
<img class="new-course-default" src="../../images/lecturer/sort-default.png" v-show="showOrderIndex !== 2"/> <img class="new-course-default" :src="sortDefaultImg" 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="sortDownImg" 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-img" :src="sortUpImg" v-show="!isNewCourseOrderDown && showOrderIndex === 2"/>
</div> </div>
<div @click="order(3, 'isResourceNumOrderDown', 'resourceNum')" <div @click="order(3, 'isResourceNumOrderDown', 'resourceNum')"
:class="{'active': showOrderIndex === 3}" class="group-title-order-item"> :class="{'active': showOrderIndex === 3}" class="group-title-order-item">
<span>课程数</span> <span>课程数</span>
<img class="course-num default" src="../../images/lecturer/sort-default.png" v-show="showOrderIndex !== 3"/> <img class="course-num default" :src="sortDefaultImg" v-show="showOrderIndex !== 3"/>
<img class="course-num" src="../../images/lecturer/sort-down.png" v-show="isResourceNumOrderDown && showOrderIndex === 3"/> <img class="course-num" :src="sortDownImg" v-show="isResourceNumOrderDown && showOrderIndex === 3"/>
<img class="course-num" src="../../images/lecturer/sort-up.png" v-show="!isResourceNumOrderDown && showOrderIndex === 3"/> <img class="course-num" :src="sortUpImg" v-show="!isResourceNumOrderDown && showOrderIndex === 3"/>
</div> </div>
<div @click="order(4, 'isHotOrderDown', 'totalNum')" <div @click="order(4, 'isHotOrderDown', 'totalNum')"
:class="{'active': showOrderIndex === 4}" class="group-title-order-item"> :class="{'active': showOrderIndex === 4}" class="group-title-order-item">
<span class="hot-degree-title">人气</span> <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 default" :src="sortDefaultImg" v-show="showOrderIndex !== 4"/>
<img class="hot-degree" src="../../images/lecturer/sort-down.png" v-show="isHotOrderDown && showOrderIndex === 4"/> <img class="hot-degree" :src="sortDownImg" v-show="isHotOrderDown && showOrderIndex === 4"/>
<img class="hot-degree" src="../../images/lecturer/sort-up.png" v-show="!isHotOrderDown && showOrderIndex === 4"/> <img class="hot-degree" :src="sortUpImg" v-show="!isHotOrderDown && showOrderIndex === 4"/>
</div> </div>
</article> </article>
</article> </article>
...@@ -48,6 +45,9 @@ export default { ...@@ -48,6 +45,9 @@ export default {
isNewCourseOrderDown: true, isNewCourseOrderDown: true,
isResourceNumOrderDown: true, isResourceNumOrderDown: true,
isHotOrderDown: true, isHotOrderDown: true,
sortDefaultImg: require('../../images//sort-default.png'),
sortDownImg: require('../../images//sort-down.png'),
sortUpImg: require('../../images//sort-up.png')
} }
}, },
props: { props: {
...@@ -109,10 +109,6 @@ export default { ...@@ -109,10 +109,6 @@ export default {
border: 1px solid #F6F6F6; border: 1px solid #F6F6F6;
border-radius: px2rem(25px); border-radius: px2rem(25px);
background: #F6F6F6; background: #F6F6F6;
// border: 1px solid #449284;
// span {
// // margin-right: px2rem(30px);
// }
img { img {
position: absolute; position: absolute;
top: px2rem(4px); top: px2rem(4px);
...@@ -127,7 +123,7 @@ export default { ...@@ -127,7 +123,7 @@ export default {
} }
.first-name.default { .first-name.default {
top: px2rem(6px); top: px2rem(6px);
left: px2rem(52px); left: px2rem(53px);
height: px2rem(10px); height: px2rem(10px);
width: px2rem(10px); width: px2rem(10px);
} }
......
...@@ -3,55 +3,55 @@ ...@@ -3,55 +3,55 @@
<article class="group-title"> <article class="group-title">
<section class="group-title-order"> <section class="group-title-order">
<div @click="selectedType(1)" class="group-title-order-item"> <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>
<div @click="selectedType(2)" class="group-title-order-item"> <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>
<div @click="selectedType(3)" class="group-title-order-item"> <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> </div>
</section> </section>
</article> </article>
</section> </section>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
selectedTypeIndex: 1 selectedTypeIndex: 1
} };
}, },
props: { props: {
selectedAreaName: { selectedAreaName: {
type: String, type: String,
default: '全国' default: "全国"
}, },
selectedLevelName: { selectedLevelName: {
type: String, type: String,
default: '全部等级' default: "全部等级"
}, },
selectedDepartName: { selectedDepartName: {
type: String, type: String,
default: '全部科室' default: "全部科室"
} }
}, },
computed: { computed: {},
}, watch: {},
watch: {
},
methods: { methods: {
selectedType(index) { selectedType(index) {
this.selectedTypeIndex = index this.selectedTypeIndex = index;
this.$emit('selectedType', index) this.$emit("selectedType", index);
},
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../style/mixin.scss'; @import "../../style/mixin.scss";
.group-title { .group-title {
display: flex; display: flex;
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
img { img {
position: relative; position: relative;
top: px2rem(1px); top: px2rem(1px);
left: px2rem(1px); left: px2rem(-1px);
height: px2rem(11px); height: px2rem(11px);
width: px2rem(11px); width: px2rem(11px);
} }
......
<template> <template>
<section class="group-title-title"> <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> </section>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {};
}
}, },
props: { props: {
mainTitle: { mainTitle: {
type: String, type: String,
default: '全部讲师' default: "全部讲师"
}, },
subTitle: { subTitle: {
type: String, type: String,
default: '专业领域的资深专家' default: "专业领域的资深专家"
},
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../style/mixin.scss'; @import "../../style/mixin.scss";
.group-title { .group-title {
height: px2rem(18px); height: px2rem(18px);
line-height: px2rem(18px); line-height: px2rem(18px);
...@@ -34,7 +33,7 @@ export default { ...@@ -34,7 +33,7 @@ export default {
margin-right: px2rem(6px); margin-right: px2rem(6px);
font-size: px2rem(18px); font-size: px2rem(18px);
font-weight: 500; font-weight: 500;
color: #28344C; color: #28344c;
} }
&-sub { &-sub {
font-size: px2rem(15px); font-size: px2rem(15px);
......
<template> <template>
<section> <section>
<div class="font-style"> <div class="font-style">
<div class="teach-opt"> <div class="teach-opt">
<div class="teach-list"> <div class="teach-list">
<div :class="index % 2 == 1 ? 'list-item mr0' : 'list-item'" <div
v-for="(item, index) in cParamData" :key="index" :class="index % 2 == 1 ? 'list-item mr0' : 'list-item'"
@click="gotoDetail(item)"> v-for="(item, index) in cParamData"
:key="index"
@click="gotoDetail(item)"
>
<div class="tea-img" :style="'background:'+ item.bgColor"> <div class="tea-img" :style="'background:'+ item.bgColor">
<img :src="item.doctorAvatarImg"> <img :src="item.doctorAvatarImg">
<span class="learn-p">{{item.totalNum | yLocalString}}人已学</span> <span class="learn-p">{{item.totalNum | yLocalString}}人已学</span>
<span class="learn-p-cnum">课程: 共{{item.resourceNum}}</span> <span class="learn-p-cnum">课程: 共{{item.resourceNum}}</span>
<!-- <span class="learn-p">{{item.joinNum | yLocalString}}人已学</span> -->
</div> </div>
<div class="tea-txt"> <div class="tea-txt">
<div class="tea-name"> <div class="tea-name">
<span>{{item.doctorName}}</span> <span>{{item.doctorName}}</span>
<span class="tea-department">{{item.department}}</span> <span class="tea-department">{{item.department}}</span>
</div> </div>
<div class="tea-position"> <div class="tea-position">{{item.doctorHospital}}</div>
{{item.doctorHospital}}
</div>
</div> </div>
</div> </div>
<div class="no-content" v-show="!cParamData.length"> <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> <span class="no-content-desc">暂无相关内容</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</section> </section>
</template> </template>
<script> <script>
import { teacher } from '../../utils/buryingPoint'; import { teacher } from "../../utils/buryingPoint";
import { mapGetters } from 'vuex' import { mapGetters } from "vuex";
import YqyLecturerOrder from '@/components/business/yqy-lecturer-order'; import YqyLecturerOrder from "@/components/business/yqy-lecturer-order";
export default { export default {
data() { data() {
return { return {
topTitle: '讲师集',
token: '',
// list: [],
isShowCount: true,
followCount: 0,
studyCount: 0,
col: 1, //0综合,1人气,2资源数,3姓名首字母 col: 1, //0综合,1人气,2资源数,3姓名首字母
dir: 2, //1:正序 2:逆序, dir: 2, //1:正序 2:逆序,
list: [], list: []
} };
}, },
components: { components: {
YqyLecturerOrder YqyLecturerOrder
...@@ -60,68 +54,67 @@ export default { ...@@ -60,68 +54,67 @@ export default {
default: () => [] default: () => []
} }
}, },
mounted() { mounted() {},
},
computed: { computed: {
cParamData() { cParamData() {
if (this.parmData && this.parmData.length) { if (this.parmData && this.parmData.length) {
return this.randomBg(this.parmData) return this.randomBg(this.parmData);
} else { } else {
return this.randomBg(this.list) return this.randomBg(this.list);
} }
} }
}, },
methods: { methods: {
// 跳转到详情页面 // 跳转到详情页面
gotoDetail(item){ gotoDetail(item) {
this.$router.push({ this.$router.push({
path: '/teachersDetail', path: "/teachersDetail",
query: { query: {
id: item.doctorId id: item.doctorId
} }
}) });
this.appBuryingPointEntrust({ this.appBuryingPointEntrust({
...teacher, ...teacher,
labelId: item.doctorId, labelId: item.doctorId,
labelValue: item.doctorName labelValue: item.doctorName
}) });
}, },
// 随机生成背景颜色 // 随机生成背景颜色
randomBg(d) { randomBg(d) {
for (let i = 0; i < d.length; i++) { for (let i = 0; i < d.length; i++) {
if (i % 4 == 0) { if (i % 4 == 0) {
d[i].bgColor = '#EBF6F1' d[i].bgColor = "#EBF6F1";
} else if (i % 4 == 1) { } else if (i % 4 == 1) {
d[i].bgColor = '#EDF3FA' d[i].bgColor = "#EDF3FA";
} else if (i % 4 == 2) { } else if (i % 4 == 2) {
d[i].bgColor = '#F0F0FA' d[i].bgColor = "#F0F0FA";
} else if (i % 4 == 3) { } else if (i % 4 == 3) {
d[i].bgColor = '#F6EFE6' d[i].bgColor = "#F6EFE6";
} }
} }
return d return d;
}, },
// 埋点 // 埋点
appBuryingPointEntrust(val) { appBuryingPointEntrust(val) {
rocNative.appBuryingPointEntrust(val) rocNative.appBuryingPointEntrust(val);
},
} }
} }
};
</script> </script>
<style> <style>
body { body {
background: #fff background: #fff;
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
body { body {
background: #fff background: #fff;
} }
@import '../../style/mixin'; @import "../../style/mixin";
.no-content { .no-content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -136,12 +129,12 @@ body { ...@@ -136,12 +129,12 @@ body {
line-height: px2rem(21px); line-height: px2rem(21px);
font-size: px2rem(15px); font-size: px2rem(15px);
font-weight: 400; font-weight: 400;
color:rgba(153,153,153,1); color: rgba(153, 153, 153, 1);
} }
} }
.mint-header { .mint-header {
background-color: rgba($color: #000000, $alpha: 0) background-color: rgba($color: #000000, $alpha: 0);
} }
.font-style { .font-style {
...@@ -193,7 +186,7 @@ body { ...@@ -193,7 +186,7 @@ body {
} }
.mr0 { .mr0 {
margin-right: 0 margin-right: 0;
} }
.tea-txt { .tea-txt {
...@@ -220,7 +213,11 @@ body { ...@@ -220,7 +213,11 @@ body {
left: 0; left: 0;
bottom: 0; bottom: 0;
background: #333; 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%); // background: linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,0.34) 100%);
color: #fff; color: #fff;
font-size: px2rem(11px); font-size: px2rem(11px);
...@@ -265,7 +262,7 @@ body { ...@@ -265,7 +262,7 @@ body {
.home-header { .home-header {
height: px2rem(185px); height: px2rem(185px);
@include bis('../../images/headerTop.png'); @include bis("../../images//headerTop.png");
.logo_img { .logo_img {
height: px2rem(85px); height: px2rem(85px);
......
...@@ -115,15 +115,3 @@ ...@@ -115,15 +115,3 @@
</defs> </defs>
</svg> </svg>
</template> </template>
<script>
export default {
}
</script>
<style lang="scss">
</style>
...@@ -3,45 +3,54 @@ ...@@ -3,45 +3,54 @@
<!-- <div class="status-bar"></div> --> <!-- <div class="status-bar"></div> -->
<div class="top-header" :class="{active:isScroll}"> <div class="top-header" :class="{active:isScroll}">
<div class="content left-icon" @click="goBack()"> <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
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png" alt=""> 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>
<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 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()"> <!-- <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-white.png" alt="">
<img v-if="isScroll" border="0" src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/right-icon.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>
</div> </div>
</template> </template>
<script> <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'
import {shareUrl} from '../../utils/index.js' import { shareUrl } from "../../utils/index.js";
export default { export default {
name:'MyHeader', name: "MyHeader",
props:{ props: {
isOpacity:{ isOpacity: {
type:Boolean, type: Boolean,
default:true default: true
}, },
isScroll:{ isScroll: {
type:Boolean, type: Boolean,
default:false default: false
}, },
isShare:{ isShare: {
type:Boolean, type: Boolean,
default:true default: true
}, },
doctorId:{ doctorId: {
type:String, type: String,
default:"" default: ""
}, },
backMethod: { backMethod: {
type: String, type: String,
default: 'native' default: "native"
}, },
isJSJ: { isJSJ: {
type: Boolean, type: Boolean,
...@@ -50,111 +59,104 @@ export default { ...@@ -50,111 +59,104 @@ export default {
}, },
computed: { computed: {
topTitle2() { topTitle2() {
return this.topTitle return this.topTitle;
} }
}, },
mounted(){ mounted() {},
}, methods: {
methods:{ goBack() {
// backPre(){ if (this.backMethod === "inner") {
// if(this.backMethod === 'inner') { this.$router.go(-1);
// this.$router.go(-1)
// } else {
// rocNative.goBack()
// }
// },
goBack(){
if(this.backMethod === 'inner') {
this.$router.go(-1)
} else { } else {
rocNative.goBack() rocNative.goBack();
} }
}, },
share(){ share() {
rocNative.shareWechat({ rocNative.shareWechat({
title1:'个人评价', title1: "个人评价",
title2:'个人评价出现了喔', title2: "个人评价出现了喔",
shareUrl:`${shareUrl}gpr#/home`+'?doctorId='+this.doctorId, shareUrl: `${shareUrl}gpr#/home` + "?doctorId=" + this.doctorId,
type:6, type: 6,
shareImageUrl:'https://file.yunqueyi.com/logo.png?version='+new Date().getTime(), shareImageUrl:
shareId:0 "https://file.yunqueyi.com/logo.png?version=" + new Date().getTime(),
}) shareId: 0
});
this.buryingPointShare(); this.buryingPointShare();
}, },
/////////埋点//////////
//返回 //返回
buryingPointBack:function(){ buryingPointBack: function() {
rocNative.appBuryingPointEntrust({ rocNative.appBuryingPointEntrust({
...teacher_back, ...teacher_back,
functionCode:'f_gpranking', functionCode: "f_gpranking",
actionCode:'c_back', actionCode: "c_back",
labelValue:'返回', labelValue: "返回",
createdTime:new Date().getTime() createdTime: new Date().getTime()
}) });
}, },
//分享 //分享
buryingPointShare:function(){ buryingPointShare: function() {
rocNative.appBuryingPointEntrust({ rocNative.appBuryingPointEntrust({
...teacher_back, ...teacher_back,
functionCode:'f_gpranking', functionCode: "f_gpranking",
actionCode:'c_share', actionCode: "c_share",
labelValue:'分享', labelValue: "分享",
createdTime:new Date().getTime() createdTime: new Date().getTime()
}) });
},
} }
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../style/mixin'; @import "../../style/mixin";
.wrapper{ .wrapper {
position:fixed; position: fixed;
top: 0; top: 0;
width:100%; width: 100%;
z-index:100000000; z-index: 100000000;
/**************表头******************/ /**************表头******************/
.top-header{ .top-header {
display:flex; display: flex;
display:-webkit-flex; display: -webkit-flex;
flex-direction: row; flex-direction: row;
// justify-content:center;//这个会整体居中,但是使用一些左右不等的margin时,会影响效果 // justify-content:center;//这个会整体居中,但是使用一些左右不等的margin时,会影响效果
align-items:center; align-items: center;
width:100%; width: 100%;
height:px2rem(45px);//header高度 height: px2rem(45px); //header高度
margin-top:px2rem(25px);///////////statusbar高度!!!!!!!!!!!!!!!!!!!!!默认使用此高度 margin-top: px2rem(
25px
); ///////////statusbar高度!!!!!!!!!!!!!!!!!!!!!默认使用此高度
} }
.top-header.active{ .top-header.active {
// margin-top:0; // margin-top:0;
border-bottom:px2rem(2px) solid #e7e7e7; border-bottom: px2rem(2px) solid #e7e7e7;
background-color:#fff; background-color: #fff;
}
.top-header .left-icon{
margin-left:px2rem(15px);
} }
.top-header .title{ .top-header .left-icon {
width:px2rem(116px); margin-left: px2rem(15px);
height:px2rem(18px);
line-height:px2rem(18px);
margin-left:px2rem(90px);
text-align:center;
color:#fff;
font-size:px2rem(18px);
} }
.top-header .title.active{ .top-header .title {
color:#000; 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{ .top-header .title.active {
margin-left:px2rem(95px); color: #000;
} }
.top-header .left-icon img,.top-header .right-icon img{ .top-header .right-icon {
display:block;//这样其外的div可以正好将其包裹住 margin-left: px2rem(95px);
width:px2rem(25px);
height:px2rem(25px);
} }
.top-header .left-icon img,
.top-header .right-icon img {
display: block; //这样其外的div可以正好将其包裹住
width: px2rem(25px);
height: px2rem(25px);
} }
.wrapper.active{ }
background-color:#fff; .wrapper.active {
// background-color:rgba(0,0,0,0.84); background-color: #fff;
// background-color:rgba(255,255,255,0.34) }
}
</style> </style>
\ No newline at end of file
<template> <template>
<section class="back-top"> <section class="back-top">
<div class="back-btn" @click="backTop"> <div class="back-btn" @click="backTop">
<img src="../../images/backTop.png"/> <img src="../../images//backTop.png">
</div> </div>
</section> </section>
</template> </template>
<script> <script>
export default { export default {
data(){ data() {
return{ return {
objPoint:{} objPoint: {}
} };
}, },
props:{ props: {
burialPoint:{ burialPoint: {
default:'', default: "",
type:String type: String
} }
}, },
mounted(){ mounted() {
if(this.burialPoint == 'activity'){ if (this.burialPoint == "activity") {
this.objPoint = { this.objPoint = {
menuLevel:2, menuLevel: 2,
menuFromCode:'m_home', menuFromCode: "m_home",
menuCode:'m_content_list', menuCode: "m_content_list",
functionCode:'f_activity', functionCode: "f_activity",
actionCode:'c_top' actionCode: "c_top"
} };
} }
}, },
methods: { methods: {
backTop:function(){ backTop: function() {
if(this.burialPoint == 'activity'){ if (this.burialPoint == "activity") {
this.pageBurialPoin(this.objPoint); this.pageBurialPoin(this.objPoint);
} }
var osTop = document.documentElement.scrollTop || document.body.scrollTop; var osTop = document.documentElement.scrollTop || document.body.scrollTop;
if(osTop > 0){ if (osTop > 0) {
document.documentElement.scrollTop = document.body.scrollTop = 0; document.documentElement.scrollTop = document.body.scrollTop = 0;
} }
} }
},
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../style/mixin'; @import "../../style/mixin";
.back-btn{ .back-btn {
position: fixed; position: fixed;
width: px2rem(35px); width: px2rem(35px);
height: px2rem(35px); height: px2rem(35px);
right: px2rem(15px); right: px2rem(15px);
z-index: 100; z-index: 100;
bottom: px2rem(80px);; bottom: px2rem(80px);
img{ img {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -4,108 +4,110 @@ ...@@ -4,108 +4,110 @@
<div class="teach-top"> <div class="teach-top">
<!-- <div class="teach-top" :class="{'pt150': isScroll}"> --> <!-- <div class="teach-top" :class="{'pt150': isScroll}"> -->
<!-- <div class="back" v-if="isScroll" @click="backPre" style="flex-direction:row;width:100%;"> <!-- <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"> <img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png">
<span style="padding-bottom:10px;">dddd</span> <span style="padding-bottom:10px;">dddd</span>
</div> --> </div>-->
<!-- <TopNav :bgColor="bgColor" :title="navTitle" :isNavFix="isNavFix" :burialPoint="pointStyle"></TopNav> --> <!-- <TopNav :bgColor="bgColor" :title="navTitle" :isNavFix="isNavFix" :burialPoint="pointStyle"></TopNav> -->
<div class="tc title">{{parmObj}}</div> <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>
</div> </div>
</template> </template>
<script> <script>
// import BackHeader from '../../components/teachers/back-header'; import BackHeader from "../../components/teacher/back-header";
import BackHeader from '../../components/teacher/back-header';
export default { export default {
data () { data() {
return { return {
bgColor:'#fff', bgColor: "#fff",
parmObj:'' parmObj: ""
} };
}, },
components:{ components: {
BackHeader BackHeader
}, },
props:{ props: {
isShowCount: { isShowCount: {
default:false, default: false,
type:Boolean type: Boolean
}, },
followCount: { followCount: {
type:Number, type: Number,
default:0 default: 0
}, },
studyCount: { studyCount: {
type:Number, type: Number,
default:0 default: 0
}, },
statusBarHeight: { statusBarHeight: {
type:Number, type: Number,
default:0 default: 0
}, },
isScroll:{ isScroll: {
type: Boolean, type: Boolean,
default: false default: false
}, },
backMethod: { backMethod: {
type: String, type: String,
default: 'native' default: "native"
}, },
isJSJ: { isJSJ: {
type: Boolean, type: Boolean,
default: true default: true
} }
}, },
mounted(){ mounted() {
this.parmObj = this.isShowCount ? '讲师集' : '云鹊医讲师' this.parmObj = this.isShowCount ? "讲师集" : "云鹊医讲师";
}, },
methods: { methods: {
backPre(){ backPre() {
if(this.backMethod === 'inner') { if (this.backMethod === "inner") {
this.$router.go(-1) this.$router.go(-1);
} else { } else {
rocNative.goBack() rocNative.goBack();
} }
},
} }
} }
};
</script> </script>
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../style/mixin.scss'; @import "../../style/mixin.scss";
@import '../../style/global.scss'; @import "../../style/global.scss";
.pt150 { .pt150 {
margin-top: px2rem(150px) margin-top: px2rem(150px);
} }
.teach-top{ .teach-top {
width: 100%; width: 100%;
height: px2rem(185px); height: px2rem(185px);
@include bis('../../images/headerTop.png'); @include bis("../../images//headerTop.png");
.tc{ .tc {
text-align: center; text-align: center;
} }
.back{ .back {
position: fixed; position: fixed;
z-index: 110; z-index: 110;
left:px2rem(18px); left: px2rem(18px);
top: px2rem(25px); top: px2rem(25px);
display: inline-block; display: inline-block;
width: px2rem(50px); width: px2rem(50px);
height: px2rem(50px); height: px2rem(50px);
img{ img {
width: px2rem(25px); width: px2rem(25px);
height: px2rem(25px); height: px2rem(25px);
} }
} }
.title{ .title {
font-size: px2rem(25px); font-size: px2rem(25px);
color: #fff; color: #fff;
padding: px2rem(55px) 0 px2rem(8px) 0; padding: px2rem(55px) 0 px2rem(8px) 0;
font-weight: 500 font-weight: 500;
} }
.count{ .count {
font-size: px2rem(15px); font-size: px2rem(15px);
line-height: px2rem(21px); line-height: px2rem(21px);
color: #fff; color: #fff;
......
<template> <template>
<section :class="isNavFix ? 'nav-top fixed' : 'nav-top'"> <section :class="isNavFix ? 'nav-top fixed' : 'nav-top'">
<div class="nav-part" :style="'background:'+bgColor"> <div class="nav-part" :style="'background:'+bgColor">
<div class="nav-title"> <div class="nav-title">
<span class="nav-back" @click="goBack"> <span class="nav-back" @click="goBack">
<img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png"/> <img src="https://pica-pro.oss-cn-shanghai.aliyuncs.com/gpranking/left-icon.png">
<!-- <img class="nav-back" src="../../images/grey-throw.png"/> --> <!-- <img class="nav-back" src="../../images//grey-throw.png"/> -->
</span> </span>
<!-- <span class="back" @click="goBack"> <!-- <span class="back" @click="goBack">
<img src="../../images/left-icon.png"> <img src="../../images//left-icon.png">
</span> --> </span>-->
{{title}} {{title}}
<!-- <span class="nav-share" @click="goShare"> <!-- <span class="nav-share" @click="goShare">
<img src="../../images/Shape1@2x.png"/> <img src="../../images//Shape1@2x.png"/>
</span> --> </span>-->
</div> </div>
</div> </div>
</section> </section>
</template> </template>
<script> <script>
export default { export default {
data(){ data() {
return{ return {
// title:'测试', // title:'测试',
content:'', content: "",
shareImageUrl:'', shareImageUrl: ""
} };
}, },
props:{ props: {
bgColor:{//背景色 bgColor: {
type:String, //背景色
default:'' type: String,
default: ""
}, },
title:{//标题 title: {
type:String, //标题
default:'暂无数据' type: String,
default: "暂无数据"
}, },
isNavFix:{//是否fix定位 isNavFix: {
type:Boolean, //是否fix定位
default:true type: Boolean,
default: true
}, },
burialPoint:{ burialPoint: {
default:'', default: "",
type:String type: String
}, },
backMethod: { backMethod: {
type: String, type: String,
default: 'native' // inner native default: "native" // inner native
} }
}, },
mounted(){ mounted() {
if(this.burialPoint == 'activity'){ if (this.burialPoint == "activity") {
this.objPoint = { this.objPoint = {
menuLevel:2, menuLevel: 2,
menuFromCode:'m_home', menuFromCode: "m_home",
menuCode:'m_content_list', menuCode: "m_content_list",
functionCode:'f_activity', functionCode: "f_activity",
actionCode:'c_last' actionCode: "c_last"
} };
} }
}, },
methods: { methods: {
//返回 //返回
goBack(){ goBack() {
if(this.burialPoint == 'activity'){ if (this.burialPoint == "activity") {
this.pageBurialPoin(this.objPoint); this.pageBurialPoin(this.objPoint);
} }
if ( this.backMethod === 'inner' ) { if (this.backMethod === "inner") {
this.$router.back(-1); this.$router.back(-1);
} else { } else {
rocNative.goBack(); rocNative.goBack();
...@@ -78,23 +77,24 @@ ...@@ -78,23 +77,24 @@
//rocNative.backPreviousPage(); //rocNative.backPreviousPage();
}, },
//分享 //分享
goShare(){ goShare() {
let url = location.hef,_this = this; let url = location.hef,
_this = this;
rocNative.shareWechat({ rocNative.shareWechat({
url:url, url: url,
title:_this.title, title: _this.title,
content:_this.content, content: _this.content,
shareImageUrl:_this.shareImageUrl shareImageUrl: _this.shareImageUrl
}) });
} }
},
} }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../style/mixin'; @import "../../style/mixin";
.back{ .back {
position: absolute; position: absolute;
left:px2rem(18px); left: px2rem(18px);
top: px2rem(25px); top: px2rem(25px);
display: inline-block; display: inline-block;
width: px2rem(50px); width: px2rem(50px);
...@@ -103,18 +103,18 @@ ...@@ -103,18 +103,18 @@
width: px2rem(25px); width: px2rem(25px);
height: px2rem(25px); height: px2rem(25px);
} }
} }
.nav-top{ .nav-top {
height: px2rem(65px); height: px2rem(65px);
background: #fff; background: #fff;
color: #333; color: #333;
position: relative; position: relative;
z-index: 109; z-index: 109;
.nav-back{ .nav-back {
display: inline-block; display: inline-block;
position: absolute; position: absolute;
left: px2rem(16px);; left: px2rem(16px);
top: 0; top: 0;
height: px2rem(25px); height: px2rem(25px);
width: px2rem(25px); width: px2rem(25px);
...@@ -122,55 +122,51 @@ ...@@ -122,55 +122,51 @@
// -webkit-transform: (180deg); // -webkit-transform: (180deg);
// transform: rotate(180deg); // transform: rotate(180deg);
} }
img{ img {
display: block; display: block;
width: 100%; width: 100%;
height: 100% height: 100%;
} }
.nav-icon{ .nav-icon {
display: inline-block; display: inline-block;
width: 50px; width: 50px;
height: 50px; height: 50px;
svg{ svg {
stroke: #000; stroke: #000;
fill: #0000ff; fill: #0000ff;
} }
} }
.nav-share{ .nav-share {
position: absolute; position: absolute;
right: px2rem(8px);; right: px2rem(8px);
top:0; top: 0;
height: px2rem(25px); height: px2rem(25px);
width: px2rem(25px); width: px2rem(25px);
} }
.nav-title{ .nav-title {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
/* padding:0 px2rem(33px);*/ /* padding:0 px2rem(33px);*/
position: relative; position: relative;
} }
.nav-part{ .nav-part {
width: 100%; width: 100%;
font-size: px2rem(18px); font-size: px2rem(18px);
text-align: center; text-align: center;
padding: px2rem(30px) 0 px2rem(10px) 0; padding: px2rem(30px) 0 px2rem(10px) 0;
/* height: px2rem(25px);*/ /* height: px2rem(25px);*/
}
} }
.fixed{ }
.nav-part{ .fixed {
.nav-part {
position: fixed; position: fixed;
top:0; top: 0;
left: 0; left: 0;
border-bottom: 1px solid #E7E7E7; border-bottom: 1px solid #e7e7e7;
/* height: px2rem(25px);*/ /* height: px2rem(25px);*/
} }
} }
</style> </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'); ...@@ -7,9 +7,7 @@ const mixins = require('@/utils/mixins');
import '@/utils/rem' // 引入自适应 import '@/utils/rem' // 引入自适应
import '@/utils/yqyServerRegister' // 移动端服务 import '@/utils/yqyServerRegister' // 移动端服务
import FastClick from 'fastclick' import FastClick from 'fastclick'
// import Logger from './plugins/logger' // 日志插件 import vueFilters from '@/utils/filter'
// import Swiper from './plugins/swiper.min.js'
// 引入Mint // 引入Mint
import Mint from 'mint-ui' import Mint from 'mint-ui'
...@@ -23,21 +21,17 @@ Vue.use(Mint) ...@@ -23,21 +21,17 @@ Vue.use(Mint)
import VueLazyload from 'vue-lazyload' import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload, { Vue.use(VueLazyload, {
preLoad: 3, 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: '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 attempt: 1
// lazyComponent: true // lazyComponent: true
}) })
Vue.filter('yLocalString', function(value){ // 注册所有公用过滤器
var b = parseInt(value).toString(); for(let key in vueFilters) {
if (b === 'NaN') return 0; Vue.filter(key, vueFilters[key])
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(",");
})
if ('addEventListener' in document) { if ('addEventListener' in document) {
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
......
import { formatTime } from './index' import { formatTime } from './index'
const vueFilter = { const vueFilter = {
// 通用状态过滤器
formatStatus: function(value) {
return !value ? '正常' : '停用'
},
formatNumber: function(num, precision, separator) { // 将数字转换成带千分位数字
formatNumber: function (num, precision, separator) {
var parts; var parts;
if (!isNaN(parseFloat(num)) && isFinite(num)) { if (!isNaN(parseFloat(num)) && isFinite(num)) {
num = Number(num); num = Number(num);
...@@ -16,6 +13,16 @@ const vueFilter = { ...@@ -16,6 +13,16 @@ const vueFilter = {
return parts.join('.'); return parts.join('.');
} }
return ''; 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 @@ ...@@ -31,7 +31,7 @@
<img v-lazy="item.imageUrl" :key="item.imageUrl"> <img v-lazy="item.imageUrl" :key="item.imageUrl">
<span class="tag" v-show="item.structureName">{{item.structureName}}</span> <span class="tag" v-show="item.structureName">{{item.structureName}}</span>
<span class="line-play" @click.stop="goToPage(item)"> <span class="line-play" @click.stop="goToPage(item)">
<img src="../../images/grey-play.png"> <img src="../../images//grey-play.png">
</span> </span>
</div> </div>
<div class="line-name"> <div class="line-name">
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
<div class="teach-title plr15">课程教学</div> <div class="teach-title plr15">课程教学</div>
<div class="opt-span plr15"> <div class="opt-span plr15">
<span class="" @click="sortFun">学习人数 <span class="" @click="sortFun">学习人数
<img src="../../images/sort-d.png" v-if="dir == 2"> <img src="../../images//sort-d.png" v-if="dir == 2">
<img src="../../images/sort-u.png" v-if="dir == 1"> <img src="../../images//sort-u.png" v-if="dir == 1">
</span> </span>
</div> </div>
<div class="teach-list plr15"> <div class="teach-list plr15">
...@@ -305,7 +305,7 @@ export default { ...@@ -305,7 +305,7 @@ export default {
left: 0; left: 0;
top:-(px2rem(64px)); top:-(px2rem(64px));
z-index: 10; z-index: 10;
@include bis('../../images/detaiBg.png'); @include bis('../../images//detaiBg.png');
.head-img{ .head-img{
width: px2rem(45px); width: px2rem(45px);
height: px2rem(45px); height: px2rem(45px);
...@@ -548,7 +548,7 @@ export default { ...@@ -548,7 +548,7 @@ export default {
} }
.home-header { .home-header {
height: px2rem(185px); height: px2rem(185px);
@include bis('../../images/headerTop.png'); @include bis('../../images//headerTop.png');
.logo_img{ .logo_img{
height: px2rem(85px); height: px2rem(85px);
width: px2rem(345px); width: px2rem(345px);
......
...@@ -68,15 +68,15 @@ export default { ...@@ -68,15 +68,15 @@ export default {
speedSwiper: 300, speedSwiper: 300,
//轮播图默认数据 //轮播图默认数据
listSwiper: [{ 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, scrollTimer: null,
scrollTop: 0, scrollTop: 0,
...@@ -473,7 +473,7 @@ export default { ...@@ -473,7 +473,7 @@ export default {
// height: px2rem(210px); // height: px2rem(210px);
.swiper{ .swiper{
height: 100%; height: 100%;
/* @include bis('../../../images/552064153@2x.png');*/ /* @include bis('../../../images//lect-bg.png');*/
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册