first commit

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

View File

@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<button>收藏</button>
<script src='//cdn.bootcss.com/jquery/3.1.1/jquery.min.js'></script>
<script>
// 当前要收藏的数据
const data = JSON.parse(localStorage.getItem("info"));
var likeData = [];
document.write(JSON.stringify(data))
$("button").on('click', function () {
console.log("status")
if (localStorage.getItem("like") !== null) {
console.log("status2")
// 收藏的数据
const like = JSON.parse(localStorage.getItem("like"));
var status = false // true 重复false 不重复
for (var i = 0;i<like.length;i++) {
if (like[i].id === data.id) {
status = true
break;
}
}
if (status) {
console.log("重复")
} else {
like.push(data)
localStorage.setItem("like", JSON.stringify(like))
}
} else {
likeData.push(data)
localStorage.setItem("like", JSON.stringify(likeData))
}
});
</script>
</body>
</html>

View File

@@ -0,0 +1,108 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>分类</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="./css/clear.css">
<link rel="stylesheet" href="./css/sm.css">
<link rel="stylesheet" href="https://unpkg.com/swiper/css/swiper.css">
<link rel="stylesheet" href="./css/class.css">
</head>
<body>
<div class="left">
<ul>
</ul>
</div>
<!-- 工具栏 -->
<nav class="bar bar-tab">
<a class="tab-item external active" href="./index.html">
<span class="icon icon-home"></span>
<span class="tab-label">推荐</span>
</a>
<a class="tab-item external" href="#">
<span class="icon icon-computer"></span>
<span class="tab-label">视频</span>
<span class="badge">2</span>
</a>
<a class="tab-item external" href="#">
<span class="icon icon-app"></span>
<span class="tab-label">分类</span>
</a>
<a class="tab-item external" href="#">
<span class="icon icon-menu"></span>
<span class="tab-label">菜单</span>
</a>
<a class="tab-item external" href="#">
<span class="icon icon-star"></span>
<span class="tab-label">收藏</span>
</a>
</nav>
<div class="right">
<ul>
</ul>
</div>
<script src='//cdn.bootcss.com/jquery/3.1.1/jquery.min.js'></script>
<script src="./js/type.js"></script>
<script>
const id = location.search.split("=")[1];
function renderUrl() {
type.result.forEach((val,index)=> {
if (val.parentId === id) {
bindClick( $(".left ul li").eq(index), index)
}
})
}
function RenderLeft() {
type.result.forEach(function (val,index) {
$(".left ul").append(`<li class="${index === 0 ? 'active' : '' }">${val.name}</li>`)
});
$(".left ul li").on('click', function () {
bindClick(this, $(this).index())
})
}
function bindClick(el, index) {
$(".right ul").empty()
el == null ? '' : $(el).addClass("active").siblings().removeClass("active")
const ri = type.result[index].list;
ri.forEach((val,index)=>{
$(".right ul").append(`
<li>
<a href="./list.html?menu_name=${val.name}">
<p>${val.name}</p>
</a>
</li>
`)
})
}
RenderLeft()
bindClick(null, 0)
renderUrl()
</script>
</body>
</html>

View File

@@ -0,0 +1,52 @@
.left{
overflow: hidden;
padding-left: 5px;
box-sizing: border-box;
position: fixed;
height: 100%;
overflow-y: scroll;
}
.left ul{
display: flex;
justify-content: space-around;
flex-direction: column;
height: -2%;
}
.left ul li{
margin: 18px 0;
font-size: 13px;
}
.active {
color: red;
}
.right{
margin-left: 31%;
}
.right ul{
width: 100%;
display: flex;
flex-wrap: wrap;
}
.right ul li{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width: 33.333%;
margin-top: 8px;
}
.right ul li a{
font-size: 13px;
color: #1a1a1a;
}
.right ul li p{
margin-top: 8px;
width: 55px;
height: 28px;
font-size: 11px;
color: #666666;
overflow: hidden;
text-align: center;
}

