first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,112 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>tabs</title>
<style>
* {
padding: 0px;
margin: 0px;
list-style: none;
}
.tab_title {
display: flex;
}
.tab_title li {
margin-right: 15px;
}
.tab_title .active_title {
color: blue;
}
.tab_content li {
display: none;
}
.active_content {
display: inline-block !important;
}
</style>
</head>
<body>
<ul class="tab_title">
<li class="active_title">首页</li>
<li>搞笑</li>
<li>军事</li>
<li>农业</li>
</ul>
<ul class="tab_content">
<li class="active_content">首页的内容</li>
<li>搞笑的内容</li>
<li>军事的内容</li>
<li>农业的内容</li>
</ul>
<script>
var titleArr = $(".tab_title li");
var contentArr = $(".tab_content li");
titleArr.forEach(function (v, i) {
v.onclick = function () {
titleArr.forEach(function (a, b) {
a.className = ""
contentArr[b].className = ""
});
this.className = "active_title"
contentArr[i].className = "active_content"
}
});
function $(className) {
return document.querySelectorAll(className)
}
// var titleArr = $(".tab_title li");
// var contentArr = $(".tab_content li");
// titleArr.forEach(function (v,i) {
// v.onclick = function () {
// // 批量的类名清除操作
// titleArr.forEach(function (a,b) {
// // 清除标题
// a.className = ""
// // 清除内容的类名
// contentArr[b].className = ""
// });
// this.className = "active_title"
// contentArr[i].className = "active_content"
// }
// });
// function $(className) {
// return document.querySelectorAll(className)
// }
</script>
</body>
</html>

View File

@@ -0,0 +1,177 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=<<device-width>>, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="header">
<div class="header_top">
<ul class="header_top_left">
<li><p>中国大陆</p></li>
<li><p>流浪的石头</p></li>
<li><p>手机淘宝</p></li>
</ul>
<ul class="right">
<li>
<img src="" alt="">
<span>文字</span>
</li>
<li>
<img src="" alt="">
<span>文字</span>
</li>
<li>
<img src="" alt="">
<span>文字</span>
</li>
<li>
<img src="" alt="">
<span>文字</span>
</li>
<li>
<img src="" alt="">
<span>文字</span>
</li>
<li>
<img src="" alt="">
<span>文字</span>
</li>
</ul>
</div>
<div class="header_bottom">
<img src="" alt="">
<div class="center">
<input type="text">
<ul>
<li><a href=""></a></li>
<li><a href=""></a></li>
<li><a href=""></a></li>
<li><a href=""></a></li>
<li><a href=""></a></li>
<li><a href=""></a></li>
<li><a href=""></a></li>
</ul>
</div>
<img src="" alt="">
</div>
</div>
<div class="content">
<div class="content_left">
<span>主题商场</span>
<ul>
<li>
<img src="" alt="">
<sapn>文字</sapn>
</li>
li>
<img src="" alt="">
<sapn>文字</sapn>
</li>
li>
<img src="" alt="">
<sapn>文字</sapn>
</li>
li>
<img src="" alt="">
<sapn>文字</sapn>
</li>
li>
<img src="" alt="">
<sapn>文字</sapn>
</li>
li>
<img src="" alt="">
<sapn>文字</sapn>
</li>
</ul>
</div>
<div class="content_right">
<ul>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
</ul>
<div class="left">
<img src="" alt="">
<div class="bottom">
<div class="bottom_top">
<img src="" alt="">
<p></p>
</div>
<ul>
<li><img src="" alt=""></li>
<li><img src="" alt=""></li>
</ul>
</div>
</div>
<div class="right">
<div class="top">
<div class="wenzi">
<img src="" alt="">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</div>
<img src="" alt="">
<div class="gonggao">
<span>公告</span>
<span>新鲜事</span>
<ul>
<li>
<img src="" alt="">
<a href=""></a>
</li>
li>
<img src="" alt="">
<a href=""></a>
</li>
li>
<img src="" alt="">
<a href=""></a>
</li>
</ul>
</div>
<ul>
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
</ul>
</div>
</div>
<ul>
<li><img src="" alt=""></li>
<li><img src="" alt=""></li>
<li><img src="" alt=""></li>
<li><img src="" alt=""></li>
</ul>
</div>
<div class="fotter"></div>
</body>
</html>

View File

@@ -0,0 +1,152 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="header"></div>
<div class="content">
<div class="content_left">
<div class="left_top">
<span>习近平</span>
<ul>
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
</ul>
</div>
<div class="left_center1">
<ul>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
</ul>
<div class="left_center_right">
<ul>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
</ul>
<ul>
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
</ul>
</div>
</div>
<div class="left_center2">
<ul class="left">
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
</ul>
<ul class="right">
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
</ul>
</div>
<div class="left_bottom">
<div class="bottom_top">
<p>热点标题</p>
<ul>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
</ul>
</div>
<ul>
<li>
<img src="" alt="">
</li>
<li>
<img src="" alt="">
</li>
<li>
<img src="" alt="">
</li>
<li>
<img src="" alt="">
</li>
</ul>
</div>
</div>
<div class="conteng_right">
<ul>
<li>
<img src="" alt="">
<a href=""></a>
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
<a href=""></a>
</li>
</ul>
<img src="" alt="">
</div>
</div>
<div class="footer"></div>
</body>
</html>

View File

@@ -0,0 +1,150 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="header">
<ul class="left">
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
</ul>
<ul class="right">
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
</ul>
</div>
<div class="contengt">
<div class="conteng_top">
<div class="serch">
<img src="" alt="">
<input type="text">
</div>
<img src="" alt="">
<ul>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
<li>
<a href=""></a>
</li>
</ul>
</div>
<div class="content_bottom">
<div class="bottom_left">
<img src="" alt="">
<div class="bototom">
<span>新浪产品</span>
<ul>
<li>
<img src="" alt="">
</li>
<li>
<img src="" alt="">
</li>
</ul>
</div>
</div>
<div class="bottom_center">
<div class="center_top">
<p>图片</p>
<ul>
<li>
<img src="" alt="">
</li>
<li>
<img src="" alt="">
</li>
</ul>
<ul>
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
</ul>
</div>
<div class="center_bottom">
<p>视频</p>
<div class="bottom">
<ul class="left">
<li>
<img src="" alt="">
</li>
<li>
<img src="" alt="">
</li>
</ul>
<ul class="right">
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
<li>
<img src="" alt="">
<a href=""></a>
</li>
</ul>
</div>
</div>
</div>
<div class="bototom_right">
<p>新闻</p>
<ul>
<li>
<a href=""></a>
</li>
li>
<a href=""></a>
</li>
li>
<a href=""></a>
</li>
li>
<a href=""></a>
</li>
</ul>
</div>
</div>
</div>
<div class="footer"></div>
</body>
</html>

View File

@@ -0,0 +1,31 @@
body,p,ul,li,h1,h2,h3,h4,h5,h6,input{
margin: 0;
padding: 0;
border: none;
}
li {
list-style: none;
}
input {
/* 去除选中input时候产生的外边框 */
outline: none;
}
a {
text-decoration: none;
color: #000;
}
input{
background: none;
border: none;
outline: none;
}

View File

@@ -0,0 +1,284 @@
.header{
width: 100%;
height: 0.88rem;
/* margin-top: 0.32rem; */
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 00.3rem;
box-sizing: border-box;
border-bottom: 0.01rem solid #e9e6e6;
background-color: #ffffff;
}
.header img{
width: 0.2rem;
height: 0.33rem;
background-color: #333333;
}
.header .header_order{
font-size: 0.34rem;
color: hsl(0, 0%, 20%);
}
.content{
width: 100%;
height: calc(100vh - 0.88rem - 0.92rem);
}
.content_address{
width: 100%;
height: 1.216rem;
background-color: #ffffff;
margin-bottom: 0.19rem;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0.3rem;
box-sizing: border-box;
}
.content_address .content_address_l{
}
.content_address .content_address_t{
font-size: 0.3rem;
color: #333333;
display: flex;
align-items: center;
justify-content: start;
}
.content_address_t .name{
margin-right: 0.52rem;
}
.content_address_t .phone{
}
.content_address_detailed{
font-size: 0.24rem;
color: #333333;
}
.content_address img{
width: 0.14rem;
height: 0.26rem;
}
.content .conment_payment{
height: 0.84rem;
border-radius: 0.1rem;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #ffffff;
padding-left: 0.26rem;
padding-right: 0.43rem;
margin-bottom: 0.16rem;
}
.content .conment_payment .conment_payment_mode{
font-size: 0.28rem;
color: #333333;
}
.content .conment_payment .conment_payment_onli{
/* width: 1.34rem; */
display: flex;
align-items: center;
justify-content: space-between;
font-size: 0.28rem;
color: #333333;
}
.conment_payment_onli span{}
.conment_payment_onli img{
width: 0.31rem;
height: 0.06rem;
text-align: center;
}
.content .content_details{
background: #ffffff;
}
.content .content_details>li{
border-bottom: 0.01rem solid #e9e6e6;
}
.content .content_details .content_details_shop{
display: flex;
align-items: center;
justify-content: start;
padding-left: 0.24rem;
height: 0.62rem;
border-bottom: 0.01rem solid #e9e6e6;
}
.content_details_shop .shop_title_l{
width: 0.24rem;
height: 0.22rem;
margin-right: 0.06rem;
}
.content_details_shop .shop_title{
font-size: 0.26rem;
color: #333333;
margin-right: 0.16rem;
}
.content_details_shop .shop_title_r{
width: 0.1rem;
height: 0.19rem;
}
.content_details .skirt{
}
.content_details .skirt .skirt_text{
position: relative;
display: flex;
align-items: center;
justify-content: start;
padding: 0.29rem 0.28rem 0.24rem;
}
.skirt_text img{
width: 2rem;
height: 1.65rem;
margin-right: 0.36rem;
}
.skirt_text.skirt .real{}
.skirt_text .real .real_title{
width: 3.18rem;
font-size: 0.28rem;
color: #333333;
margin-bottom: 0.14rem;
}
.real .real_category{
font-size: 0.2rem;
color: #999999;
display: flex;
align-items: center;
margin-bottom: 0.18rem;
}
.real_category_t{
margin-right: 0.36rem;
}
.real.real_category .real_category_b{}
.real_price{
font-size: 0.34rem;
color: #ea4e3d;
}
.skirt .number{
position: absolute;
right: 0.76rem;
bottom: 0.47rem;
font-size: 0.2rem;
color: #999999;
}
.content_details .remarks{
display: flex;
align-items: center;
padding: 0.3rem 0 0.29rem 0.3rem;
}
.remarks .remarks_text{
font-size: 0.3rem;
color: #333333;
margin-right: 0.31rem;
}
.remarks input{
width: 4.15rem;
font-size: 0.26rem;
color: #aaaaaa;
letter-spacing: 0rem;
}
.coupon{}
.coupon .serve{
padding: 0.22rem 0.23rem 0.16rem 0.33rem;
}
.coupon .serve .serve_purpose{
display: flex;
align-items: center;
justify-content: space-between;
}
.serve_purpose .use{
font-size: 0.24rem;
color: #333333;
}
.serve_purpose .pass{
font-size: 0.24rem;
color: #f09c48;
}
.coupon .serve .serve_post{
display: flex;
align-items: center;
justify-content: space-between;
}
.serve_post .other{
font-size: 0.24rem;
color: #333333;
}
.serve_post .run{
font-size: 0.24rem;
color: #333333;
}
.content_details .money{
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.3rem 0.26rem 0.25rem 0.31rem;
margin-bottom: 0.16rem;
}
.content_details .money .money_l{
font-size: 0.3rem;
color: #333333;
}
.content_details .money .money_r{
font-size: 0.34rem;
color: #ea4e3d;
}
.footer{
width: 7.5rem;
height: 0.92rem;
background-color: #ffffff;
position: fixed;
bottom: 0px;
left: 0px;
z-index: 999;
display: flex;
align-items: center;
/* justify-content: space-between; */
padding: 0.16rem 0.24rem 0.1rem 1.67rem;
box-sizing: border-box;
}
.footer .footer_total{
font-size: 0.26rem;
color: #999999;
margin-right: 0.27rem;
}
.footer .footer_dollar{
font-size: 0.26rem;
color: #000000;
margin-right: 0.42rem;
}
.footer .footer_settlement{
width: 1.92rem;
font-size: 0.28rem;
color: #ffffff;
background-color: #5697f4;
border-radius: 0.33rem;
text-align: center;
line-height: 0.66rem;
}
.footer_settlement span{
}

