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

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -0,0 +1,57 @@
<!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;
}
body {
height: 3000px;
}
.header {
width: 100%;
height: 60px;
background: #ff0;
}
.test {
width: 100%;
height: 60px;
}
</style>
</head>
<body>
<div class="test"></div>
<div class="header"></div>
</body>
<script>
// 给网页绑定滚动事件
// 获取滚动条的滚动距离,然后拿滚动距离进行判断 document.documentElement.scrollTop
// 大于 某个数值 ,给 html 定固定定位,反之不加
var body = $("body"),
header = $(".header");
body.onscroll = () => {
var offsetTop = document.documentElement.scrollTop;
console.log("offsetTop: ", offsetTop);
if (offsetTop > 60) {
header.style.position = "fixed"
header.style.top = "0"
} else {
header.style.position = "static"
}
}
function $(className) {
return document.querySelector(className)
}
</script>
</html>

View File

@@ -0,0 +1,66 @@
<!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>烦人的广告</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
height: 3000px;
}
.gg {
width: 200px;
height: 200px;
background: red;
position: fixed;
right: 0;
bottom: 0;
}
.gg span {
position: absolute;
right: 10px;
top: 10px;
font-size: 20px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="gg">
<span> x </span>
</div>
</body>
<script>
// 点击三次
// 第一次打开网页,第二次没什么反应,第三次关闭整个广告
var close = document.querySelector(".gg span"),
gg = document.querySelector(".gg"),
nums = 0;
close.onclick = () => {
nums += 1;
if (nums == 1) {
open("https://www.runoob.com/jsref/dom-obj-event.html")
}
// if (nums == 2) {
// }
if (nums == 3) {
gg.style.display = "none"
}
}
</script>
</html>

View File

@@ -0,0 +1,78 @@
<!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>
* {
margin: 0;
padding: 0;
list-style: none;
}
.title {
display: flex;
}
.title li {
margin-right: 20px;
}
.title .active {
color: red;
}
.content li {
display: none;
}
.content .active {
display: block;
}
</style>
</head>
<body>
<ul class="title">
<li class="active">社会</li>
<li>娱乐</li>
<li>体育</li>
<li>军事</li>
</ul>
<ul class="content">
<li class="active">社会内容</li>
<li>娱乐内容</li>
<li>体育内容</li>
<li>军事内容</li>
</ul>
</body>
<script>
_(".title li").forEach((v,i) => {
v.onclick = () => {
console.dir(v);
_(".title li").forEach((val,index) => {
val.className = ""
_(".content li")[index].className = ""
})
v.className = "active"
_(".content li")[i].className = "active"
}
})
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,172 @@
<!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>
* {
margin: 0;
padding: 0;
list-style: none;
}
.title {
display: flex;
}
.title li {
margin-right: 20px;
}
.title .active {
color: red;
}
.content li {
display: none;
}
.content .active {
display: block;
}
</style>
</head>
<body>
<ul class="title"></ul>
<ul class="content"></ul>
</body>
<script>
// 数据从哪来的?
// 通过ajax请求网络从后端的数据库里面获取到的
var tabsList = [
{
title: '社会',
content: [
{
title: '社会新闻1',
time: '2023',
text: '主体内容部分'
},
]
},
{
title: '娱乐',
content: [
{
title: '娱乐新闻1',
time: '2023',
text: '主体内容部分'
},
{
title: '娱乐新闻2',
time: '2023',
text: '主体内容部分'
},
]
},
{
title: '体育',
content: [
{
title: '体育新闻1',
time: '2023',
text: '主体内容部分'
}
]
},
{
title: '军事',
content: [
{
title: '军事新闻1',
time: '2023',
text: '主体内容部分'
},
{
title: '军事新闻2',
time: '2023',
text: '主体内容部分'
},
{
title: '军事新闻3',
time: '2023',
text: '主体内容部分'
},
]
},
{
title: '科技',
content: [
{
title: '科技新闻1',
time: '2023',
text: '主体内容部分'
}
]
},
]
// 渲染 tabs 标题部分
function renderTitle() {
tabsList.forEach((v, i) => {
$(".title").innerHTML += `<li class="${i == 0 ? 'active' : ''}">${v.title}</li>`
$(".content").innerHTML +=
`<li class="${i == 0 ? 'active' : ''}">
${
v.content.length == 0
? '<p>暂无数据</p>'
: v.content.map(v => {
return `<p>${v.title}</p>`
}).toString().replaceAll(",", "")
}
</li>`
});
bindTitleClick()
}
// 给标题 绑定点击事件
function bindTitleClick() {
_(".title li").forEach((v, i) => {
v.onclick = () => {
_(".title li").forEach((val, index) => {
val.className = ""
_(".content li")[index].className = ""
})
v.className = "active"
_(".content li")[i].className = "active"
}
})
}
renderTitle()
// var a = [1,24,6,2,8,5,9].forEach(v => {
// console.log(v);
// })
// var a = [1,24,6,2,8,5,9].map(v => {
// return `<p>${v}</p>`
// })
// console.log(a.toString().replaceAll(",", ""));
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,90 @@
* {
margin: 0;
padding: 0;
list-style: none;
}
.list img {
width: 100px;
}
.preview {
width: 100vw;
height: 100vh;
position: absolute;
left: 0;
top: 0;
z-index: 999;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.preview .zz {
width: 100%;
height: 100%;
background: #000000c4;
z-index: -1;
position: absolute;
}
.preview .preview_img {
transition: all 0.3s;
user-select: none;
cursor: pointer;
}
.preview .icon-close {
position: absolute;
z-index: 2;
right: 10px;
top: 10px;
color: #fff;
font-size: 40px;
}
.preview .button {
position: absolute;
width: 100%;
top: 50%;
transform: translateY(-50%);
z-index: 2;
display: flex;
justify-content: space-between;
padding: 0 20px;
box-sizing: border-box;
}
.preview .button i {
color: #fff;
font-size: 25px;
}
.preview .icon{
z-index: 2;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 30px;
padding: 9px 10px;
background: #716f6fc4;
border-radius: 25px;
}
.preview .icon i {
color: #fff;
font-size: 22px;
margin-right: 20px;
cursor: pointer;
user-select: none;
}
.preview .icon i:last-child {
margin-right: 0px;
}
.icon .right {
transform: rotateY(180deg);
display: inline-block;
}

View File

@@ -0,0 +1,160 @@
<!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>图片预览</title>
<link rel="stylesheet" href="http://at.alicdn.com/t/c/font_3445167_gwp92uwquwa.css">
<link rel="stylesheet" href="./index.css">
</head>
<body>
<div class="list">
<img src="https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg" alt="">
</div>
</body>
<script>
var scaleNum = 1, rotateNum = 0, startX = null, startY = null, oldLeft = null, oldTop = null, MoveStatus = false;
_(".list img").forEach(v => {
v.onclick = () => {
$("body").insertAdjacentHTML("beforeend", `
<div class="preview">
<div class="zz"></div>
<img style="transform: scale(${scaleNum}) rotate(${rotateNum}deg); height: 100%; margin-left: 0px;margin-top: 0px;" class="preview_img" src="https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg" alt="">
<i class="iconfont icon-close"></i>
<div class="button">
<i class="iconfont icon-fanhui"></i>
<i class="iconfont icon-gengduo"></i>
</div>
<div class="icon">
<i class="iconfont icon-suoxiao"></i>
<i class="iconfont icon-fangda"></i>
<i class="iconfont qp icon-quanping"></i>
<i class="iconfont icon-yulanxuanzhuan left "></i>
<i class="iconfont icon-yulanxuanzhuan right"></i>
</div>
</div>
`);
$(".icon-close").onclick = () => {
$("body").removeChild($(".preview"))
}
$(".icon-suoxiao").onclick = () => {
scaleNum = scaleNum - 0.2 < 0.2 ? 0.2 : scaleNum - 0.2
xuanzhong()
}
$(".icon-fangda").onclick = () => {
scaleNum += 0.2
xuanzhong()
}
$(".left").onclick = () => {
rotateNum -= 90
xuanzhong()
}
$(".right").onclick = () => {
rotateNum += 90
xuanzhong()
}
$(".icon-quanping").onclick = () => {
if ($(".qp").classList.contains("icon-quanping")) {
$(".qp").classList.replace("icon-quanping", "icon-beijingyibiyi")
$(".preview_img").style.height = "auto"
} else {
$(".qp").classList.replace("icon-beijingyibiyi", "icon-quanping")
$(".preview_img").style.height = "100%"
}
}
$(".preview_img").onmousedown = (e) => {
MoveStatus = true;
e.preventDefault();
e.stopPropagation(); // TODO 事件冒泡
startX = e.x;
startY = e.y;
oldLeft = parseInt($(".preview_img").style.marginLeft);
oldTop = parseInt($(".preview_img").style.marginTop);
$(".preview_img").onmousemove = (e) => {
console.log("preview_img");
MouseMove(e)
}
$(".preview_img").onmouseup = () => {
MoveStatus = false;
$(".preview_img").onmousemove = null
}
}
$(".preview_img").onmouseout = () => {
if (MoveStatus) {
$(".preview").onmousemove = (e) => {
console.log("preview");
console.log("2 MoveStatus: ", MoveStatus);
MouseMove(e)
}
}
}
$(".preview").onmouseup = () => {
MoveStatus = false;
$(".preview_img").onmousemove = null
$(".preview").onmousemove = null
}
}
})
function MouseMove(e) {
console.log("3 status: ", status);
e.preventDefault();
e.stopPropagation();
var moveX = e.x, moveY = e.y;
var offsetX = moveX - startX, offsetY = moveY - startY;
console.log("移动数值:", offsetX, offsetY);
$(".preview_img").style.marginLeft = `${offsetX + oldLeft}px`;
$(".preview_img").style.marginTop = `${offsetY + oldTop}px`;
}
function xuanzhong() {
$(".preview_img").style.transform = `scale(${scaleNum}) rotate(${rotateNum}deg)`
}
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,83 @@
<!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;
}
span {
user-select: none;
position: fixed;
transition: all 1s;
}
body {
height: 100vh;
}
</style>
</head>
<body>
</body>
<script>
// 产生文字
// 给网页绑定点击事件,获取到鼠标点击时候产生的 x y 坐标
// 使用下标来依次读取 数组中的文字,如果读完了回第一个继续轮回
// 使用 文字 生成 标签并用js为标签设置定位left top 距离 就是 xy 坐标
// 把生成好的 标签 放到 网页上,显示出来
// 让文字消失
var textArr = ["富强", "民主", "文明", "和谐", "自由", "平等", "公正" ,"法治", "爱国", "敬业", "诚信", "友善"];
var i = 0;
$("body").onclick = (e) => {
// var x = e.x,
// y = e.y;
var { x,y } = e;
var span = document.createElement("span");
span.innerText = textArr[i]
span.style = `
color: hsla(${parseInt(Math.random() * 360)},100%,50%,1);
left: ${x}px;
top: ${y}px;
`
console.log(span);
$("body").appendChild(span)
sport(span, y)
i++
if (i > 11) {
i = 0
}
}
function sport(span,y) {
setTimeout(() => {
span.style.top = `${y - 200}px`
}, 200)
setTimeout(() => {
$("body").removeChild(span)
}, 1250)
}
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,100 @@
<!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;
}
</style>
</head>
<body>
<input type="text" placeholder="请输入关键字">
<button>搜索</button>
<ul>
</ul>
</body>
<script>
// 实现搜索建议
// 1 放置inputbuttonul li
// 2 给input绑定 oninput 事件,实时获取用户输入的 东西
// 3 从本地的所有搜索建议的数组中,筛选出包含 用户 输入内容 的 搜索建议
// 4 把符合条件的 展示 在 ul li 里面给用户看
// 5 给 ul li 中所有 li 都绑定点击事件,点击时候获取 li 的文本内容,并为输入框重新赋值,
// 然后实现百度搜索。
// 关键字加红
var keyWordList = [
'今天出太阳了', '太阳很好', '不喜欢js学习',
'js编程很简单', '喜欢很简单的html', '今天不想学习html只想出去玩',
'今天不想学习css', '今晚出去飙车', '明天出去修车'
];
var newKeyList = []
// for(var i = 0;i<keyWordList.length;i++) {
// console.log(keyWordList[i]);
// console.log(i);
// }
$("input").oninput = () => {
newKeyList = []
if ($("input").value.length > 0) {
keyWordList.forEach(v => {
if (v.includes($("input").value)) {
var text = v.replace($("input").value, `<span style="color:red;">${$("input").value}</span>`)
newKeyList.push(text)
}
})
console.log("符合条件的数据:", newKeyList);
renderUl()
} else {
$("ul").innerHTML = ""
}
}
function renderUl() {
$("ul").innerHTML = ""
newKeyList.forEach(v => {
$("ul").innerHTML += `<li>${v}</li>`
})
bindLiClick()
}
function bindLiClick() {
_("ul li").forEach(v => {
v.onclick = () => {
console.dir(v);
$("input").value = v.innerText
SearchBaidu(v.innerText)
}
})
}
$("button").onclick = () => SearchBaidu($("input").value)
function SearchBaidu(text) {
open(`https://www.baidu.com/s?wd=${text}`)
}
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,197 @@
<!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 {
width: 70px;
height: 90px;
position: fixed;
}
body {
height: 100vh;
}
.alert {
width: 100%;
height: 100%;
position: fixed;
z-index: 999;
display: none;
}
.zz {
width: 100%;
height: 100%;
background: #000000a8;
position: fixed;
z-index: 1;
}
.text {
width: 300px;
height: 250px;
background: #fff;
position: fixed;
z-index: 2;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
border-radius: 10px;
padding: 11px;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
.text .title {
height: 40px;
display: flex;
align-items: center;
border-bottom: 1px solid #d5d5d5;
}
.text .close {
position: absolute;
right: 10px;
top: 4px;
font-size: 20px;
cursor: pointer;
user-select: none;
}
.text .content {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
}
</style>
</head>
<body>
<div class="alert">
<div class="zz"></div>
<div class="text">
<div class="close"> x </div>
<div class="title">恭喜中奖</div>
<div class="content"></div>
</div>
</div>
</body>
<script>
// 生成随机出现的红包
// 计算红包随机出现的最大x轴范围
// 创建红包img为红包设置定位left 随机最大范围出现 0 ~ offsetLeft
// 让红包动起来
// 点击红包可以拆开(弹窗,告诉你中了什么奖项)
// 注意:弹窗打开时候,所有红包需要先暂停运动(停止创建红包),关闭弹窗的时候,你点击的红包消失,其他红包继续运动
var { clientWidth, clientHeight } = document.body;
var offsetLeft = clientWidth - 70, gId = null, gImg = null;
// 创建红包
function createdHB() {
var randomLeft = Math.random() * offsetLeft;
var img = document.createElement("img");
img.src = "./hb.png";
img.onclick = () => {
gImg = img;
img.src = "./hb1.png";
probability()
$(".alert").style.display = "block"
// 停止页面上已有红包的运动
_("img").forEach(v => clearInterval(v.intervalId))
// 创建新红包的也需要停止
clearInterval(gId)
}
img.style = `
left: ${randomLeft}px;
top: -90px;
`;
$("body").appendChild(img)
sport(img)
}
// 运动起来
function sport(img) {
img.intervalId = setInterval(() => {
var oldTop = Number(img.style.top.replace("px", ""));
var newTop = oldTop + 1
img.style.top = `${newTop}px`
if (newTop > clientHeight) {
$("body").removeChild(img);
clearInterval(img.intervalId)
}
}, 10);
}
// 关闭按钮被点击
$(".text .close").onclick = () => {
$(".alert").style.display = "none"
// 删除你已经拆开过的红包
$("body").removeChild(gImg);
// 让页面上已有的红包在暂停后继续运动
_("img").forEach(v => sport(v))
auto()
}
function auto() {
gId = setInterval(() => {
createdHB()
}, 500)
}
// 中将的概率
function probability() {
var probabilityNums = Number((Math.random() * 10).toFixed(4))
if (probabilityNums < 0.0002) {
$(".content").innerText = "恭喜中得一等奖!"
} else if (probabilityNums > 0.0001 && probabilityNums < 8) {
$(".content").innerText = "恭喜中得三等奖!"
} else {
$(".content").innerText = "恭喜中得二等奖!"
}
}
auto()
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,183 @@
<!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>轮播图</title>
<style>
* {
margin: 0;
padding: 0;
list-style: none;
}
.swiper {
width: 630px;
height: 315px;
margin: 100px auto;
overflow: hidden;
position: relative;
}
.swiper .swiper_wrap {
display: flex;
position: relative;
transition: all 1s;
}
.swiper .swiper_wrap li {}
.swiper .swiper_wrap li img {
width: 630px;
height: 315px;
}
.swiper .button {
width: 100%;
position: absolute;
top: 50%;
display: flex;
justify-content: space-between;
transform: translateY(-50%);
}
.swiper .button div {
color: #fff;
font-size: 20px;
background: #000;
display: flex;
align-items: center;
justify-content: center;
width: 50px;
height: 50px;
cursor: pointer;
}
.swiper .button .left {}
.swiper .button .right {}
.swiper .dot {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 20px;
display: flex;
}
.swiper .dot li {
width: 13px;
height: 13px;
background: #fff;
border-radius: 100%;
margin-right: 10px;
cursor: pointer;
}
.swiper .dot li:last-child {
margin-right: 0px;
}
.swiper .dot .active {
background: red;
}
</style>
</head>
<body>
<div class="swiper">
<ul class="swiper_wrap" style="left: 0px;">
<li>
<img src="https://img.alicdn.com/imgextra/i4/6000000003174/O1CN01cpv0cZ1ZJjvVWrUuo_!!6000000003174-2-octopus.png"
alt="">
</li>
<li>
<img src="https://img.alicdn.com/imgextra/i2/6000000003386/O1CN01ySmLuo1asptKSfbHC_!!6000000003386-0-octopus.jpg"
alt="">
</li>
<li>
<img src="https://img.alicdn.com/imgextra/i3/6000000000084/O1CN012wKWpe1CUW5EEs61K_!!6000000000084-0-octopus.jpg"
alt="">
</li>
</ul>
<div class="button">
<div class="left">< </div>
<div class="right"> > </div>
</div>
<ul class="dot">
<li class="active"></li>
<li></li>
<li></li>
</ul>
</div>
</body>
<script>
// TODO 使用 下标完成对 sport 的改造,
// 实现 调用 changeDotActive 只需要传入 下标即可
var timeId = null;
$(".right").onclick = () => {
sport(-630)
}
$(".left").onclick = () => {
sport(630)
}
_(".dot li").forEach((v, i) => {
v.onclick = () => {
changeDotActive(i)
}
})
$(".swiper").onmouseover = () => {
clearInterval(timeId)
}
$(".swiper").onmouseout = () => {
auto()
}
function sport(offset) {
var oldLeft = parseInt($(".swiper_wrap").style.left);
console.log("a",$(".swiper_wrap").style.left);
var newLeft = oldLeft + offset;
if (newLeft <= 0 && newLeft >= -1260) {
changeDotActive(newLeft / -630)
// changeDotActive(i)
}
}
function changeDotActive(i) {
_(".dot li").forEach(val => {
val.classList.remove("active");
})
_(".dot li")[i].classList.add("active")
$(".swiper_wrap").style.left = `${i * -630}px`
}
function auto() {
timeId = setInterval(() => {
$(".right").onclick()
}, 2000)
}
auto()
function $(className) {
return document.querySelector(className)
}
function _(className) {
return document.querySelectorAll(className)
}
</script>
</html>

View File

@@ -0,0 +1,144 @@
<!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>轮播图</title>
<style>
* {
margin: 0;
padding: 0;
list-style: none;
}
.swiper {
width: 630px;
height: 315px;
margin: 100px auto;
overflow: hidden;
position: relative;
}
.swiper .swiper_wrap {
display: flex;
position: relative;
transition: all 1s;
}
.swiper .swiper_wrap li {}
.swiper .swiper_wrap li img {
width: 630px;
height: 315px;
}
.swiper .button {
width: 100%;
position: absolute;
top: 50%;
display: flex;
justify-content: space-between;
transform: translateY(-50%);
}
.swiper .button div {
color: #fff;
font-size: 20px;
background: #000;
display: flex;
align-items: center;
justify-content: center;
width: 50px;
height: 50px;
cursor: pointer;
}
.swiper .button .left {}
.swiper .button .right {}
.swiper .dot {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 20px;
display: flex;
}
.swiper .dot li {
width: 13px;
height: 13px;
background: #fff;
border-radius: 100%;
margin-right: 10px;
cursor: pointer;
}
.swiper .dot li:last-child {
margin-right: 0px;
}
.swiper .dot .active {
background: red;
}
</style>
</head>
<body>
<div class="swiper banner">
<ul class="swiper_wrap" style="left: 0px;">
<li>
<img src="https://img.alicdn.com/imgextra/i4/6000000003174/O1CN01cpv0cZ1ZJjvVWrUuo_!!6000000003174-2-octopus.png"
alt="">
</li>
<li>
<img src="https://img.alicdn.com/imgextra/i2/6000000003386/O1CN01ySmLuo1asptKSfbHC_!!6000000003386-0-octopus.jpg"
alt="">
</li>
<li>
<img src="https://img.alicdn.com/imgextra/i3/6000000000084/O1CN012wKWpe1CUW5EEs61K_!!6000000000084-0-octopus.jpg"
alt="">
</li>
</ul>
<div class="button">
<div class="left">&#8249;</div>
<div class="right">&#8250;</div>
</div>
<ul class="dot"></ul>
</div>
<button>去下标2的图片(3)</button>
</body>
<script src="./index2.js"></script>
<script>
/**
* 第一个参数 是 最外层 父元素类名
* 第二个是允许用户自定义插件的参数
*/
var a = new Swiper(".banner", {
autoPlay: false,
time: 2000,
initialSlide: 0,
// on: {
// slideChange: function (index) {
// console.log("当前轮播图切换到:",index);
// },
// slideChange3: function (index) {
// console.log("当前轮播图切换到:",index);
// }
// },
})
document.querySelector("button").onclick = () => {
a.slideTo(2)
}
</script>
</html>

View File

@@ -0,0 +1,208 @@
// // 自执行函数
// // 好处?
//
class Swiper {
defaultOption = {
TimeId: null,
autoPlay: false,
time: 1000,
initialSlide: 0, // 实现了
el: '.swiper',
on: { },
length: () => this._f(`.swiper_wrap li`).length,
width: () => this.$f(``).offsetWidth,
initSlideLeft: () => {
this.$f(".swiper_wrap").style.left = `${
this.defaultOption.initialSlide * -this.defaultOption.width()
}px`
}
}
// 构造函数里面接受
constructor (el, option) {
if (el.length == 0 || this.$(el) == null) {
console.error(`类名:${el}不存在,请检查`);
} else {
this.defaultOption.el = el || this.defaultOption.el;
this.defaultOption.autoPlay = option.autoPlay || this.defaultOption.autoPlay;
this.defaultOption.time = option.time || this.defaultOption.time;
this.defaultOption.initialSlide = option.initialSlide || this.defaultOption.initialSlide;
if (option.hasOwnProperty("on")) {
this.defaultOption.on = option.on
}
this.init()
}
}
init() {
this.defaultOption.initSlideLeft()
if (this.$f(".button") != null) {
this.next()
this.prev()
}
this.defaultOption.autoPlay
? this.autoPlay()
: ''
this.$f(".dot") == null ? '' : this.renderDot()
}
next() {
this.click(".right", (v) => this.sport(1))
}
prev() {
this.click(".left", v => this.sport(-1))
}
changeDotActive(i) {
this.defaultOption.on.slideChange && this.defaultOption.on.slideChange(i)
if (this.$f(".dot") != null) {
this._f(".dot li").forEach(val => val.classList.remove("active"))
this._f(".dot li")[i].classList.add("active")
}
this.$f(".swiper_wrap").style.left = `${i * -this.defaultOption.width()}px`
}
renderDot() {
for (var i = 0; i < this.defaultOption.length(); i++) {
this.$f(".dot").innerHTML += `
<li class="${i == this.defaultOption.initialSlide ? 'active' : '' }"></li>
`
}
this.click(".dot li", (v,i) => this.changeDotActive(i))
}
autoPlay() {
this.defaultOption.TimeId = setInterval(() => this.sport(1), this.defaultOption.time)
this.$f("").onmouseover = () => clearInterval(this.defaultOption.TimeId)
this.$f("").onmouseout = () => this.autoPlay()
}
sport(offset) {
this.defaultOption.initialSlide += offset
if (this.defaultOption.initialSlide < 0) {
this.defaultOption.initialSlide = 0
}
if (this.defaultOption.initialSlide > this.defaultOption.length() - 1) {
this.defaultOption.initialSlide = this.defaultOption.length() - 1
}
if (this.defaultOption.initialSlide >= 0 && this.defaultOption.initialSlide <= this.defaultOption.length() - 1) {
this.changeDotActive(this.defaultOption.initialSlide)
}
}
slideTo(index) {
this.changeDotActive(index)
}
click(className, callback) {
this._f(className).forEach((v,i) => v.onclick = () => callback(v,i))
}
$f(className) {
return this.$(`${this.defaultOption.el} ${className}`)
}
_f(className) {
return this._(`${this.defaultOption.el} ${className}`)
}
$(className) {
return document.querySelector(className)
}
_(className) {
return document.querySelectorAll(className)
}
}
// 为什么要 new
// x 类的 实例
// var x = new Swiper(1000);
// x.test()
// 哪些功能需要自定义?
// 是否需要自动播放
// 设置自动播放的时间间隔
// 可以设置默认显示第几张
// 如果不写html就不需要对应的功能
// 可以js编程控制轮播图滚动到第几张
// 当轮播图滚动的时候要抛出当前下标
// this 指向
// 函数执行的时候才能确定this到底指向谁,
// 实际上this的最终指向的是那个调用它的对象
// var time = 4000
// var a = {
// time: 2000,
// b: () => {
// this.time = 5000;
// var test = () => {
// console.log(this.time);
// }
// return test
// }
// }
// var dddd = a.b()
// dddd()
// 箭头函数 和 普通函数的区别
// 如何改变this 指向??
// https://www.runoob.com/w3cnote/js-call-apply-bind.html
// 继承
// class car {
// color = "red";
// speed = null;
// start() {}
// stop() {}
// }
// class mtc extends car {
// constructor(dddd) {
// super()
// this.par = dddd
// console.log(this.par);
// }
// size() {
// console.log("摩托车很小:",this.color);
// }
// }
// class jhc extends car {
// rescue() {
// console.log("救人");
// }
// }
// var mt = new mtc("1")
// // mt.size()

View File

@@ -0,0 +1,10 @@
正则表达式
手机号验证
12345678901
11056042604
邮箱验证
密码验证

View File

@@ -0,0 +1,14 @@
POST https://api.zzzmh.cn/bz/v3/getData HTTP/1.1
content-type: application/json
{
"size":24,
"current":2,
"sort":0,
"category":0,
"resolution":0,
"color":0,
"categoryId":0,
"ratio":0
}

View File

@@ -0,0 +1,58 @@
const utils = require('./utils');
const fs = require('fs');
var baseUrl = 'https://pic.netbian.com/4kmeinv/'
var pageArr = []
var pageIndex = 0
var currentPageArr = []
var currentPageInfoId = 0
for (var i = 1; i <= 66; i++) {
pageArr.push(`${i == 1 ? baseUrl : `${baseUrl}index_${i}.html`}`)
}
page(pageArr[pageIndex])
// 获取当前 pageIndex 的所有详情页连接构成数组
async function page(url) {
let $ = await utils.html(url);
$(".slist ul li").each(function (i,v) {
currentPageArr.push(
`https://pic.netbian.com${ $(this).find("a").attr("href") }`
)
})
info(currentPageArr[currentPageInfoId])
}
async function info(url) {
let $ = await utils.html(url);
let bigImg = `https://pic.netbian.com${$(".photo-pic img").attr("src")}`;
dowmImg(bigImg)
}
async function dowmImg(url) {
let buff = await utils.html(url,"img");
fs.writeFileSync(`img/${Math.random() * 99999999}.jpg`,buff);
currentPageInfoId +=1;
if (currentPageInfoId < currentPageArr.length) {
setTimeout(() => {
info(currentPageArr[currentPageInfoId])
},1500)
} else {
pageIndex += 1;
if (pageIndex < pageArr.length) {
currentPageInfoId = 0
currentPageArr = []
page(pageArr[pageIndex])
}
}
}

View File

@@ -0,0 +1,205 @@
{
"name": "pc",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
},
"axios": {
"version": "1.3.4",
"resolved": "https://registry.npmmirror.com/axios/-/axios-1.3.4.tgz",
"integrity": "sha512-toYm+Bsyl6VC5wSkfkbbNB6ROv7KY93PEBBL6xyDczaIHasAiv4wPqQ/c4RjoQzipxRD2W5g21cOqQulZ7rHwQ==",
"requires": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"boolbase": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz",
"integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="
},
"cheerio": {
"version": "1.0.0-rc.12",
"resolved": "https://registry.npmmirror.com/cheerio/-/cheerio-1.0.0-rc.12.tgz",
"integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==",
"requires": {
"cheerio-select": "^2.1.0",
"dom-serializer": "^2.0.0",
"domhandler": "^5.0.3",
"domutils": "^3.0.1",
"htmlparser2": "^8.0.1",
"parse5": "^7.0.0",
"parse5-htmlparser2-tree-adapter": "^7.0.0"
}
},
"cheerio-select": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/cheerio-select/-/cheerio-select-2.1.0.tgz",
"integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==",
"requires": {
"boolbase": "^1.0.0",
"css-select": "^5.1.0",
"css-what": "^6.1.0",
"domelementtype": "^2.3.0",
"domhandler": "^5.0.3",
"domutils": "^3.0.1"
}
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"css-select": {
"version": "5.1.0",
"resolved": "https://registry.npmmirror.com/css-select/-/css-select-5.1.0.tgz",
"integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==",
"requires": {
"boolbase": "^1.0.0",
"css-what": "^6.1.0",
"domhandler": "^5.0.2",
"domutils": "^3.0.1",
"nth-check": "^2.0.1"
}
},
"css-what": {
"version": "6.1.0",
"resolved": "https://registry.npmmirror.com/css-what/-/css-what-6.1.0.tgz",
"integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw=="
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
"dom-serializer": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-2.0.0.tgz",
"integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
"requires": {
"domelementtype": "^2.3.0",
"domhandler": "^5.0.2",
"entities": "^4.2.0"
}
},
"domelementtype": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz",
"integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw=="
},
"domhandler": {
"version": "5.0.3",
"resolved": "https://registry.npmmirror.com/domhandler/-/domhandler-5.0.3.tgz",
"integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
"requires": {
"domelementtype": "^2.3.0"
}
},
"domutils": {
"version": "3.0.1",
"resolved": "https://registry.npmmirror.com/domutils/-/domutils-3.0.1.tgz",
"integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==",
"requires": {
"dom-serializer": "^2.0.0",
"domelementtype": "^2.3.0",
"domhandler": "^5.0.1"
}
},
"entities": {
"version": "4.4.0",
"resolved": "https://registry.npmmirror.com/entities/-/entities-4.4.0.tgz",
"integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA=="
},
"follow-redirects": {
"version": "1.15.2",
"resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.2.tgz",
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="
},
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"htmlparser2": {
"version": "8.0.1",
"resolved": "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-8.0.1.tgz",
"integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==",
"requires": {
"domelementtype": "^2.3.0",
"domhandler": "^5.0.2",
"domutils": "^3.0.1",
"entities": "^4.3.0"
}
},
"iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
}
},
"mime-db": {
"version": "1.52.0",
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
},
"mime-types": {
"version": "2.1.35",
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"requires": {
"mime-db": "1.52.0"
}
},
"nth-check": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/nth-check/-/nth-check-2.1.1.tgz",
"integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
"requires": {
"boolbase": "^1.0.0"
}
},
"parse5": {
"version": "7.1.2",
"resolved": "https://registry.npmmirror.com/parse5/-/parse5-7.1.2.tgz",
"integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==",
"requires": {
"entities": "^4.4.0"
}
},
"parse5-htmlparser2-tree-adapter": {
"version": "7.0.0",
"resolved": "https://registry.npmmirror.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz",
"integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==",
"requires": {
"domhandler": "^5.0.2",
"parse5": "^7.0.0"
}
},
"proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
}
}
}