View File

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

View File

@@ -0,0 +1,66 @@
.content {
margin-top: 72px;
margin-bottom: 50px;
padding: 10px;
}
.search {
width: 100%;
position: fixed;
height: 72px;
left: 0;
top: 0;
background: #fff;
z-index: 999;
}
.search_f {
display: flex;
height: 45px;
background: #f5f5f5;
color: #999;
margin: 16px;
border-radius: 4px;
align-items: center;
padding-left: 16px;
}
.search .icon-search {
}
.search span {
}
.list_a{
width: 100%;
}
.list_a ul{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
}
.list_a ul li{
text-align: center;
width: 20%;
height: 30px;
margin: 0 10px 10px 10px;
background: #ffffff;
border-radius: 15px;
line-height: 30px;
}
.list_a ul a{
font-size: 13px;
color: #333333;
}
.content_h h3{
font-size: 16px;
color: #999999;
}
.list_b{
display: flex;
}
.list_b li{
margin-right: 10px;
}
.active{
font-size: 20px;
}

View File

@@ -0,0 +1,7 @@
ul{
width:100%;
text-align: center;
}
ul li{
font-size: 40px;
}

View File

@@ -0,0 +1,18 @@
html {
font-size: 20px;
}
@media only screen and (min-width: 400px) {
html {
font-size: 21.33333333px !important;
}
}
@media only screen and (min-width: 414px) {
html {
font-size: 22.08px !important;
}
}
@media only screen and (min-width: 480px) {
html {
font-size: 25.6px !important;
}
}

View File