View File

@@ -0,0 +1,222 @@
.header{}
.header .header_top{
/* width: 4.32rem; */
height: 0.8rem;
background-color: #828282;
border-radius: 0.4rem;
position: fixed;
top: 0.54rem;
left: 0.24rem;
display: flex;
align-items: center;
padding: 0.05rem 0.34rem 0.05rem 0.07rem;
box-sizing: border-box;
z-index: 9999;
}
.header .header_top_img{
width: 0.7rem;
height: 0.7rem;
border-radius: 100%;
margin-right: 0.09rem;
}
.header .header_top .user{
margin-right: 0.13rem;
}
.header .header_top .user .id{
font-size: 0.26rem;
color: #ffffff;
}
.header .header_top .user .addres{
font-size: 0.22rem;
color: #ffffff;
}
.header .header_top .follow{
/* width: 1.05rem; */
height: 0.45rem;
background: #ea4e3d;
border-radius: 30%;
display: flex;
align-items: center;
margin-left: 0.01rem;
padding-left: 0.08rem;
box-sizing: border-box;
}
.header .header_top .follow .follow_img{
width: 0.34rem;
height: 0.24rem;
margin-right: 0.1rem;
}
.header .header_top .follow .follow_text{
font-size: 0.24rem;
color: #ffffff;
margin-right: 0.1rem;
}
.content{
background-image:url("../kobe_1.jpg") ;
width: 100%;
height: calc(100vh - 1rem);
position: relative;
}
.content .content_text{
width: 100%;
position: fixed;
bottom:1rem;
left: 0.14rem;
}
.content .content_text .content_text_follow{
/* width: 3.59rem;
height: 0.5rem; */
background-color: #4799ee;
border-radius: 0.1rem;
padding: 0.13rem 0.18rem 0.1rem 0.17rem;
box-sizing: border-box;
display: flex;
align-items: center;
margin-bottom: 0.31rem;
display: inline-block;
}
.content .content_text_follow img{
width: 0.34rem;
height: 0.24rem;
margin-right: 0.14rem;
}
.content .content_text_follow .thank{
font-size: 0.26rem;
color: #ffffff;
}
.content .content_text .evaluate{
}
.content .content_text .evaluate li{
width: 3.8rem;
/* height: 0.5rem; */
background-color: #828282;
border-radius: 0.25rem;
padding: 0.13rem 0.17rem 0.12rem 0.23rem;
margin-bottom: 0.13rem;
box-sizing: border-box;
}
.content .evaluate li .evaluate_fly{
font-size: 0.26rem;
color: #4799ee;
}
.content .evaluate li .evaluate_order{
font-size: 0.26rem;
color: #ffffff;
}
.commodity{
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.3rem 0.25rem 0.09rem 0.3rem;
width: 100%;
z-index: 9999;
position: fixed;
bottom: 1rem;
box-sizing: border-box;
background-image: url(../kobe_2.jpg);
}
.commodity li{
margin-right: 0.1rem;
}
.commodity li:last-child{
margin-right: 0rem;
}
.commodity .img{
width: 0.1rem;
height: 0.65rem;
margin-bottom: 0.08rem;
}
.commodity .brand{
font-size: 0.2rem;
color: #000000;
margin-bottom: 0.17rem;
}
.commodity .sinze{
font-size: 0.2rem;
color: #ea4e3d;
}
.footer{
width: 100%;
height:1rem;
position: fixed;
bottom: 0rem;
left: 0rem;
display: flex;
align-items: center;
padding: 0.14rem 0.29rem 0.28rem 0.4rem;
box-sizing: border-box;
z-index: 99999;
background-image: url(../kobe_3.jpg);
}
.footer .footer_left{
width: 0.63rem;
height: 0.63rem;
background-color: #4799ee;
border-radius: 50%;
margin-right: 0.1rem;
display: flex;
align-items: center;
justify-content: center;
}
.footer .footer_left img{
width: 0.36rem;
height: 0.34rem;
}
.footer input{
width: 3.59rem;
height: 0.62rem;
background-color: #828282;
border-radius: 0.31rem;
margin-right: 0.29rem;
}
.footer .footer_right{
width: 2.2rem;
display: flex;
align-items: center;
justify-content: space-between;
}
.footer .footer_right li{
background: #828282;
width: 0.63rem;
height: 0.63rem;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
}
.footer .footer_right li img{
}
.footer .footer_right li:nth-child(1) img{
width: 0.4rem;
height: 0.3rem;
}
.footer .footer_right li:nth-child(2) img{
width: 0.34rem;
height: 0.3rem;
}
.footer .footer_right li:nth-child(3) img{
width: 0.34rem;
height: 0.34rem;
}

View File

