提交 96e90144 编写于 作者: chendeli's avatar chendeli

add

上级 68a3ef95
<template> <template>
<div class="cource-teach" id="adjust-u"> <div class="cource-teach" id="adjust-u">
<div :class="isFixed ? 'cource-header fixed' : 'cource-header'"> <div :class="isFixed ? 'cource-header fixed' : 'cource-header'">
<div class="font-title">{{teacherData.title}}</div> <div class="font-title">
{{title}}
<div class="change-part gray">
换一批
<img src="../../images/change.png"/>
</div>
</div>
</div> </div>
<div class="couse-list"> <div class="couse-list">
<div :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index" v-for="(item,index) in cource"> <div :class="index%2==1 ? 'course-item end-left' : 'course-item'" :key="index" v-for="(item,index) in list">
<div class="course-pic"> <div class="course-pic">
<img src="../../images/552064153@2x.png" class="pic-tec" /> <img :src="item.appIndexCourseUrl" class="pic-tec" />
<span class="course-tag">高血压</span> <span class="course-tag">{{item.disName}}</span>
</div> </div>
<p class="course-txt"> <p class="course-txt">
高血压伴糖尿病的规范化治疗 {{item.name}}
</p> </p>
<div class="course-opt"> <div class="course-opt">
<span class="opt-info">刚刚 | 89人已学</span> <span class="opt-info">{{item.showTime == '' ? '' : item.showTime + ' |'}} {{item.joinNum}}人已学</span>
<span class="opt collect"> <span class="opt collect">
收藏 收藏
</span> </span>
...@@ -29,133 +37,44 @@ ...@@ -29,133 +37,44 @@
</template> </template>
<script> <script>
export default {
name: 'YqyTeacherList',
export default {
data () {
return {
list:[{name:'ahda',disName:'fajhkfhak',joinNum:'111',modifyTime:1534312600000,showTime:''}],
pageNo:1,
pageSize:10,
title:'为您推荐',
mockUrl:'http://sosoapi.yunqueyi.com/sosoapi-web/pass/mock/39'
}
},
props: props:
{ {
isFixed:{ isFixed:{
default:false, default:false,
type:Boolean type:Boolean
},
teacherData: {
type: Object,
default: ()=>{
return {
title: '为您推荐',
hasSelect: true,
showMoreBtn: true,
selectOptions: [
{ text: 'One', value: 'A' },
{ text: 'Two', value: 'B' },
{ text: 'Three', value: 'C' }
],
firstOption: '综合',
options: [
{
isCheck: false,
title: '在学人数'
},
{
isCheck: false,
title: '最新发布'
}
]
}
}
},
hasPersonName: {
type: Boolean,
default: true
},
courceData: {
type: Object,
default:()=>{
return {
selected: '综合1',
hasHospital: true,
hasType: true,
ascending: true,
data: [{},{},{},{},{},{},{},{},{},{},{},{}]
}
} }
},
direction: {
type: String,
default: 'left'
}
},
watch: {
selected(val){
console.log('val',val);
this.$emit('selected',val)
}
},
data () {
return {
selected: 'A',
isStudy: false,
ascending: true,
cource: [{},{},{},{},{},{},{},{},{},{},{},{}],
showMore: false,
options: [
{ text: 'One', value: 'A' },
{ text: 'Two', value: 'B' },
{ text: 'Three', value: 'C' }
]
}
},
created () {
}, },
mounted(){ mounted(){
this.flag(); this.getData();
}, },
methods: { methods: {
disable(val){
console.log('val',val); getData(){
}, let _this = this,
teacherChange(){ parm = {
console.log('teacherChange'); pageNo:_this.pageNo,
this.$emit('teacherChange') pageSize:_this.pageSize,
}, token:'F08EDE2622B34953B970E3FD686F5064',
teacherMore(){ setEntry: 'headers'
console.log('teacherMore'); }
this.$emit('teacherMore') _this.API_GET(_this.mockUrl+'contents/courses/recommendCourseList',parm).then(function(res){
}, if(res.code === '000000'){
firstOption(){ _this.list = res.data || [];
this.isStudy = false; }
this.ascending = !this.ascending; })
console.log('firstOption');
this.$emit('firstOption',this.ascending)
},
flag(){
// let temp = this.courceData.data;
// let fourCource = temp&&temp.slice(0,4);
// console.log('fourCource',fourCource);
// if(!this.showMore&&this.teacherData.showMoreBtn){
// this.cource = fourCource;
// }else{
// this.cource = this.courceData.data;
// }
},
showMoreFn(){
console.log('more',1);
this.showMore = !this.showMore;
this.flag();
},
collection(){
},
study(val){
this.isStudy = true;
console.log('val',val);
this.teacherData.options[val].isCheck=!this.teacherData.options[val].isCheck;
this.teacherData.options.filter((item,index)=>
index!==val
)[0].isCheck= false
this.$emit('study',val)
} }
} }
} }
...@@ -179,8 +98,27 @@ export default { ...@@ -179,8 +98,27 @@ export default {
padding:0 px2rem(15px); padding:0 px2rem(15px);
} }
.cource-header{ .cource-header{
margin: 0 0 px2rem(21px) 0; margin: 0 0 px2rem(21px) 0;
overflow: hidden;
height: px2rem(40px);
.font-title{
line-height: px2rem(40px);
}
}
.change-part{
margin-top:px2rem(10px);
float: right;
font-size:px2rem(11px);
line-height: px2rem(11px);
border:1px solid #A9AEB7;
border-radius: px2rem(9px);
vertical-align: middle;
padding: px2rem(3px) px2rem(5px) px2rem(2px) px2rem(6px);
img{
width: px2rem(12px);
height: px2rem(12px);
}
} }
.fixed{ .fixed{
.font-title{ .font-title{
...@@ -263,6 +201,7 @@ export default { ...@@ -263,6 +201,7 @@ export default {
.font-title{ .font-title{
font-size: px2rem(18px); font-size: px2rem(18px);
font-weight: bold; font-weight: bold;
} }
.title{ .title{
font-size: px2rem(16px); font-size: px2rem(16px);
......
<template>
<transition name="evluatbox">
<div class="top-evaluat" v-show="isShow">
<div class="evaluat-info">
<span class="evaluat-icon">
<img src='../../images/552064153@2x.png'/>
</span>
<span class="evaluat-persent">您的学习速度战胜了本院内36%的医生</span>
</div>
<div class="evaluat-part">
<span class="part-throw"><img src='../../images/grey-throw.png'/></span>
<div class="part-item part-finish">
<div class="item-num">
<span class="fs16">101</span><span class="fs15">/</span><span class="fs14">300</span>
</div>
<div class="item-persent">
<span></span>
</div>
<div class="item-txt">已完成课程</div>
</div>
<div class="part-item part-pass">
<div class="item-num">
<span class="fs16">101</span><span class="fs15">/</span><span class="fs14">300</span>
</div>
<div class="item-persent">
<span></span>
</div>
<div class="item-txt">已通过考试</div>
</div>
<div class="part-item part-get">
<div class="item-num">
<span class="fs16">101</span><span class="fs15">/</span><span class="fs14">300</span>
</div>
<div class="item-persent">
<span></span>
</div>
<div class="item-txt">已获得证书</div>
</div>
</div>
<div class="push-up" @click="toggleFun">
<img src='../../images/push.png'/>
<span>收起</span>
</div>
</div>
</transition>
</template>
<script>
export default {
props: {
isShowEvluat:{
default:false,
type:Boolean
}
},
data () {
return {
isShow:true,
mockUrl:'http://sosoapi.yunqueyi.com/sosoapi-web/pass/mock/39/'
}
},
mounted(){
this.isShow = this.isShowEvluat;
this.getData();
},
methods: {
getData:function(){
let para = {
sysCode: 27,
token: this.token,
setEntry: 'headers'
}
this.GET('analysis/activityDetail', para).then(res => {
if(res.code == '000000'){
}
})
},
toggleFun:function(){
this.$emit('evluatFun',{isPull:false});
this.isShow = !this.isShow;
}
}
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin.scss';
@import '../../style/global.scss';
.evluatbox-leave-active,.evluatbox-enter-active{
transition: all 1s ease;
}
.evluatbox-leave-active,.evluatbox-enter{
height:0px !important;
}
.evluatbox-leave,.evluatbox-enter-active{
height: px2rem(225px);
}
.top-evaluat{
animation: myfirst 1.2s;
}
@keyframes myfirst
{
from {height: 0;}
to {height:px2rem(225px)}
}
.top-evaluat{
position: fixed;
z-index: 105;
left: 0;
top:0;
width: 100%;
height: px2rem(225px);
overflow:hidden;
@include bis('../../images/evaluatBg.png');
padding:0 px2rem(10px);
.evaluat-info{
margin-top: px2rem(33px);
.evaluat-icon{
height: px2rem(26px);
width: px2rem(26px);
border-radius: 50%;
background: #D7E0EC;
display: inline-block;
vertical-align: middle;
img{
margin-top:px2rem(3px);
height: px2rem(23px);
width: px2rem(26px);
display: inline-block;
border-radius: 50%;
}
}
.evaluat-persent{
font-size: px2rem(13px);
color:#AA813B;
}
}
.push-up{
text-align: center;
height: px2rem(14px);
line-height: px2rem(14px);
margin-top:px2rem(23px);
span{
color: #A8997F;
font-size: px2rem(12px);
display: inline-block;
}
img{
width: px2rem(11px);
height: px2rem(11px);
display: inline-block;
}
}
.evaluat-part{
background: #fff;
border:px2rem(1px) solid RGBA(179, 139, 72, 0.45);
border-radius: px2rem(3px);
padding:px2rem(14px) 0 px2rem(14px) px2rem(14px);
margin-top: px2rem(15px);
position: relative;
.part-throw{
position: absolute;
display: inline-block;
width: px2rem(16px);
height: px2rem(16px);
top:50%;
right: px2rem(7px);;
margin-top: -(px2rem(8px));
img{
width: 100%;
height: 100%;
display: block;
}
}
.part-item{
width:px2rem(84px);
display: inline-block;
margin-right: px2rem(20px);
.item-num{
font-size: px2rem(16px);
font-weight: bold;
.fs16{
font-size: 16px;
}
.fs15{
font-size: 15px;
}
.fs14{
font-size: 14px;
}
}
.item-txt{
padding-top:px2rem(10px);
font-size: px2rem(13px);
color: #888
}
}
.part-get{
margin:0;
}
.part-finish .item-num{
.fs16{
color: RGBA(74, 135, 212, 1)
}
.fs15{
color: RGBA(74, 135, 212, 1)
}
.fs14{
color: RGBA(74, 135, 212, 0.6)
}
}
.part-pass .item-num{
.fs16{
color: #449284
}
.fs15{
color: #449284
}
.fs14{
color: RGBA(68, 146, 132, 0.6)
}
}
.part-get .item-num{
.fs16{
color: #CAA861
}
.fs15{
color: #CAA861
}
.fs14{
color: RGBA(202, 168, 97, 0.6)
}
}
.part-item .item-persent{
width: px2rem(84px);
height: px2rem(7px);
margin-top: px2rem(6px);
border: 1px solid #5890DD;
border-radius: px2rem(4px);
position: relative;
span{
position: absolute;
top:-(px2rem(1px));
left: -(px2rem(1px));
width:px2rem(30px);
display: inline-block;
background: -webkit-linear-gradient(left, #8FC1E6, #5890DD);
background: -o-linear-gradient(right, #8FC1E6, #5890DD);
background: -moz-linear-gradient(right, #8FC1E6, #5890DD);
background: linear-gradient(to right, #8FC1E6, #5890DD);
height: px2rem(7px);
border-radius: px2rem(4px);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(103, 153, 217, 0.3);
}
}
.part-pass .item-persent{
border-color: #449284;
span{
background: -webkit-linear-gradient(left, #8DC5BB, #449284);
background: -o-linear-gradient(right, #8DC5BB, #449284);
background: -moz-linear-gradient(right,#8DC5BB, #449284);
background: linear-gradient(to right, #8DC5BB, #449284);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(94, 136, 128, 0.3);
}
}
.part-get .item-persent{
border-color: #CAA861;
span{
background: -webkit-linear-gradient(left, #CCAB65, #F6DDA9);
background: -o-linear-gradient(right, #CCAB65, #F6DDA9);
background: -moz-linear-gradient(right,#CCAB65, #F6DDA9);
background: linear-gradient(to right, #CCAB65, #F6DDA9);
box-shadow: 0 px2rem(2px) px2rem(3px) RGBA(207, 174, 106, 0.3);
}
}
}
}
</style>
<template>
<section class="nav-top">
<div class="nav-part">
<div class="nav-title">
<span class="nav-back">
<img src="../../images/grey-throw.png"/>
</span>
{{title}}
<span class="nav-share">
<img src="../../images/Shape1@2x.png"/>
</span>
</div>
</div>
</section>
</template>
<script>
export default {
data(){
return{
title:'测试'
}
},
mounted(){
},
methods: {
},
}
</script>
<style lang="scss" scoped>
@import '../../style/mixin';
.nav-top{
height: px2rem(55px);
border-bottom: 1px solid #E7E7E7;
background: #fff;
color: #333;
.nav-back{
display: inline-block;
position: absolute;
left:px2rem(8px);;
top:0;
height: px2rem(25px);
width: px2rem(25px);
transform:rotate(180deg);
}
img{
display: block;
width: 100%;
height: 100%
}
.nav-share{
position: absolute;
right: px2rem(8px);;
top:0;
height: px2rem(25px);
width: px2rem(25px);
}
.nav-title{
display: inline-block;
width: 100%;
padding:0 px2rem(33px);
position: relative;
}
.nav-part{
position: fixed;
top:px2rem(20px);
left: 0;
width: 100%;
font-size: px2rem(18px);
text-align: center;
height: px2rem(25px);
}
}
</style>
...@@ -172,9 +172,11 @@ const apiUrl = 'http://test1-api.yunqueyi.com/' ...@@ -172,9 +172,11 @@ const apiUrl = 'http://test1-api.yunqueyi.com/'
// 为每个URL添加应用校验密钥 // 为每个URL添加应用校验密钥
export function getBaseUrl(url) { export function getBaseUrl(url) {
return baseUrl + url //return baseUrl + url
return url
} }
export function getApiUrl(url) { export function getApiUrl(url) {
return apiUrl + url //return apiUrl + url
return url
} }
<template> <template>
<section class="font-style"> <section :class="isBodyPull?'font-style pull-down':'font-style pull-up'">
<!--展开收起学习评价-->
<YqyTopEvaluat :isShowEvluat="isShowEvluat" v-if="isShowEvluat" v-on:evluatFun="getEluatFun"/>
<section class="home-header"> <section class="home-header">
<div class="home-topMenu"> <div class="home-topMenu">
<YqyHomeHeader/> <YqyHomeHeader/>
...@@ -54,7 +57,10 @@ ...@@ -54,7 +57,10 @@
<!--为你推荐--> <!--为你推荐-->
<YqyHomeAdjust :isFixed="isFixed"/> <YqyHomeAdjust :isFixed="isFixed"/>
<!--返回顶部-->
<BackTop v-if="isShowBackTop"/> <BackTop v-if="isShowBackTop"/>
<a class="news-update" href="#new-course" v-if="showNewCorse"> <a class="news-update" href="#new-course" v-if="showNewCorse">
<span class="news-info"> <span class="news-info">
10个新内容 10个新内容
...@@ -69,6 +75,7 @@ ...@@ -69,6 +75,7 @@
import { Swipe, SwipeItem ,Header} from 'mint-ui'; import { Swipe, SwipeItem ,Header} from 'mint-ui';
import BackTop from '../../components/common/backTop'; import BackTop from '../../components/common/backTop';
import YqyTeacherList from '../../components/business-new/yqy-teacher-list'; import YqyTeacherList from '../../components/business-new/yqy-teacher-list';
import YqyTopEvaluat from '../../components/business-new/yqy-home-learn-evaluation';
import YqyHomeHeader from '../../components/business-new/yqy-home-header'; import YqyHomeHeader from '../../components/business-new/yqy-home-header';
import YqyHomeAdv from '../../components/business-new/yqy-home-adv'; import YqyHomeAdv from '../../components/business-new/yqy-home-adv';
import YqyFiveMinutes from '../../components/business-new/yqy-five-minutes'; import YqyFiveMinutes from '../../components/business-new/yqy-five-minutes';
...@@ -83,6 +90,8 @@ export default { ...@@ -83,6 +90,8 @@ export default {
showNewCorse:true, // 是否显示新内容 默认显示 showNewCorse:true, // 是否显示新内容 默认显示
isFixed:false, isFixed:false,
isShowBackTop:false, isShowBackTop:false,
isShowEvluat:true,//是否显示下拉
isBodyPull:true,
} }
}, },
components:{ components:{
...@@ -90,6 +99,7 @@ export default { ...@@ -90,6 +99,7 @@ export default {
Swipe, Swipe,
SwipeItem, SwipeItem,
BackTop, BackTop,
YqyTopEvaluat,
YqyTeacherList, YqyTeacherList,
YqyHomeHeader, YqyHomeHeader,
YqyHomeAdv, YqyHomeAdv,
...@@ -135,17 +145,20 @@ export default { ...@@ -135,17 +145,20 @@ export default {
}else{ }else{
this.isFixed = false; this.isFixed = false;
} }
}, },
getEluatFun(obj){
this.isBodyPull = false;
},
init() { init() {
this.API_GET('contents/homeButton/msg', {}).then( res => { this.API_GET('contents/homeButton/msg', {}).then( res => {
logger.debug(res) logger.debug(res)
this.$log.debug(res) this.$log.debug(res)
}) })
console.log(this);
let para = { let para = {
sysCode: 27, sysCode: 27,
token: this.token, token: this.token,
...@@ -228,6 +241,25 @@ export default { ...@@ -228,6 +241,25 @@ export default {
.font-style { .font-style {
@include sc(0.6rem, #666); @include sc(0.6rem, #666);
} }
.top-evaluat{
}
@keyframes myPullDown{
from {padding-top: 0;}
to {padding-top:px2rem(225px)}
}
@keyframes myPullUp{
from {padding-top: px2rem(225px);}
to {padding-top:0}
}
.pull-down{
animation: myPullDown 1.2s;
padding-top:px2rem(225px)
}
.pull-up{
animation: myPullUp 1.2s;
padding-top:0
}
.news-update{ .news-update{
display: block; display: block;
position: fixed; position: fixed;
......
<template> <template>
<section class="cooper-box"> <section>
<div class="cooper-count">共4个活动</div> <TopNav></TopNav>
<div class="cooper-list"> <section class="cooper-box">
<div class="cooper-item" v-for="(item,index) in list" :key="index">
<img src="../../images/Shape@2x.png" class="tag-img"/> <div class="cooper-count">共4个活动</div>
<div class="txt">国家基本公共卫生服务项目基层高血压管理办公室</div> <div class="cooper-list">
<span class="throw-img"> <div class="cooper-item" v-for="(item,index) in list" :key="index">
<img src="../../images/grey-throw.png" /> <img src="../../images/Shape@2x.png" class="tag-img"/>
</span> <div class="txt">国家基本公共卫生服务项目基层高血压管理办公室</div>
<span class="throw-img">
<img src="../../images/grey-throw.png" />
</span>
</div>
</div> </div>
</div> <BackTop></BackTop>
<BackTop></BackTop>
</section>
</section> </section>
</template> </template>
<script> <script>
import BackTop from '../../components/common/backTop'; import BackTop from '../../components/common/backTop';
import TopNav from '../../components/common/topNav';
export default { export default {
data(){ data(){
return { return {
...@@ -24,7 +32,8 @@ export default { ...@@ -24,7 +32,8 @@ export default {
} }
}, },
components:{ components:{
BackTop BackTop,
TopNav
}, },
mounted(){ mounted(){
document.tittle = this.tittle; document.tittle = this.tittle;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册