提交 b4931cfd 编写于 作者: guojing.hao's avatar guojing.hao

搜索框

上级 fe74b741
<template> <template>
<div class="hello"> <div class="space-between header">
<div class="header"> <div class="search">
<div class="search"> <input type="search" class="input" v-model="message" :placeholder="resourceData.placeholder"/>
<input type="search" class="input" v-model="message" placeholder="请输入课程名称"/> <img class="searchImg" :src="resourceData.img">
<img class="searchImg" src="../../images/Shape@2x.png"> </div>
</div> <div class="headerRight">
<div class="white gxy">高血压</div> <img class="info" :src="resourceData.img">
<div> <img class="info-count" :src="resourceData.img">
<span class="white fs30 gxyStudy">287,387人学习</span>
<span class="white fs30">327,387人关注</span>
</div>
<Banner/>
</div> </div>
</div> </div>
</template> </template>
...@@ -20,6 +16,17 @@ export default { ...@@ -20,6 +16,17 @@ export default {
name: 'header', name: 'header',
components: { components: {
}, },
props: {
resourceData: {
type: Object,
default:()=>{
return {
placeholder: '请输入课程名称',
img: '../../images/Shape@2x.png'
}
}
}
},
watch: { watch: {
message(val){ message(val){
console.log('val',val); console.log('val',val);
...@@ -42,98 +49,109 @@ export default { ...@@ -42,98 +49,109 @@ export default {
@import '../../style/mixin.scss'; @import '../../style/mixin.scss';
@import '../../style/global.scss'; @import '../../style/global.scss';
html,body{ html,body{
width: 750px; width: px2rem(375px);
height: 100%; height: 100%;
background-color: #F8F8F8; background-color: #F8F8F8;
} }
.white{ .white{
color: #fff; color: #fff;
} }
.headerRight{
width: px2rem(30px);
height: px2rem(30px);
}
.fs30{ .fs30{
font-size: 30px; font-size: px2rem(15px);
} }
.gxyStudy{ .gxyStudy{
margin-right: 38px; margin-right: px2rem(19px);
} }
.gxy{ .gxy{
font-size: 50px; font-size: px2rem(25px);
margin: 50px 0 22px 0; margin: px2rem(25px) 0 px2rem(11px) 0;
} }
.header{ .header{
width: 100%; width: 100%;
height: 416px; padding: 0 px2rem(25px) 0 px2rem(15px);
background-image: url('http://pica-pro.oss-cn-shanghai.aliyuncs.com/teach/bg.png'); position: relative;
padding-top: 40px;
} }
.search{ .search{
width: 580px; width: px2rem(290px);
height: 60px; height: px2rem(30px);
border-radius: 38px; border-radius: px2rem(19px);
background-color: #fff; background-color: #fff;
margin: 0 auto;
} }
.input{ .input{
outline: none; outline: none;
border: none; border: none;
float: left; float: left;
font-size: 26px; font-size: px2rem(13px);
margin: 12px 0 12px 30px; margin: px2rem(6px) 0 px2rem(6px) px2rem(15px);
line-height: 36px; line-height: px2rem(18px);
width: 80%; width: 80%;
} }
.searchImg{ .searchImg{
width: 32px; width: px2rem(16px);
height: 32px; height: px2rem(16px);
margin: 16px 36px 16px 0; margin: px2rem(8px) px2rem(18px) px2rem(8px) 0;
float: right; float: right;
} }
.info{
width: px2rem(20px);
height: px2rem(20px);
}
.info-count{
position:absolute;
top: px2rem(-10px);
right: px2rem(21px);
}
.hotTag{ .hotTag{
width: 100%; width: 100%;
height: 300px; height: px2rem(150px);
} }
.hotTagTitle{ .hotTagTitle{
font-size: 36px; font-size: px2rem(18px);
padding: 147px 30px; padding: px2rem(73px) px2rem(15px);
float: left; float: left;
background-color: #fff; background-color: #fff;
} }
.cource{ .cource{
width: 100%; width: 100%;
height: 700px; height: px2rem(350px);
} }
.fontTitle{ .fontTitle{
font-size: 36px; font-size: px2rem(18px);
padding: 0 0 42px 30px; padding: 0 0 px2rem(21px) px2rem(15px);
float: left; float: left;
width: 100%; width: 100%;
text-align: left; text-align: left;
} }
.title{ .title{
font-size: 32px; font-size: px2rem(16px);
} }
.courceLeft{ .courceLeft{
float: left; float: left;
padding-left: 30px; padding-left: px2rem(15px);
} }
.needLeft{ .needLeft{
float: left; float: left;
padding: 0 0 80px 30px; padding: 0 0 px2rem(40px) px2rem(15px);
} }
.courceTime{ .courceTime{
float: left; float: left;
} }
.courceImg{ .courceImg{
width: 340px; width: px2rem(170px);
height: 192px; height: px2rem(96px);
margin-bottom: 20px; margin-bottom: px2rem(10px);
} }
.courceMore{ .courceMore{
font-size: 30px; font-size: px2rem(15px);
color: #999999; color: #999999;
} }
.need{ .need{
width: 100%; width: 100%;
height: 650px; height: px2rem(325px);
margin-top: 70px; margin-top: px2rem(35px);
} }
</style> </style>
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<mt-button icon="more" slot="right"></mt-button> <mt-button icon="more" slot="right"></mt-button>
</mt-header> </mt-header>
<article style="width: 100%;text-align:center;"> <article style="width: 100%;text-align:center;">
<YqyHomeHeader/>
<img class="logo_img" src='../../images/header-bg-2.png' /> <img class="logo_img" src='../../images/header-bg-2.png' />
</article> </article>
</section> </section>
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
<YqyHotTeacher/> <YqyHotTeacher/>
<YqyTeacherList/> <YqyTeacherList/>
<YqyTeacherInfo/> <YqyTeacherInfo/>
<!-- <YqyHomeHeader/> -->
</section> </section>
<section class="home-bottom"> <section class="home-bottom">
<!-- <yqyTest/> --> <!-- <yqyTest/> -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册