@@ -0,0 +1,5 @@
/* 存放使用率高的css代码 */
body {
font-size: 0px;
background-color:#f2f2f2;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

View File

@@ -0,0 +1,148 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./js/rem.js"></script>
<link rel="stylesheet" href="./CSS/css/clear.css">
<link rel="stylesheet" href="./CSS/css/public.css">
<link rel="stylesheet" href="./CSS/css/index.css">
</head>
<body>
<div class="header">
<img src="./img/back.png" alt="">
<div class="header_order">填写订单</div>
<div></div>
</div>
<div class="content">
<div class="content_address">
<div class="content_address_l">
<div class="content_address_t">
<div class="name">张晓明</div>
<div class="phone">186****0019</div>
</div>
<div class="content_address_detailed">
上海市黄浦区中山南路128号千古美城1楼1210室
</div>
</div>
<img src="./img/zhankai.png" alt="">
</div>
<div class="conment_payment ">
<div class="conment_payment_mode">选择支付方式</div>
<div class="conment_payment_onli">
<span>在线支付</span>
<img src="./img/24gl-ellipsis.png" alt="">
</div>
</div>
<ul class="content_details">
<li class="content_details_shop">
<img src="./img/lihe.png" alt="" class="shop_title_l">
<div class="shop_title">路易斯女装旗舰店</div>
<img src="./img/r_zhankai.png" alt="" class="shop_title_r">
</li>
<li class="skirt">
<div class="skirt_text">
<img src="./img/qunzi.png" alt="">
<div class="real">
<div class="real_title">真丝连衣裙2019春夏新款杭州大牌气质修…… </div>
<div class="real_category">
<div class="real_category_t">颜色:黑白</div>
<div class="real_category_b">尺码:L</div>
</div>
<div class="real_price">¥160.00</div>
</div>
<div class="number">X1</div>
</div>
</li>
<li class="remarks">
<div class="remarks_text">订单备注</div>
<input type="text" value="有什么想对商家留言的可以在这里说">
</li>
<li class="coupon">
<ul class="serve">
<li class="serve_purpose">
<div class="use">优惠抵用</div>
<div class="pass">-¥5</div>
</li>
<li class="serve_post">
<div class="other">快递费用</div>
<div class="run">免费包邮</div>
</li>
</ul>
</li>
<li class="money">
<div class="money_l">商品金额</div>
<div class="money_r">¥155.00</div>
</li>
</ul>
<ul class="content_details">
<li class="content_details_shop">
<img src="./img/lihe.png" alt="" class="shop_title_l">
<div class="shop_title">路易斯女装旗舰店</div>
<img src="./img/r_zhankai.png" alt="" class="shop_title_r">
</li>
<li class="skirt">
<div class="skirt_text">
<img src="./img/qunzi.png" alt="">
<div class="real">
<div class="real_title">真丝连衣裙2019春夏新款杭州大牌气质修…… </div>
<div class="real_category">
<div class="real_category_t">颜色:黑白</div>
<div class="real_category_b">尺码:L</div>
</div>
<div class="real_price">¥160.00</div>
</div>
<div class="number">X1</div>
</div>
</li>
<li class="skirt">
<div class="skirt_text">
<img src="./img/qunzi.png" alt="">
<div class="real">
<div class="real_title">真丝连衣裙2019春夏新款杭州大牌气质修…… </div>
<div class="real_category">
<div class="real_category_t">颜色:黑白</div>
<div class="real_category_b">尺码:L</div>
</div>
<div class="real_price">¥160.00</div>
</div>
<div class="number">X1</div>
</div>
</li>
<li class="remarks">
<div class="remarks_text">订单备注</div>
<input type="text" value="有什么想对商家留言的可以在这里说">
</li>
<li class="coupon">
<ul class="serve">
<li class="serve_purpose">
<div class="use">优惠抵用</div>
<div class="pass">-¥5</div>
</li>
<li class="serve_post">
<div class="other">快递费用</div>
<div class="run">免费包邮</div>
</li>
</ul>
</li>
<li class="money">
<div class="money_l">商品金额</div>
<div class="money_r">¥155.00</div>
</li>
</ul>
</div>
<div class="footer">
<div class="footer_total">共3件,合计</div>
<div class="footer_dollar">¥5999.00</div>
<div class="footer_settlement">
<span>结算(2)</span>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./js/rem.js"></script>
<link rel="stylesheet" href="./CSS/css/clear.css">
<link rel="stylesheet" href="./CSS/css/public.css">
<link rel="stylesheet" href="./CSS/css/index2.css">
</head>
<body>
<div class="header">
<div class="header_top">
<img src="./img/pazhe_gou.png" alt="" class="header_top_img">
<div class="user">
<div class="id">昵称 | ID:12345</div>
<div class="addres">7455观看| 首尔市</div>
</div>
<div class="follow">
<img src="./img/关注.png" alt="" class="follow_img">
<span class="follow_text">关注</span>
</div>
</div>
</div>
<div class="content">
<div class="content_text">
<div class="content_text_follow">
<img src="./img/关注.png" alt="">
<span class="thank">我是嘟嘟嘴 关注了主播</span>
</div>
<ul class="evaluate">
<li>
<span class="evaluate_fly">小飞仙:</span>
<span class="evaluate_order">我下单啦查看下</span>
</li>
<li>
<span class="evaluate_fly">小飞仙:</span>
<span class="evaluate_order">我下单啦查看下</span>
</li>
<li>
<span class="evaluate_fly">小飞仙:</span>
<span class="evaluate_order">我下单啦查看下</span>
</li>
<li>
<span class="evaluate_fly">小飞仙:</span>
<span class="evaluate_order">我下单啦查看下</span>
</li>
<li>
<span class="evaluate_fly">小飞仙:</span>
<span class="evaluate_order">我下单啦查看下</span>
</li>
</ul>
</div>
<ul class="commodity">
<li>
<img src="./img/shop.png" alt="">
<div class="brand">品牌经典多…</div>
<div class="sinze">¥160.00</div>
</li>
<li>
<img src="./img/shop.png" alt="">
<div class="brand">品牌经典多…</div>
<div class="sinze">¥160.00</div>
</li>
<li>
<img src="./img/shop.png" alt="">
<div class="brand">品牌经典多…</div>
<div class="sinze">¥160.00</div>
</li>
<li>
<img src="./img/shop.png" alt="">
<div class="brand">品牌经典多…</div>
<div class="sinze">¥160.00</div>
</li>
</ul>
</div>
<div class="footer">
<div class="footer_left">
<img src="./img/礼物 活动.png" alt="">
</div>
<input type="text" value="说些什么...">
<ul class="footer_right">
<li><img src="./img/return.png" alt=""></li>
<li><img src="./img/爱心 (1).png" alt=""></li>
<li><img src="./img/开关.png" alt=""></li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,14 @@
window.onload = function(){
/*720代表设计师给的设计稿的宽度,你的设计稿是多少,就写多少;100代表换算比例,这里写100是
为了以后好算,比如,你测量的一个宽度是100px,就可以写为1rem,以及1px=0.01rem等等*/
getRem(720,100)
};
window.onresize = function(){
getRem(720,100)
};
function getRem(pwidth,prem){
var html = document.getElementsByTagName("html")[0];
var oWidth = document.body.clientWidth || document.documentElement.clientWidth;
html.style.fontSize = oWidth/pwidth*prem + "px";
}

View File

@@ -0,0 +1,122 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
* {
list-style: none;
margin: 0px;
padding: 0px;
}
</style>
<body>
<input type="text" placeholder="请输入关键字">
<ul>
</ul>
</body>
<script>
// var keyword = ['今天天气不好', '今天很开心', '大事不好', '我不开心', '天气很一般'];
// var newWord = [];
// $("input").oninput = function () {
// if ($("input").value.length != 0) {
// newWord = []
// keyword.forEach(function (v) {
// if (v.includes($("input").value)) {
// var news =v.replaceAll(
// $("input").value,
// `<span style="color:red;">${ $("input").value}</span>`
// )
// newWord.push(news)
// }
// });
// renderLi()
// }
// }
// function renderLi() {
// $("ul").innerHTML = ""
// newWord.forEach(function (v) {
// $("ul").innerHTML +=`<li>${v}</li>`
// })
// }
// var keyword = ['科比', '科比球星', '詹姆斯', '詹姆斯球星', '科比不错', '詹姆斯不错', '霍华德', '霍华德球星', '霍华德不错']
// var newWord = []
// $("input").oninput = function () {
// if ($("input").value.length != 0) {
// newWord = []
// keyword.forEach(function (v) {
// if (v.includes($("input").value)) {
// var news=v.replaceAll(
// $("input").value,
// `<span style="color:blue;">${$("input").value}</span>`
// )
// newWord.push(news)
// }
// });
// dis()
// }
// }
// function dis() {
// $("ul").innerHTML=""
// newWord.forEach(function (v) {
// $("ul").innerHTML+=`<li>${v}</li>`
// })
// }
var keyword = ['科比', '科比球星', '詹姆斯', '詹姆斯球星', '科比不错', '詹姆斯不错', '霍华德', '霍华德球星', '霍华德不错']
var newWord = []
$("input").oninput=function () {
if ($("input").value.length !=0) {
newWord = []
keyword.forEach(function (v) {
if (v.includes($("input").value)) {
var news=v.replaceAll(
$("input").value,
`<span style="color:red;">${$("input").value}</span>`
)
newWord.push(news)
}
});
app ()
}
}
function app () {
$("ul").innerHTML=""
newWord.forEach(function (v) {
$("ul").innerHTML+= `<li>${v}</li>`
})
}
function $(className) {
return document.querySelector(className)
}
</script>
</html>

View File

@@ -0,0 +1,225 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
list-style: none;
}
.tabs_title {
display: flex;
}
.tabs_title li {
margin-right: 10px;
}
.active_title {
color: red;
}
.tabs_content li {
display: none;
}
.active_content {
display: inline-block !important;
}
</style>
</head>
<body>
<ul class="tabs_title">
</ul>
<ul class="tabs_content">
</ul>
<script>
var tabsData=[
{
title:"搞笑",
content:[
{ text:"搞笑的内容1"},
{ text:"搞笑的内容2"},
{ text:"搞笑的内容3"},
]
},
{
title:"娱乐",
content:[
{ text:"娱乐的内容1"},
{ text:"娱乐的内容2"},
{ text:"娱乐的内容3"},
]
},
{
title:"动漫",
content:[
{ text:"动漫的内容1"},
{ text:"动漫的内容2"},
{ text:"动漫的内容3"},
]
},
{
title:"军事",
content:[
{ text:"军事的内容1"},
{ text:"军事的内容2"},
{ text:"军事的内容3"},
]
}
]
function titleApp() {
tabsData.forEach(function (v,i) {
$(".tabs_title").innerHTML +=`<li class="${i==0 ? 'active_title' : ''}">${v.title}</li>`;
$(".tabs_content").innerHTML +=`<li class="${i==0 ? 'active_content' : ''}">
${
v.content.map(function (item, index) {
return `<p>${item.text}</p>`
}).toString().replaceAll(",", "")
}
</li>`;
});
BindEvent()
}
function BindEvent() {
var titleArr = document.querySelectorAll(".tabs_title li");
var contentArr = document.querySelectorAll(".tabs_content li");
titleArr.forEach(function (v,i) {
v.onclick = function () {
// 批量的类名清除操作
titleArr.forEach(function (item,index) {
// 清除标题
item.className = ""
// 清除内容的类名
contentArr[index].className = ""
});
this.className = "active_title"
contentArr[i].className = "active_content"
}
});
}
titleApp()
function $(className) {
return document.querySelector(className)
}
// function rendderTitle() {
// tabsData.forEach( function (v,i) {
// $(".tabs_title").innerHTML +=` <li class="${i ==0 ? 'active_title' : ''}">${v.title}</li>`;
// $(".tabs_content").innerHTML +=`
// <li class="${ i==0 ?'active_content' : ''}">
// ${
// v.content.map(function (iteam, index) {
// return `<p>${iteam.text}</p>`
// }).toString().replaceAll(",","")
// }
// </li>`;
// })
// BindEvent();
// };
// function BindEvent() {
// var titleArr = document.querySelectorAll(".tabs_title li");
// var contentArr = document.querySelectorAll(".tabs_content li");
// titleArr.forEach(function (v,i) {
// v.onclick = function () {
// // 批量的类名清除操作
// titleArr.forEach(function (item,index) {
// // 清除标题
// item.className = ""
// // 清除内容的类名
// contentArr[index].className = ""
// });
// this.className = "active_title"
// contentArr[i].className = "active_content"
// }
// });
// }
// rendderTitle()
// function titleCl() {
// tabsData.forEach( function (v, i) {
// $(".tabs_title").innerHTML += `<li class="${ i==0 ? 'active_title' : '' }">${v.title}</li>`;
// $(".tabs_content").innerHTML += `<li class="${ i==0 ? 'active_content' : '' }">
// ${
// v.content.map(function (item, index) {
// return `<p>${item.text}</p>`
// }).toString().replaceAll(",","")
// }
// </li>`;
// });
// BindEvent()
// }
// function BindEvent() {
// var titleArr = document.querySelectorAll(".tabs_title li");
// var contentArr = document.querySelectorAll(".tabs_content li");
// titleArr.forEach(function (v,i) {
// v.onclick = function () {
// // 批量的类名清除操作
// titleArr.forEach(function (item,index) {
// // 清除标题
// item.className = ""
// // 清除内容的类名
// contentArr[index].className = ""
// });
// this.className = "active_title"
// contentArr[i].className = "active_content"
// }
// });
// }
// titleCl()
// function $(className) {
// return document.querySelector(className)
// }
</script>
</body>
</html>

View File

@@ -0,0 +1,8 @@
定义一个text数组用来存放数据
定义一个函数用来获取当前页面的宽高,屏幕中心店坐标
定义一个函数随机产生X,Y坐标
系统随机产生一个X轴坐标,将随机产生的X坐标与当前屏幕宽度的一半作比较,
如果X大于当前屏幕宽度的一半在右半边准备弹出,小于在左半边,
系统随机产生一个Y轴坐标,将随机产生的X坐标与当前屏幕的高度一半作比较,
如果Y大于当前屏幕高度的一半在上方准备弹出,小于在中心点下方
系统随机产生的X,y轴坐标赋值给<span></span>

View File

@@ -0,0 +1,14 @@
body,p,ul,li,h1,h2,h3,h4,h5,h6,input{
margin: 0;
padding: 0;
border: none;
}
li {
list-style: none;
}
a{
text-decoration: none;
color: #000;
}

View File

@@ -0,0 +1,262 @@
.header{
width: 100%;
height: 72px;
}
.header_cengter{
width: 1200px;
height: 72px;
margin: auto;
position: relative;
}
.cengter{
width: 100%;
float: left;
}
.center_left{
margin-top: 19.5px;
width: 148px;
height: 33px;
}
.header_cengter a{}
.header_cengter img{
width: 148px;
height: 33px;
}
.center_serch{
width: 500px;
height: 38px;
background-color: #f5f5f5;
border-radius: 19px;
margin: auto;
/* margin-top: 17px; */
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
}
.center_serch input{
width: 500px;
height: 38px;
border: none;
padding-left: 20px;
border-radius: 19px;
border: 1px solid transparent;
background-color: transparent;
box-sizing: border-box;
position: relative;
}
.serch_right{
width: 80px;
height: 38px;
background-color: red;
color: #fff;
border-top-right-radius: 19px;
border-bottom-right-radius: 19px;
font-weight: 600;text-align: center;
position: absolute;
right: 0;
top: 0;
}
.serch_right i{
font-weight: 400;
vertical-align: middle;
background-size: contain;
}
.serch_right a{
line-height: 38px;
color: #fff;
text-align: center;
font-size: 14px;
}
.center_right{
width: 230px;
height: 72px;
position: absolute;
right: 0;
top: 0;
}
.center_right .list{
width: 230px;
height: 72px;
}
.center_right .list li:last-child{
margin-right: 0px !important;
}
.center_right .list li{
float: left;
padding: 15.5px 0;
margin-right: 12px;
min-width: 48px;
}
.center_right .list li a{
display: block;
text-align: center;
}
.center_right .list li a i{
font-size: 24px;
color: #b3b3b3;
}
.center_right .list li a p{
font-size: 12px;
color: #b3b3b3;
}
.center_right .list li a img{
width: 40px;
height: 40px;
border-radius: 50%;
}
.content{
height: 40px;
width: 100%;
}
.content .content_menu{
background-color: #f7f7f7;
height: 40px;
width: 100%;
}
.content .content_menu ul{
width: 1200px;
height: 100%;
margin: 0 auto;
position: relative;
}
.menu_list li{
float: left;
width: 75px;
height: 100%;
line-height: 40px;
text-align: center;
}
.menu_list li a{
width: 100%;
height: 100%;
color: #000;
display: block;
}
.menu_list li a:hover{
color: red;
border-bottom:2px solid red ;
}
.menu_list li:hover .menu_list_li{
display: block;
background-color: white;
}
.menu_list_li{
display: none;
position: relative;
right: 600px;
top:0px;
}
.content_center{
margin-top: 24px;
}
.center_top{
width: 1200px;
height: 266px;
/* background-color: red; */
margin: 0 auto;
}
.center_top_banner{
width: 471px;
height: 266px;
margin-right: 16px;
float: left;
}.center_top_banner img{
width: 471px;
height: 266px;
border-radius: 5px;
}
.center_top_right{
width: 713px;
height: 262px;
float: left;
}
.right_menu{}
.right_menu li{
width: 227px;
height: 128px;
margin-right: 10px;
margin-bottom: 10px;
border-radius: 5px;
float: left;
/* 右侧对不齐 */
}
.right_menu li img{
display: block;
width: 227px;
height: 128px;
}
.center_bottom{
width: 1200px;
height: 272px;
margin: 0 auto;
margin-top: 24px;
box-sizing: border-box;
}
.bottom_menu{
width: 1200px;
height: 28px;
}
.menu_left::before{
content: "";
width: 0.5px;
height: 18px;
background-color: red;
display: inline-block;
margin: auto;
padding-right: 4px;
}
.menu_left{
width: 68px;
height: 28px;
float: left;
}
.menu_left span{
font-size: 28px;
text-align: center;
}
.menu_right{
width: 60px;px;
height: 28px;
}
.menu_right a{
color: #888;
}
.menu_right span{}
.menu_right i{}
.bottom_text{
width: 1200px;
height: 202px;
margin-top: 18px;
}
.bottom_text .card{
width: 100%;
height: 100%;
}
.bottom_text .card li{
float: left;
margin: 0 13px 13px 0;
}
.bottom_text .card li img{
width: 227px;
border-radius: 5px;
}
.bottom_text .card li:last-child{
margin-right: 0px;
}