View File

@@ -0,0 +1,17 @@
{
"name": "pc",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node-dev index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^1.3.4",
"cheerio": "^1.0.0-rc.12",
"iconv-lite": "^0.6.3"
}
}

View File

@@ -0,0 +1,15 @@
const axios = require('axios');
const iconv = require('iconv-lite');
const cheerio = require('cheerio');
class Utils {
async html(url,type = "") {
let res = await axios.get(url, {
responseType: 'arraybuffer'
});
return type != "" ? res.data : cheerio.load(iconv.decode(res.data, 'gb2312'))
}
}
module.exports = new Utils();

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,14 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {},
'postcss-pxtorem': {
rootValue: 37.5,
propList: ['*']
}
}
}

View File

@@ -0,0 +1,21 @@
# vuecli2x
> A Vue.js project
## 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,103 @@
'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/'),
'@c': resolve('src/components/'),
'@page': resolve('src/page/'),
'@config': resolve('src/config/'),
'@http': resolve('src/http/'),
'@service': resolve('src/service/'),
'@utils': resolve('src/utils/'),
}
},
module: {
rules: [
...(config.dev.useEslint ? [createLintingRule()] : []),
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
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]')
}
},
{
test: /\.less$/,
loader: "style-loader!css-loader!less-loader"
}
]
},
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: [`前端运行在这: 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,85 @@
'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: {
'/api': { //使用"/api"来代替
target: 'http://127.0.0.1:3000/api/json', //接口域名
changeOrigin: true, //改变源
pathRewrite: {
'^/api': '' //路径重写
}
}
},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 1314, // 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>vuecli2x</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,82 @@
{
"name": "vuecli2x",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "zhangsan <www.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.19.0",
"moment": "^2.29.4",
"vant": "^2.12.54",
"videojs-contrib-hls": "^5.15.0",
"vue": "^2.5.2",
"vue-router": "^3.0.1",
"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.3",
"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",
"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,17 @@
<template>
<div id="app">
<!-- <keep-alive> -->
<router-view/>
<!-- </keep-alive> -->
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
<style lang="less">
@import "~@less/common/normalize.less";
</style>

View File

@@ -0,0 +1,3 @@
@import "./mixins/index.less";
@import "./variable/colors.less";
@import "./variable/size.less";

View File

@@ -0,0 +1,422 @@
/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Change the default font family in all browsers (opinionated).
* 2. Prevent adjustments of font size after orientation changes in IE and iOS.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove the margin in all browsers (opinionated).
*/
body,h1,h2,h3,h4,h5,h6,ul,li,p,span{
margin: 0;
padding: 0;
list-style: none;
}
/* 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 */
text-decoration: none;
}
/**
* 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,313 @@
.border(@position: top) {
border-@{position}: 0.5px solid #ebedf0;
}
.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,5 @@
@import "../_.less";
.about {
}

View File

@@ -0,0 +1,13 @@
@import "../_.less";
.home {
/deep/ .van-tabs__wrap {
top: 0;
position: fixed;
width: 100%;
}
/deep/ .van-tabs__content {
margin-top: 44px;
}
}

View File

@@ -0,0 +1,69 @@
@import "../_.less";
.news {
.wrod {
margin-top: 1.65rem;
margin-left: 0.307rem;
margin-right: 0.333rem;
font-size: 0.533rem;
line-height: 0.72rem;
}
.title {
width: 9.36rem;
height: 1.227rem;
font-family: PingFang-SC-Bold;
font-size: 0.533rem;
line-height: 0.72rem;
letter-spacing: 0.013rem;
color: #333333
}
.time {
width: 5.333rem;
height: 0.307rem;
font-size: 0.32rem;
color: #999999;
// margin-left: 0.32rem;
}
.content {
margin-top: 0.907rem;
margin-left: 0.32rem;
margin-right: 0.32rem;
height: 400px;
font-size: 0.427rem;
line-height: 0.667rem;
color: #000000;
overflow-y: hidden;
}
.appear {
margin-top: 0;
margin-left: 4.32rem;
width: 0.693rem;
height: 0.533rem;
}
.active {
margin-top: 0.907rem;
margin-left: 0.32rem;
margin-right: 0.907rem;
height: auto;
font-size: 0.427rem;
line-height: 0.667rem;
color: #000000;
overflow-y: hidden;
}
.open {
width: 9.36rem;
height: 1.173rem;
background-color: #d0302c;
border-radius: 0.107rem;
font-size: 0.373rem;
line-height: 1.173rem;
color: #ffffff;
text-align: center;
}
}

View File

@@ -0,0 +1,101 @@
@import "../_.less";
.bunch_planting {
margin-top: 1.333rem;
.planting_box {
width: 10rem;
height: 5.627rem;
background-color: #000000;
}
.planting_desc {
width: 100%;
padding-top: 0.587rem;
padding-left: 0.37rem;
padding-right: 0.387rem;
padding-bottom: 0.24rem;
box-sizing: border-box;
p {
font-family: PingFangSC-Bold;
font-size: 0.48rem;
line-height: 0.76rem;
letter-spacing: 0rem;
color: #333333;
margin-bottom: 0.1rem;
}
span {
font-family: PingFangSC-Medium;
font-size: 0.307rem;
line-height: 0.576rem;
color: #999999;
}
.planting_icon {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 0.133rem;
.icon_left {
width: 35%;
height: max-content;
display: flex;
align-items: center;
justify-content: space-between;
div {
display: flex;
align-items: center;
}
}
.icon_right {
display: flex;
align-items: center;
img {
width: 0.227rem;
height: 0.133rem;
}
}
img {
width: 0.373rem;
height: 0.373rem;
margin-right: 0.107rem;
}
span {
font-family: PingFangSC-Medium;
font-size: 0.32rem;
line-height: 0.6rem;
letter-spacing: 0rem;
color: #999999;
margin-right: 0.1rem;
}
}
.planting_introduce {
// display: none;
font-family: PingFangSC-Medium;
font-size: 0.373rem;
line-height: 0.627rem;
letter-spacing: 0rem;
color: #999999;
margin-top: 0.467rem;
p {
font-family: PingFangSC-Medium;
font-size: 0.373rem;
line-height: 0.627rem;
color: #999999;
margin-top: 0.16rem;
}
}
}
}

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,5 @@
@s12: 12px;
@s13: 13px;
@s14: 14px;
@s15: 15px;
@s16: 16px;

View File

@@ -0,0 +1,13 @@
<template>
<div class="header">头部</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@@ -0,0 +1,19 @@
<template>
<div class="live">
融媒直播
</div>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style lang="less" scoped>
</style>

View File

@@ -0,0 +1,107 @@
<template>
<div class="radio">
<bh-video ref="bhVideo" v-if="videoUrl.length != 0" :show="false" :url="videoUrl"></bh-video>
<div class="title">{{ radioData.play_title }}</div>
<img class="fm" :src="radioData.play_img" alt="">
<img class="gif" :src="isPlaying ? '/static/img/sound_spectrum.gif' : '/static/img/sound_spectrum.png'" alt="">
<ul>
<li>
<img src="/static/img/live_broadcast_icon.png" alt="">
<p>当前直播</p>
</li>
<li>
<img @click="play" :src="isPlaying ? '/static/img/radio_stop.png' : '/static/img/radio_up.png'" alt="">
</li>
<li>
<img src="/static/img/program_list_icon.png" alt="">
<p>界面列表</p>
</li>
</ul>
</div>
</template>
<script>
export default {
data() {
return {
isPlaying: false, // false 表示未播放, true 正在播放
radioData: {},
videoUrl: []
}
},
created() {
this.getRadio()
},
methods: {
play() {
this.isPlaying ? this.$refs.bhVideo.PlayerPause() : this.$refs.bhVideo.PlayerPlay()
this.isPlaying = !this.isPlaying
},
async getRadio() {
this.radioData = await this.$http.index.radio();
this.videoUrl = [
{ type: 'application/x-mpegURL', src: this.radioData.play_url }
]
}
}
}
</script>
<style lang="less" scoped>
.radio {
display: flex;
flex-direction: column;
align-items: center;
.title {
font-family: PingFangSC-Bold;
font-size: 0.48rem;
color: #000000;
margin-top: 1.347rem;
margin-bottom: 0.84rem;
}
.fm {
width: 7.467rem;
height: 7.467rem;
margin-bottom: 0.667rem;
}
.gif {
width: 7.467rem;
height: 1.2rem;
margin-bottom: 0.733rem;
}
ul {
display: flex;
width: 7.467rem;
justify-content: space-between;
li {
text-align: center;
img {
width: 0.52rem;
height: 0.52rem;
}
p {
font-family: PingFang-SC-Medium;
font-size: 0.267rem;
color: #999999;
}
&:nth-child(2) {
img {
width: 1.6rem;
height: 1.6rem;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,128 @@
<template>
<div class="recommend">
<span class="t">相关推荐</span>
<div class="recommend_listHorizontal" v-if="them == 1">
<a class="recommend_list_item borde" v-for="(v, i) in arr" :key="i">
<img :src="v.image" alt="" />
<p>{{ v.content }}</p>
</a>
</div>
<div class="recommend_listVerticality" v-else>
<a class="recommend_list_item" v-for="(v, i) in arr" :key="i">
<div class="list_item_left">
<p>
{{ v.content }}
</p>
<span>{{ v.creatTime }}</span>
</div>
<img :src="v.image" alt="" />
</a>
</div>
</div>
</template>
<script>
export default {
data() {
return {};
},
created() {
// console.log(this.arr);
},
props: {
them: {
default: Number,
type: Number,
},
arr: {
//数组默认值只能是方法返回空数组
default: () => [],
type: Array,
},
},
methods: {},
};
</script>
<style lang="less" scoped>
@import "~@less/_";
.recommend {
.t {
font-family: PingFangSC-Bold;
font-size: 0.427rem;
font-weight: 600;
color: #333333;
padding-top: 0.427rem;
padding-bottom: 0.493rem;
padding-left: 0.32rem;
display: block;
.border(top);
}
.recommend_listHorizontal {
display: flex;
flex-wrap: nowrap;
overflow-x: scroll;
padding-left: 0.32rem;
.recommend_list_item {
width: 3.867rem;
height: 3.453rem;
margin-right: 0.147rem;
background: red;
flex-shrink: 0;
img {
width: 100%;
height: 2.08rem;
background-color: #000000;
border-radius: 0.053rem;
// opacity: 0.3;
margin-bottom: 0.1rem;
}
p {
width: 100%;
height: 1.3rem;
line-height: 0.627rem;
font-family: PingFangSC-Medium;
font-size: 0.373rem;
color: #333333;
overflow: hidden;
}
}
}
.recommend_listVerticality {
padding-right: 0.32rem;
padding-left: 0.32rem;
.recommend_list_item {
// height: 2.44rem;
display: flex;
justify-content: space-between;
padding-top: 0.3rem;
padding-bottom: 0.3rem;
box-sizing: border-box;
.border(bottom);
img {
width: 3.013rem;
height: 2.267rem;
}
}
.list_item_left {
height: 100%;
flex: 1;
p {
width: 100%;
margin-right: 0.413rem;
font-family: PingFangSC-Medium;
font-size: 0.427rem;
line-height: 0.667rem;
margin-bottom: 0.3rem;
color: #333333;
}
span {
font-family: PingFangSC-Medium;
font-size: 0.32rem;
color: #999999;
}
}
}
}
</style>

View File

@@ -0,0 +1,47 @@
<template>
<div class="tou">
<img class="logo" src="/static/img/gw_img_logo.png" alt="" />
<img class="icon" src="/static/img/icon/logo_text_icon.png" alt="" />
<div></div>
<img class="open" src="/static/img/打开副本.png" alt="" />
</div>
</template>
<script>
export default {};
</script>
<style scoped lang="less">
.tou {
display: flex;
justify-content: space-between;
align-items: center;
background: #4c4c4c;
height: 1.333rem;
width: 100%;
position: fixed;
top: 0;
z-index: 999;
}
.logo {
margin-left: 0.32rem;
width: 0.867rem;
height: 0.867rem;
}
.icon {
width: 1.76rem;
height: 0.613rem;
margin-left: -2rem;
}
.open {
width: 1.92rem;
height: 0.693rem;
margin-right: 0.533rem;
}
</style>

View File

@@ -0,0 +1,31 @@
<template>
<div class="tv">
<tv-list :list="tvData"></tv-list>
</div>
</template>
<script>
export default {
data() {
return {
tvData: []
}
},
created() {
this.getTv();
},
activated() {
console.log("activated");
},
methods: {
async getTv() {
this.tvData = await this.$http.index.tv();
console.log(this.tvData);
}
}
}
</script>
<style lang="less" scoped>
</style>

View File

@@ -0,0 +1,58 @@
<template>
<div class="tvList">
<ul>
<router-link tag="li" :to="{ name: 'tvInfo', query: { id: v.id } }" v-for="v, i in list" :key="i">
<p>{{ v.title }}</p>
<img v-show="showIcon" src="/static/img/act-list.gif" alt="">
</router-link>
</ul>
</div>
</template>
<script>
export default {
name: 'tv-list',
props: {
showIcon: {
type: Boolean,
default: false
},
list: {
type: Array,
default: () => []
}
},
data() {
return {
}
}
}
</script>
<style lang="less" scoped>
@import "~@less/mixins/index";
.tvList {
ul {
li {
height: 1.6rem;
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 0.547rem;
padding-right: 0.36rem;
.border(bottom);
p {
font-family: PingFangSC-Bold;
font-size: 0.427rem;
color: #333333;
}
img {
width: 0.36rem;
height: 0.4rem;
}
}
}
}
</style>

View File

@@ -0,0 +1,36 @@
<template>
<div class="header_icon">
<img src="../../static/img/icon/close.png" alt="" />
<span>安徽卫视</span>
<img src="../../static/img/icon/more.png" alt="" />
</div>
</template>
<script>
export default {};
</script>
<style lang="less" scoped>
.header_icon {
width: 100%;
height: 1.2rem;
position: fixed;
top:0;
z-index: 999;
background: #e1e1e1;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0.987rem;
box-sizing: border-box;
img {
width: 0.5rem;
height: 0.46rem;
}
span {
font-family: PingFang-SC-Bold;
font-size: 0.48rem;
color: #171717;
}
}
</style>

View File

@@ -0,0 +1,73 @@
<template>
<div class="video">
<video-player v-show="show" class="video-player-box" ref="videoPlayer" :options="playerOptions" :playsinline="true"
customEventName="customstatechangedeventname">
</video-player>
</div>
</template>
<script>
export default {
name: 'bh-video',
props: {
url: {
default: () => [],
type: Array
},
show: {
default: true,
type: Boolean
}
},
data() {
return {
playerOptions: {
// videojs options
autoplay: false,
muted: false,
preload: 'auto',
language: 'zh-CN',
fluid: true,
playbackRates: [0.7, 1.0, 1.5, 2.0],
sources: this.url,
// poster: "https://pic.qtfm.cn/2020/0311/20200311053004.png",
poster: "",
notSupportedMessage: '此视频暂无法播放,请稍后再试',
controlBar: {
timeDivider: true,
durationDisplay: true,
remainingTimeDisplay: false,
fullscreenToggle: true, // 全屏按钮
currentTimeDisplay: true, // 当前时间
volumeControl: false, // 声音控制键
playToggle: true, // 暂停和播放键
progressControl: true // 进度条
}
}
}
},
mounted() {
console.log('this is current player instance object', this.player)
},
computed: {
player() {
return this.$refs.videoPlayer.player
}
},
methods: {
PlayerPlay() {
this.player.play()
},
PlayerPause() {
this.player.pause()
},
}
}
</script>
<style lang="less" scoped>
.video {
width: 100%;
}
</style>

View File

@@ -0,0 +1,50 @@
import Vant from 'vant';
import 'vant/lib/index.css';
import 'videojs-contrib-hls'
import VueVideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
import service from './../service/_'
import utils from './../utils'
import VideoComponent from "../components/video";
import tvList from "@c/tvList";
export default {
devBaseUrl: '/api',
testBaseUrl: 'http://127.0.0.1:3000/test/api/json',
prodBaseUrl: 'http://127.0.0.1:3000/prod/api/json',
apiList: {
videoPlay: '/videoPlay',
tvInfo:'/tvInfo',
radio: '/radio',
tv: '/tv',
news:'/news',
},
checkStage: function () {
switch (process.env.NODE_ENV) {
case "development":
return this.devBaseUrl;
break;
case "test":
return this.testBaseUrl;
break;
case "production":
return this.prodBaseUrl;
break;
default:
break;
}
},
VueComponent: [VideoComponent, tvList],
VuePlugs: [ Vant, VueVideoPlayer ],
NotVuePlugs: [
{ n: '$http', v: service },
{ n: '$util', v: utils },
]
}

View File

@@ -0,0 +1,75 @@
import http from "axios";
import config from "@config/"
import { Toast } from 'vant';
class HTTP {
constructor() {
this.instance = http.create({
baseURL: config.checkStage(),
timeout: 3000,
headers: {
'Content-Type': 'application/json;charset:utf-8;'
}
});
this.interceptors()
}
async get(par) {
return await this.instance.get(par.url, {
params: par.data,
headers: Object.assign({
token: `${localStorage.getItem("token")}`
}, par.headers)
})
}
async post() {
return await this.instance.post(par.url, par.data, {
headers: Object.assign({
token: `${localStorage.getItem("token")}`
}, par.headers)
})
}
interceptors() {
// 添加请求拦截器
this.instance.interceptors.request.use(function (config) {
// 在发送请求之前做些什么
Toast.loading({
duration: 0,
forbidClick: true,
message: '加载中..',
});
return config;
}, function (error) {
// 对请求错误做些什么
return Promise.reject(error);
});
// 添加响应拦截器
this.instance.interceptors.response.use(function (response) {
// 对响应数据做点什么
Toast.clear();
switch (response.data.status) {
case 200:
return response.data.data;
break;
case 404:
Toast.fail(response.data.message);
throw new Error(response.data.message);
break;
default:
break;
}
}, function (error) {
// 对响应错误做点什么
return Promise.reject(error);
});
}
}
export default HTTP

View File

@@ -0,0 +1,18 @@
import 'amfe-flexible'
import Vue from 'vue'
import App from './App'
import router from './router'
import config from './config'
import http from './service/_'
config.VuePlugs.forEach(v => Vue.use(v))
config.NotVuePlugs.forEach(v => Vue.prototype[v.n] = v.v )
config.VueComponent.forEach(v => Vue.component(v.name, v))
Vue.config.productionTip = false
Vue.prototype.$http = http
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})

View File

@@ -0,0 +1,27 @@
<template>
<div class="about">
<VHeader></VHeader>
<h2>{{ title }}</h2>
</div>
</template>
<script>
import VHeader from '@c/header'
export default {
data() {
return {
title: '我的'
}
},
methods: {
},
components: {
VHeader
}
}
</script>
<style scoped lang="less">
@import "~@less/page/about";
</style>

View File

@@ -0,0 +1,51 @@
<template>
<div class="home">
<van-tabs v-model="active"
line-width="0.32rem"
title-inactive-color="#999"
title-active-color="#333"
:border="true">
<van-tab title="包河radio">
<Radio></Radio>
</van-tab>
<van-tab title="包河TV">
<Tv></Tv>
</van-tab>
<van-tab title="融媒直播">
<Live></Live>
</van-tab>
</van-tabs>
</div>
</template>
<script>
import Tv from "@c/tv.vue";
import Radio from "@c/radio.vue";
import Live from "@c/live.vue";
export default {
data() {
return {
title: "首页",
active: 0
};
},
created() {
// console.log(this.$util.test());
// this.getData()
},
methods: {
async getData() {
let res = await this.$http.index.home();
console.log(res);
}
},
components: {
Tv,Radio,Live
}
};
</script>
<style scoped lang="less">
@import "~@less/page/home";
</style>

View File

@@ -0,0 +1,82 @@
<template>
<div class="news">
<Tou></Tou>
<div class="wrod">
<div class="tittle">{{ news.title }}</div>
<div class="time">
<span>{{ this.time(news.creatTime) }}</span>
<span> 浏览量{{ news.browse }}</span>
</div>
<!-- <div :class="status ? 'active' : 'content'">
{{ news.content }}
</div> -->
<div class="content" :style=" {height: height} ">
{{ news.content }}
</div>
<div class="footer">
<img
v-if="status"
src="/static/img/select-down.png"
class="appear"
alt=""
@click="click()"
/>
<div class="open">打开APP阅读全文</div>
</div>
</div>
<Recommend
title="相关推荐"
:arr="news.relevantRecommendations"
>
</Recommend>
</div>
</template>
<script>
import Tou from "@c/tou.vue";
import Recommend from "@c/recommend.vue";
import moment from 'moment';
export default {
name: "news",
data() {
return {
height: '400px',
status: true,
news: {},
};
},
created() {
this.getNews();
},
methods: {
async getNews() {
this.news = await this.$http.index.news();
console.log("test:",this.news);
},
click() {
this.height ='auto';
this.status = false
},
time(){
return moment().format('YYYY-MM-DD HH:mm:ss');
}
},
components: {
Tou,Recommend
},
};
</script>
<style scoped lang="less">
@import "~@less/page/news";
</style>

View File

@@ -0,0 +1,92 @@
<template>
<div class="tvInfo">
<bh_header></bh_header>
<div class="tv_viode">
<bh-video
ref="bhVideo"
v-if="this.videoUrl.length != 0"
:show="false"
:url="this.videoUrl"
></bh-video>
</div>
<van-tabs v-model="active" line-width="0.533rem">
<van-tab title="频道">
<Tv></Tv>
</van-tab>
<van-tab title="评论"></van-tab>
</van-tabs>
</div>
</template>
<script>
import bh_header from "../components/tou.vue";
import Tv from "../components/tv.vue";
export default {
name: "bh-video",
props: {
url: {
default: () => [],
type: Array,
},
show: {
default: true,
type: Boolean,
},
},
data() {
return {
tvData: [],
active: 0,
isPlaying: false, // false 表示未播放, true 正在播放
videoUrl: [],
};
},
created() {
// this.tvInfo();
// console.log("你好");
},
methods: {
play() {
this.isPlaying
? this.$refs.bhVideo.PlayerPause()
: this.$refs.bhVideo.PlayerPlay();
this.isPlaying = !this.isPlaying;
},
async tvInfo() {
this.tvData = await this.$http.index.tvInfo();
console.log("tvdata", this.tvData);
// this.videoUrl = [
// { type: "application/x-mpegURL", src: this.tvData.list[this.$route.query.id].play_url },
// ];
// console.log(this.tvData.list[this.$route.query.id].play_url );
},
},
components: {
bh_header,
Tv,
},
};
</script>
<style lang="less" scoped>
@import "~@less/mixins/index";
.tvInfo {
.tv_viode {
margin-top: 1.2rem;
width: 100%;
height: 5.627rem;
background: #000000;
img {
width: 100%;
height: 100%;
background-color: #000000;
}
}
}
</style>

View File

@@ -0,0 +1,121 @@
<template>
<div class="videodemand">
<!-- <h4>电视详情</h4> -->
<!-- <v_herader_top></v_herader_top> -->
<bh_header></bh_header>
<div class="bunch_planting" v-if="this.res != ''">
<div class="planting_box"></div>
<div class="planting_desc">
<p>{{ this.res.play_title }}</p>
<span>{{ this.res.play_time }}</span>
<div class="planting_icon">
<div class="icon_left">
<div>
<img src="../../static/img/icon/collection-icon.png" />
<span>收藏</span>
</div>
<div>
<img src="../../static/img/icon/give_thumbs-up.png" />
<span>{{ this.res.play_fabulous }}</span>
</div>
</div>
<a class="icon_right" @click="changeShow">
<span>简介</span>
<img
:src="
isShow
? '../../static/img/icon/open-just.png'
: '../../static/img/icon/open-close.png'
"
/>
</a>
</div>
<div class="planting_introduce" v-show="isShow">
<p>{{ this.res.play_desc }}</p>
</div>
</div>
</div>
<v_recommend :them="2" :arr="arr"></v_recommend>
<div class=""></div>
<div class="comment_on">
<div class="comment_on_title">全部评论</div>
<div class="comment_on_all">打开APP查看全部评论</div>
</div>
</div>
</template>
<script>
import v_recommend from "../components/recommend.vue";
import bh_header from "../components/tou.vue";
import v_herader_top from "../components/v_header.vue";
export default {
data() {
let isShow = false;
let them = null;
let arr = [];
return {
them: 2,
arr: [],
res: null,
isShow,
};
},
created() {
this.getData();
// console.log("b");
},
methods: {
async getData() {
this.res = await this.$http.tvs.tvrecommend({
id: "" ? 12 : this.$route.query.id,
});
this.arr = this.res.relevantRecommendations;
// console.log("res", this.res);
},
changeShow() {
this.isShow = !this.isShow;
},
},
components: {
v_recommend,
bh_header,
v_herader_top,
},
};
</script>
<style lang="less" scoped>
@import "~@less/page/videodemand";
.comment_on {
.comment_on_title {
width: 10rem;
height: 1.333rem;
font-family: PingFangSC-Bold;
font-size: 0.427rem;
font-weight: 600;
line-height: 1.333rem;
color: #333333;
padding-left: 0.32rem;
box-sizing: border-box;
}
.comment_on_all {
width: 9.36rem;
height: 1.173rem;
background: #fff;
position: fixed;
bottom: 0;
left: (50%);
transform:translateX(-50%);
z-index: 999;
border-radius: 0.107rem;
border: solid 0.027rem #d0302c;
font-family: PingFangSC-Medium;
font-size: 0.373rem;
line-height: 0.627rem;
color: #d0302c;
text-align: center;
line-height: 1.173rem;
}
}
</style>

View File

@@ -0,0 +1,33 @@
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'home',
component: () => import(/* webpackChunkName: "home" */ '@page/home')
},
{
path: '/about',
name: 'about',
component: () => import(/* webpackChunkName: "about" */ '@page/about')
},
{
path: '/tvinfo',
name: 'tvInfo',
component: () => import(/* webpackChunkName: "about" */ '@page/tvInfo')
},
{
path: '/videodemand',
name: 'videodemand',
component: () => import(/* webpackChunkName: "videodemand" */ '@page/videodemand')
},
{
path: '/news',
name: 'news',
component: () => import(/* webpackChunkName: "news" */ '@/page/News.vue')
}
]
})

View File

@@ -0,0 +1,9 @@
import IndexService from "./indexService"
import CarService from "./carService"
import TvrecommendService from "./tvrecommendService"
export default {
tvs: new TvrecommendService(),
index: new IndexService(),
car: new CarService(),
}

View File

@@ -0,0 +1,14 @@
import http from "@http/"
import config from "@config/"
class CarService {
async index(data = {}, headers = {}) {
return await http.get({
url: config.apiList.index,
data,
headers
})
}
}
export default CarService

View File

@@ -0,0 +1,39 @@
import http from "@http/"
import config from "@config/"
class IndexService {
async tvInfo(data = {}, headers = {}) {
return await (new http()).get({
url: config.apiList.tvInfo,
data,
headers
})
}
async radio(data = {}, headers = {}) {
return await (new http()).get({
url: config.apiList.radio,
data,
headers
})
}
async tv(data = {}, headers = {}) {
return await (new http()).get({
url: config.apiList.tv,
data,
headers
})
}
async news(data = {}, headers = {}) {
return await (new http()).get({
url: config.apiList.news,
data,
headers
})
}
}
export default IndexService

View File

@@ -0,0 +1,14 @@
import http from "@http/"
import config from "@config/"
class TvrecommendService {
async tvrecommend(data = {}, headers = {}) {
return await (new http()).get({
url: config.apiList.videoPlay,
data,
headers
})
}
}
export default TvrecommendService

View File

@@ -0,0 +1,7 @@
class Utils {
test () {
return "哈哈哈"
}
}
export default new Utils()

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -0,0 +1,158 @@
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:10.000000,
0.ts
#EXTINF:10.000000,
1.ts
#EXTINF:10.000000,
2.ts
#EXTINF:10.000000,
3.ts
#EXTINF:10.000000,
4.ts
#EXTINF:10.000000,
5.ts
#EXTINF:10.000000,
6.ts
#EXTINF:10.000000,
7.ts
#EXTINF:10.000000,
8.ts
#EXTINF:10.000000,
9.ts
#EXTINF:10.000000,
10.ts
#EXTINF:10.000000,
11.ts
#EXTINF:10.000000,
12.ts
#EXTINF:10.000000,
13.ts
#EXTINF:10.000000,
14.ts
#EXTINF:10.000000,
15.ts
#EXTINF:10.000000,
16.ts
#EXTINF:10.000000,
17.ts
#EXTINF:10.000000,
18.ts
#EXTINF:10.000000,
19.ts
#EXTINF:10.000000,
20.ts
#EXTINF:10.000000,
21.ts
#EXTINF:10.000000,
22.ts
#EXTINF:10.000000,
23.ts
#EXTINF:10.000000,
24.ts
#EXTINF:10.000000,
25.ts
#EXTINF:10.000000,
26.ts
#EXTINF:10.000000,
27.ts
#EXTINF:10.000000,
28.ts
#EXTINF:10.000000,
29.ts
#EXTINF:10.000000,
30.ts
#EXTINF:10.000000,
31.ts
#EXTINF:10.000000,
32.ts
#EXTINF:10.000000,
33.ts
#EXTINF:10.000000,
34.ts
#EXTINF:10.000000,
35.ts
#EXTINF:10.000000,
36.ts
#EXTINF:10.000000,
37.ts
#EXTINF:10.000000,
38.ts
#EXTINF:10.000000,
39.ts
#EXTINF:10.000000,
40.ts
#EXTINF:10.000000,
41.ts
#EXTINF:10.000000,
42.ts
#EXTINF:10.000000,
43.ts
#EXTINF:10.000000,
44.ts
#EXTINF:10.000000,
45.ts
#EXTINF:10.000000,
46.ts
#EXTINF:10.000000,
47.ts
#EXTINF:10.000000,
48.ts
#EXTINF:10.000000,
49.ts
#EXTINF:10.000000,
50.ts
#EXTINF:10.000000,
51.ts
#EXTINF:10.000000,
52.ts
#EXTINF:10.000000,
53.ts
#EXTINF:10.000000,
54.ts
#EXTINF:10.000000,
55.ts
#EXTINF:10.000000,
56.ts
#EXTINF:10.000000,
57.ts
#EXTINF:10.000000,
58.ts
#EXTINF:10.000000,
59.ts
#EXTINF:10.000000,
60.ts
#EXTINF:10.000000,
61.ts
#EXTINF:10.000000,
62.ts
#EXTINF:10.000000,
63.ts
#EXTINF:10.000000,
64.ts
#EXTINF:10.000000,
65.ts
#EXTINF:10.000000,
66.ts
#EXTINF:10.000000,
67.ts
#EXTINF:10.000000,
68.ts
#EXTINF:10.000000,
69.ts
#EXTINF:10.000000,
70.ts
#EXTINF:10.000000,
71.ts
#EXTINF:10.000000,
72.ts
#EXTINF:10.000000,
73.ts
#EXTINF:10.000000,
74.ts
#EXTINF:6.760000,
75.ts
#EXT-X-ENDLIST

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

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