@@ -0,0 +1,6 @@
input{
border: none;
background: #ffffff;
margin-left: 50px;
}
buttom{}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,536 @@
/**
* Swiper 5.3.7
* Most modern mobile touch slider and framework with hardware accelerated transitions
* http://swiperjs.com
*
* Copyright 2014-2020 Vladimir Kharlampidi
*
* Released under the MIT License
*
* Released on: April 10, 2020
*/
@font-face {
font-family: 'swiper-icons';
src: url("data:application/font-woff;charset=utf-8;base64, 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") format("woff");
font-weight: 400;
font-style: normal;
}
:root {
--swiper-theme-color: #007aff;
}
.swiper-container {
margin-left: auto;
margin-right: auto;
position: relative;
overflow: hidden;
list-style: none;
padding: 0;
/* Fix of Webkit flickering */
z-index: 1;
}
.swiper-container-vertical > .swiper-wrapper {
flex-direction: column;
}
.swiper-wrapper {
position: relative;
width: 100%;
height: 100%;
z-index: 1;
display: flex;
transition-property: transform;
box-sizing: content-box;
}
.swiper-container-android .swiper-slide,
.swiper-wrapper {
transform: translate3d(0px, 0, 0);
}
.swiper-container-multirow > .swiper-wrapper {
flex-wrap: wrap;
}
.swiper-container-multirow-column > .swiper-wrapper {
flex-wrap: wrap;
flex-direction: column;
}
.swiper-container-free-mode > .swiper-wrapper {
transition-timing-function: ease-out;
margin: 0 auto;
}
.swiper-slide {
flex-shrink: 0;
width: 100%;
height: 100%;
position: relative;
transition-property: transform;
}
.swiper-slide img{
width: 297px;
height: 297px;
border-radius: 10px;
}
.swiper-slide-invisible-blank {
visibility: hidden;
}
/* Auto Height */
.swiper-container-autoheight,
.swiper-container-autoheight .swiper-slide {
height: auto;
}
.swiper-container-autoheight .swiper-wrapper {
align-items: flex-start;
transition-property: transform, height;
}
/* 3D Effects */
.swiper-container-3d {
perspective: 1200px;
}
.swiper-container-3d .swiper-wrapper,
.swiper-container-3d .swiper-slide,
.swiper-container-3d .swiper-slide-shadow-left,
.swiper-container-3d .swiper-slide-shadow-right,
.swiper-container-3d .swiper-slide-shadow-top,
.swiper-container-3d .swiper-slide-shadow-bottom,
.swiper-container-3d .swiper-cube-shadow {
transform-style: preserve-3d;
}
.swiper-container-3d .swiper-slide-shadow-left,
.swiper-container-3d .swiper-slide-shadow-right,
.swiper-container-3d .swiper-slide-shadow-top,
.swiper-container-3d .swiper-slide-shadow-bottom {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 10;
}
.swiper-container-3d .swiper-slide-shadow-left {
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.swiper-container-3d .swiper-slide-shadow-right {
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.swiper-container-3d .swiper-slide-shadow-top {
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.swiper-container-3d .swiper-slide-shadow-bottom {
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
/* CSS Mode */
.swiper-container-css-mode > .swiper-wrapper {
overflow: auto;
scrollbar-width: none;
/* For Firefox */
-ms-overflow-style: none;
/* For Internet Explorer and Edge */
}
.swiper-container-css-mode > .swiper-wrapper::-webkit-scrollbar {
display: none;
}
.swiper-container-css-mode > .swiper-wrapper > .swiper-slide {
scroll-snap-align: start start;
}
.swiper-container-horizontal.swiper-container-css-mode > .swiper-wrapper {
scroll-snap-type: x mandatory;
}
.swiper-container-vertical.swiper-container-css-mode > .swiper-wrapper {
scroll-snap-type: y mandatory;
}
:root {
--swiper-navigation-size: 44px;
/*
--swiper-navigation-color: var(--swiper-theme-color);
*/
}
.swiper-button-prev,
.swiper-button-next {
position: absolute;
top: 50%;
width: calc(var(--swiper-navigation-size) / 44 * 27);
height: var(--swiper-navigation-size);
margin-top: calc(-1 * var(--swiper-navigation-size) / 2);
z-index: 10;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
color: var(--swiper-navigation-color, var(--swiper-theme-color));
}
.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
opacity: 0.35;
cursor: auto;
pointer-events: none;
}
.swiper-button-prev:after,
.swiper-button-next:after {
font-family: swiper-icons;
font-size: var(--swiper-navigation-size);
text-transform: none !important;
letter-spacing: 0;
text-transform: none;
font-variant: initial;
}
.swiper-button-prev,
.swiper-container-rtl .swiper-button-next {
left: 10px;
right: auto;
}
.swiper-button-prev:after,
.swiper-container-rtl .swiper-button-next:after {
content: 'prev';
}
.swiper-button-next,
.swiper-container-rtl .swiper-button-prev {
right: 10px;
left: auto;
}
.swiper-button-next:after,
.swiper-container-rtl .swiper-button-prev:after {
content: 'next';
}
.swiper-button-prev.swiper-button-white,
.swiper-button-next.swiper-button-white {
--swiper-navigation-color: #ffffff;
}
.swiper-button-prev.swiper-button-black,
.swiper-button-next.swiper-button-black {
--swiper-navigation-color: #000000;
}
.swiper-button-lock {
display: none;
}
:root {
/*
--swiper-pagination-color: var(--swiper-theme-color);
*/
}
.swiper-pagination {
position: absolute;
text-align: center;
transition: 300ms opacity;
transform: translate3d(0, 0, 0);
z-index: 10;
}
.swiper-pagination.swiper-pagination-hidden {
opacity: 0;
}
/* Common Styles */
.swiper-pagination-fraction,
.swiper-pagination-custom,
.swiper-container-horizontal > .swiper-pagination-bullets {
bottom: 10px;
left: 0;
width: 100%;
}
/* Bullets */
.swiper-pagination-bullets-dynamic {
overflow: hidden;
font-size: 0;
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transform: scale(0.33);
position: relative;
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {
transform: scale(1);
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {
transform: scale(1);
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {
transform: scale(0.66);
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {
transform: scale(0.33);
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {
transform: scale(0.66);
}
.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {
transform: scale(0.33);
}
.swiper-pagination-bullet {
width: 8px;
height: 8px;
display: inline-block;
border-radius: 100%;
background: #000;
opacity: 0.2;
}
button.swiper-pagination-bullet {
border: none;
margin: 0;
padding: 0;
box-shadow: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.swiper-pagination-clickable .swiper-pagination-bullet {
cursor: pointer;
}
.swiper-pagination-bullet-active {
opacity: 1;
background: var(--swiper-pagination-color, var(--swiper-theme-color));
}
.swiper-container-vertical > .swiper-pagination-bullets {
right: 10px;
top: 50%;
transform: translate3d(0px, -50%, 0);
}
.swiper-container-vertical > .swiper-pagination-bullets .swiper-pagination-bullet {
margin: 6px 0;
display: block;
}
.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
top: 50%;
transform: translateY(-50%);
width: 8px;
}
.swiper-container-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
display: inline-block;
transition: 200ms transform, 200ms top;
}
.swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
margin: 0 4px;
}
.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic {
left: 50%;
transform: translateX(-50%);
white-space: nowrap;
}
.swiper-container-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transition: 200ms transform, 200ms left;
}
.swiper-container-horizontal.swiper-container-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {
transition: 200ms transform, 200ms right;
}
/* Progress */
.swiper-pagination-progressbar {
background: rgba(0, 0, 0, 0.25);
position: absolute;
}
.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
background: var(--swiper-pagination-color, var(--swiper-theme-color));
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
transform: scale(0);
transform-origin: left top;
}
.swiper-container-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
transform-origin: right top;
}
.swiper-container-horizontal > .swiper-pagination-progressbar,
.swiper-container-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
width: 100%;
height: 4px;
left: 0;
top: 0;
}
.swiper-container-vertical > .swiper-pagination-progressbar,
.swiper-container-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite {
width: 4px;
height: 100%;
left: 0;
top: 0;
}
.swiper-pagination-white {
--swiper-pagination-color: #ffffff;
}
.swiper-pagination-black {
--swiper-pagination-color: #000000;
}
.swiper-pagination-lock {
display: none;
}
/* Scrollbar */
.swiper-scrollbar {
border-radius: 10px;
position: relative;
-ms-touch-action: none;
background: rgba(0, 0, 0, 0.1);
}
.swiper-container-horizontal > .swiper-scrollbar {
position: absolute;
left: 1%;
bottom: 3px;
z-index: 50;
height: 5px;
width: 98%;
}
.swiper-container-vertical > .swiper-scrollbar {
position: absolute;
right: 3px;
top: 1%;
z-index: 50;
width: 5px;
height: 98%;
}
.swiper-scrollbar-drag {
height: 100%;
width: 100%;
position: relative;
background: rgba(0, 0, 0, 0.5);
border-radius: 10px;
left: 0;
top: 0;
}
.swiper-scrollbar-cursor-drag {
cursor: move;
}
.swiper-scrollbar-lock {
display: none;
}
.swiper-zoom-container {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.swiper-zoom-container > img,
.swiper-zoom-container > svg,
.swiper-zoom-container > canvas {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
.swiper-slide-zoomed {
cursor: move;
}
/* Preloader */
:root {
/*
--swiper-preloader-color: var(--swiper-theme-color);
*/
}
.swiper-lazy-preloader {
width: 42px;
height: 42px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -21px;
margin-top: -21px;
z-index: 10;
transform-origin: 50%;
animation: swiper-preloader-spin 1s infinite linear;
box-sizing: border-box;
border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));
border-radius: 50%;
border-top-color: transparent;
}
.swiper-lazy-preloader-white {
--swiper-preloader-color: #fff;
}
.swiper-lazy-preloader-black {
--swiper-preloader-color: #000;
}
@keyframes swiper-preloader-spin {
100% {
transform: rotate(360deg);
}
}
/* a11y */
.swiper-container .swiper-notification {
position: absolute;
left: 0;
top: 0;
pointer-events: none;
opacity: 0;
z-index: -1000;
}
.swiper-container-fade.swiper-container-free-mode .swiper-slide {
transition-timing-function: ease-out;
}
.swiper-container-fade .swiper-slide {
pointer-events: none;
transition-property: opacity;
}
.swiper-container-fade .swiper-slide .swiper-slide {
pointer-events: none;
}
.swiper-container-fade .swiper-slide-active,
.swiper-container-fade .swiper-slide-active .swiper-slide-active {
pointer-events: auto;
}
.swiper-container-cube {
overflow: visible;
}
.swiper-container-cube .swiper-slide {
pointer-events: none;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
z-index: 1;
visibility: hidden;
transform-origin: 0 0;
width: 100%;
height: 100%;
}
.swiper-container-cube .swiper-slide .swiper-slide {
pointer-events: none;
}
.swiper-container-cube.swiper-container-rtl .swiper-slide {
transform-origin: 100% 0;
}
.swiper-container-cube .swiper-slide-active,
.swiper-container-cube .swiper-slide-active .swiper-slide-active {
pointer-events: auto;
}
.swiper-container-cube .swiper-slide-active,
.swiper-container-cube .swiper-slide-next,
.swiper-container-cube .swiper-slide-prev,
.swiper-container-cube .swiper-slide-next + .swiper-slide {
pointer-events: auto;
visibility: visible;
}
.swiper-container-cube .swiper-slide-shadow-top,
.swiper-container-cube .swiper-slide-shadow-bottom,
.swiper-container-cube .swiper-slide-shadow-left,
.swiper-container-cube .swiper-slide-shadow-right {
z-index: 0;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.swiper-container-cube .swiper-cube-shadow {
position: absolute;
left: 0;
bottom: 0px;
width: 100%;
height: 100%;
background: #000;
opacity: 0.6;
-webkit-filter: blur(50px);
filter: blur(50px);
z-index: 0;
}
.swiper-container-flip {
overflow: visible;
}
.swiper-container-flip .swiper-slide {
pointer-events: none;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
z-index: 1;
}
.swiper-container-flip .swiper-slide .swiper-slide {
pointer-events: none;
}
.swiper-container-flip .swiper-slide-active,
.swiper-container-flip .swiper-slide-active .swiper-slide-active {
pointer-events: auto;
}
.swiper-container-flip .swiper-slide-shadow-top,
.swiper-container-flip .swiper-slide-shadow-bottom,
.swiper-container-flip .swiper-slide-shadow-left,
.swiper-container-flip .swiper-slide-shadow-right {
z-index: 0;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}

View File

@@ -0,0 +1,219 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>首页</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="./css/clear.css">
<link rel="stylesheet" href="./css/public.css">
<link rel="stylesheet" href="./css/sm.css">
<link rel="stylesheet" href="./css/swiper.css">
<link rel="stylesheet" href="./css/index.css">
</head>
<body>
<div class="page">
<!-- 这里是页面内容区 -->
<div class="content">
<div class="search">
<a class="tab-item external active" href="./search.html">
<div class="search_f">
<label class="icon icon-search" for="search"></label>
<span>搜索百万免费菜谱</span>
</div>
</a>
</div>
<div class="content-padded">
<h2>今日热门</h2>
</div>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide"><img src="https://st-cn.meishij.net/p2/20200414/20200414180023_774.jpg" alt=""></div>
<div class="swiper-slide"><img src="https://st-cn.meishij.net/p2/20200414/20200414180204_544.jpg" alt=""></div>
<div class="swiper-slide"><img src="https://st-cn.meishij.net/p2/20200414/20200414180259_701.jpg" alt=""></div>
</div>
</div>
<div class="content-padded">
<h2>为你推荐</h2>
</div>
<div class="list_a">
<ul>
<li><a href="">每日优惠</a></li>
<li><a href="">食材大全</a></li>
<li><a href="">热门话题</a></li>
<li><a href="./class.html">菜谱分类</a></li>
<li><a href="">本周流行</a></li>
<li><a href="">菜谱视频</a></li>
</ul>
</div>
<div class="content_h">
<h3>每日三餐</h3>
</div>
<ul class="list_b">
</ul>
<ul class="list_bc">
</ul>
<ul class="list">
<li>
<a href="./class.html?id=10007">菜系</a>
</li>
<li>
<a href="./class.html?id=10009">西点</a>
</li>
</ul>
</div>
<!-- 工具栏 -->
<nav class="bar bar-tab">
<a class="tab-item external active" href="#">
<span class="icon icon-home"></span>
<span class="tab-label">推荐</span>
</a>
<a class="tab-item external" href="#">
<span class="icon icon-computer"></span>
<span class="tab-label">视频</span>
<span class="badge">2</span>
</a>
<a class="tab-item external" href="./class.html">
<span class="icon icon-app"></span>
<span class="tab-label">分类</span>
</a>
<a class="tab-item external" href="#">
<span class="icon icon-menu"></span>
<span class="tab-label">菜单</span>
</a>
<a class="tab-item external" href="./Collection.html">
<span class="icon icon-star"></span>
<span class="tab-label">收藏</span>
</a>
</nav>
</div>
<!-- popup, panel 等放在这里 -->
<div class="panel-overlay"></div>
<!-- Left Panel with Reveal effect -->
<div class="panel panel-left panel-reveal">
<div class="content-block">
<p>这是一个侧栏</p>
<p></p>
<!-- Click on link with "close-panel" class will close panel -->
<p><a href="#" class="close-panel">关闭</a></p>
</div>
</div>
<script src='//cdn.bootcss.com/jquery/3.1.1/jquery.min.js'></script>
<script src="https://unpkg.com/swiper/js/swiper.min.js"> </script>
<script src='https://sui.ctolog.com/dist/js/sm.js'></script>
<script src="./js/type.js"></script>
<script>
// var mySwiper = new Swiper('.swiper-container', {
// autoplay: 5000,//可选选项,自动滑动
// f
// });
// function f() {
// console.log('1')
// }
function Rendertop() {
const bi = type.result[4].list;
bi.forEach(function (val,index) {
if( index < 5){
$(".list_b").append(`<li class="${index === 0 ? 'active' : ''}">${val.name}</li>`)
}
});
console.log(bi)
Rendliclick(bi)
}
function Rendliclick(list) {
var li = Array.from($(".list_b li"))
console.log(li)
li.forEach(function (val,index) {
console.log(val)
val.onclick = function () {
li.forEach((v,i) => {
v.className = ""
});
val.className = "active"
console.log(list[index].name)
getbotdata(list[index].name)
}
})
}
function getbotdata(menu) {
$.ajax({
type: "GET",
url: "http://127.0.0.1/caipu/index.php",
data: {
menu: menu,
page: 1,
limit: 10
},
success: function (res) {
const data = JSON.parse(res);
console.log(data)
if (data.result.data.length === 0) {
document.write("没有数据")
} else {
list = data.result.data
// renderPage(JSON.parse(list))
renderPage(list)
}
},
error: function (err) {
console.log(err)
}
});
}
function renderPage(res) {
$(".list_bc").empty()
console.log(res)
res.forEach(function (val,index) {
if(index<2){
console.log(val)
$(".list_bc").append(`
<img src="${val.albums}" alt="">
<li>${val.title}</li>
`)
}
})
}
Rendertop()
getbotdata('早餐')
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>菜谱列表页面</title>
<link rel="stylesheet" href="./css/clear.css">
<link rel="stylesheet" href="./css/list.css">
</head>
<body>
<ul>
</ul>
<script src='//cdn.bootcss.com/jquery/3.1.1/jquery.min.js'></script>
<script>
const MenuName = location.search.split("=")[1];
$.ajax({
type: "GET",
url: "http://127.0.0.1/caipu/index.php",
data: {
menu: MenuName,
page: 1,
limit: 10
},
success: function (res) {
const data = JSON.parse(res);
if (data.result.data.length === 0) {
document.write("没有数据")
} else {
renderPage(JSON.parse(res))
console.log(JSON.parse(res))
}
},
error: function (err) {
console.log(err)
}
});
function renderPage(res) {
res.result.data.forEach((val,index)=>{
$("ul").append(`<li>${val.title}</li>`)
});
$("ul li").on('click', function () {
localStorage.setItem("info", JSON.stringify(res.result.data[$(this).index()]))
location.href = "./Collection.html"
})
}
</script>
</body>
</html>

View File

@@ -0,0 +1,78 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>首页</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="./css/sm.css">
<link rel="stylesheet" href="https://unpkg.com/swiper/css/swiper.min.css">
<link rel="stylesheet" href="./css/index.css">
<link rel="stylesheet" href="./css/clear.css">
</head>
<body>
<div class="page">
<header class="bar bar-nav">
<h1 class="title">菜单</h1>
</header>
<!-- 这里是页面内容区 -->
<div class="content">
</div>
<!-- 工具栏 -->
<nav class="bar bar-tab">
<a class="tab-item external active" href="#">
<span class="icon icon-home"></span>
<span class="tab-label">推荐</span>
</a>
<a class="tab-item external" href="#">
<span class="icon icon-computer"></span>
<span class="tab-label">视频</span>
<span class="badge">2</span>
</a>
<a class="tab-item external" href="./class.html">
<span class="icon icon-app"></span>
<span class="tab-label">分类</span>
</a>
<a class="tab-item external" href="#">
<span class="icon icon-menu"></span>
<span class="tab-label">菜单</span>
</a>
<a class="tab-item external" href="#">
<span class="icon icon-star"></span>
<span class="tab-label">收藏</span>
</a>
</nav>
</div>
<!-- popup, panel 等放在这里 -->
<div class="panel-overlay"></div>
<!-- Left Panel with Reveal effect -->
<div class="panel panel-left panel-reveal">
<div class="content-block">
<p>这是一个侧栏</p>
<p></p>
<!-- Click on link with "close-panel" class will close panel -->
<p><a href="#" class="close-panel">关闭</a></p>
</div>
</div>
<script src='//cdn.bootcss.com/jquery/3.1.1/jquery.min.js'></script>
<script src="https://unpkg.com/swiper/js/swiper.min.js"> </script>
<script src='https://sui.ctolog.com/dist/js/sm.js'></script>
</body>
</htm>

View File

@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>搜索页面</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="./css/sm.css">
<link rel="stylesheet" href="./css/search.css">
</head>
<body>
<input type="text" placeholder="输入关键词">
<button>搜索</button>
<div class="result">
</div>
</body>
<script src='//cdn.bootcss.com/jquery/3.1.1/jquery.min.js'></script>
<script>
$("button").on('click', function () {
console.log( $("input").val() )
$.ajax({
type: "GET",
url: "http://127.0.0.1/cp/index.php",
data: {
menu: $("input").val(),
page: 1,
limit: 10
},
success: function (res) {
const data = JSON.parse(res);
if (data.result == null) {
$(".result").empty();
$(".result").append(`<h2>没有数据</h2>`)
} else {
renderPage(data)
}
},
error: function (err) {
console.log(err)
}
});
});
function renderPage(data) {
console.log(data)
$(".result").empty();
data.result.data.forEach((val)=>{
$(".result").append(`<p>${val.title}</p>`)
})
}
</script>
</html>