View File

@@ -0,0 +1,11 @@
.left{
float: left;
}
.right{
float: right;
}
.hidden{
overflow: hidden;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,14 @@
body,p,ul,li,h1,h2,h3,h4,h5,h6,input{
margin: 0;
padding: 0;
border: none;
}
li {
list-style: none;
}
a{
text-decoration: none;
color: #000;
}

View File

@@ -0,0 +1,169 @@
.header_top{
width: 100%;
height: 45px;
position: fixed;
top: 0px;
left: 0px;
/* background-image: url(../img/beijing.png); */
}
.header{
width: 100%;
height:230px;
background-image: url(../img/beijing.png);
padding-top: 35px;
background-size: cover;
}
.header_none{
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 21.5px;
}
.header .header_text {
display: flex;
align-items: center;
font-size: 18px;
color: #ffffff;
}
.header .header_text .header_text_circle{
padding-right: 18.5px;
}
.header .header_text .header_text_nearby{}
.header .header_img{
width: 28px;
height: 21.5px;
}
.content{
width: 100%;
display: flex;
margin-top: 21px;
padding-left: 12px;
box-sizing: border-box;
}
.content .content_info{
width: 43px;
height: 43px;
}
.content .content_right{
padding-left: 11px;
}
.content .content_right .content_right_title{
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 11.5px;
}
.right_title_shop{
font-size: 15px;
color: #5a6f92;
}
.right_title_distance{
padding-right: 24px;
font-size: 12px;
color: #999999;
}
.content .content_right .content_right_text{
font-size: 12px;
line-height: 18px;
color: #686868;
padding-right: 21.5px;
margin-bottom: 13px;
}
.content .content_right .content_right_img{
margin-bottom: 11px;
display: flex;
justify-content: space-around;
padding-right: 20.5px;
}
.content .content_right .content_right_img img{
width: 92.5px;
height: 92.5px;
}
.content_right_time{
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 28.5px;
margin-bottom: 18px;
}
.content_right_time .content_right_time_branch{
font-size: 12px;
color: #989898;
}
.content_right_time .content_right_time_text{
font-size: 10px;
color: #989898;
}
.content_right_time_img{
width: 17px;
height: 13px;
background-color: #f1f1f1;
}
.content_right_comment{
/* padding-left: 63px;
padding-right: 27px; */
background: #f7f7f7;
padding-left: 14px;
margin-right: 27px;
}
.content_right_comment .comment_name{
height: 37px;
line-height: 37px;
border-bottom: 1px #141414;
}
.comment_name .comment_name_img{
width: 14.5px;
height: 13px;
}
.comment_name .comment_name_fist{
font-size: 15px;
color: #5a6f92;
}
.comment_text li{
height: 30.25px;
line-height: 30.25px;
}
.comment_text .comment_name_fist{
font-size: 15px;
color: #5a6f92;
}
.comment_name .comment_name_symbol{}
.comment_text .comment_name_marvellous{
font-size: 15px;
color: #0e0e0e;
}
.content_right_comment .comment_text{
/* height: 59.5px; */
}
.footer {
width: 100%;
height: 50px;
background: #141414;
position: fixed;
bottom: 0px;
left: 0px;
font-size: 12px;
line-height: 54.167px;
color: #ffffff;
display: flex;
align-items: center;
justify-content: space-around;
}
.footer .footer_home{}
.footer .footer_friend{}
.footer .footer_circle{}
.footer .footerfooter_shopping_home{}
.footer .footer_my{}

View File

@@ -0,0 +1,21 @@
/* 存放使用率高的css代码 */
.left {
float: left;
}
.right {
float: right;
}
.hidden {
overflow: hidden;
}
.center {
width: 1200px;
margin: 0 auto;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,124 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./css/clear.css">
<link rel="stylesheet" href="./css/public.css">
<link rel="stylesheet" href="./css/index.css">
</head>
<body>
<div class="header_top">111111111</div>
<div class="header">
<div class="header_none">
<div></div>
<div class="header_text">
<div class="header_text_circle">圈子</div>
<div class="header_text_nearby">附近</div>
</div>
<img src="./img/cam.png" alt="" class="header_img">
</div>
</div>
<div class="content">
<div><img src="./img/touxiang .png" alt="" class="content_info"></div>
<div class="content_right">
<div class="content_right_title">
<div class="right_title_shop">护肤品专卖店</div>
<div class="right_title_distance">>200km</div>
</div>
<div class="content_right_text">
我亲测好用我亲测好用我亲测好用我亲测好用我亲测好
用我亲测好用我亲测好用我亲测好用我亲测好用我亲好
用我亲测我亲测我亲测我亲测"
</div>
<div class="content_right_img">
<img src="./img/shop.png" alt="">
<img src="./img/shop.png" alt="">
<img src="./img/shop.png" alt="">
</div>
<div class="content_right_time">
<div class="">
<span class="content_right_time_branch">3</span>
<span class="content_right_time_text">分钟前</span>
</div>
<img src="./img/pinglun.png" alt="" class="content_right_time_img">
</div>
<div class="content_right_comment">
<div class="comment_name">
<img src="./img/aixin.png" alt="" class="comment_name_img">
<span class="comment_name_fist">张三</span>
<span class="comment_name_symbol">、</span>
<span class="comment_name_fist">李</span>
</div>
<ul class="comment_text">
<li>
<span class="comment_name_fist">小可</span>
<span class="comment_name_symbol">:</span>
<span class="comment_name_marvellous">精彩</span>
</li>
<li>
<span class="comment_name_fist">小可</span>
<span class="comment_name_symbol">:</span>
<span class="comment_name_marvellous">精彩</span>
</li>
</ul>
</div>
</div>
</div>
<div class="content">
<div><img src="./img/touxiang .png" alt="" class="content_info"></div>
<div class="content_right">
<div class="content_right_title">
<div class="right_title_shop">护肤品专卖店</div>
<div class="right_title_distance">>200km</div>
</div>
<div class="content_right_text">
我亲测好用我亲测好用我亲测好用我亲测好用我亲测好
用我亲测好用我亲测好用我亲测好用我亲测好用我亲好
用我亲测我亲测我亲测我亲测"
</div>
<div class="content_right_img">
<img src="./img/shop.png" alt="">
<img src="./img/shop.png" alt="">
<img src="./img/shop.png" alt="">
</div>
<div class="content_right_time">
<div class="">
<span class="content_right_time_branch">3</span>
<span class="content_right_time_text">分钟前</span>
</div>
<img src="./img/pinglun.png" alt="" class="content_right_time_img">
</div>
<div class="content_right_comment">
<div class="comment_name">
<img src="./img/aixin.png" alt="" class="comment_name_img">
<span class="comment_name_fist">张三</span>
<span class="comment_name_symbol">、</span>
<span class="comment_name_fist">李</span>
</div>
<ul class="comment_text">
<li>
<span class="comment_name_fist">小可</span>
<span class="comment_name_symbol">:</span>
<span class="comment_name_marvellous">精彩</span>
</li>
<li>
<span class="comment_name_fist">小可</span>
<span class="comment_name_symbol">:</span>
<span class="comment_name_marvellous">精彩</span>
</li>
</ul>
</div>
</div>
</div>
<div class="footer">
<div class="footer_home">首页</div>
<div class="footer_friend">好友</div>
<div class="footer_circle">圈子</div>
<div class="footer_shopping ">购物车</div>
<div class="footer_my">我的</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,14 @@
body,p,ul,li,h1,h2,h3,h4,h5,h6,input{
margin: 0;
padding: 0;
border: none;
}
li {
list-style: none;
}
a{
text-decoration: none;
color: #000;
}

View File

@@ -0,0 +1,177 @@
.header{
height: 32px;
width: 100%;
margin-bottom: 15px;
padding-top: 30px;
border-bottom: 1px solid #58bd5a;
}
.header ul{
height: 100%;
float: left;
}
.header ul li{
float: left;
}
.header ul li a{
padding: 0 35px;
font-size: 16px;
}
.header .bookshelf{
float: right;
margin-right: 50px;
}
.header .bookshelf i{}
.header .bookshelf span{}
.logo{
/* padding-left: 10px; */
}
.center{
}
.center img{
height: 280px;
margin-left: 55px;
}
.hundreds{
width: 1090px;
margin: 0 auto;
overflow: hidden;
/* height: 80px; */
box-sizing: border-box;
margin-bottom: 30px;
}
.hundreds>span{
font-size: 16px;
color: #555;
/* vertical-align: top; */
font-weight: 700;
float: left;
padding: 22px 10px 0 0;
}
.hundreds ul{
overflow: hidden;
padding-left: 10px;
box-sizing: border-box;
float: left;
}
.hundreds ul li{
float: left;
margin: 19px 10px 0 0;
height: 32px;
line-height: 30px;
}
.hundreds ul li a{
font-size: 16px;
padding: 3px 15px;
border: 1px solid #d3d3d3;
border-radius: 6px;
}
.hundreds_right{
float: right;
box-sizing: border-box;
margin-top: 25px;
}
.hundreds_right span{
color: #666;
text-decoration: none;
font-size: 14px;
padding-left: 10px;
vertical-align: top;
margin-top: 21px;
}
.hundreds_right i{}
.menu{
width: 1090px;
margin: 0 auto;
overflow: hidden;
}
.menu li{
float: left;
}
.menu li a{}
.menu li a img{
border-radius: 4px;
margin-left: 20px;
}
.mod {
height: 100%;
}
.mod .hot{
width:1090px;
height: 100%;
margin: 0 auto;
box-sizing: border-box;
}
.mod .hot .hot_title{
width: 100%;
padding: 22px 0 5px;
text-align: center;
overflow: hidden;
margin-bottom: 15px;
}
.mod .hot .hot_title >span {
font-size: 24px;
color: #444;
font-weight: 400;
}
.mod .hot .hot_title .title_more{
float: right;
margin-right: 3px;
text-align: center;
margin-top: 7px;
}
.mod .hot .hot_title .title_more span{}
.mod .hot .hot_title .title_more i{}
.hot_title ul{
}
.details li{
float: left;
margin-right: 20px;
text-align: center;
height: 260px;
margin-left: 11px;
margin-bottom: 20px;
}
.details li img{
border-radius: 10px;
}
.details .if{
font-size: 16px;
color: #555;
margin-top: 10px;
margin-bottom: 10px;
}
.details .money{
color: #c97618;
font-size: 14px;
line-height: 23px;
}

View File

@@ -0,0 +1,21 @@
/* 存放使用率高的css代码 */
.left {
float: left;
}
.right {
float: right;
}
.hidden {
overflow: hidden;
}
.center {
width: 1200px;
margin: 0 auto;
}

View File

@@ -0,0 +1,136 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="http://at.alicdn.com/t/font_2919415_shmkzb0eo2l.css">
<link rel="stylesheet" href="./css/clear.css">
<link rel="stylesheet" href="./css/public.css">
<link rel="stylesheet" href="./css/index.css">
</head>
<body>
<div class="logo center">
<div class="header">
<ul>
<li><a href="">首页</a></li>
<li><a href="">分类</a></li>
<li><a href="">榜单</a></li>
<li><a href="">机构专区</a></li>
<li><a href="">客户端</a></li>
</ul>
<div class="bookshelf">
<i class="iconfont icon-biaoqing"></i>
<span>我的书架</span>
</div>
</div>
</div>
<div class="content">
<div class="center">
<img src="https://wkstatic.bdimg.com/static/ydcore/yuedu_index/images/top_bg_907998c.png" class="img_left"
alt="">
<img src="https://edu-yuedu.bdimg.com/v1/RD/%E6%98%A5%E5%A4%8F/%E5%A4%A9%E8%B0%B4%E8%80%85720x285-1545014171754.jpg"
class="img_right" alt="">
</div>
<div class="hundreds ">
<span>分类</span>
<ul>
<li><a href="">成功学</a></li>
<li><a href="">投资理财</a></li>
<li><a href="">人际处事</a></li>
<li><a href="">计算机</a></li>
<li><a href="">人物传记</a></li>
<li><a href="">言情小说</a></li>
<li><a href="">散文随笔</a></li>
<li><a href="">悬疑推理</a></li>
<li><a href="">市场营销</a></li>
</ul>
<div class="hundreds_right">
<span>更多</span>
<i class="iconfont icon-gengduo"></i>
</div>
</div>
<ul class="menu">
<li><a href=""><img
src="https://gss2.baidu.com/9rkZfyqpAA5D8sK8p9iCKT67gB5-reHg-_/v1/topic/bojizhuanqu315x150-1493704323337.jpg"
alt=""></a></li>
<li><a href=""><img src="https://gss2.baidu.com/9rkZfyqpAA5D8sK8p9iCKT67gB5-reHg-_/v1/topic/315X150duke.jpg"
alt=""></a></li>
<li><a href=""><img src="https://gss2.baidu.com/9rkZfyqpAA5D8sK8p9iCKT67gB5-reHg-_/v1/topic/315X150huazhang.jpg"
alt=""></a></li>
</ul>
<div class="mod">
<div class="hot">
<div class="hot_title">
<span>热门推荐</span>
<div class="title_more">
<span>更多</span>
<i class="iconfont icon-gengduo"></i>
</div>
</div>
<div>
<ul class="details">
<li>
<img src="https://wkphoto.cdn.bcebos.com/b17eca8065380cd708275a88a244ad345982819e.jpg@s_0,h_200,w_200"
alt="">
<p class="if">如果没有遇见你</p>
<p class="money">¥17.99</p>
</li>
<li>
<img src="https://wkphoto.cdn.bcebos.com/b17eca8065380cd708275a88a244ad345982819e.jpg@s_0,h_200,w_200"
alt="">
<p class="if">如果没有遇见你</p>
<p class="money">¥17.99</p>
</li>
<li>
<img src="https://wkphoto.cdn.bcebos.com/b17eca8065380cd708275a88a244ad345982819e.jpg@s_0,h_200,w_200"
alt="">
<p class="if">如果没有遇见你</p>
<p class="money">¥17.99</p>
</li>
<li>
<img src="https://wkphoto.cdn.bcebos.com/b17eca8065380cd708275a88a244ad345982819e.jpg@s_0,h_200,w_200"
alt="">
<p class="if">如果没有遇见你</p>
<p class="money">¥17.99</p>
</li>
<li>
<img src="https://wkphoto.cdn.bcebos.com/b17eca8065380cd708275a88a244ad345982819e.jpg@s_0,h_200,w_200"
alt="">
<p class="if">如果没有遇见你</p>
<p class="money">¥17.99</p>
</li>
<li>
<img src="https://wkphoto.cdn.bcebos.com/b17eca8065380cd708275a88a244ad345982819e.jpg@s_0,h_200,w_200"
alt="">
<p class="if">如果没有遇见你</p>
<p class="money">¥17.99</p>
</li>
<li>
<img src="https://wkphoto.cdn.bcebos.com/b17eca8065380cd708275a88a244ad345982819e.jpg@s_0,h_200,w_200"
alt="">
<p class="if">如果没有遇见你</p>
<p class="money">¥17.99</p>
</li>
<li>
<img src="https://wkphoto.cdn.bcebos.com/b17eca8065380cd708275a88a244ad345982819e.jpg@s_0,h_200,w_200"
alt="">
<p class="if">如果没有遇见你</p>
<p class="money">¥17.99</p>
</li>
<li>
<img src="https://wkphoto.cdn.bcebos.com/b17eca8065380cd708275a88a244ad345982819e.jpg@s_0,h_200,w_200"
alt="">
<p class="if">如果没有遇见你</p>
<p class="money">¥17.99</p>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="footer"></div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -0,0 +1,188 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
img {
height: 80px;
position: fixed;
user-select: none;
}
body {
height: 100vh;
}
.hidden {
display: none !important;
}
.popup {
position: fixed;
width: 100%;
height: 100%;
background: rgb(0 0 0 / 57%);
display: flex;
align-items: center;
justify-content: center;
z-index: 99;
}
.popup .center {
width: 400px;
height: 250px;
background: #fff;
position: relative;
}
.popup .center .popup_title {
display: flex;
justify-content: center;
height: 50px;
align-items: center;
border-bottom: 1px solid #eeecec;
box-sizing: border-box;
}
.popup .center .popup_close {
position: absolute;
right: 15px;
top: 5px;
font-size: 24px;
}
.popup .center .popup_body {
padding: 15px;
display: flex;
align-items: center;
height: 200px;
justify-content: center;
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="popup hidden">
<div class="center">
<div class="popup_title">恭喜中奖</div>
<div class="popup_close">x</div>
<div class="popup_body">
</div>
</div>
</div>
<script>
var clientWidth=$("body").clientWidth - 61,
clientHeight=$("body").clientHeight + 80,
createId = null, currendHb = null
function createdHongBao() {
var img=document.createElement("img");
img.src="./hb.png";
img.style.top = "-80px";
img.style.left = `${Math.random() * clientWidth}px`;
img.onclick = () =>{
currendHb = img;
console.log("被点击了")
// clearInterval(img.IntervalId)
_("img").forEach(function (v) {
clearInterval(v.IntervalId)
})
clearInterval(createId)
discount()
$(".popup").classList.remove("hidden")
}
$("body").appendChild(img);
motion(img)
}
//让红包不断移动
function motion(el) {
el.IntervalId = setInterval(() => {
var top = parseInt(el.style.top) + 1;
if (top > clientHeight) {
clearInterval(el.IntervalId)
$("body").removeChild(el)
} else {
el.style.top = `${top}px`
}
}, 6);
}
function discount() {
var news = Math.random();
if (news < 0.1) {
$(".popup_body").innerText = `恭喜中得,1折`
} else if (news >= 0.1 & news < 0.3) {
$(".popup_body").innerText = `恭喜中得,!!`
} else if (news > 0.3) {
$(".popup_body").innerText = `恭喜中得,!!`
}
}
$(".popup_close").onclick = function () {
$(".popup").classList.add("hidden");
$("body").removeChild(currendHb);
_("img").forEach(function (v) {
motion(v)
})
auto();
}
function auto() {
createId = setInterval(function () {
createdHongBao()
},500)
}
auto()
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</body>
</html>

View File

@@ -0,0 +1,12 @@
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}

View File

@@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

View File

@@ -0,0 +1,4 @@
/build/
/config/
/dist/
/*.js

View File

@@ -0,0 +1,29 @@
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint'
},
env: {
browser: true,
},
extends: [
// https://github.com/vuejs/eslint-plugin-vue#priority-a-essential-error-prevention
// consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules.
'plugin:vue/essential',
// https://github.com/standard/standard/blob/master/docs/RULES-en.md
'standard'
],
// required to lint *.vue files
plugins: [
'vue'
],
// add your custom rules here
rules: {
// allow async-await
'generator-star-spacing': 'off',
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}

View File

@@ -0,0 +1,14 @@
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln

View File

@@ -0,0 +1,13 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
"autoprefixer": {},
'postcss-pxtorem': {
rootValue: 37.5,
propList: ['*']
}
}
}

View File

@@ -0,0 +1,21 @@
# my-project
> jhbhbuhbh
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).

View File

@@ -0,0 +1,41 @@
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})

View File

@@ -0,0 +1,54 @@
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,101 @@
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}

View File

@@ -0,0 +1,22 @@
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}

View File

@@ -0,0 +1,102 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
const createLintingRule = () => ({
test: /\.(js|vue)$/,
loader: 'eslint-loader',
enforce: 'pre',
include: [resolve('src'), resolve('test')],
options: {
formatter: require('eslint-friendly-formatter'),
emitWarning: !config.dev.showEslintErrorsInOverlay
}
})
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json', ".less"],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
'@less': resolve('src/assets/less'),
'@page': resolve('src/assets/less/page')
}
},
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.less$/,
loader: "style-loader!css-loader!less-loader"
},
{
test: /\.pug$/,
loader: "pug-loader"
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}

View File

@@ -0,0 +1,95 @@
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const path = require('path')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: {
rewrites: [
{ from: /.*/, to: path.posix.join(config.dev.assetsPublicPath, 'index.html') },
],
},
hot: true,
contentBase: false, // since we use CopyWebpackPlugin.
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)
}
})
})

View File

@@ -0,0 +1,145 @@
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// keep module.id stable when vendor modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig

View File

@@ -0,0 +1,7 @@
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})

View File

@@ -0,0 +1,76 @@
'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
// Use Eslint Loader?
// If true, your code will be linted during bundling and
// linting errors and warnings will be shown in the console.
useEslint: false,
// If true, eslint errors and warnings will also be shown in the error overlay
// in the browser.
showEslintErrorsInOverlay: false,
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'cheap-module-eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
cssSourceMap: true
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
/**
* Source Maps
*/
productionSourceMap: false,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}

View File

@@ -0,0 +1,4 @@
'use strict'
module.exports = {
NODE_ENV: '"production"'
}

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>my-project</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1,83 @@
{
"name": "my-project",
"version": "1.0.0",
"description": "jhbhbuhbh",
"author": "bmy <2271608011@qq.com>",
"private": true,
"scripts": {
"dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
"start": "npm run dev",
"lint": "eslint --ext .js,.vue src",
"build": "node build/build.js"
},
"dependencies": {
"amfe-flexible": "^2.2.1",
"axios": "^0.24.0",
"vant": "^2.12.37",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"videojs-contrib-hls": "^5.15.0",
"vue-video-player": "^5.0.2"
},
"devDependencies": {
"autoprefixer": "^7.1.2",
"babel-core": "^6.22.1",
"babel-eslint": "^8.2.1",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.1",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-plugin-transform-vue-jsx": "^3.5.0",
"babel-preset-env": "^1.3.2",
"babel-preset-stage-2": "^6.22.0",
"chalk": "^2.0.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.0",
"eslint": "^4.15.0",
"eslint-config-standard": "^10.2.1",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-node": "^5.2.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^1.1.4",
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"less": "^4.1.2",
"less-loader": "^4.1.0",
"node-notifier": "^5.1.2",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
"postcss-import": "^11.0.0",
"postcss-loader": "^2.0.8",
"postcss-pxtorem": "^5.1.1",
"postcss-url": "^7.2.1",
"pug": "^3.0.2",
"pug-loader": "^2.4.0",
"rimraf": "^2.6.0",
"semver": "^5.3.0",
"shelljs": "^0.7.6",
"uglifyjs-webpack-plugin": "^1.1.1",
"url-loader": "^0.5.8",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"
},
"engines": {
"node": ">= 6.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
]
}

View File

@@ -0,0 +1,15 @@
<template lang="pug">
#app
router-view(:key="$route.meta.keepAlive ? '' : $route.fullPath")
</template>
<script>
export default {
name: 'App'
}
</script>
<style lang="less">
@import "~@less/_";
</style>

View File

@@ -0,0 +1,4 @@
@import "./mixins/index";
@import "./mixins/normalize";
@import "./mixins/reset";
@import "./config/color";

View File

@@ -0,0 +1,304 @@
@red50: #ffebee;
@red100: #ffcdd2;
@red200: #ef9a9a;
@red300: #e57373;
@red400: #ef5350;
@red500: #f44336;
@red600: #e53935;
@red700: #d32f2f;
@red800: #c62828;
@red900: #b71c1c;
@redA100: #ff8a80;
@redA200: #ff5252;
@redA400: #ff1744;
@redA700: #d50000;
@red: @red500;
@pink50: #fce4ec;
@pink100: #f8bbd0;
@pink200: #f48fb1;
@pink300: #f06292;
@pink400: #ec407a;
@pink500: #e91e63;
@pink600: #d81b60;
@pink700: #c2185b;
@pink800: #ad1457;
@pink900: #880e4f;
@pinkA100: #ff80ab;
@pinkA200: #ff4081;
@pinkA400: #f50057;
@pinkA700: #c51162;
@pink: @pink500;
@purple50: #f3e5f5;
@purple100: #e1bee7;
@purple200: #ce93d8;
@purple300: #ba68c8;
@purple400: #ab47bc;
@purple500: #9c27b0;
@purple600: #8e24aa;
@purple700: #7b1fa2;
@purple800: #6a1b9a;
@purple900: #4a148c;
@purpleA100: #ea80fc;
@purpleA200: #e040fb;
@purpleA400: #d500f9;
@purpleA700: #aa00ff;
@purple: @purple500;
@deepPurple50: #ede7f6;
@deepPurple100: #d1c4e9;
@deepPurple200: #b39ddb;
@deepPurple300: #9575cd;
@deepPurple400: #7e57c2;
@deepPurple500: #673ab7;
@deepPurple600: #5e35b1;
@deepPurple700: #512da8;
@deepPurple800: #4527a0;
@deepPurple900: #311b92;
@deepPurpleA100: #b388ff;
@deepPurpleA200: #7c4dff;
@deepPurpleA400: #651fff;
@deepPurpleA700: #6200ea;
@deepPurple: @deepPurple500;
@indigo50: #e8eaf6;
@indigo100: #c5cae9;
@indigo200: #9fa8da;
@indigo300: #7986cb;
@indigo400: #5c6bc0;
@indigo500: #3f51b5;
@indigo600: #3949ab;
@indigo700: #303f9f;
@indigo800: #283593;
@indigo900: #1a237e;
@indigoA100: #8c9eff;
@indigoA200: #536dfe;
@indigoA400: #3d5afe;
@indigoA700: #304ffe;
@indigo: @indigo500;
@blue50: #e3f2fd;
@blue100: #bbdefb;
@blue200: #90caf9;
@blue300: #64b5f6;
@blue400: #42a5f5;
@blue500: #2196f3;
@blue600: #1e88e5;
@blue700: #1976d2;
@blue800: #1565c0;
@blue900: #0d47a1;
@blueA100: #82b1ff;
@blueA200: #448aff;
@blueA400: #2979ff;
@blueA700: #2962ff;
@blue: @blue500;
@lightBlue50: #e1f5fe;
@lightBlue100: #b3e5fc;
@lightBlue200: #81d4fa;
@lightBlue300: #4fc3f7;
@lightBlue400: #29b6f6;
@lightBlue500: #03a9f4;
@lightBlue600: #039be5;
@lightBlue700: #0288d1;
@lightBlue800: #0277bd;
@lightBlue900: #01579b;
@lightBlueA100: #80d8ff;
@lightBlueA200: #40c4ff;
@lightBlueA400: #00b0ff;
@lightBlueA700: #0091ea;
@lightBlue: @lightBlue500;
@cyan50: #e0f7fa;
@cyan100: #b2ebf2;
@cyan200: #80deea;
@cyan300: #4dd0e1;
@cyan400: #26c6da;
@cyan500: #00bcd4;
@cyan600: #00acc1;
@cyan700: #0097a7;
@cyan800: #00838f;
@cyan900: #006064;
@cyanA100: #84ffff;
@cyanA200: #18ffff;
@cyanA400: #00e5ff;
@cyanA700: #00b8d4;
@cyan: @cyan500;
@teal50: #e0f2f1;
@teal100: #b2dfdb;
@teal200: #80cbc4;
@teal300: #4db6ac;
@teal400: #26a69a;
@teal500: #009688;
@teal600: #00897b;
@teal700: #00796b;
@teal800: #00695c;
@teal900: #004d40;
@tealA100: #a7ffeb;
@tealA200: #64ffda;
@tealA400: #1de9b6;
@tealA700: #00bfa5;
@teal: @teal500;
@green50: #e8f5e9;
@green100: #c8e6c9;
@green200: #a5d6a7;
@green300: #81c784;
@green400: #66bb6a;
@green500: #4caf50;
@green600: #43a047;
@green700: #388e3c;
@green800: #2e7d32;
@green900: #1b5e20;
@greenA100: #b9f6ca;
@greenA200: #69f0ae;
@greenA400: #00e676;
@greenA700: #00c853;
@green: @green500;
@lightGreen50: #f1f8e9;
@lightGreen100: #dcedc8;
@lightGreen200: #c5e1a5;
@lightGreen300: #aed581;
@lightGreen400: #9ccc65;
@lightGreen500: #8bc34a;
@lightGreen600: #7cb342;
@lightGreen700: #689f38;
@lightGreen800: #558b2f;
@lightGreen900: #33691e;
@lightGreenA100: #ccff90;
@lightGreenA200: #b2ff59;
@lightGreenA400: #76ff03;
@lightGreenA700: #64dd17;
@lightGreen: @lightGreen500;
@lime50: #f9fbe7;
@lime100: #f0f4c3;
@lime200: #e6ee9c;
@lime300: #dce775;
@lime400: #d4e157;
@lime500: #cddc39;
@lime600: #c0ca33;
@lime700: #afb42b;
@lime800: #9e9d24;
@lime900: #827717;
@limeA100: #f4ff81;
@limeA200: #eeff41;
@limeA400: #c6ff00;
@limeA700: #aeea00;
@lime: @lime500;
@yellow50: #fffde7;
@yellow100: #fff9c4;
@yellow200: #fff59d;
@yellow300: #fff176;
@yellow400: #ffee58;
@yellow500: #ffeb3b;
@yellow600: #fdd835;
@yellow700: #fbc02d;
@yellow800: #f9a825;
@yellow900: #f57f17;
@yellowA100: #ffff8d;
@yellowA200: #ffff00;
@yellowA400: #ffea00;
@yellowA700: #ffd600;
@yellow: @yellow500;
@amber50: #fff8e1;
@amber100: #ffecb3;
@amber200: #ffe082;
@amber300: #ffd54f;
@amber400: #ffca28;
@amber500: #ffc107;
@amber600: #ffb300;
@amber700: #ffa000;
@amber800: #ff8f00;
@amber900: #ff6f00;
@amberA100: #ffe57f;
@amberA200: #ffd740;
@amberA400: #ffc400;
@amberA700: #ffab00;
@amber: @amber500;
@orange50: #fff3e0;
@orange100: #ffe0b2;
@orange200: #ffcc80;
@orange300: #ffb74d;
@orange400: #ffa726;
@orange500: #ff9800;
@orange600: #fb8c00;
@orange700: #f57c00;
@orange800: #ef6c00;
@orange900: #e65100;
@orangeA100: #ffd180;
@orangeA200: #ffab40;
@orangeA400: #ff9100;
@orangeA700: #ff6d00;
@orange: @orange500;
@deepOrange50: #fbe9e7;
@deepOrange100: #ffccbc;
@deepOrange200: #ffab91;
@deepOrange300: #ff8a65;
@deepOrange400: #ff7043;
@deepOrange500: #ff5722;
@deepOrange600: #f4511e;
@deepOrange700: #e64a19;
@deepOrange800: #d84315;
@deepOrange900: #bf360c;
@deepOrangeA100: #ff9e80;
@deepOrangeA200: #ff6e40;
@deepOrangeA400: #ff3d00;
@deepOrangeA700: #dd2c00;
@deepOrange: @deepOrange500;
@brown50: #efebe9;
@brown100: #d7ccc8;
@brown200: #bcaaa4;
@brown300: #a1887f;
@brown400: #8d6e63;
@brown500: #795548;
@brown600: #6d4c41;
@brown700: #5d4037;
@brown800: #4e342e;
@brown900: #3e2723;
@brown: @brown500;
@blueGrey50: #eceff1;
@blueGrey100: #cfd8dc;
@blueGrey200: #b0bec5;
@blueGrey300: #90a4ae;
@blueGrey400: #78909c;
@blueGrey500: #607d8b;
@blueGrey600: #546e7a;
@blueGrey700: #455a64;
@blueGrey800: #37474f;
@blueGrey900: #263238;
@blueGrey: @blueGrey500;
@grey50: #fafafa;
@grey100: #f5f5f5;
@grey200: #eeeeee;
@grey300: #e0e0e0;
@grey400: #bdbdbd;
@grey500: #9e9e9e;
@grey600: #757575;
@grey700: #616161;
@grey800: #424242;
@grey900: #212121;
@grey: @grey500;
@black: #000000;
@white: #ffffff;
@transparent: rgba(0, 0, 0, 0);
@fullBlack: rgba(0, 0, 0, 1);
@darkBlack: rgba(0, 0, 0, 0.87);
@lightBlack: rgba(0, 0, 0, 0.54);
@minBlack: rgba(0, 0, 0, 0.26);
@faintBlack: rgba(0, 0, 0, 0.12);
@fullWhite: rgba(255, 255, 255, 1);
@darkWhite: rgba(255, 255, 255, 0.87);
@lightWhite: rgba(255, 255, 255, 0.54);

View File

@@ -0,0 +1,310 @@
.transition(@d) {
-webkit-transition-duration: @d;
transition-duration: @d;
}
.delay(@d) {
-webkit-transition-delay: @d;
transition-delay: @d;
}
.transform(@t) {
-webkit-transform: @t;
transform: @t;
}
.transform-origin(@to) {
-webkit-transform-origin: @to;
transform-origin: @to;
}
.translate3d(@x:0, @y:0, @z:0) {
-webkit-transform: translate3d(@x,@y,@z);
transform: translate3d(@x,@y,@z);
}
.animation (@a) {
-webkit-animation: @a;
animation: @a;
}
.scrollable() {
overflow: auto;
-webkit-overflow-scrolling: touch;
}
.flex-shrink(@fs) {
-webkit-box-flex: @fs;
-webkit-flex-shrink: @fs;
-ms-flex: 0 @fs auto;
flex-shrink: @fs;
}
.clearfix() {
&:after,
&:before {
content: " ";
display: table;
}
&:after {
clear: both;
}
}
.hairline(@position, @color) when (@position = top) {
&:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: auto;
right: auto;
height: 1px;
width: 100%;
background-color: @color;
display: block;
z-index: 15;
// .transform-origin(50% 0%);
html.pixel-ratio-2 & {
.transform(scaleY(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleY(0.33));
}
}
}
.hairline(@position, @color) when (@position = left) {
&:before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: auto;
right: auto;
width: 1px;
height: 100%;
background-color: @color;
display: block;
z-index: 15;
// .transform-origin(0% 50%);
html.pixel-ratio-2 & {
.transform(scaleX(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleX(0.33));
}
}
}
.hairline(@position, @color) when (@position = bottom) {
&:after {
content: '';
position: absolute;
left: 0;
bottom: 0;
right: auto;
top: auto;
height: 1px;
width: 100%;
background-color: @color;
display: block;
z-index: 15;
html.pixel-ratio-2 & {
.transform(scaleY(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleY(0.33));
}
}
}
.hairline(@position, @color) when (@position = right) {
&:after {
content: '';
position: absolute;
right: 0;
top: 0;
left: auto;
bottom: auto;
width: 1px;
height: 100%;
background-color: @color;
display: block;
z-index: 15;
// .transform-origin(100% 50%);
html.pixel-ratio-2 & {
.transform(scaleX(0.5));
}
html.pixel-ratio-3 & {
.transform(scaleX(0.33));
}
}
}
// For right and bottom
.hairline-remove(@position) when not (@position = left) and not (@position = top) {
&:after {
display: none;
}
}
// For left and top
.hairline-remove(@position) when not (@position = right) and not (@position = bottom) {
&:before {
display: none;
}
}
// For right and bottom
.hairline-color(@position, @color) when not (@position = left) and not (@position = top) {
&:after {
background-color: @color;
}
}
// For left and top
.hairline-color(@position, @color) when not (@position = right) and not (@position = bottom) {
&:before {
background-color: @color;
}
}
// Encoded SVG Background
.encoded-svg-background(@svg) {
@url: `encodeURIComponent(@{svg})`;
background-image: url("data:image/svg+xml;charset=utf-8,@{url}");
}
// Preserve3D
.preserve3d() {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
}
// Shadow
.depth(@level:1) {
& when (@level = 0) {
box-shadow: none;
}
& when (@level = 1) {
box-shadow: 0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);
}
& when (@level = 2) {
box-shadow: 0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);
}
& when (@level = 3) {
box-shadow: 0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);
}
& when (@level = 4) {
box-shadow: 0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);
}
& when (@level = 5) {
box-shadow: 0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12);
}
& when (@level = 6) {
box-shadow: 0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);
}
& when (@level = 7) {
box-shadow: 0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);
}
& when (@level = 8) {
box-shadow: 0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);
}
& when (@level = 9) {
box-shadow: 0 5px 6px -3px rgba(0,0,0,.2),0 9px 12px 1px rgba(0,0,0,.14),0 3px 16px 2px rgba(0,0,0,.12);
}
& when (@level = 10) {
box-shadow: 0 6px 6px -3px rgba(0,0,0,.2),0 10px 14px 1px rgba(0,0,0,.14),0 4px 18px 3px rgba(0,0,0,.12);
}
& when (@level = 11) {
box-shadow: 0 6px 7px -4px rgba(0,0,0,.2),0 11px 15px 1px rgba(0,0,0,.14),0 4px 20px 3px rgba(0,0,0,.12);
}
& when (@level = 12) {
box-shadow: 0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12);
}
& when (@level = 13) {
box-shadow: 0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12);
}
& when (@level = 14) {
box-shadow: 0 7px 9px -4px rgba(0,0,0,.2),0 14px 21px 2px rgba(0,0,0,.14),0 5px 26px 4px rgba(0,0,0,.12);
}
& when (@level = 15) {
box-shadow: 0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12);
}
& when (@level = 16) {
box-shadow: 0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12);
}
& when (@level = 17) {
box-shadow: 0 8px 11px -5px rgba(0,0,0,.2),0 17px 26px 2px rgba(0,0,0,.14),0 6px 32px 5px rgba(0,0,0,.12);
}
& when (@level = 18) {
box-shadow: 0 9px 11px -5px rgba(0,0,0,.2),0 18px 28px 2px rgba(0,0,0,.14),0 7px 34px 6px rgba(0,0,0,.12);
}
& when (@level = 19) {
box-shadow: 0 9px 12px -6px rgba(0,0,0,.2),0 19px 29px 2px rgba(0,0,0,.14),0 7px 36px 6px rgba(0,0,0,.12);
}
& when (@level = 20) {
box-shadow: 0 10px 13px -6px rgba(0,0,0,.2),0 20px 31px 3px rgba(0,0,0,.14),0 8px 38px 7px rgba(0,0,0,.12);
}
& when (@level = 21) {
box-shadow: 0 10px 13px -6px rgba(0,0,0,.2),0 21px 33px 3px rgba(0,0,0,.14),0 8px 40px 7px rgba(0,0,0,.12);
}
& when (@level = 22) {
box-shadow: 0 10px 14px -6px rgba(0,0,0,.2),0 22px 35px 3px rgba(0,0,0,.14),0 8px 42px 7px rgba(0,0,0,.12);
}
& when (@level = 23) {
box-shadow: 0 11px 14px -7px rgba(0,0,0,.2),0 23px 36px 3px rgba(0,0,0,.14),0 9px 44px 8px rgba(0,0,0,.12);
}
& when (@level = 24) {
box-shadow: 0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12);
}
// & when (@level = 1) {
// box-shadow: rgba(0, 0, 0, 0.117647) 0px 1px 6px, rgba(0, 0, 0, 0.117647) 0px 1px 4px;
// }
// & when (@level = 2) {
// box-shadow: rgba(0, 0, 0, 0.156863) 0px 3px 10px, rgba(0, 0, 0, 0.227451) 0px 3px 10px;
// }
// & when (@level = 3) {
// box-shadow: rgba(0, 0, 0, 0.188235) 0px 10px 30px, rgba(0, 0, 0, 0.227451) 0px 6px 10px;
// }
// & when (@level = 4) {
// box-shadow: rgba(0, 0, 0, 0.247059) 0px 14px 45px, rgba(0, 0, 0, 0.219608) 0px 10px 18px;
// }
// & when (@level = 5) {
// box-shadow: rgba(0, 0, 0, 0.298039) 0px 19px 60px, rgba(0, 0, 0, 0.219608) 0px 15px 20px;
// }
}
// Highlighted Links
.active-highlight(@color:rgba(255, 255, 255, 0.15)){
&:before {
content: '';
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
background-color: @color;
background-repeat: no-repeat;
background-position: center;
background-size: 100% 100%;
opacity: 0;
pointer-events: none;
.transition(600ms);
}
&.active-state:before,
html:not(.watch-active-state) &:active:before {
opacity: 1;
.transition(150ms);
}
}
.active-highlight-color(@color) {
&:before {
background-image: -webkit-radial-gradient(center, circle cover, @color 66%, rgba(red(@color),green(@color),blue(@color),0) 66%);
background-image: radial-gradient(circle at center, @color 66%, rgba(red(@color),green(@color),blue(@color),0) 66%);
}
}
// No Scrollbar
.no-scrollbar() {
&::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
opacity: 0 !important;
}
}
.ellipsis() {
white-space:nowrap;
text-overflow:ellipsis;
overflow:hidden;
word-wrap: break-word;
}

View File

@@ -0,0 +1,418 @@
.content {
padding-top: 1.333rem !important;
}
body,ul,li,h1,h2,h3,h4,h5,h6,p {
margin: 0;
padding: 0;
list-style: none;
}
a {
text-decoration: none;
}
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* HTML5 display definitions
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
* 2. Add the correct display in IE.
*/
article,
aside,
details, /* 1 */
figcaption,
figure,
footer,
header,
main, /* 2 */
menu,
nav,
section,
summary { /* 1 */
display: block;
}
/**
* Add the correct display in IE 9-.
*/
audio,
canvas,
progress,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Add the correct display in IE 10-.
* 1. Add the correct display in IE.
*/
template, /* 1 */
[hidden] {
display: none;
}
/* Links
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/* Forms
========================================================================== */
/**
* 1. Change font properties to `inherit` in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
select,
textarea {
font: inherit; /* 1 */
margin: 0; /* 2 */
}
/**
* Restore the font weight unset by the previous rule.
*/
optgroup {
font-weight: bold;
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Correct the text style of placeholders in Chrome, Edge, and Safari.
*/
::-webkit-input-placeholder {
color: inherit;
opacity: 0.54;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}

View File

@@ -0,0 +1,15 @@
.vjs-big-play-button {
position: absolute;
left: 50% !important;
top: 50% !important;
transform: translate(-50%,-50%) !important;
}
/deep/ .van-tabs__wrap {
position: fixed;
width: 100%;
top: 0;
left: 0;
right: 0;
z-index: 999;
}

View File

@@ -0,0 +1,7 @@
@import "~@less/_";
.home {
h2 {
color: @purple300;
.ellipsis();
}
}

View File

@@ -0,0 +1,41 @@
.newsInfo {
.newsContent {
padding-left: 10px;
margin-top: 1.333rem;
position: relative;
height: 700px;
overflow: hidden;
.title {
font-size: 0.53rem;
font-weight: 500;
}
span {
margin: 0.51rem 0;
font-size: .32rem;
color: #999;
}
.loadMore {
text-align: center;
position: absolute;
bottom: 0;
img {
width: 0.693rem;
height: 0.533rem;
}
.button {
width: 9.36rem;
height: 1.173rem;
background-color: #d0302c;
border-radius: 0.107rem;
line-height: 1.173rem;
}
}
}
.more {
height: auto !important;
}
.hide {
display: none !important;
}
}

View File

@@ -0,0 +1,29 @@
<template lang="pug">
.Live.content
</template>
<script>
export default {
name: 'Live',
data () {
return {
}
},
created () {
},
methods: {
async getIndex () {
}
},
components: {}
}
</script>
<style lang="less" scoped>
// @import "~@page/Live.less";
</style>

View File

@@ -0,0 +1,166 @@
<template lang="pug">
.Radio.content
v-video(ref="video" v-if="videoUrl.length != 0" :url="videoUrl" :show="false")
.radio_title {{ RadioList.title }}
img.preview(:src="RadioList.frontcover")
img.gif(:src="isPlay ? '../../static/img/sound_spectrum.gif' : '../../static/img/sound_spectrum.png' ")
ul.list
li(@click="getRadio")
img(src="../../static/img/live_broadcast_icon.png")
p 当前直播
li(@click="playVideo")
img(:src="isPlay ? '../../static/img/radio_stop.png' : '../../static/img/radio_up.png' ")
li(@click="getMenuList")
img(src="../../static/img/program_list_icon.png")
p 节目列表
van-popup(class="program", v-model='isShow', position='bottom', :style="{ height: '70%' }")
.title 节目单
ul.program_list
li(v-for="(item,index) in MenuList" :key="index")
.program_left
.text
.name {{ item.menu_name }}
.host {{ item.nick_name }}
img(src="../../static/img/act-list.gif")
.program_right {{ item.start_time }}-{{ item.end_time }}
.close.title(@click="isShow = false") 关闭
</template>
<script>
export default {
name: 'Radio',
data () {
return {
isShow: false, // 控制节目单是否显示
isPlay: false, // false 未播放,true 播放中
RadioList: {},
MenuList: [],
videoUrl: []
}
},
created () {
this.getRadio()
},
methods: {
async getRadio () {
this.RadioList = await this.$http.index.radio()
this.videoUrl = [
{
type: 'application/x-mpegurl',
src: this.RadioList.play_url
}
]
},
playVideo() {
if (this.isPlay) {
this.$refs.video.PlayerPause()
} else {
this.$refs.video.PlayerPlay()
}
this.isPlay = !this.isPlay
},
async getMenuList() {
this.MenuList = await this.$http.index.getMenuList();
this.isShow = true;
}
},
components: {}
}
</script>
<style lang="less" scoped>
.Radio {
text-align: center;
.radio_title {
font-size: 0.48rem;
color: #000000;
margin-top: 1.347rem;
font-weight: bold;
margin-bottom: 0.84rem;
}
.preview {
width: 7.467rem;
height: 7.467rem;
margin-bottom: 0.667rem;
}
.gif {
width: 7.467rem;
height: 1.2rem;
margin-bottom: 0.733rem;
}
.list {
display: flex;
align-items: center;
justify-content: space-around;
li {
&:nth-child(2) {
img {
width: 1.6rem !important;
height: 1.6rem !important;
}
}
img {
width: 0.52rem;
height: 0.52rem;
margin-bottom: 0.16rem;
}
p {
font-size: 0.267rem;
color: #999999;
}
}
}
.program {
display: flex;
flex-direction: column;
.title {
font-size: .37rem;
font-weight: 500;
color: #000;
text-align: center;
border-bottom: 0.01rem solid #ccc;
line-height: 1.6rem;
}
.program_list {
flex: 1;
overflow-y: scroll;
li {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0.39rem;
border-bottom: 0.01rem solid #ccc;
.program_left {
display: flex;
align-items: center;
.text {
.name {
font-size: .37rem;
color: #000;
}
.host {
margin-top: 0.27rem;
font-size: .32rem;
color: #999;
}
}
img {
width: 0.37rem;
height: 0.39rem;
margin-left: 0.57rem
}
}
.program_right {
font-size: .37rem;
color: #000;
line-height: 1.6rem;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,27 @@
<template lang="pug">
.TV
.content
TvList(:show="false")
</template>
<script>
export default {
name: 'TV',
data () {
return {}
},
created () {
},
methods: {
async getIndex () {
}
},
components: {}
}
</script>
<style lang="less" scoped>
// @import "~@page/TV.less";
</style>

View File

@@ -0,0 +1,99 @@
<template lang="pug">
van-list(v-model='loading',
:finished='finished',
:immediate-check="false",
finished-text='没有更多了',
@load='onLoad')
ul.TvList
router-link(:to="{ path: 'tvinfo', query: { id: item.id, url: item.play_url }}" tag="li" v-for="item,index in info" :key="index")
span(:class="show && $route.query.id == item.id ? 'active' : '' ") {{ item.title }}
img(src="../../static/img/act-list.gif" v-if="show && $route.query.id == item.id")
</template>
<script>
export default {
name: 'TvList',
data () {
return {
page: 1,
total_page: 0,
loading: false,
finished: false,
info: []
}
},
props: {
show: {
type: Boolean,
default: true
}
},
created () {
this.getChannelList();
},
methods: {
async getChannelList () {
let res = await this.$http.index.channelList({
page: this.page,
count: 15
});
this.info = [
...this.info,
...res.data
];
this.page = res.current_page;
// this.total_page = res.last_page;
this.total_page = 2;
this.loading = false;
},
onLoad() {
if (this.page < this.total_page) {
this.page+=1
this.getChannelList();
} else {
this.finished = true
}
}
},
components: {}
}
</script>
<style lang="less" scoped>
.TvList {
li {
height: 1.6rem;
background-color: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 0.547rem;
padding-right: 0.36rem;
//border-bottom: 1px solid #e5e5e5;
position: relative;
.active {
color: #d0302c !important;
}
&:after {
content: "";
position: absolute;
width: 100%;
height: 1px;
background: #e5e5e5;
transform: scaleY(0.5);
bottom: 0;
left: 0;
right: 0;
}
span {
font-size: 0.427rem;
color: #333333;
}
img {
width: 0.36rem;
height: 0.4rem;
}
}
}
</style>

View File

@@ -0,0 +1,57 @@
<template lang="pug">
.Video
video-player.video-player-box(ref='videoPlayer',
v-show="show"
:options='playerOptions', :playsinline='true')
</template>
<script>
export default {
name: 'v-video',
props: {
url: {
type: Array,
default: () => []
},
show: {
type: Boolean,
default: true
}
},
data () {
return {
playerOptions: {
muted: false,
language: 'en',
playbackRates: [0.7, 1.0, 1.5, 2.0],
aspectRatio: "16:9",
sources: this.url
}
}
},
created () {
},
mounted() {
},
methods: {
PlayerPlay () {
this.player.play()
},
PlayerPause() {
this.player.pause()
}
},
computed: {
player() {
return this.$refs.videoPlayer.player
}
},
components: {}
}
</script>
<style lang="less" scoped>
// @import "~@page/Video.less";
</style>

View File

@@ -0,0 +1,115 @@
<template lang="pug" >
.comment
ul.comment_list(v-if="list.length !=0")
li(v-for="v,i in list" :key="i")
.top
.left
img(:src="v.image")
.author
p {{v.nick_name}}
span {{v.create_time}}
.right
img(src='../../static/img/icon/give_thumbs-up.png', alt='')
span {{v.praise_count}}
p.bottom {{v.content}}
.noData(v-else)
img(src='../../static/img/hm_bg_img_no.png', alt='')
p 快来发表你的评论吧
</template>
<script>
export default {
name: 'v-comment',
props: {
list: {
type: Array,
default: () => [],
}
},
data () {
return {}
},
created () {
},
methods: {
async getIndex () {
}
},
components: {}
}
</script>
<style lang="less" scoped>
.comment {
font-size: 0;
margin-top: .5rem;
margin-bottom: 0.5rem;
.comment_list {
li {
margin-bottom: 0.933rem;
.top {
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 0.307rem;
padding-right: 0.32rem;
padding-bottom: 0.493rem;
.left {
display: flex;
align-items: center;
img {
width: 0.933rem;
height: 0.947rem;
border-radius: 100%;
margin-right: 0.24rem;
}
.author {
p {
font-size: 0.373rem;
color: #333333;
}
span {
font-size: 0.267rem;
color: #999999;
}
}
}
.right {
display: flex;
img {
width: 0.347rem;
height: 0.36rem;
margin-right: 0.133rem;
}
span {
font-size: 0.32rem;
color: #999999;
}
}
}
.bottom {
font-size: 0.373rem;
color: #333333;
margin-left: 1.507rem;
margin-right: 0.52rem;
}
}
}
.noData {
text-align: center;
img {
width: 5.56rem;
height: 4.653rem;
margin-bottom: 0.68rem;
}
p {
font-size: 0.373rem;
color: #999999;
}
}
}
</style>

View File

@@ -0,0 +1,24 @@
<template lang="pug">
</template>
<script>
export default {
name: "v-header",
data() {
return {};
},
created() {},
methods: {
async getIndex() {},
},
components: {},
};
</script>
<style lang="less" scoped>
</style>

View File

@@ -0,0 +1,41 @@
<template lang="pug">
.listTitle
span {{title}}
</template>
<script>
export default {
name: 'v-listTitle',
props: {
title:{
type: String,
default:""
}
},
data () {
return {}
},
created () {
},
methods: {
async getIndex () {
}
},
components: {}
}
</script>
<style lang="less" scoped>
.listTitle {
padding-top: .5rem;
border-top: 2px solid #f3f3f3;
span {
font-size: 0.427rem;
color: #333333;
margin-left: 0.32rem;
font-weight: 700;
}
}
</style>

View File

@@ -0,0 +1,70 @@
<template lang="pug">
.pubHeader
.header_left
<img class="left" src="../../static/img/icon/gw_img_logo.png" alt="">
<img class="right" src="../../static/img/icon/logo_text_icon.png" alt="">
.header_right 打开
</template>
<script>
export default {
name: 'v-pubHeader',
data () {
return {}
},
created () {
},
methods: {
async getIndex () {
}
},
components: {}
}
</script>
<style lang="less" scoped>
.pubHeader {
width: 10rem;
height: 1.333rem;
background-color: #000000;
opacity: 0.7;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
z-index: 999;
top:0;
left: 0;
right: 0;
.header_left {
display: flex;
align-items: center;
margin-left: 0.32rem;
.left {
width: 0.867rem;
height: 0.867rem;
margin-right: 0.253rem;
}
.right{
width: 1.76rem;
height: 0.613rem;
}
}
.header_right {
width: 1.92rem;
height: 0.693rem;
background-color: #d0302c;
border-radius: 0.107rem;
font-size: 0.32rem;
line-height: 0.693rem;
color: #ffffff;
margin-right: 0.533rem;
text-align: center;
}
}
</style>

View File

@@ -0,0 +1,94 @@
<template lang="pug">
.relevantRecommend
.recommend_one(v-if="theme == 1")
ul
router-link(:to="{ path: 'newsInfo', query: { id: v.id }}" tag="li" v-for="v,i in list" :key="i")
.left_item
p {{v.title}}
span {{v.update_time}}
img(:src="v.icon")
.recommend_two(v-else)
ul
li(v-for="v,i in list" :key="i")
img(:src="v.icon")
p {{v.title}}
</template>
<script>
export default {
name: "v-relevantRecommend",
props: {
theme: {
type: Number,
default: 1,
},
list: {
type: Array,
default: () => [],
},
},
data() {
return {};
},
created() {},
methods: {},
components: {},
};
</script>
<style lang="less" scoped>
.relevantRecommend {
font-size: 0;
.recommend_one {
ul {
li {
display: flex;
padding: 0.427rem 0.32rem;
border-bottom: solid 1px #e5e5e5;
justify-content: space-between;
.left_item {
margin-right: 0.413rem;
p {
font-size: 0.427rem;
color: #333333;
margin-bottom: 0.533rem;
}
span {
font-size: 0.32rem;
color: #999999;
}
}
img {
width: 3.013rem;
height: 2.267rem;
border-radius: 0.053rem;
}
}
}
}
.recommend_two {
overflow-x: scroll;
padding-left: 0.32rem;
ul {
display: flex;
border-bottom: solid 1px #e5e5e5;
padding-bottom: 0.52rem;
li {
margin-right: 0.133rem;
img {
width: 3.653rem;
height: 2.08rem;
background-color: #000000;
border-radius: 0.053rem;
margin-bottom: 00.32rem;
}
p {
font-size: 0.373rem;
color: #333333;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,27 @@
export default {
devUrl: 'https://zbhapi.ahtv.cn/h5',
testUrl: '',
prodUrl: 'https://zbhapi.ahtv.cn/h5',
apiList: {
radio: '/radio',
channelList: '/channelList',
liveList: '/liveList',
getMenuList: '/getMenuList',
liveComment: '/liveComment',
newsDetail: '/newsDetail',
interactDetail: '/interactDetail'
},
checkUrl: function () {
switch (process.env.NODE_ENV) {
case 'development':
return this.devUrl;
break;
case 'test':
return this.testUrl;
break;
case 'production':
return this.prodUrl;
break;
}
}
}

View File

@@ -0,0 +1,27 @@
import $http from '@/service/_'
import $util from '@/util'
import Vant from 'vant';
import 'vant/lib/index.css';
import VueVideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
import "videojs-contrib-hls";
import header from '@/components/header'
import Video from '@/components/Video'
import TvList from '@/components/TvList'
import pubHeader from '@/components/pubHeader'
import listTitle from '@/components/listTitle'
import relevantRecommend from '@/components/relevantRecommend'
import comment from '@/components/comment'
export default {
VueComponents: [ header, Video, TvList, pubHeader ,listTitle, relevantRecommend, comment],
VuePlugIn: [ Vant, VueVideoPlayer ],
NotVuePlugIn: {
$http, $util
}
}

View File

@@ -0,0 +1,71 @@
import axios from 'axios'
import config from '@/config'
import { Toast } from 'vant';
var toast = null;
export default class Http {
constructor () {
this.instance = axios.create({
baseURL: config.checkUrl(),
timeout: 10000,
headers: {
'Content-Type': 'application/json'
}
})
this.interceptors()
}
async get (params) {
return await this.instance.get(params.url, {
params: params.data,
headers: Object.assign({
// token: localStorage.getItem("token")
}, params.headers )
})
}
async post (params) {
return await this.instance.post(params.url, params.data, {
headers: Object.assign({
// token: localStorage.getItem("token")
}, params.headers )
})
}
interceptors () {
// 添加请求拦截器
this.instance.interceptors.request.use(function (config) {
toast = Toast.loading({
duration: 0,
message: '加载中...'
});
return config
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error)
})
// 添加响应拦截器
this.instance.interceptors.response.use(function (response) {
toast.clear();
if (response.config.url == "/channelList") {
return response.data;
}
switch (response.data.resultCode) {
case "000":
return response.data.data
break;
case "500":
Toast.fail(response.data.message);
throw new Error(response.data.message)
break;
}
}, function (error) {
// 对响应错误做点什么
return Promise.reject(error)
})
}
}

View File

@@ -0,0 +1,22 @@
import 'amfe-flexible'
import Vue from 'vue'
import App from './App'
import router from './router'
import init from './config/init'
Vue.config.productionTip = false
// 注册全局组件
init.VueComponents.forEach(v => Vue.component(v.name, v))
// 初始化vue插件
init.VuePlugIn.forEach(v => Vue.use(v))
// 挂载非vue插件到vue实例中,这样可以全局调用方法
for (const key in init.NotVuePlugIn) Vue.prototype[key] = init.NotVuePlugIn[key]
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})

View File

@@ -0,0 +1,14 @@
<template>
<div class="about">
关于
</div>
</template>
<script>
export default {
data () {}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,46 @@
<template lang="pug">
.home
van-tabs(v-model='active' :border="true" line-width="0.32rem" @change="tabChange")
van-tab(title='包河Radio')
Radio
van-tab(title='包河TV')
Tv
van-tab(title='融媒直播')
Live
</template>
<script>
import Radio from "@/components/Radio";
import Tv from "@/components/Tv";
import Live from "@/components/Live";
export default {
data () {
return {
active: 0
}
},
created () {
if (this.$route.query.hasOwnProperty("active")) {
this.active = Number(this.$route.query.active)
}
},
methods: {
tabChange(index) {
this.$router.push({
query: {
active: index
}
})
}
},
components: {
Radio, Tv, Live
}
}
</script>
<style scoped lang="less">
@import "~@page/home";
</style>

Some files were not shown because too many files have changed in this diff Show More