code
stringlengths 1
1.05M
| repo_name
stringlengths 6
83
| path
stringlengths 3
242
| language
stringclasses 222
values | license
stringclasses 20
values | size
int64 1
1.05M
|
|---|---|---|---|---|---|
:root {
--auto-center-width: 1160px;
}
body {
background-color: gray;
}
a {
color: white;
text-decoration: none;
}
a:active {
color: blue;
}
/* 版心 */
.auto-center {
width: var(--auto-center-width);
margin-left: auto;
margin-right: auto;
}
/* 默认是横跨一行,宽度为100%,但是不小于版心宽度 */
.full-center {
min-width: var(--auto-center-width);
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-29(30)-day23/cheng/css/common.css
|
CSS
|
unknown
| 411
|
.footer, .copy {
color:white;
background-color: #22212f;
}
.footer>.auto-center {
display: flex;
align-items: flex-start;
padding-top: 57px;
}
.footer .service {
width:290px;
border-right: 1px solid #4c4f5f;
}
.footer .chat {
display: flex;
padding: 0 30px 18px;
}
.footer .concat {
flex:1;
display: flex;
flex-direction: column;
justify-content: center;
margin-left:10px;
}
.footer .phone {
font-size: 22px;
}
.footer .phone-desc {
font-size: 14px;
color: #d2d2d2;
}
.footer .qrcode {
display: flex;
flex-direction: column;
align-items: center;
}
.footer .qrcode-desc {
margin-top: 15px;
color: #cecece;
font-size: 12px;
}
.footer .nav {
flex:1;
display: flex;
justify-content: flex-end;
font-size: 14px;
}
.footer .nav>.nav-item {
display: flex;
flex-direction: column;
margin-left:150px;
}
.footer .nav .title {
font-size: 16px;
margin-bottom: 42px;
}
.footer .nav-item a {
margin-bottom: 20px;
}
.copy {
padding-top: 20px;
}
.copy>.auto-center {
text-align: center;
line-height: 50px;
border-top: 1px solid #4c4f5f;
color:#7e8088;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-29(30)-day23/cheng/css/footer.css
|
CSS
|
unknown
| 1,202
|
.header-fixed{
position: fixed;
left: 0;
right: 0;
top: 22px;
}
.header>.auto-center{
display: flex;
justify-content: space-between;
}
.header .logo{
width: 92px;
height: 36px;
background: url("../images/logofanbai.png") center / contain no-repeat;
}
.header .nav{
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
}
.header .nav>.nav-item {
position: relative;
display: flex;
align-items: center;
margin-left: 46px;
}
.header .arrow-down {
margin-left:9px;
}
.header .mask {
position: absolute;
top:30px;
left:-20px;
width:100px;
max-height:0;
display:flex;
flex-direction: column;
background-color: rgba(0,0,0,.5);
transition: all 0.5s linear;
overflow:hidden;
}
.header .nav>.nav-item:hover .mask {
max-height:500px;
}
.header .mask>a{
text-align: center;
padding: 10px;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-29(30)-day23/cheng/css/header.css
|
CSS
|
unknown
| 942
|
.banner {
background: url("../images/banner-main.jpg") center / cover no-repeat;
height: 664px;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-29(30)-day23/cheng/css/index.css
|
CSS
|
unknown
| 105
|
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-29(30)-day23/cheng/css/reset.css
|
CSS
|
unknown
| 1,092
|
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="keywords" content="橙券">
<meta name="description" content="橙券">
<title>橙券</title>
<link rel="stylesheet" href="./css/reset.css">
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/header.css">
<link rel="stylesheet" href="./css/footer.css">
<link rel="stylesheet" href="./css/index.css?v=1">
</head>
<body>
<header class="header header-fixed">
<div class="auto-center">
<a class="logo" href="#"></a>
<ul class="nav">
<li class="nav-item">
<a href="#">首页</a>
</li>
<li class="nav-item">
<a href="#">橙品牌</a>
<img class="arrow-down" src="./images/arrow-down.png" alt="arrow-down" width="13px" height="6px">
<div class="mask">
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
</div>
</li>
<li class="nav-item">
<a href="#">橙权益</a>
</li>
<li class="nav-item">
<a href="#">行业案例</a>
</li>
<li class="nav-item">
<a href="#">新闻动态</a>
<img class="arrow-down" src="./images/arrow-down.png" alt="arrow-down" width="13px" height="6px">
<div class="mask">
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
</div>
</li>
<li class="nav-item">
<a href="#">关于我们</a>
</li>
</ul>
</div>
</header>
<div class="banner full-center"></div>
<main class="auto-center" style="height: 1000px;"></main>
<footer class="footer">
<div class="auto-center">
<div class="service">
<div class="chat">
<img src="./images/service.png" alt="service" width="50px" height="50px"><div class="concat">
<span class="phone">400-096-0828</span>
<span class="phone-desc">
7*24小时客服为您服务
</span> </div>
</div>
<div class="qrcode">
<img src="./images/QR-code.png" alt="#" width="159px"
height="159px">
<span class="qrcode-desc">微信扫描二维码,关注【橙券】</span>
</div>
</div>
<ul class="nav">
<li class="nav-item">
<span class="title">橙品牌</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">橙品牌</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">快速入口</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">快速入口</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
</ul>
</div>
</footer>
<div class="copy">
<div class="auto-center">
©2019 山东鼎信网络科技有限公司 鲁ICP备13023321号-25
</div>
</div>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-29(30)-day23/cheng/index.html
|
HTML
|
unknown
| 4,746
|
:root {
--auto-center-width: 1160px;
}
body {
font: 12px/1.5 "Microsoft YaHei","Heiti SC",tahoma,arial,"Hiragino Sans GB","\5B8B\4F53",sans-serif;
}
a {
color: white;
text-decoration: none;
}
a:active {
color: blue;
}
/* 版心 */
.auto-center {
width: var(--auto-center-width);
margin-left: auto;
margin-right: auto;
}
/* 默认是横跨一行,宽度为100%,但是不小于版心宽度 */
.full-center {
min-width: var(--auto-center-width);
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-31-day24/cheng/css/common.css
|
CSS
|
unknown
| 488
|
.footer, .copy {
color:white;
background-color: #22212f;
}
.footer>.auto-center {
display: flex;
align-items: flex-start;
padding-top: 57px;
}
.footer .service {
width:290px;
border-right: 1px solid #4c4f5f;
}
.footer .chat {
display: flex;
padding: 0 30px 18px;
}
.footer .concat {
flex:1;
display: flex;
flex-direction: column;
justify-content: center;
margin-left:10px;
}
.footer .phone {
font-size: 22px;
}
.footer .phone-desc {
font-size: 14px;
color: #d2d2d2;
}
.footer .qrcode {
display: flex;
flex-direction: column;
align-items: center;
}
.footer .qrcode-desc {
margin-top: 15px;
color: #cecece;
font-size: 12px;
}
.footer .nav {
flex:1;
display: flex;
justify-content: flex-end;
font-size: 14px;
}
.footer .nav>.nav-item {
display: flex;
flex-direction: column;
margin-left:150px;
}
.footer .nav .title {
font-size: 16px;
margin-bottom: 42px;
}
.footer .nav-item a {
margin-bottom: 20px;
}
.copy {
padding-top: 20px;
}
.copy>.auto-center {
text-align: center;
line-height: 50px;
border-top: 1px solid #4c4f5f;
color:#7e8088;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-31-day24/cheng/css/footer.css
|
CSS
|
unknown
| 1,202
|
.header-fixed{
position: fixed;
left: 0;
right: 0;
top: 22px;
z-index: 1;
}
.header>.auto-center{
display: flex;
justify-content: space-between;
}
.header .logo{
width: 92px;
height: 36px;
background: url("../images/logofanbai.png") center / contain no-repeat;
}
.header .nav{
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
}
.header .nav>.nav-item {
position: relative;
display: flex;
align-items: center;
margin-left: 46px;
}
.header .arrow-down {
margin-left:9px;
}
.header .mask {
position: absolute;
top:30px;
left:-20px;
width:100px;
max-height:0;
display:flex;
flex-direction: column;
background-color: rgba(0,0,0,.5);
transition: all 0.5s linear;
overflow:hidden;
}
.header .nav>.nav-item:hover .mask {
max-height:500px;
}
.header .mask>a{
text-align: center;
padding: 10px;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-31-day24/cheng/css/header.css
|
CSS
|
unknown
| 958
|
.banner {
position: relative;;
background: url("../images/banner-main.jpg") center / cover no-repeat;
height: 664px;
}
.banner .dots {
position: absolute;
left: 50%;
bottom: 78px;
transform: translateX(-50%);
display: flex;
}
.banner .dots>.dot-item {
width: 49px;
height: 3px;
margin-right: 17px;
background-color: #838a94;
border-radius: 2px;
}
.banner .dots>.dot-item:last-child {
margin-right: 0;
}
.banner .dots>.dot-item.active{
background-color: #fff;
}
.brand{
position: relative;
top: -38px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 24px 34px;
background-color: #fff;
box-shadow: 0px 0px 54px 0px
rgba(92, 107, 143, 0.21);
}
.brand .desc{
font-size: 20px;
color: #333333;
}
.brand .button {
color:#ff7200;
border-color: #ff7200;
}
.button {
display: flex;
align-items: center;
padding: 12px 43px;
border-radius: 20px;
border: solid 1px #fff;
color:#fff;
font-size: 16px;
}
.button>img {
margin-left: 8px;
transition: all 0.2s linear;
}
.button:hover {
cursor:pointer;
}
.button:hover>img{
transform: translateX(10px);
}
.function {
margin-top: 120px;
}
.function .title,.vendor .title {
text-align: center;
}
.function .products {
display: flex;
justify-content: space-between;
padding: 66px 0;
}
.function .products>.pro-item {
position: relative;
width:280px;
height:400px;
}
.function .products .pro-bg,
.function .products .pro-bg-hover,
.function .products .pro-desc {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.function .products .pro-bg,
.function .products .pro-bg-hover {
background: center / cover no-repeat;
transition: transform .3s linear;
}
.function .products .pro-bg {
opacity: 1;
}
.function .products .pro-bg-hover {
opacity: 0;
}
.function .pro-item:hover .pro-bg {
opacity: 0;
}
.function .pro-item:hover .pro-bg-hover {
opacity: 1;
transform: scale(1.3);
z-index: 1;
}
.function .pro-desc{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index:2;
}
.function .pro-title {
margin-top: 38px;
font-size: 28px;
color:#fff;
}
.function .pro-title-desc {
margin-top: 13px;
font-size: 16px;
color: #dadada;
}
.function .pro-more {
opacity: 0;
margin-top: 24px;
}
.function .pro-item:hover .pro-more{
opacity:1;
}
.vendor {
margin-top: 80px;
}
.vendor .button-group {
display: flex;
justify-content: space-between;
margin-top: 70px;
}
.vendor .button-item {
padding: 16px 56px;
background-color: #ffffff;
box-shadow: 0px -1px 21px 0px
rgba(192, 192, 192, 0.35);
border-radius: 25px;
color: #333;
font-size: 18px;
}
.vendor .button-item:hover {
background-color: #ff7200;
color:#fff;
}
.vendor .types{
position: relative;
margin-top: 100px;
display: flex;
justify-content: space-between;
align-items: center;
}
.vendor .type-item {
display: flex;
flex-direction: column;
width: 500px;
height: 391px;
padding: 75px 0 75px 45px;
background-color: #ffffff;
box-shadow: 0px -1px 21px 0px
rgba(192, 192, 192, 0.35);
opacity: 0.45;
box-sizing: border-box;
}
.vendor .type-left .type-logo {
margin-left: 39px;
}
.vendor .type-middle {
position: absolute;
left: 50%;
height: 452px;
z-index:2;
align-items: center;
box-shadow: 0px -1px 21px 0px
rgba(114, 113, 113, 0.3);
opacity: 1;
padding-right: 45px;
transform: translateX(-50%);
}
.vendor .type-right {
align-items: flex-end;
}
.vendor .type-right .type-logo {
margin-right: 39px;
}
.vendor .type-desc {
margin-top:66px;
text-indent:2em;
font-size: 14px;
line-height: 30px;
color: #666666;
}
.ad{
display: flex;
flex-direction: column;
align-items: center;
margin-top: 143px;
padding: 100px 0 67px;
background: url("../images/banner-footer.png") center / cover no-repeat;
}
.ad .title {
font-size: 48px;
color: #fff;
}
.ad .phones {
margin-top: 24px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 20px;
color:#fff;
}
.ad .phones .border {
width: 1px;
height: 16px;
margin:0 27px;
background-color: #ffffff;
}
.ad .button {
margin-top:31px;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-31-day24/cheng/css/index.css
|
CSS
|
unknown
| 4,515
|
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-31-day24/cheng/css/reset.css
|
CSS
|
unknown
| 1,092
|
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="keywords" content="橙券">
<meta name="description" content="橙券">
<title>橙券</title>
<link rel="stylesheet" href="./css/reset.css">
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/header.css">
<link rel="stylesheet" href="./css/footer.css">
<link rel="stylesheet" href="./css/index.css?v=1">
</head>
<body>
<header class="header header-fixed">
<div class="auto-center">
<a class="logo" href="#"></a>
<ul class="nav">
<li class="nav-item">
<a href="#">首页</a>
</li>
<li class="nav-item">
<a href="#">橙品牌</a>
<img class="arrow-down" src="./images/arrow-down.png" alt="arrow-down" width="13px" height="6px">
<div class="mask">
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
</div>
</li>
<li class="nav-item">
<a href="#">橙权益</a>
</li>
<li class="nav-item">
<a href="#">行业案例</a>
</li>
<li class="nav-item">
<a href="#">新闻动态</a>
<img class="arrow-down" src="./images/arrow-down.png" alt="arrow-down" width="13px" height="6px">
<div class="mask">
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
</div>
</li>
<li class="nav-item">
<a href="#">关于我们</a>
</li>
</ul>
</div>
</header>
<div class="banner full-center">
<ul class="dots">
<li class="dot-item active"></li>
<li class="dot-item"></li>
<li class="dot-item"></li>
<li class="dot-item"></li>
</ul>
</div>
<main class="auto-center">
<section class="brand">
<img src="./images/logo-unfont.png" alt="logo-unfont" width="76" height="70">
<span class="desc">橙券,是权益营销方案提供商,为实现品牌-市场-用户的紧密互联提供强有力的智慧支持。</span>
<div class="button">
<span>了解更多</span>
<img src="./images/arrow-right-orange.png" alt="arrow-right-orange" width="6" height="12">
</div>
</section>
<section class="function">
<div class="title">
<img src="./images/logo-title.png" alt="logo-title" width="391" height="86">
</div>
<ul class="products">
<li class="pro-item">
<div class="pro-bg" style="background-image: url(./images/type1-sell.png);"></div>
<div class="pro-bg-hover" style="background-image: url(./images/type1-sell-hover.png)"></div>
<div class="pro-desc">
<img src="./images/type1-sell-icon.png" alt="type1-sell-icon" width="90" height="90">
<span class="pro-title">橙营销</span>
<span class="pro-title-desc">
营销助力品牌升级
</span>
<div class="button pro-more">
<span>了解更多</span>
<img src="./images/arrow-right-white.png" alt="arrow-right-white" width="6" height="12">
</div>
</div>
</li>
<li class="pro-item">
<div class="pro-bg" style="background-image: url(./images/type1-sell.png);"></div>
<div class="pro-bg-hover" style="background-image: url(./images/type1-sell-hover.png)"></div>
<div class="pro-desc">
<img src="./images/type1-sell-icon.png" alt="type1-sell-icon" width="90" height="90">
<span class="pro-title">橙营销</span>
<span class="pro-title-desc">
营销助力品牌升级
</span>
<div class="button pro-more">
<span>了解更多</span>
<img src="./images/arrow-right-white.png" alt="arrow-right-white" width="6" height="12">
</div>
</div>
</li>
<li class="pro-item">
<div class="pro-bg" style="background-image: url(./images/type1-sell.png);"></div>
<div class="pro-bg-hover" style="background-image: url(./images/type1-sell-hover.png)"></div>
<div class="pro-desc">
<img src="./images/type1-sell-icon.png" alt="type1-sell-icon" width="90" height="90">
<span class="pro-title">橙营销</span>
<span class="pro-title-desc">
营销助力品牌升级
</span>
<div class="button pro-more">
<span>了解更多</span>
<img src="./images/arrow-right-white.png" alt="arrow-right-white" width="6" height="12">
</div>
</div>
</li>
<li class="pro-item">
<div class="pro-bg" style="background-image: url(./images/type1-sell.png);"></div>
<div class="pro-bg-hover" style="background-image: url(./images/type1-sell-hover.png)"></div>
<div class="pro-desc">
<img src="./images/type1-sell-icon.png" alt="type1-sell-icon" width="90" height="90">
<span class="pro-title">橙营销</span>
<span class="pro-title-desc">
营销助力品牌升级
</span>
<div class=" button
pro-more">
<span>了解更多</span>
<img src="./images/arrow-right-white.png" alt="arrow-right-white" width="6" height="12">
</div>
</div>
</li>
</ul>
</section>
<section class="vendor">
<div class="title">
<img src="./images/logo-title2.png" alt="logo-title2" width="302" height="79">
</div>
<div class="button-group">
<a class="button-item" href="#">金融行业</a>
<a class="button-item" href="#">金融行业</a>
<a class="button-item" href="#">金融行业</a>
<a class="button-item" href="#">金融行业</a>
<a class="button-item" href="#">金融行业</a>
<a class="button-item" href="#">金融行业</a>
</div>
<div class="types">
<img src="./images/arrow-left-gray.png" alt="arrow-left-gray" width="53" height="53">
<div class="type-item type-left">
<img class="type-logo" src="./images/B-CUCC.png" alt="B-CUCC" width="218" height="55">
<p class="type-desc">
作为中国的银行卡联合组织,中国银联处于我国银行卡产业的核心和枢纽地位,对我国银行卡产业发展发挥着基础性作用,各银行通过银联跨行交易清算系统,实现了系统间的互联互通,进而使银行卡得以跨银行、跨地区和跨境使用。
</p>
</div>
<div class="type-item type-middle">
<img class="type-logo" src="./images/B-CUCC.png" alt="B-CUCC" width="218" height="55">
<p class="type-desc">
作为中国的银行卡联合组织,中国银联处于我国银行卡产业的核心和枢纽地位,对我国银行卡产业发展发挥着基础性作用,各银行通过银联跨行交易清算系统,实现了系统间的互联互通,进而使银行卡得以跨银行、跨地区和跨境使用。
</p>
</div>
<div class="type-item type-right">
<img class="type-logo" src="./images/B-CUCC.png" alt="B-CUCC" width="218" height="55">
<p class="type-desc">
作为中国的银行卡联合组织,中国银联处于我国银行卡产业的核心和枢纽地位,对我国银行卡产业发展发挥着基础性作用,各银行通过银联跨行交易清算系统,实现了系统间的互联互通,进而使银行卡得以跨银行、跨地区和跨境使用。
</p>
</div>
<img src="./images/arrow-right-gray.png" alt="arrow-right-gray" width="53" height="53">
</div>
</section>
</main>
<div class="ad full-center">
<div class="title">
依托橙券,聚焦权益,全面合作
</div>
<div class="phones">
<span>全国服务热线:400-096-0828</span>
<span class="border"></span>
<span>商务合作专线:156-6806-1789</span>
</div>
<div class="button">
<span>了解更多</span>
<img src="./images/arrow-right-white.png" alt="arrow-right-white" width="6" height="12">
</div>
</div>
<footer class="footer">
<div class="auto-center">
<div class="service">
<div class="chat">
<img src="./images/service.png" alt="service" width="50px" height="50px"><div class="concat">
<span class="phone">400-096-0828</span>
<span class="phone-desc">
7*24小时客服为您服务
</span> </div>
</div>
<div class="qrcode">
<img src="./images/QR-code.png" alt="#" width="159px"
height="159px">
<span class="qrcode-desc">微信扫描二维码,关注【橙券】</span>
</div>
</div>
<ul class="nav">
<li class="nav-item">
<span class="title">橙品牌</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">橙品牌</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">快速入口</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">快速入口</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
</ul>
</div>
</footer>
<div class="copy">
<div class="auto-center">
©2019 山东鼎信网络科技有限公司 鲁ICP备13023321号-25
</div>
</div>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-7-31-day24/cheng/index.html
|
HTML
|
unknown
| 12,573
|
<!--
* @Author: Zhouxin 2890091630@qq.com
* @Date: 2024-09-11 10:45:35
* @LastEditors: Zhouxin 2890091630@qq.com
* @LastEditTime: 2024-09-11 10:45:42
* @FilePath: \2024-8-1-day25\1.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<div class="a">
创作活动<a href="https://mp.csdn.net/mp_blog/manage/creative" target="_blank"
data-report-click="{"spm":"3001.9462"}" data-report-query="spm=3001.9462"
class="show-more-link aside-common-box-more" data-v-2f83e7b6="">更多<img
src="https://img-home.csdnimg.cn/images/20211026015802.png" alt="" class="arrow-icon"
data-v-2f83e7b6=""></a></div>
<style>
.a{
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
font-size: 16px;
color: #222226;
font-weight: 500;
line-height: 48px;
padding: 0 16px;
border-bottom: 1px solid #e8e8ed;
}
</style>
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-8-1-day25/1.html
|
HTML
|
unknown
| 1,075
|
:root {
--auto-center-width: 1160px;
--header-z-index: 999;
--a-color: blue;
--a-color-active: white;
--header-white-hover: #ff7200;
}
body {
font: 12px/1.5 "Microsoft YaHei","Heiti SC",tahoma,arial,"Hiragino Sans GB","\5B8B\4F53",sans-serif;
}
a {
color: white;
text-decoration: none;
}
a:active {
color: blue;
}
/* 版心 */
.auto-center {
width: var(--auto-center-width);
margin-left: auto;
margin-right: auto;
}
/* 默认是横跨一行,宽度为100%,但是不小于版心宽度 */
.full-center {
min-width: var(--auto-center-width);
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-8-1-day25/css/common.css
|
CSS
|
unknown
| 600
|
.footer, .copy {
color:white;
background-color: #22212f;
}
.footer>.auto-center {
display: flex;
align-items: flex-start;
padding-top: 57px;
}
.footer .service {
width:290px;
border-right: 1px solid #4c4f5f;
}
.footer .chat {
display: flex;
padding: 0 30px 18px;
}
.footer .concat {
flex:1;
display: flex;
flex-direction: column;
justify-content: center;
margin-left:10px;
}
.footer .phone {
font-size: 22px;
}
.footer .phone-desc {
font-size: 14px;
color: #d2d2d2;
}
.footer .qrcode {
display: flex;
flex-direction: column;
align-items: center;
}
.footer .qrcode-desc {
margin-top: 15px;
color: #cecece;
font-size: 12px;
}
.footer .nav {
flex:1;
display: flex;
justify-content: flex-end;
font-size: 14px;
}
.footer .nav>.nav-item {
display: flex;
flex-direction: column;
margin-left:150px;
}
.footer .nav .title {
font-size: 16px;
margin-bottom: 42px;
}
.footer .nav-item a {
margin-bottom: 20px;
}
.copy {
padding-top: 20px;
}
.copy>.auto-center {
text-align: center;
line-height: 50px;
border-top: 1px solid #4c4f5f;
color:#7e8088;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-8-1-day25/css/footer.css
|
CSS
|
unknown
| 1,202
|
.header-fixed{
position: fixed;
left: 0;
right: 0;
z-index: var(--header-z-index);
}
.header>.auto-center{
display: flex;
justify-content: space-between;
}
.header .logo{
width: 92px;
height: 36px;
background: url("../images/logofanbai.png") center / contain no-repeat;
}
.header .nav{
display: flex;
justify-content: space-between;
align-items: center;
font-size: 16px;
}
.header .nav>.nav-item {
position: relative;
display: flex;
align-items: center;
margin-left: 46px;
}
.header .arrow-down {
margin-left:9px;
}
.header .mask {
position: absolute;
top:30px;
left:-20px;
width:100px;
max-height:0;
display:flex;
flex-direction: column;
background-color: rgba(0,0,0,.5);
transition: all 0.5s linear;
overflow:hidden;
}
.header .nav>.nav-item:hover .mask {
max-height:500px;
}
.header {
padding: 22px 0;
}
.header .mask>a{
text-align: center;
padding: 10px;
}
.header-white .mask>a{
color:#fff;
}
.header-white .mask>a:hover {
color: var(--header-white-hover);
}
.header-white {
background-color: #fff;
}
.header-white a {
color:#333;
}
.header-white a:hover{
color: var(--header-white-hover);
}
.header-white .logo {
background-image: url("../images/logo.png");
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-8-1-day25/css/header.css
|
CSS
|
unknown
| 1,332
|
.banner {
position: relative;;
background: url("../images/banner-main.jpg") center / cover no-repeat;
height: 664px;
}
.banner .dots {
position: absolute;
left: 50%;
bottom: 78px;
transform: translateX(-50%);
display: flex;
}
.banner .dots>.dot-item {
width: 49px;
height: 3px;
margin-right: 17px;
background-color: #838a94;
border-radius: 2px;
}
.banner .dots>.dot-item:last-child {
margin-right: 0;
}
.banner .dots>.dot-item.active{
background-color: #fff;
}
.brand{
position: relative;
top: -38px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 24px 34px;
background-color: #fff;
box-shadow: 0px 0px 54px 0px
rgba(92, 107, 143, 0.21);
}
.brand .desc{
font-size: 20px;
color: #333333;
}
.brand .button {
color:#ff7200;
border-color: #ff7200;
}
.button {
display: flex;
align-items: center;
padding: 12px 43px;
border-radius: 20px;
border: solid 1px #fff;
color:#fff;
font-size: 16px;
}
.button>img {
margin-left: 8px;
transition: all 0.2s linear;
}
.button:hover {
cursor:pointer;
}
.button:hover>img{
transform: translateX(10px);
}
.function {
margin-top: 120px;
}
.function .title,.vendor .title {
text-align: center;
}
.function .products {
display: flex;
justify-content: space-between;
padding: 66px 0;
}
.function .products>.pro-item {
position: relative;
width:280px;
height:400px;
}
.function .products .pro-bg,
.function .products .pro-bg-hover,
.function .products .pro-desc {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.function .products .pro-bg,
.function .products .pro-bg-hover {
background: center / cover no-repeat;
transition: transform .3s linear;
}
.function .products .pro-bg {
opacity: 1;
}
.function .products .pro-bg-hover {
opacity: 0;
}
.function .pro-item:hover .pro-bg {
opacity: 0;
}
.function .pro-item:hover .pro-bg-hover {
opacity: 1;
transform: scale(1.3);
z-index: 1;
}
.function .pro-desc{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index:2;
}
.function .pro-title {
margin-top: 38px;
font-size: 28px;
color:#fff;
}
.function .pro-title-desc {
margin-top: 13px;
font-size: 16px;
color: #dadada;
}
.function .pro-more {
opacity: 0;
margin-top: 24px;
}
.function .pro-item:hover .pro-more{
opacity:1;
}
.vendor {
margin-top: 80px;
}
.vendor .button-group {
display: flex;
justify-content: space-between;
margin-top: 70px;
}
.vendor .button-item {
padding: 16px 56px;
background-color: #ffffff;
box-shadow: 0px -1px 21px 0px
rgba(192, 192, 192, 0.35);
border-radius: 25px;
color: #333;
font-size: 18px;
}
.vendor .button-item:hover {
background-color: #ff7200;
color:#fff;
}
.vendor .types{
position: relative;
margin-top: 100px;
display: flex;
justify-content: space-between;
align-items: center;
}
.vendor .type-item {
display: flex;
flex-direction: column;
width: 500px;
height: 391px;
padding: 75px 0 75px 45px;
background-color: #ffffff;
box-shadow: 0px -1px 21px 0px
rgba(192, 192, 192, 0.35);
opacity: 0.45;
box-sizing: border-box;
}
.vendor .type-left .type-logo {
margin-left: 39px;
}
.vendor .type-middle {
position: absolute;
left: 50%;
height: 452px;
z-index:2;
align-items: center;
box-shadow: 0px -1px 21px 0px
rgba(114, 113, 113, 0.3);
opacity: 1;
padding-right: 45px;
transform: translateX(-50%);
}
.vendor .type-right {
align-items: flex-end;
}
.vendor .type-right .type-logo {
margin-right: 39px;
}
.vendor .type-desc {
margin-top:66px;
text-indent:2em;
font-size: 14px;
line-height: 30px;
color: #666666;
}
.ad{
display: flex;
flex-direction: column;
align-items: center;
margin-top: 143px;
padding: 100px 0 67px;
background: url("../images/banner-footer.png") center / cover no-repeat;
}
.ad .title {
font-size: 48px;
color: #fff;
}
.ad .phones {
margin-top: 24px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 20px;
color:#fff;
}
.ad .phones .border {
width: 1px;
height: 16px;
margin:0 27px;
background-color: #ffffff;
}
.ad .button {
margin-top:31px;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-8-1-day25/css/index.css
|
CSS
|
unknown
| 4,515
|
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-8-1-day25/css/reset.css
|
CSS
|
unknown
| 1,092
|
.banner {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 380px;
background: url("../images/settle/supplier-cooperation.jpg") center / cover no-repeat;
color: #fff;
}
.banner .title {
font-size:44px;
margin-bottom:26px;
font-weight:normal;
}
.banner .desc {
font-size:22px;
}
.flow-path {
margin-top: 62px;
}
.flow-path .title {
font-size: 30px;
text-align: center;
}
.flow-path .step {
margin-top: 74px;
padding: 0 127px;
display: flex;
justify-content: space-between;
align-items: center;
color:#333;
font-size:20px;
}
.flow-path .step-item {
display: flex;
flex-direction: column;
align-items: center;
}
.flow-path .step-item>img {
margin-bottom: 36px;
}
.flow-path .right-arrow {
margin-bottom: 60px;
}
.apply {
margin-top: 127px;
padding-top: 65px;
padding-bottom: 107px;
background: url("../images/settle/residency-application.jpg") center / cover no-repeat;
}
.apply .title {
display: flex;
align-items: center;
font-size: 30px;
color:#333;
}
.apply .title::before {
content: '';
margin-right:20px;
width:2px;
height:36px;
background-color: #333;
}
.apply .form {
padding-top: 1px;
}
.apply .form-row{
margin-top: 50px;
}
.apply .form input {
width: 493px;
padding: 22px 0 22px 22px;
font-size: 16px;
color: #999;
outline: none;
background-color: #ffffff;
border-radius: 2px;
border: solid 1px #d3d3d3;
}
.apply .form button {
padding: 12px 43px;
background-color: #ff7200;
border-radius: 20px;
border: none;
font-size: 16px;
color: #fff;
}
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-8-1-day25/css/settle.css
|
CSS
|
unknown
| 1,712
|
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="keywords" content="橙券">
<meta name="description" content="橙券">
<title>橙券</title>
<link rel="stylesheet" href="./css/reset.css">
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/header.css">
<link rel="stylesheet" href="./css/footer.css">
<link rel="stylesheet" href="./css/index.css?v=1">
</head>
<body>
<header class="header header-fixed">
<div class="auto-center">
<a class="logo" href="#"></a>
<ul class="nav">
<li class="nav-item">
<a href="#">首页</a>
</li>
<li class="nav-item">
<a href="#">橙品牌</a>
<img class="arrow-down" src="./images/arrow-down.png" alt="arrow-down" width="13px" height="6px">
<div class="mask">
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
</div>
</li>
<li class="nav-item">
<a href="#">橙权益</a>
</li>
<li class="nav-item">
<a href="#">行业案例</a>
</li>
<li class="nav-item">
<a href="#">新闻动态</a>
<img class="arrow-down" src="./images/arrow-down.png" alt="arrow-down" width="13px" height="6px">
<div class="mask">
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
</div>
</li>
<li class="nav-item">
<a href="#">关于我们</a>
</li>
</ul>
</div>
</header>
<div class="banner full-center">
<ul class="dots">
<li class="dot-item active"></li>
<li class="dot-item"></li>
<li class="dot-item"></li>
<li class="dot-item"></li>
</ul>
</div>
<main class="auto-center">
<section class="brand">
<img src="./images/logo-unfont.png" alt="logo-unfont" width="76" height="70">
<span class="desc">橙券,是权益营销方案提供商,为实现品牌-市场-用户的紧密互联提供强有力的智慧支持。</span>
<div class="button">
<span>了解更多</span>
<img src="./images/arrow-right-orange.png" alt="arrow-right-orange" width="6" height="12">
</div>
</section>
<section class="function">
<div class="title">
<img src="./images/logo-title.png" alt="logo-title" width="391" height="86">
</div>
<ul class="products">
<li class="pro-item">
<div class="pro-bg" style="background-image: url(./images/type1-sell.png);"></div>
<div class="pro-bg-hover" style="background-image: url(./images/type1-sell-hover.png)"></div>
<div class="pro-desc">
<img src="./images/type1-sell-icon.png" alt="type1-sell-icon" width="90" height="90">
<span class="pro-title">橙营销</span>
<span class="pro-title-desc">
营销助力品牌升级
</span>
<div class="button pro-more">
<span>了解更多</span>
<img src="./images/arrow-right-white.png" alt="arrow-right-white" width="6" height="12">
</div>
</div>
</li>
<li class="pro-item">
<div class="pro-bg" style="background-image: url(./images/type1-sell.png);"></div>
<div class="pro-bg-hover" style="background-image: url(./images/type1-sell-hover.png)"></div>
<div class="pro-desc">
<img src="./images/type1-sell-icon.png" alt="type1-sell-icon" width="90" height="90">
<span class="pro-title">橙营销</span>
<span class="pro-title-desc">
营销助力品牌升级
</span>
<div class="button pro-more">
<span>了解更多</span>
<img src="./images/arrow-right-white.png" alt="arrow-right-white" width="6" height="12">
</div>
</div>
</li>
<li class="pro-item">
<div class="pro-bg" style="background-image: url(./images/type1-sell.png);"></div>
<div class="pro-bg-hover" style="background-image: url(./images/type1-sell-hover.png)"></div>
<div class="pro-desc">
<img src="./images/type1-sell-icon.png" alt="type1-sell-icon" width="90" height="90">
<span class="pro-title">橙营销</span>
<span class="pro-title-desc">
营销助力品牌升级
</span>
<div class="button pro-more">
<span>了解更多</span>
<img src="./images/arrow-right-white.png" alt="arrow-right-white" width="6" height="12">
</div>
</div>
</li>
<li class="pro-item">
<div class="pro-bg" style="background-image: url(./images/type1-sell.png);"></div>
<div class="pro-bg-hover" style="background-image: url(./images/type1-sell-hover.png)"></div>
<div class="pro-desc">
<img src="./images/type1-sell-icon.png" alt="type1-sell-icon" width="90" height="90">
<span class="pro-title">橙营销</span>
<span class="pro-title-desc">
营销助力品牌升级
</span>
<div class=" button
pro-more">
<span>了解更多</span>
<img src="./images/arrow-right-white.png" alt="arrow-right-white" width="6" height="12">
</div>
</div>
</li>
</ul>
</section>
<section class="vendor">
<div class="title">
<img src="./images/logo-title2.png" alt="logo-title2" width="302" height="79">
</div>
<div class="button-group">
<a class="button-item" href="#">金融行业</a>
<a class="button-item" href="#">金融行业</a>
<a class="button-item" href="#">金融行业</a>
<a class="button-item" href="#">金融行业</a>
<a class="button-item" href="#">金融行业</a>
<a class="button-item" href="#">金融行业</a>
</div>
<div class="types">
<img src="./images/arrow-left-gray.png" alt="arrow-left-gray" width="53" height="53">
<div class="type-item type-left">
<img class="type-logo" src="./images/B-CUCC.png" alt="B-CUCC" width="218" height="55">
<p class="type-desc">
作为中国的银行卡联合组织,中国银联处于我国银行卡产业的核心和枢纽地位,对我国银行卡产业发展发挥着基础性作用,各银行通过银联跨行交易清算系统,实现了系统间的互联互通,进而使银行卡得以跨银行、跨地区和跨境使用。
</p>
</div>
<div class="type-item type-middle">
<img class="type-logo" src="./images/B-CUCC.png" alt="B-CUCC" width="218" height="55">
<p class="type-desc">
作为中国的银行卡联合组织,中国银联处于我国银行卡产业的核心和枢纽地位,对我国银行卡产业发展发挥着基础性作用,各银行通过银联跨行交易清算系统,实现了系统间的互联互通,进而使银行卡得以跨银行、跨地区和跨境使用。
</p>
</div>
<div class="type-item type-right">
<img class="type-logo" src="./images/B-CUCC.png" alt="B-CUCC" width="218" height="55">
<p class="type-desc">
作为中国的银行卡联合组织,中国银联处于我国银行卡产业的核心和枢纽地位,对我国银行卡产业发展发挥着基础性作用,各银行通过银联跨行交易清算系统,实现了系统间的互联互通,进而使银行卡得以跨银行、跨地区和跨境使用。
</p>
</div>
<img src="./images/arrow-right-gray.png" alt="arrow-right-gray" width="53" height="53">
</div>
</section>
</main>
<div class="ad full-center">
<div class="title">
依托橙券,聚焦权益,全面合作
</div>
<div class="phones">
<span>全国服务热线:400-096-0828</span>
<span class="border"></span>
<span>商务合作专线:156-6806-1789</span>
</div>
<div class="button">
<span>了解更多</span>
<img src="./images/arrow-right-white.png" alt="arrow-right-white" width="6" height="12">
</div>
</div>
<footer class="footer">
<div class="auto-center">
<div class="service">
<div class="chat">
<img src="./images/service.png" alt="service" width="50px" height="50px"><div class="concat">
<span class="phone">400-096-0828</span>
<span class="phone-desc">
7*24小时客服为您服务
</span> </div>
</div>
<div class="qrcode">
<img src="./images/QR-code.png" alt="#" width="159px"
height="159px">
<span class="qrcode-desc">微信扫描二维码,关注【橙券】</span>
</div>
</div>
<ul class="nav">
<li class="nav-item">
<span class="title">橙品牌</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">橙品牌</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">快速入口</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">快速入口</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
</ul>
</div>
</footer>
<div class="copy">
<div class="auto-center">
©2019 山东鼎信网络科技有限公司 鲁ICP备13023321号-25
</div>
</div>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-8-1-day25/index.html
|
HTML
|
unknown
| 12,573
|
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="keywords" content="橙券">
<meta name="description" content="橙券">
<title>橙券</title>
<link rel="stylesheet" href="./css/reset.css">
<link rel="stylesheet" href="./css/common.css">
<link rel="stylesheet" href="./css/header.css">
<link rel="stylesheet" href="./css/footer.css">
<link rel="stylesheet" href="./css/settle.css?v=1">
</head>
<body>
<header class="header header-white">
<div class="auto-center">
<a class="logo" href="#"></a>
<ul class="nav">
<li class="nav-item">
<a href="#">首页</a>
</li>
<li class="nav-item">
<a href="#">橙品牌</a>
<img class="arrow-down" src="./images/arrow-down.png" alt="arrow-down" width="13px" height="6px">
<div class="mask">
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
</div>
</li>
<li class="nav-item">
<a href="#">橙权益</a>
</li>
<li class="nav-item">
<a href="#">行业案例</a>
</li>
<li class="nav-item">
<a href="#">新闻动态</a>
<img class="arrow-down" src="./images/arrow-down.png" alt="arrow-down" width="13px" height="6px">
<div class="mask">
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
<a href="#">橙品牌</a>
</div>
</li>
<li class="nav-item">
<a href="#">关于我们</a>
</li>
</ul>
</div>
</header>
<div class="banner full-center">
<h3 class="title">供应商合作</h3>
<p class="desc">橙券诚邀您的加入,更高效的合作方式,更尖端的技术接入</p>
<p class="desc">我们期待与您携手前行共创未来</p>
</div>
<div class="flow-path auto-center">
<p class="title">入驻流程</p>
<div class="step">
<div class="step-item">
<img src="./images/settle/fill-in-information.png" alt="fill-in-information" width="130" height="130">
<span>填写信息</span>
</div>
<img class="right-arrow" src="./images/settle/right-arrow.png" alt="right-arrow" width="52" height="24">
<div class="step-item">
<img src="./images/settle/business-relations.png" alt="business-relations" width="130" height="130">
<span>商务联系</span>
</div>
<img class="right-arrow" src="./images/settle/right-arrow.png" alt="right-arrow" width="52" height="24">
<div class="step-item">
<img src="./images/settle/negotiate-resources.png" alt="negotiate-resources" width="130" height="130">
<span>洽谈资源</span>
</div>
<img class="right-arrow" src="./images/settle/right-arrow.png" alt="right-arrow" width="52" height="24">
<div class="step-item">
<img src="./images/settle/sign-up-for-cooperation.png" alt="sign-up-for-cooperation" width="130" height="130">
<span>签约合作</span>
</div>
</div>
</div>
<div class="apply full-center">
<div class="auto-center">
<h4 class="title">入驻申请</h4>
<form class="form" action="#">
<div>
<input class="form-row" type="text" placeholder="您的姓名">
</div>
<div>
<input class="form-row" type="text" placeholder="您的手机号码">
</div>
<div>
<input class="form-row" type="text" placeholder="您要供应的资源">
</div>
<div class="form-row">
<button type="submit">
提交信息
</button>
</div>
</form>
</div>
</div>
<footer class="footer">
<div class="auto-center">
<div class="service">
<div class="chat">
<img src="./images/service.png" alt="service" width="50px" height="50px"><div class="concat">
<span class="phone">400-096-0828</span>
<span class="phone-desc">
7*24小时客服为您服务
</span> </div>
</div>
<div class="qrcode">
<img src="./images/QR-code.png" alt="#" width="159px"
height="159px">
<span class="qrcode-desc">微信扫描二维码,关注【橙券】</span>
</div>
</div>
<ul class="nav">
<li class="nav-item">
<span class="title">橙品牌</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">橙品牌</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">快速入口</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
<li class="nav-item">
<span class="title">快速入口</span>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
<a href="#">橙营销</a>
</li>
</ul>
</div>
</footer>
<div class="copy">
<div class="auto-center">
©2019 山东鼎信网络科技有限公司 鲁ICP备13023321号-25
</div>
</div>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第一阶段:HTML和CSS3/2024-8-1-day25/settle.html
|
HTML
|
unknown
| 7,063
|
<!--
* @Author: your name
* @Date: 2020-07-24 19:46:37
* @LastEditTime: 2020-07-24 23:01:41
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \作业\homework.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>作用域练习</title>
</head>
<body>
<script>
var x = 10;
function fn() {
x = 20;
console.log(x); //这里打印值是多少?
var x = 30;
}
x = 30;
fn();
console.log(x); //这里打印值是多少?
/*============================分割线========================== */
console.log(x);//这里打印值是多少?
var x = function () {
x = 90;
}
x();
var x = 30;
function x() {
x = 40;
}
console.log(x); //这里打印值是多少?
/*============================分割线========================== */
var x = 20;
function fn1() {
console.log(x); //这里打印值是多少?
}
x = 30;
function fn2() {
var x = 1;
fn1();
}
x = 40;
fn2();
/*============================分割线========================== */
var x = 20;
function fn() {
if (x) {
var x = 30;
}
console.log(x);//这里打印值是多少?
}
fn();
console.log(x);//这里打印值是多少?
/*============================分割线========================== */
function fun(param) {
console.log(param);//这里打印值是多少?
var param = function () {
console.log(1);
}
console.log(param);//这里打印值是多少?
}
fun(5);
/*============================分割线========================== */
var foo = 1;
function bar() {
function foo() { }
foo = 10;
console.log(foo);//这里打印值是多少?
}
bar();
console.log(foo);//这里打印值是多少?
/*============================分割线========================== */
function fn() {
var a = b = 3;
}
console.log(b);//这里打印值是多少?
console.log(a);//这里打印值是多少?
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11 .24-day11-作用域/homework.html
|
HTML
|
unknown
| 2,223
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-26 21:04:18
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-26 21:05:03
* @FilePath: \2024.11 .24-day11-作用域\tes2jt.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function outerFunction() {
function innerFunction() {
console.log("Inner function called!");
}
innerFunction();
}
outerFunction();
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11 .24-day11-作用域/tes2jt.html
|
HTML
|
unknown
| 856
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-24 22:48:27
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-25 15:39:55
* @FilePath: \2024.11 .24-day11-作用域\test.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
// var x = 20;
// function fn1() {
// console.log(x); //这里打印值是多少?
// }
// x = 30;
// function fn2() {
// var x = 1;
// fn1();
// }
// x = 40;
// fn2();
// function fn() {
// var x = y = 10;
// }
// fn();
// console.log(y);
// console.log(x);
// function fn() {
// console.log(x);
// }
// fn();
// function fn1() {
// console.log(x);
// }
// function fn2() {
// var x;
// x = 1;
// fn1();
// }
// var x;
// x = 20;
// x = 30;
// x = 40;
// fn2();
// var x=1;
// function fn1() {
// console.log(x);
// }
// function fn2() {
// var x;
// x = 1;
// fn1();
// }
// var x;
// x = 20;
// x = 30;
// x = 40;
// fn2();
// function fn() {
// if (x) {
// var x = 30;
// }
// console.log(x);//30
// }
// var x;
// x = 20;
// fn();
// console.log(x);//20\
// function fn() {
// if (x) {
// var x = 30;
// }
// console.log(x);//30
// }
// var x;
// x = 20;
// fn();
// console.log(x);//20
// function fun(param) {
// console.log(param);//这里打印值是多少?
// var param = function () {
// console.log(1);
// }
// console.log(param);//这里打印值是多少?
// }
// fun(5);
// function fun(param) {
// console.log(param);//undefined
// param = function () {
// console.log(1);
// }
// console.log(param);//函数体
// }
// fun(5);
// var foo = 1;
// function bar() {
// function foo() { }
// foo = 10;
// console.log(foo);//这里打印值是多少?
// }
// bar();
// console.log(foo);//这里打印值是多少?
// var x;
// function x() {
// x = 40;
// }
// console.log(x);//函数体
// x = function () {
// x = 90;
// }
// x();
// x = 30;
// console.log(x);//30
// var x;
// function fn1() {
// console.log(x);
// }
// function fn2() {
// var x;
// x = 1;
// fn1();
// }
// x = 20;
// x = 30;
// x = 40;
// fn2();
// var x = 20;
// function fn() {
// if (x) {
// var x = 30;
// }
// console.log(x); // 这里打印值是多少?
// }
// fn();
// console.log(x); // 这里打印值是多少?
// var x; // 全局变量声明提升,初始值为 undefined
// function fn() {
// var x; // 局部变量声明提升,初始值为 undefined
// if (x) {
// x = 30; // 不会执行,因为 x 是 undefined,条件为 false
// }
// console.log(x); // 输出 undefined
// }
// // 执行阶段
// x = 20; // 全局变量赋值
// fn(); // 调用函数 fn,进入局部作用域
// console.log(x); // 输出 20
// function fun(param) {
// console.log(param); // 这里打印值是多少?
// var param = function () {
// console.log(1);
// };
// console.log(param); // 这里打印值是多少?
// }
// fun(5);
// function fun(param) {
// // 参数 `param` 被提升,作为函数的局部变量,初始值为传递的参数值 5
// console.log(param); // 输出 5
// param = function () { // 赋值操作覆盖了参数的值
// console.log(1);
// };
// console.log(param); // 输出函数体
// }
// // 执行阶段
// fun(5);
// var foo = 1;
// function bar() {
// function foo() { }
// foo = 10;
// console.log(foo); // 这里打印值是多少?
// }
// bar();
// console.log(foo); // 这里打印值是多少?
// var foo; // 全局变量声明,初始值 undefined
// function bar() {
// function foo() { } // 局部变量 foo,初始值为函数
// foo = 10; // 覆盖局部变量 foo 的值
// console.log(foo); // 输出 10
// }
// // 执行阶段
// foo = 1; // 全局变量赋值
// bar(); // 调用 bar 函数
// console.log(foo); // 输出 1
function fn() {
var a = b = 3;
}
console.log(b);//这里打印值是多少?
console.log(a);//这里打印值是多少?
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11 .24-day11-作用域/test.html
|
HTML
|
unknown
| 5,925
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-25 10:23:17
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-25 10:45:35
* @FilePath: \2024.11 .24-day11-作用域\test2.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
// function x(){
// x = 20;
// }
// var x;
// console.log(x);
// console.log(x);
// x = 10;
// console.log(x);
// x();
// console.log(x);
// function x(){
// x = 20;
// }
// var x;
// console.log(x);
var x = 30;
function fn() { // 函数 fn 的作用域
var x; // 在 fn 作用域中重新声明了一个局部变量 x,覆盖了全局变量 x
x = 10; // 给局部变量 x 赋值为 10
function fn1() { // 嵌套函数 fn1 的作用域
x = 20; // 修改 fn 作用域中的局部变量 x 的值为 20
}
console.log(x); // 输出 10
fn1(); // 调用 fn1,修改局部变量 x 的值为 20
console.log(x); // 输出 20
}
fn();
console.log(x); // 输出 30
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11 .24-day11-作用域/test2.html
|
HTML
|
unknown
| 1,575
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-25 12:19:24
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-25 15:39:30
* @FilePath: \2024.11 .24-day11-作用域\test3.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var x;
function fn() {
var x;
x = 20;
console.log(x);//20
x = 30;
}
x = 10;
x = 30;
fn();
console.log(x); //30
// ===================================
var x;
function x() {
x = 40;
}
console.log(x);//函数体
x = function () {
x = 90;
}
x();
x = 30;
console.log(x);//30
//===================================
var x;
function fn1() {
console.log(x);
}
function fn2() {
var x;
x = 1;
fn1();
}
x = 20;
x = 30;
x = 40;
fn2();
//===================================
var x;
function fn() {
var x;
if (x) {
x = 30;
}
console.log(x);//undefined
}
x = 20;
fn();
console.log(x);//20
// ===================
function fun(param) {
console.log(param);//5
param = function () {
console.log(1);
}
console.log(param);//函数体
}
fun(5);
// ===================
var foo;
function bar() {
function foo() { }
foo = 10;
console.log(foo);//10
}
foo = 1;
bar();
console.log(foo);//1
// ========================== */
function fn() {
var a ;
var b;
b = 3;
a = b;
}
console.log(b);//这里打印值是多少?
console.log(a);//这里打印值是多少?
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11 .24-day11-作用域/test3.html
|
HTML
|
unknown
| 2,421
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-25 16:01:26
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-25 16:33:14
* @FilePath: \2024.11 .24-day11-作用域\test5.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function example() {
x = 10;
}
example();
console.log(x);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11 .24-day11-作用域/test5.html
|
HTML
|
unknown
| 753
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>求两个数的最大数</title>
</head>
<body>
<SCript>
var a = 6;
var b = 7;
//第一种
var maxNumber;
var maxNumber = a;
if (a < b) {
maxNumber = b;
} else {
maxNumber = a;
}
console.log(maxNumber);
//第二种
var maxNumber = a;
if (a < b) {
maxNumber = b;
}
console.log(maxNumber);
</SCript>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.15-day05-隐式转换 控制流程/homework/demo1.html
|
HTML
|
unknown
| 550
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>判断一个数是偶数还是奇数</title>
</head>
<body>
<script>
var a = 66;
a = Number(a);
if (!isNaN(a)) {
if (a % 2 == 0) {
console.log(a + "是偶数");
} else {
console.log(a + "是奇数");
}
}else{
console.log('请输入合法数字');
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.15-day05-隐式转换 控制流程/homework/demo2.html
|
HTML
|
unknown
| 484
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>分数转换,把百分制转换成ABCDE <60E60-70 D70-80C 80-90B 90-100 A</title>
</head>
<body>
<script>
var score = 98;
if (score <= 100 && score >= 0) {
if (score <= 100 && score > 90) {
console.log("A");
} else if (score > 80) {
console.log("B");
} else if (score > 70) {
console.log("C");
} else if (score > 60) {
console.log("D");
} else {
console.log("E");
}
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.15-day05-隐式转换 控制流程/homework/demo3.html
|
HTML
|
unknown
| 662
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>判断四季 3-5 春 6-8夏9-11秋12-2 冬</title>
</head>
<body>
<script>
var a = 8;
if (a <= 12 && a > 0) {
if (a > 8 && a <= 11) {
console.log("秋");
} else if (a > 5) {
console.log("夏");
} else if (a > 2) {
console.log("春");
} else {
console.log("冬");
}
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.15-day05-隐式转换 控制流程/homework/demo4.html
|
HTML
|
unknown
| 529
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>判断一个年份是闰年还是平年</title>
</head>
<body>
<script>
var year = 2024;
if (year > 0) {
if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
console.log(year + "是闰年");
} else {
console.log(year + "是平年");
}
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.15-day05-隐式转换 控制流程/homework/demo5.html
|
HTML
|
unknown
| 449
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>判断一个人的年龄是否满18岁(是否成年)</title>
</head>
<body>
<script>
var age = 22;
//第一种
if(age > 0 && !isNaN(Number(age))){
if(age < 18){
console.log('未成年');
}else {
console.log('已成年')
}
}
//第二种
if (age > 0) {
var adult = '已成年';
if (age < 18) {
adult = '未成年';
}
console.log(adult);
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.15-day05-隐式转换 控制流程/homework/demo6.html
|
HTML
|
unknown
| 700
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-18 19:56:54
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-18 20:15:28
* @FilePath: \2024.11.15-day05-隐式转换 控制流程c:\Users\zhou'xin\Desktop\Gitee仓库\qd-project-shizhibo\第二阶段:JavaScript\2024.11.18-day07-数组\demo1.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 一、看数组 观察变化找规律
初始 ['a','b','c','d','e']
第一次 ['d','e','a','b','c']
第二次 ['b','c','d','e','a']
第三次 ['e','a','b','c','d']
...
请问第五次 第十五次数组是如何? -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var arr = ['a','b','c','d','e'];
for(var j = 0; j < 15; j++){
var output = [];
for(var i = 0; i<arr.length; i++){
output.push(arr[(i+2*j)%arr.length]);
}
console.log(output.join(' '));
console.log("------------");
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.18-day07-数组/demo1.html
|
HTML
|
unknown
| 1,306
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-18 20:17:10
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-18 20:40:49
* @FilePath: \2024.11.15-day05-隐式转换 控制流程c:\Users\zhou'xin\Desktop\Gitee仓库\qd-project-shizhibo\第二阶段:JavaScript\2024.11.18-day07-数组\demo2.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 二、抽茧剥丝
var arr = ['鸡腿',101,'3','奥利奥',9,false,'33a',1.333,'巧克力'];
求数组中所有类型为number的整数之和 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var arr = ['鸡腿',101,'3','奥利奥',9,false,'33a',1.333,'巧克力'];
var sum = 0;
for(var i = 0; i < arr.length; i++){
if(typeof(arr[i])=="number" && arr[i] % 1 === 0){
sum += arr[i];
}
}
console.log(sum);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.18-day07-数组/demo2.html
|
HTML
|
unknown
| 1,210
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-20 23:02:30
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-21 00:33:33
* @FilePath: \2024.11.20-day08-数组与字符串\1.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 一、看数组 观察变化找规律
初始 ['a','b','c','d','e']
第一次 ['d','e','a','b','c']
第二次 ['b','c','d','e','a']
第三次 ['e','a','b','c','d']
...
请问第五次 第十五次数组是如何? -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var arr = ['a', 'b', 'c', 'd', 'e'];
var arr2=[];
for (var j = 1; j <= 15; j++) {
for (var i = 0; i < arr.length; i++) {
arr2[(i + 2) % (arr.length)] = arr[i];
}
arr = arr2;
console.log("第",j+1,"次打印结果是:",arr2);
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.20-day08-数组与字符串/1.html
|
HTML
|
unknown
| 1,211
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-21 09:52:10
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-21 09:53:25
* @FilePath: \2024.11.20-day08-数组与字符串\11.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
let str = 'Hello,JavaScript!';
console.log(str.length);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.20-day08-数组与字符串/11.html
|
HTML
|
unknown
| 726
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-20 20:26:55
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-20 20:33:33
* @FilePath: \2024.11.20-day08-数组与字符串\demo1.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 求一数组中的所有数的和和平均值 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var sum = 0;
for (var i = 0; i < arr.length; i++) {
sum += arr[i];
}
console.log("和:" + sum);
console.log("平均值为:"+(sum/arr.length));
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.20-day08-数组与字符串/demo1.html
|
HTML
|
unknown
| 961
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-20 20:33:50
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-20 22:45:42
* @FilePath: \2024.11.20-day08-数组与字符串\demo2.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 求一组数中的最大值和最小值,以及所在位置 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var arr = [7, 6, 3, 2, 4, 9, 1, 8, 5, 10];
var max = arr[0];
var min = arr[0];
var maxIndex,minIndex;
for (var i = 1; i < arr.length; i++) {
if (arr[i] < min) {
min = arr[i];
minIndex = i;
}
if (arr[i] > max) {
max = arr[i];
maxIndex = i;
}
}
console.log("最大值为:" + max+",下标为:"+maxIndex);
console.log("最小值为:" + min+",下标为:"+minIndex);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.20-day08-数组与字符串/demo2.html
|
HTML
|
unknown
| 1,276
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-20 20:39:08
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-20 20:42:01
* @FilePath: \2024.11.20-day08-数组与字符串\demo3.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 将字符串数组用|或其他符号分割 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var arr2 = [];
var arr = [7, 6, 3, 2, 4, 9, 1, 8, 5, 10];
var arr2 = arr.join("-");
console.log(arr2);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.20-day08-数组与字符串/demo3.html
|
HTML
|
unknown
| 843
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-20 20:42:31
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-20 20:47:05
* @FilePath: \2024.11.20-day08-数组与字符串\demo4.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 要求将数组中的0项去掉,将不为0的值存入一个新的数组,生成新的数组 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var arr1 = [0, 6, 3, 0, 4, 0, 1, 8, 0, 10];
var arr2 = [];
for (var i = 0; i < arr1.length; i++) {
if (arr1[i] !== 0) {
arr2.push(arr1[i]);
}
}
console.log(arr2);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.20-day08-数组与字符串/demo4.html
|
HTML
|
unknown
| 1,004
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-20 20:48:23
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-20 20:51:14
* @FilePath: \2024.11.20-day08-数组与字符串\demo5.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 查找数组[1,2,3,4,1,2,3,4,2,3,1,1,0]中所有值为1的项的下标 输出为新数组 -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var arr1 = [1, 2, 3, 4, 1, 2, 3, 4, 2, 3, 1, 1, 0];
var arr2 = [];
for (var i = 0; i < arr1.length; i++) {
if (arr1[i] === 1) {
arr2.push(i);
}
}
console.log(arr2);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.20-day08-数组与字符串/demo5.html
|
HTML
|
unknown
| 1,001
|
<!-- 翻转数组 [1,2,3,4,5] => [5,4,3,2,1] -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var arr = [1, 2, 3, 4, 5];
for (var i = 0; i < (arr.length / 2); i++) {
var temp = 0;
temp = arr[i];
arr[i] = arr[arr.length - 1 - i];
arr[arr.length - 1 - i] = temp;
}
console.log(arr);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.20-day08-数组与字符串/demo6.html
|
HTML
|
unknown
| 549
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-20 22:56:28
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-20 23:00:16
* @FilePath: \2024.11.20-day08-数组与字符串\demo7.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 一、看数组 观察变化找规律
初始 ['a','b','c','d','e']
第一次 ['d','e','a','b','c']
第二次 ['b','c','d','e','a']
第三次 ['e','a','b','c','d']
请问第五次 第十五次数组是如何? -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var arr = ['a', 'b', 'c', 'd', 'e'];f
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.20-day08-数组与字符串/demo7.html
|
HTML
|
unknown
| 1,018
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-21 14:49:38
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-21 15:09:29
* @FilePath: \2024.11.21-day09-字符串方法 函数\test.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
console.log('undefined'.indexOf());//0
console.log('undefine'.indexOf());//-1
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.21-day09-字符串方法 函数/test.html
|
HTML
|
unknown
| 749
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-21 16:39:08
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-21 16:39:17
* @FilePath: \2024.11.21-day09-字符串方法 函数\test2.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var plants = '西红柿,黄瓜,芹菜,豆角,土豆,黄瓜'; //length 18
console.log(plants.indexOf('黄瓜'));
//4
console.log(plants.indexOf('黄瓜',5));
//16
console.log(plants.indexOf('黄'));
//4
console.log(plants.indexOf('黄瓶'));
//-1
console.log(plants.indexOf('大象'));
//-1
console.log(plants.indexOf(''));
//0
console.log(plants.indexOf('',5));
//5
console.log(plants.indexOf('',19));
//18 超出长度的参数会返回长度
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.21-day09-字符串方法 函数/test2.html
|
HTML
|
unknown
| 1,118
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-22 17:44:53
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-23 09:47:38
* @FilePath: \2024.11.22-day10-函数\test.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
// function test() {
// console.log(arguments);
// }
// test(1, 2, 3);
// function example() {
// console.log(arguments); // 输出 arguments 对象
// }
// example(1, 2, 3);
// function sum() {
// let total = 0;
// for (let i = 0; i < arguments.length; i++) {
// total += arguments[i];
// }
// return total;
// }
// console.log(sum(1, 2, 3, 4));
// function example() {
// if (arguments.length === 0) {
// console.log('没有传入参数');
// } else {
// console.log('传入了', arguments.length, '个参数');
// }
// }
// example();
// example(1, 2);
// function test() {
// const args = Array.from(arguments);
// console.log(args.map(x => x * 2)); // [2, 4, 6]
// }
// test(1, 2, 3);
// function test() {
// const args = [...arguments];
// console.log(args.map(x => x * 2));
// }
// test(1, 2, 3);
// function test() {
// const args = Array.prototype.slice.call(arguments);
// console.log(args.map(x => x * 2));
// }
// test(1, 2, 3);
// const example = (...args) => {
// console.log(args);
// };
// example(1, 2, 3);
// function sum(...args) {
// return args.reduce((total, current) => total + current, 0);
// }
// console.log(sum(1, 2, 3, 4));
// let array = [1, 2, 3, 4, 5];
// console.log(array.indexOf(3));
// console.log(array.indexOf(6));
// console.log(array.indexOf(2, 2));
// var plants = '西红柿,黄瓜,芹菜,豆角,土豆,黄瓜';
// console.log(plants.indexOf('黄瓜'));
// console.log(plants.indexOf('芹菜'));
// console.log(plants.indexOf('苹果'));
// var plants = '西红柿,黄瓜,芹菜,豆角,土豆,黄瓜';
// console.log(plants.indexOf(''));
// var plants = '西红柿,黄瓜,芹菜,豆角,土豆,黄瓜';
// console.log(plants.indexOf('黄瓜', 19));
// let fruits = ['apple', 'banana', 'mango', 'orange'];
// console.log(fruits.indexOf('mango'));
// console.log(fruits.indexOf('grape'));
// let numbers = [1, 2, 3, '4'];
// console.log(numbers.indexOf(4));
// console.log(numbers.indexOf('4'));
// let arr = [NaN, 1, 2];
// console.log(arr.findIndex(Number.isNaN));
// let str = 'hello world, hello JavaScript';
// console.log(str.indexOf('hello', 5));
// let str = 'hello';
// console.log(str.indexOf('h', 10));
// console.log(str.indexOf('e', -4));
// let sentence = 'The quick brown fox jumps over the lazy dog';
// if (sentence.indexOf('fox') !== -1) {
// console.log('包含子字符串 "fox"');
// }
// let numbers = [1, 2, 2, 3, 4, 4, 5];
// let uniqueNumbers = [];
// numbers.forEach(num => {
// if (uniqueNumbers.indexOf(num) === -1) {
// uniqueNumbers.push(num);
// }
// });
// console.log(uniqueNumbers);
// let fruits = ['apple', 'banana', 'mango'];
// console.log(fruits.includes('banana'));
// console.log(fruits.includes('grape'));
var arr = [1, 2, 3];
function push() {
var arr = Array.isArray(arguments[0]) && arguments[0] || [];
console.log(arr);
var argLen = arguments.length;
for (var i = 1; i < argLen; i++) {
var len = arr.length;
arr[len] = arguments[i];
}
return arr;
}
console.log(push([1, 2, 3], 4, 5, 6, 7));
function test() {
var arr = Array.isArray(arguments[0]) && arguments[0] || [];
console.log(arr);
}
test();
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.22-day10-函数/test.html
|
HTML
|
unknown
| 4,817
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-06 16:35:57
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-06 16:36:35
* @FilePath: \2024.11.6-day01-认识JavaScript\1.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
console.log("你好,JavasCript!")
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.6-day01-认识JavaScript/1.html
|
HTML
|
unknown
| 691
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-11-06 17:47:19
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-11-06 17:48:52
* @FilePath: \2024.11.6-day02-变量 语句 数据类型\1.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var a;
console.log(a);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.11.6-day02-变量 语句 数据类型/1.html
|
HTML
|
unknown
| 694
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-11 17:52:34
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-11 18:02:42
* @FilePath: \2024.12.11-day15-执行上下文 内置对象方法 sp.7z\1.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
// var obj = {
// name: 'zs',
// fn: function (){
// console.log(this.name);
// }
// }
// var name = 'ls';
// obj.fn();
function a(nms) {
nms = 100;
console.log(nms);
function b() {
var w = 10;
console.log(nms);
nms = 20;
}
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.11-day15-执行上下文 内置对象方法 sp.7z/1.html
|
HTML
|
unknown
| 1,099
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-11 18:18:11
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-11 19:05:21
* @FilePath: \2024.12.11-day15-执行上下文 内置对象方法 sp.7z\test.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function a() {
var x = 10;
}
function c() {
var x = 20;
function b() {
x = 30;
}
b();
a();
console.log(x); // ?
}
c();
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.11-day15-执行上下文 内置对象方法 sp.7z/test.html
|
HTML
|
unknown
| 937
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-11 18:22:15
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-11 18:22:27
* @FilePath: \2024.12.11-day15-执行上下文 内置对象方法 sp.7z\test2.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function a(nms) {
nms = 100; // 修改形式参数 nms
console.log(nms); // 输出 100
function b() {
var w = 10; // 声明局部变量 w
console.log(nms); // 此处访问的依然是 a() 函数的 nms 参数
nms = 20; // 修改的仍然是 a() 函数作用域内的 nms
}
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.11-day15-执行上下文 内置对象方法 sp.7z/test2.html
|
HTML
|
unknown
| 1,065
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-11 18:56:34
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-11 21:12:37
* @FilePath: \2024.12.11-day15-执行上下文 内置对象方法 sp.7z\test3.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function a() {
var x = 1;
return function () {
x++;
return x;
};
}
var w = a();
console.log(w()); // 输出 2
console.log(w()); // 输出 3
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.11-day15-执行上下文 内置对象方法 sp.7z/test3.html
|
HTML
|
unknown
| 926
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-11 22:05:53
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-12 00:45:33
* @FilePath: \2024.12.11-day15-执行上下文 内置对象方法 sp.7z\test4.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function test() {
var foo;
function bar() {
console.log("this will run!");
}
foo(); // 未捕获类型错误“foo不是函数”
bar(); // "this will run!"
foo = function () {
console.log("this won't run!");
};
}
test();
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.11-day15-执行上下文 内置对象方法 sp.7z/test4.html
|
HTML
|
unknown
| 1,039
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-02 10:02:59
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-02 11:29:27
* @FilePath: \2024.12.2-day12-工厂模式 自定义构造函数 this\1.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function f1() {
var arr = [];
for (var i = 0; i < 10; i++) {
(function (j) {
arr.push(function () {
return j;
});
})(i);
}
return arr;
}
console.log(f1()[3]()); // 输出 3
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.2-day12-工厂模式 自定义构造函数 this/1.html
|
HTML
|
unknown
| 1,013
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-02 20:37:13
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-02 20:47:05
* @FilePath: \2024.12.2-day12-工厂模式 自定义构造函数 this\1hw.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
//第一种
var obj1 = {
name: "zz",
age: 21
}
//第二种
function create(name, age, sex) {
var obj2 = new Object();
obj2.name = name;
obj2.age = age;
obj2.sex = sex;
return obj2;
}
var obj2 = create('zz', 21, 'Man');
//第三种
function Student(name, age, sex) {
this.name = name;
this.age = age;
this.sex = sex;
}
var obj3 = new Student('zz', 21, 'Man');
console.log(obj1.name, obj2.age, obj3.sex);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.2-day12-工厂模式 自定义构造函数 this/1hw.html
|
HTML
|
unknown
| 1,298
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-02 14:25:36
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-02 16:12:30
* @FilePath: \2024.12.2-day12-工厂模式 自定义构造函数 this\2.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
/**
* 工厂模式 集中管理 高效
*/
// function createStudent(name, age, sex) {
// var obj = new Object(); //new 构造函数();
// obj.name = name;
// obj.age = age;
// obj.sex = sex;
// obj.speak = function () {
// console.log('我要学习,学习使我快乐,学习让我成长!');
// }
// return obj;
// }
// var stu1 = createStudent('小明', 99, 'Man');
// console.log(stu1 instanceof createStudent); // false
// console.log(stu1 instanceof Object); // true
function Student(name, age, sex) {
this.name = name;
this.age = age;
this.sex = sex;
this.speak = function () {
console.log('我要学习, 学习使我快乐, 学习让我成长! 我叫 ' + this.name);
};
}
var stu3 = new Student('张三', 18, 'Man');
console.log(stu3 instanceof Student); // true
console.log(stu3 instanceof Object); // true
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.2-day12-工厂模式 自定义构造函数 this/2.html
|
HTML
|
unknown
| 1,764
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-02 17:00:58
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-02 17:33:26
* @FilePath: \2024.12.2-day12-工厂模式 自定义构造函数 this\3.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var x = 10;
function f1() {
console.log(x);
}
function fn2() {
var x = 20;
f1(); // 调用 f1
}
fn2(); // 调用 fn2
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.2-day12-工厂模式 自定义构造函数 this/3.html
|
HTML
|
unknown
| 875
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-02 20:26:49
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-02 20:36:05
* @FilePath: \2024.12.2-day12-工厂模式 自定义构造函数 this\hw.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function fillArray(arr1,arr2){
var maxLen = 7;
var arrAlen = arr1.length;
return arr1.concat(arr2.slice(0,maxLen-arrAlen));
}
console.log(fillArray([1,2,3,4],[5,6,7,8,9,10,11,12,13,14]));
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.2-day12-工厂模式 自定义构造函数 this/4hw.html
|
HTML
|
unknown
| 921
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-02 09:49:14
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-02 19:28:09
* @FilePath: \2024.12.2-day12-工厂模式 自定义构造函数 this\test.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
// var x;
// function f1(){
// var x;//局部变量x
// function f2() {
// x = 20;//局部变量x
// console.log(x);//20
// }
// f2();
// x = 10;//局部变量
// }
// console.log(x);//undefined;
// f1();
// x = 0;//全局变量x
// console.log(x);//0
// var a;
// function a(){
// a = 20;//全局变量
// }
// console.log(a);//function a(){ a = 20; }
// a();
// console.log(a);//20
// a = 30;
// console.log(a);//30
// function f1() {
// var arr;
// var i;
// arr = [];
// for (i = 0; i < 10; i++){
// arr.push(function(){
// return i;
// })
// }
// return arr;
// }
// console.log(f1()[3]);
// console.log(f1()[3]());
"use strict";
function f1() {
console.log(this); // 严格模式下,输出: undefined
}
f1();
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.2-day12-工厂模式 自定义构造函数 this/test.html
|
HTML
|
unknown
| 1,824
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-09 17:01:57
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-09 17:57:16
* @FilePath: \2024.12.9-day14-this指向 包装对象 JSON\1.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var numObj = new Number(6);
console.log(numObj.toString());
numObj = null;
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.9-day14-this指向 包装对象 JSON/1.html
|
HTML
|
unknown
| 760
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-09 20:35:42
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-09 20:37:15
* @FilePath: \2024.12.9-day14-this指向 包装对象 JSON\2.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
function Cat(name, age){
//var Obj = new Object();
// this => Obj;
this.name = name;
this.age = age;
this.speal = function(){
console.log('我是' + this.name + '喵喵喵');
}
//return Obj;
}
var cat1 = new Cat('橘子', 1);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.9-day14-this指向 包装对象 JSON/2.html
|
HTML
|
unknown
| 1,012
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-09 21:09:22
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-09 21:33:56
* @FilePath: \2024.12.9-day14-this指向 包装对象 JSON\3.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var name = '李四';
var obj = {
name: '张三',
speak: function () {
console.log(this.name);//obj
showName();
}
}
obj.speak(); //obj调用的speak speak 函数内部的this指向obj
function showName() {
console.log(this.name);
}
/*
window.name = '李四';
函数内的this指向 调用函数方法的主体对象
对象.方法(); //方法内的this指向 .之前的对象
函数(); //this => window
谁调用的showName? 谁.showName()? 找不到这个谁的时候 谁=>window
在函数调用的时候 是谁调用的 this指向谁 不看作用域 不看函数是谁的
*/
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.9-day14-this指向 包装对象 JSON/3.html
|
HTML
|
unknown
| 1,498
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-09 21:15:55
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-09 21:16:07
* @FilePath: \2024.12.9-day14-this指向 包装对象 JSON\4.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var obj1 = {
name: '张三',
eat: function () {
console.log(this.name); //'张三'
}
}
var obj2 = {
name: '李四',
eat: function () {
console.log(this.name);
}
}
obj1.eat();
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.9-day14-this指向 包装对象 JSON/4.html
|
HTML
|
unknown
| 984
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-09 21:36:21
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-09 21:48:20
* @FilePath: \2024.12.9-day14-this指向 包装对象 JSON\test.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
'use strict';
function show() {
console.log(this);
}
show(); // 输出:undefined
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.9-day14-this指向 包装对象 JSON/test.html
|
HTML
|
unknown
| 793
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-09 22:15:46
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-09 22:16:54
* @FilePath: \2024.12.9-day14-this指向 包装对象 JSON\test2.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
var obj = {
a: 1,
b: 2,
c: 3
}
var name = 'a';
console.log(obj[name]);
console.log(obj.name);
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.9-day14-this指向 包装对象 JSON/test2.html
|
HTML
|
unknown
| 834
|
<!--
* @Author: Zhouxin 2201_75539691@noreply.gitcode.com
* @Date: 2024-12-09 22:33:04
* @LastEditors: Zhouxin 2201_75539691@noreply.gitcode.com
* @LastEditTime: 2024-12-09 22:45:09
* @FilePath: \2024.12.9-day14-this指向 包装对象 JSON\test3.html
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
const user = {
name: "Alice",
age: 25,
city: "New York"
};
for (const key in user) {
console.log(`${key}: ${user[key]}`);
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.12.9-day14-this指向 包装对象 JSON/test3.html
|
HTML
|
unknown
| 869
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>求两个数的最大数</title>
</head>
<body>
<SCript>
var a = 6;
var b = 7;
//第一种
var maxNumber;
var maxNumber = a;
if (a < b) {
maxNumber = b;
} else {
maxNumber = a;
}
console.log(maxNumber);
//第二种
var maxNumber = a;
if (a < b) {
maxNumber = b;
}
console.log(maxNumber);
</SCript>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.8.11-day05/homework/demo1.html
|
HTML
|
unknown
| 550
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>判断一个数是偶数还是奇数</title>
</head>
<body>
<script>
var a = 66;
a = Number(a);
if (!isNaN(a)) {
if (a % 2 == 0) {
console.log(a + "是偶数");
} else {
console.log(a + "是奇数");
}
}else{
console.log('请输入合法数字');
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.8.11-day05/homework/demo2.html
|
HTML
|
unknown
| 484
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>分数转换,把百分制转换成ABCDE <60E60-70 D70-80C 80-90B 90-100 A</title>
</head>
<body>
<script>
var score = 98;
if (score <= 100 && score >= 0) {
if (score <= 100 && score > 90) {
console.log("A");
} else if (score > 80) {
console.log("B");
} else if (score > 70) {
console.log("C");
} else if (score > 60) {
console.log("D");
} else {
console.log("E");
}
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.8.11-day05/homework/demo3.html
|
HTML
|
unknown
| 662
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>判断四季 3-5 春 6-8夏9-11秋12-2 冬</title>
</head>
<body>
<script>
var a = 8;
if (a <= 12 && a > 0) {
if (a > 8 && a <= 11) {
console.log("秋");
} else if (a > 5) {
console.log("夏");
} else if (a > 2) {
console.log("春");
} else {
console.log("冬");
}
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.8.11-day05/homework/demo4.html
|
HTML
|
unknown
| 529
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>判断一个年份是闰年还是平年</title>
</head>
<body>
<script>
var year = 2024;
if (year > 0) {
if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
console.log(year + "是闰年");
} else {
console.log(year + "是平年");
}
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.8.11-day05/homework/demo5.html
|
HTML
|
unknown
| 449
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>判断一个人的年龄是否满18岁(是否成年)</title>
</head>
<body>
<script>
var age = 22;
//第一种
if(age > 0 && !isNaN(Number(age))){
if(age < 18){
console.log('未成年');
}else {
console.log('已成年')
}
}
//第二种
if (age > 0) {
var adult = '已成年';
if (age < 18) {
adult = '未成年';
}
console.log(adult);
}
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.8.11-day05/homework/demo6.html
|
HTML
|
unknown
| 700
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
console.log(!!1);
console.log(!!NaN==false);
console.log(!!'123');
var a=true;
console.log('\u0035' + (true * 2) + --a);
var val=1;
console.log((val != '0') ? 'define': 'undefine');
</script>
</body>
</html>
|
2201_75539691/qd-project-shizhibo
|
第二阶段:JavaScript/2024.8.11-day05/test.html
|
HTML
|
unknown
| 443
|
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_4870258_t31k8pzlbbg.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
|
2203_75900462/weather-project
|
index.html
|
HTML
|
unknown
| 413
|
<template>
<div class="weather">
<Header />
<router-view />
</div>
</template>
<script setup>
import Header from './components/Header.vue'
</script>
<style lang="scss">
* {
margin: 0;
box-sizing: border-box;
}
.weather {
background: #00668a;
flex-direction: column;
min-height: 100vh;
display: flex;
color: white;
}
</style>
|
2203_75900462/weather-project
|
src/App.vue
|
Vue
|
unknown
| 353
|
import axios from 'axios';
// 创建一个axios实例,可以设置基础配置
const request = axios.create({
timeout: 10000, // 请求超时时间
headers: {
'Content-Type': 'application/json'
}
});
// 请求拦截器
request.interceptors.request.use(
config => {
// 可以在这里统一添加token等认证信息
return config;
},
error => {
return Promise.reject(error);
}
);
// 响应拦截器
request.interceptors.response.use(
response => {
// 可以统一处理响应
return response.data;
},
error => {
// 统一处理错误
console.error('请求错误:', error);
return Promise.reject(error);
}
);
export default request;
|
2203_75900462/weather-project
|
src/api/request.js
|
JavaScript
|
unknown
| 695
|
// src/api/weatherApi.js
import request from './request';
const BASE_URL = 'https://restapi.amap.com/v3/weather/weatherInfo';
const API_KEY = 'b49db479db7ed5703052e4146f6744b9'; // 建议使用环境变量管理密钥
// 获取实时天气数据
export const getWeather = async (adcode) => {
try {
const response = await request({
url: BASE_URL,
method: 'get',
params: {
key: API_KEY,
city: adcode,
extensions: 'base',
}
});
return {
...response.lives[0],
temperature: response.lives[0].temperature.replace('℃', '') // 清理温度单位
};
} catch (error) {
console.error('获取天气失败:', error);
return null;
}
};
export const getWeatherForecast = async (adcode) => {
try {
const response = await request({
url: BASE_URL,
method: 'get',
params: {
key: API_KEY,
city: adcode,
extensions: 'all'
}
});
return response.forecasts[0];
} catch (error) {
console.error('获取天气预报失败:', error);
return null;
}
};
// 新增城市搜索API函数(获取adcode和城市列表)
export const searchCity = async (keywords) => {
try {
const response = await request({
url: 'https://restapi.amap.com/v3/config/district',
method: 'get',
params: {
key: API_KEY,
keywords: keywords,
subdistrict: 0, // 不获取下级行政区
extensions: 'base'
}
});
return response.districts || [];
} catch (error) {
console.error('城市搜索失败:', error);
return [];
}
};
|
2203_75900462/weather-project
|
src/api/weatherApi.js
|
JavaScript
|
unknown
| 1,619
|
<template>
<header>
<div class="header-left">
<i class="iconfont icon-a-farfa-sun sun-icon"></i>
<p>新中地天气</p>
<h4>{{ city }}</h4>
<span v-if="weatherData">实时天气:{{ weatherData.weather }} {{ weatherData.temperature }}℃</span>
<span v-if="weatherData">{{ weatherData.windpower }}级 {{ weatherData.winddirection }}风</span>
</div>
<div class="header-right">
<i class="iconfont icon-fa-circle-info-fill info-icon" @click="showInfoModal = true"></i>
<i v-if="showAddButton" class="iconfont icon-jiahao" @click="addCity"></i>
</div>
<div class="info-modal" v-if="showInfoModal">
<div class="modal-content">
<h2>关于:</h2>
<p>这个应用可以用来追踪你选择城市的当前天气</p>
<h2>如何使用:</h2>
<p>
1.点击搜索框输入你希望追踪的城市<br />
2.在搜索结果中选中一个城市,你将获取当地最新的天气<br />
3.点击右侧的+号可以将追踪城市的天气情况保存在首页
</p>
<h2>移除城市:</h2>
<p>
如果你不想在首页关注某个城市,可以通过底部的按钮删<br>
除它
</p>
<button @click="showInfoModal = false">关闭</button>
</div>
</div>
</header>
</template>
<script setup>
import { ref, onMounted, watch } from 'vue';
import { useRoute } from 'vue-router';
import { getWeather } from '../api/weatherApi';
const route = useRoute();
//控制弹窗信息
const showInfoModal = ref(false);
//控制城市名称
const city = ref('');
//控制武汉当天天气
const weatherData = ref(null);
//控制加号显示
const showAddButton = ref(true); // 控制加号显示
// 检查是否已保存当前城市
const checkSaved = () => {
try {
const savedData = localStorage.getItem('savedCities');
// 安全解析
let cities = [];
if (savedData) {
try {
cities = JSON.parse(savedData);
if (!Array.isArray(cities)) cities = [];
} catch (e) {
cities = [];
}
}
const currentAdcode = route.params.adcode;
// 只有在详情页且adcode存在时才判断按钮显示
if (currentAdcode) {
showAddButton.value = !cities.some(c => c.adcode === currentAdcode);
} else {
showAddButton.value = false; // 在首页不显示加号
}
return cities;
} catch (error) {
console.error('解析保存的城市数据失败:', error);
return []; // 返回空数组作为默认值
}
};
// 点击加号,进行城市添加
const addCity = async () => {
const data2 = await getWeather(route.params.adcode);
console.log(data2);
try {
// 先从localStorage获取数据,确保是一个数组
let saved = [];
const savedStr = localStorage.getItem('savedCities');
// 安全解析JSON
if (savedStr) {
try {
saved = JSON.parse(savedStr);
if (!Array.isArray(saved)) saved = [];
} catch (e) {
saved = [];
}
}
// 创建城市数据对象
const cityData = {
name:data2.city,
adcode: route.params.adcode,
temp: data2.temperature
};
console.log(cityData);
// 添加到数组并保存
saved.push(cityData);
localStorage.setItem('savedCities', JSON.stringify(saved));
showAddButton.value = false;
window.dispatchEvent(new Event('storage-update')); // 触发数据更新事件
} catch (error) {
console.error('添加城市失败:', error);
// 初始化一个新数组
localStorage.setItem('savedCities', '[]');
}
};
// 监听路由变化
watch(() => route.params, checkSaved);
//刷新渲染页面
onMounted(async () => {
const data = await getWeather('420100');
console.log(data);
if (data) {
weatherData.value = data;
city.value = data.city;
}
checkSaved();
});
</script>
<style lang="scss" scoped>
header {
display: flex;
justify-content: space-between;
padding: 1.5rem 250px;
align-items: center;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
background: #00668a;
color: white;
position: relative;
.header-left {
display: flex;
align-items: center;
gap: 1rem;
p {
font-size: 1.5rem;
}
h4 {
font-size: 1.125rem;
line-height: 1.75rem;
font-weight: inherit;
}
span {
font-size: 0.875rem;
line-height: 1.25rem;
}
.sun-icon {
font-size: 24px;
color: #ffd700;
animation: rotate 20s linear infinite;
}
}
.header-right {
display: flex;
align-items: center;
gap: 1rem;
// 太阳图标的样式
// 信息图标的样式
.info-icon {
font-size: 20px;
color: #ffffff;
cursor: pointer;
transition: all 0.3s ease;
&:hover {
transform: scale(1.2);
color: #004e71;
}
}
.icon-jiahao {
font-size: 20px;
color: #ffffff;
cursor: pointer;
transition: all 0.3s ease;
&:hover {
transform: scale(1.2);
color: #004e71;
}
}
}
// 信息弹窗样式
.info-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
.modal-content {
background-color: rgb(255 255 255);
padding: 1rem;
opacity: 1;
align-self: flex-start;
border-radius: 8px;
max-width: 500px;
margin-top: 8rem;
color: black;
h2 {
margin: 0;
font-size: inherit;
font-weight: inherit;
}
p {
font-size: .75rem;
line-height: 1rem;
margin-bottom: 1rem;
margin: 0 0 16px;
}
button {
margin-top: 1rem;
padding: 0.5rem 2rem;
background-color: #00668a;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 0.75rem;
transition: all 0.3s ease;
&:hover {
background-color: #005275;
}
}
}
}
}
// 太阳旋转动画
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
|
2203_75900462/weather-project
|
src/components/Header.vue
|
Vue
|
unknown
| 6,456
|
<template>
<div class="search-box">
<input
type="text"
placeholder="请输入城市名称"
v-model="searchQuery"
@input="handleSearchInput"
@focus="showSearchResults = true"
>
<ul v-show="showSearchResults && (cityList.length > 0 || searchError || networkError)">
<li
v-for="(city, index) in cityList"
:key="index"
@click="selectCity(city)"
>
{{ city.name }}
</li>
<p v-if="searchError">似乎没有找到你查找的城市</p>
<p v-if="networkError">网络异常,请稍后重试</p>
</ul>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { searchCity } from '@/api/weatherApi'
const router = useRouter();
// 响应式数据
const searchQuery = ref('');
//控制搜索结果
const cityList = ref([]);
const searchError = ref(false);
//控制网络异常
const networkError = ref(false);
//控制搜索结果显示
const showSearchResults = ref(false);
// 防抖处理
let timeoutId;
const handleSearchInput = () => {
clearTimeout(timeoutId);
showSearchResults.value = true;
timeoutId = setTimeout(async () => {
if (searchQuery.value.trim()) {
try {
const res = await searchCity(searchQuery.value.trim());
if (res && Array.isArray(res)) {
cityList.value = res.map(item => ({
name: item.name || item.cityname || item.districtname || '未知城市',
adcode: item.adcode || item.citycode || '未知代码'
}));
searchError.value = cityList.value.length === 0;
} else {
cityList.value = [];
searchError.value = true;
}
networkError.value = false;
} catch (error) {
console.error('搜索出错:', error);
networkError.value = true;
searchError.value = false;
cityList.value = [];
}
} else {
cityList.value = [];
searchError.value = false;
networkError.value = false;
}
}, 500);
};
// 城市选择处理
const selectCity = (city) => {
router.push({
name: 'CityView',
params: { adcode: city.adcode }
});
showSearchResults.value = false;
searchQuery.value = '';
};
</script>
<style lang="scss" scoped>
.search-box {
margin: 2rem 0;
input {
width: 100%;
padding: 0.75rem 0;
background-color: transparent;
border: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.947);
color: white;
font-size: 1rem;
outline: none;
&::placeholder {
color: rgba(255, 255, 255, 0.827);
}
&:focus {
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
border-bottom: 0;
}
}
ul {
display: block;
list-style: none;
margin: 0;
padding: 8px 4px;
background-color: #004e71;
width: 100%;
border-radius: 0 0 4px 4px;
color: white;
z-index: 10;
p {
display: none;
padding: 8px 0;
margin: 0;
color: rgba(255, 255, 255, 0.85);
}
li {
padding: 8px 0;
cursor: pointer;
&:hover {
background-color: rgba(255, 255, 255, 0.1);
}
}
}
}
</style>
|
2203_75900462/weather-project
|
src/components/SearchBox.vue
|
Vue
|
unknown
| 3,514
|
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import VueEcharts from 'vue-echarts'
const app = createApp(App)
app.use(router)
app.mount('#app')
app.component('v-chart', VueEcharts)
|
2203_75900462/weather-project
|
src/main.js
|
JavaScript
|
unknown
| 230
|
import { createRouter, createWebHistory } from 'vue-router'
import Container from '../views/Container.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'Container',
component: Container,
},
{
path: '/city/:adcode', // 动态adcode参数
name: 'CityView',
component: () => import('../views/CityView.vue'),
props: true // 将路由参数作为props传递
}
],
})
export default router
|
2203_75900462/weather-project
|
src/router/index.js
|
JavaScript
|
unknown
| 516
|
<template>
<div class="city-view">
<div class="prompt">
你正在预览{{ cityName }}的天气信息
<span>,可以通过右上角的"+"号按钮保存起来</span>
</div>
<div class="container">
<h1>当日气温是:{{ currentWeather.temperature }}℃</h1>
<h1>当日天气是:{{ currentWeather.weather }}</h1>
<h1>当日风向是:{{ currentWeather.winddirection }}</h1>
<h1>当日风力是:{{ currentWeather.windpower }}级</h1>
</div>
<hr>
<div class="forecast-section">
<div class="forecast-cards">
<div
class="forecast-card"
v-for="(cast, index) in forecasts"
:key="index"
>
<span class="day">{{ formatDay(index, cast.week) }}</span>
<span class="date">{{ formatDate(cast.date) }}</span>
<span class="weather-type">{{ cast.dayweather }}</span>
<span class="wind">风力 {{ cast.daypower }}级</span>
</div>
</div>
<div class="temperature-chart">
<v-chart class="chart" :option="option" autoresize />
</div>
</div>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import { getWeather, getWeatherForecast } from '../api/weatherApi'
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { LineChart } from 'echarts/charts'
import { GridComponent } from 'echarts/components'
use([CanvasRenderer, LineChart, GridComponent])
const route = useRoute()
const cityName = ref('')
const currentWeather = ref({})
const forecasts = ref([])
// 图表配置
const option = ref({
grid: {
left: '5%',
right: '5%',
top: '15%',
bottom: '15%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: [],
show: false,
},
yAxis: {
type: 'value',
show: false,
min: function (value) {
return Math.floor(value.min * 0.6)
},
max: function (value) {
return Math.ceil(value.max * 1)
}
},
series: [
{
name: '白天',
type: 'line',
data: [],
symbolSize: 12,
symbol: 'circle',
smooth: true,
lineStyle: {
width: 3,
color: '#7EB3FF'
},
itemStyle: {
color: '#7EB3FF',
borderWidth: 2,
borderColor: '#fff'
},
label: {
show: true,
position: 'top',
formatter: '白{c}°C',
color: '#FFFFFF',
fontSize: 12,
padding: [2, 4],
distance: 4
}
},
{
name: '夜间',
type: 'line',
data: [],
symbolSize: 12,
symbol: 'circle',
smooth: true,
lineStyle: {
width: 3,
color: '#A7E25F'
},
itemStyle: {
color: '#A7E25F',
borderWidth: 2,
borderColor: '#fff'
},
label: {
show: true,
position: 'bottom',
formatter: '晚{c}°C',
color: '#FFFFFF',
fontSize: 12,
padding: [2, 4],
distance: 4
}
}
]
})
// 日期格式化
const formatDate = (dateStr) => {
const date = new Date(dateStr)
return `${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`
}
// 星期格式化
const formatDay = (index, week) => {
const weekMap = ['日', '一', '二', '三', '四', '五', '六']
// 前两日特殊处理
if (index === 0) return '今天';
if (index === 1) return '明天';
return `周${weekMap[week % 7] || ''}`;
}
// 获取天气数据
onMounted(async () => {
try {
const adcode = route.params.adcode
// 获取实时天气
const liveData = await getWeather(adcode)
if (liveData) {
currentWeather.value = liveData
cityName.value = liveData.city
}
// 获取天气预报
const forecastRes = await getWeatherForecast(adcode)
if (forecastRes?.casts) {
// 处理每个预报项目的week数据
forecasts.value = forecastRes.casts.slice(0, 4).map(cast => ({
...cast,
// 确保week是有效的,API可能返回1-7的数字或"星期x"格式
week: cast.week || String(new Date(cast.date).getDay())
}))
// 更新图表配置
option.value = {
...option.value,
xAxis: {
...option.value.xAxis,
data: forecasts.value.map((cast, index) => formatDay(index, cast.week))
},
series: [
{
...option.value.series[0],
data: forecasts.value.map(c => parseInt(c.daytemp))
},
{
...option.value.series[1],
data: forecasts.value.map(c => parseInt(c.nighttemp))
}
]
}
}
} catch (error) {
console.error('数据加载失败:', error)
}
})
</script>
<style lang="scss" scoped>
/* 保持原有样式不变 */
.city-view {
opacity: 1;
flex-direction: column;
display: flex;
box-sizing: border-box;
border-width: 0;
.prompt{
text-align: center;
padding: .5rem;
background-color: #004e71;
}
.container{
text-align: center;
gap: 1rem;
flex-direction: column;
display: flex;
margin-top: 1.5rem;
max-width: 1024px;
margin-right: auto;
margin-left: auto;
padding-right: 10rem;
padding-left: 10rem;
h1{
margin: 0;
font-size: inherit;
font-weight: inherit;
}
}
hr{
border-color: rgba(255, 255, 255, 0.2);
margin-top: 1.5rem;
border-top-width: 1px;
}
.forecast-section {
margin-top: 8px;
padding: 0 300px;
.forecast-cards {
display: flex;
justify-content: space-between;
margin-bottom: 0;
background-color: #004e71;
border-radius: 8px 8px 0 0;
padding: 1.5rem 1.5rem 0 1.5rem;
.forecast-card {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
padding: 1rem;
gap: 1rem;
text-align: center;
height: 150px;
width: 100px;
}
}
.temperature-chart {
position: relative;
width: 100%;
height: 300px;
padding: 1.5rem;
margin-bottom: 2rem;
background-color: #004e71;
padding: 1.5rem 1.5rem 0 1.5rem;
.chart {
position: absolute;
left: 0;
top: 0;
width: 90%;
height: 100%;
user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
padding: 1.5rem;
margin-left: 40px;
border-width: 0;
}
}
}
}
</style>
|
2203_75900462/weather-project
|
src/views/CityView.vue
|
Vue
|
unknown
| 6,660
|
<template>
<div class="container">
<!-- 使用搜索框组件 -->
<SearchBox />
<!-- 已保存城市列表 -->
<div
class="add-city"
v-for="(city, index) in savedCities"
:key="index"
@mouseenter="showButtons = index"
@mouseleave="showButtons = -1"
>
<div class="a1">
<div class="addleft">
<h3>{{ city.name }}</h3>
<span>{{ city.temp }}度</span>
</div>
<div class="button-city" v-show="showButtons === index">
<button @click="$router.push({ name: 'CityView', params: { adcode: city.adcode } })">查看</button>
<button @click="deleteCity(city.adcode)">删除</button>
</div>
</div>
</div>
<!-- 空状态提示 -->
<div class="empty-message" v-show="!hasSavedCities">
<p>暂时没有保存过城市天气信息,请查询后点击右上角"+"号保存。</p>
</div>
<h2>近期天气</h2>
<div class="forecast-section">
<div class="forecast-cards">
<div
class="forecast-card"
v-for="(day, index) in forecastCards"
:key="index"
>
<span class="day">{{ formatDay(index, day.week) }}</span>
<span class="date">{{ formatDate(day.date) }}</span>
<span class="weather-type">{{ day.dayweather }}</span>
<span class="wind">风力 {{ day.daypower }}级</span>
</div>
</div>
<div class="temperature-chart">
<v-chart class="chart" :option="option" autoresize />
</div>
</div>
</div>
</template>
<script setup>
import { ref, onMounted, computed, onBeforeUnmount } from 'vue'
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { LineChart } from 'echarts/charts'
import { GridComponent } from 'echarts/components'
import SearchBox from '@/components/SearchBox.vue'
import { getWeatherForecast } from '@/api/weatherApi'
use([CanvasRenderer, LineChart, GridComponent])
const showSearchResults = ref(false);
// 控制按钮显示
const showButtons = ref(false);
// 控制是否显示已保存城市列表
const hasSavedCities = ref(true);
// const searchCity = ref('武汉')
const forecastData = ref(null)
// 图表配置
const option = ref({
grid: {
left: '5%',
right: '5%',
top: '5%',
bottom: '5%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: [],
show: false,
},
yAxis: {
type: 'value',
show: false,
min: function (value) {
return Math.floor(value.min * 0.1)
}
},
series: [
{
name: '白天',
type: 'line',
data: [],
symbolSize: 8,
symbol: 'circle',
smooth: true,
lineStyle: { width: 3, color: '#7EB3FF' },
itemStyle: { color: '#7EB3FF', borderWidth: 2, borderColor: '#fff' },
label: {
show: true,
position: 'top',
formatter: '白{c}°C',
color: '#FFFFFF',
fontSize: 12,
padding: [2, 4],
distance: 6
}
},
{
name: '夜间',
type: 'line',
data: [],
symbolSize: 8,
symbol: 'circle',
smooth: true,
lineStyle: { width: 3, color: '#A7E25F' },
itemStyle: { color: '#A7E25F', borderWidth: 2, borderColor: '#fff' },
label: {
show: true,
position: 'bottom',
formatter: '晚{c}°C',
color: '#FFFFFF',
fontSize: 12,
padding: [2, 4],
distance: 6
}
}
]
})
// 处理日期显示
const formatDate = (dateStr) => {
const date = new Date(dateStr)
return `${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`
}
// 处理星期显示
const formatDay = (index, week) => {
const weekMap = ['日', '一', '二', '三', '四', '五', '六']
// 前两日特殊处理
if (index === 0) return '今天';
if (index === 1) return '明天';
return `周${weekMap[week % 7] || ''}`;
}
// 计算属性处理预报卡片数据
const forecastCards = computed(() => {
return forecastData.value?.casts?.map((cast, index) => ({
...cast,
// 添加week字段格式化(如果API返回的是数字)
week: cast.week || `周${index + 1}`
})).slice(0, 4) || []
})
// 获取天气数据
const fetchWeatherData = async () => {
try {
const data = await getWeatherForecast('武汉') // 固定使用武汉
forecastData.value = data
// 更新图表数据
option.value.xAxis.data = forecastCards.value.map((_, index) => formatDay(index))
option.value.series[0].data = forecastCards.value.map(d => parseInt(d.daytemp))
option.value.series[1].data = forecastCards.value.map(d => parseInt(d.nighttemp))
option.value.xAxis.data = forecastCards.value.map((day, index) =>
formatDay(index, day.week) // 添加week参数
)
} catch (error) {
console.error('获取天气数据失败:', error)
forecastData.value = null
}
}
// 初始化加载数据
onMounted(fetchWeatherData)
// 已保存城市列表
const savedCities = ref([]);
// 安全获取localStorage数据
const loadSavedCities = () => {
try {
const savedData = localStorage.getItem('savedCities');
if (savedData) {
const parsed = JSON.parse(savedData);
savedCities.value = Array.isArray(parsed) ? parsed : [];
} else {
savedCities.value = [];
}
// 根据是否有保存的城市设置空状态显示
hasSavedCities.value = savedCities.value.length > 0;
} catch (error) {
console.error('加载保存的城市失败:', error);
savedCities.value = [];
hasSavedCities.value = false;
}
};
// 删除城市
const deleteCity = (adcode) => {
savedCities.value = savedCities.value.filter(c => c.adcode !== adcode);
localStorage.setItem('savedCities', JSON.stringify(savedCities.value));
hasSavedCities.value = savedCities.value.length > 0;
// 触发事件通知Header组件更新按钮状态
window.dispatchEvent(new Event('storage-update'));
};
// // 初始化时加载
onMounted(() => {
loadSavedCities();
document.addEventListener('click', handleClickOutside);
window.addEventListener('storage-update', loadSavedCities);
});
// 组件卸载时清理
onBeforeUnmount(() => {
document.removeEventListener('click', handleClickOutside);
window.removeEventListener('storage-update', loadSavedCities);
});
// 点击外部关闭搜索结果
const handleClickOutside = (event) => {
const searchBox = document.querySelector('.search-box');
if (searchBox && !searchBox.contains(event.target)) {
showSearchResults.value = false;
}
};
onMounted(() => {
document.addEventListener('click', handleClickOutside);
});
onBeforeUnmount(() => {
document.removeEventListener('click', handleClickOutside);
});
</script>
<style lang="scss" scoped>
.container {
width: 100%;
padding: 0 250px;
margin: 0 auto;
.empty-message {
text-align: center;
margin: 2rem 0 ;
p {
font-size: 1rem;
color: rgba(255, 255, 255, 0.8);
}
}
.add-city {
display: flex;
justify-content: space-between;
width: 100%; // 确保宽度与input一致
margin-top: 1rem;
.a1{
height: 44px;
display: flex;
justify-content: space-between;
width: 100%;
.addleft{
display: flex;
padding: 0.75rem 1rem;
justify-content: space-between;
width: 100%; // 占据整个宽度
background-color: #004e71;
transition:width 1s;
h3 {
margin: 0;
font-size: inherit;
font-weight: inherit;
}
&:hover {
width: 90%;
}
}
.button-city{
display: flex;
margin-bottom: 1rem;
button{
margin-left: 10px;
height: 44px;
text-align: center;
opacity: 1;
background-color: #eab308;
width: 80px;
cursor: pointer;
font-family: inherit;
font-size: 100%;
font-weight: inherit;
line-height: inherit;
color: inherit;
border: none;
}
}
}
}
h2 {
margin-bottom: 1rem;
font-size: 1rem;
font-weight: 250;
margin-top: 24px;
}
.forecast-section {
.forecast-cards {
display: flex;
justify-content: space-between;
margin-bottom: 0;
background-color: #004e71;
border-radius: 8px 8px 0 0;
padding: 1.5rem 1.5rem 0 1.5rem;
.forecast-card {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
padding: 1rem;
gap: 1rem;
text-align: center;
height: 150px;
width: 100px;
}
}
.temperature-chart {
position: relative;
width: 100%;
height: 300px;
padding: 1.5rem;
margin-bottom: 2rem;
background-color: #004e71;
padding: 1.5rem 1.5rem 0 1.5rem;
.chart {
position: absolute;
left: 0;
top: 0;
width: 90%;
height: 100%;
user-select: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
padding: 1.5rem;
margin-left: 40px;
border-width: 0;
}
}
}
}
</style>
|
2203_75900462/weather-project
|
src/views/Container.vue
|
Vue
|
unknown
| 9,138
|
<template>
</template>
<script setup>
</script>
<style scoped>
</style>
|
2203_75900462/weather-project
|
src/views/HomeView.vue
|
Vue
|
unknown
| 71
|
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueDevTools from 'vite-plugin-vue-devtools'
// https://vite.dev/config/
export default defineConfig({
plugins: [
vue(),
vueDevTools(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
})
|
2203_75900462/weather-project
|
vite.config.js
|
JavaScript
|
unknown
| 379
|
"""
ASGI config for IPaddress project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/5.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "IPaddress.settings")
application = get_asgi_application()
|
2202_75604983/IPaddress
|
IPaddress/asgi.py
|
Python
|
mit
| 395
|
"""
URL configuration for IPaddress project.
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/5.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import include
urlpatterns = [
path("admin/", admin.site.urls),
path('', include('index.urls')),
]
|
2202_75604983/IPaddress
|
IPaddress/urls.py
|
Python
|
mit
| 835
|
"""
WSGI config for IPaddress project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/5.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "IPaddress.settings")
application = get_wsgi_application()
|
2202_75604983/IPaddress
|
IPaddress/wsgi.py
|
Python
|
mit
| 395
|
#!/usr/bin/env python
import os
import sys
import random
from datetime import datetime, timedelta
from django.utils import timezone
# 设置Django环境
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'IPaddress.settings')
import django
django.setup()
from index.models import Data_date, Access_ip
from django.db import transaction
def generate_test_data():
"""生成2025年9月10日到21日的测试数据"""
start_date = datetime(2025, 9, 10).date()
end_date = datetime(2025, 9, 21).date()
# 测试IP地址池
test_ips = [
'192.168.1.10', '192.168.1.11', '192.168.1.12', '192.168.1.13',
'192.168.1.20', '192.168.1.21', '192.168.1.22', '192.168.1.23',
'10.0.0.15', '10.0.0.16', '10.0.0.17', '10.0.0.18',
'172.16.0.25', '172.16.0.26', '172.16.0.27', '172.16.0.28',
'8.8.8.8', '1.1.1.1', '9.9.9.9', '208.67.222.222'
]
current_date = start_date
while current_date <= end_date:
print(f"正在处理日期: {current_date}")
# 创建日期记录
data_date, created = Data_date.objects.get_or_create(
date=current_date,
defaults={'date': current_date}
)
if created:
print(f" ✓ 创建新日期记录: {current_date}")
else:
print(f" - 使用现有日期记录: {current_date}")
# 为这一天生成访问记录
# 每天的访问量:50-200次
daily_visits = random.randint(50, 200)
print(f" 生成 {daily_visits} 条访问记录...")
# 使用事务批量创建访问记录
with transaction.atomic():
access_records = []
for i in range(daily_visits):
# 随机选择一个IP
ip_address = random.choice(test_ips)
# 随机生成一天内的时间
hour = random.randint(0, 23)
minute = random.randint(0, 59)
second = random.randint(0, 59)
# 创建访问时间
access_time = timezone.make_aware(
datetime.combine(current_date, datetime.min.time().replace(
hour=hour, minute=minute, second=second
))
)
# 创建访问记录对象
access_record = Access_ip(
ip_address=ip_address,
date=data_date,
exact_time=access_time
)
access_records.append(access_record)
# 批量创建访问记录
Access_ip.objects.bulk_create(access_records)
print(f" ✓ 完成 {daily_visits} 条访问记录的创建")
# 移动到下一天
current_date += timedelta(days=1)
print("\n" + "="*50)
print("测试数据生成完成!")
print("="*50)
# 显示统计信息
total_dates = Data_date.objects.count()
total_accesses = Access_ip.objects.count()
print(f"总日期记录数: {total_dates}")
print(f"总访问记录数: {total_accesses}")
# 显示每天的统计
print("\n每日访问统计:")
for data_date in Data_date.objects.order_by('date'):
access_count = data_date.access_ip_set.count()
print(f" {data_date.date}: {access_count} 次访问")
if __name__ == "__main__":
print("开始生成2025年9月10日到21日的测试数据...")
print("="*50)
try:
generate_test_data()
print("\n✓ 测试数据生成成功!")
except Exception as e:
print(f"\n✗ 生成测试数据时出错: {e}")
import traceback
traceback.print_exc()
|
2202_75604983/IPaddress
|
add_test_data.py
|
Python
|
mit
| 3,807
|
from django.contrib import admin
# Register your models here.
|
2202_75604983/IPaddress
|
index/admin.py
|
Python
|
mit
| 63
|
from django.apps import AppConfig
class IndexConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "index"
|
2202_75604983/IPaddress
|
index/apps.py
|
Python
|
mit
| 142
|
from django.utils.deprecation import MiddlewareMixin
from .models import Data_date, Access_ip
import datetime
class Access_ipMiddleware(MiddlewareMixin):
def process_request(self, request):
# 避免递归调用 - 检查是否是内部请求
if hasattr(request, '_access_ip_processed'):
return None
try:
request._access_ip_processed = True
x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR')
if x_forwarded_for:
ip = x_forwarded_for.split(',')[0]
else:
ip = request.META.get('REMOTE_ADDR')
# 验证IP地址 - 允许所有有效IP包括127.0.0.1
if not ip:
return None
today = datetime.date.today()
date, created = Data_date.objects.get_or_create(date=today)
Access_ip.objects.create(ip_address=ip, date=date)
except Exception as e:
# 记录错误但不中断请求处理
print(f"Access_ipMiddleware error: {e}")
pass
return None
|
2202_75604983/IPaddress
|
index/middleware.py
|
Python
|
mit
| 1,161
|
from django.db import models
from django.utils import timezone
# Create your models here.
class Data_date(models.Model):
date = models.DateField(default=timezone.now, unique=True)
class Meta:
db_table = 'data_date'
ordering = ['date']
class Access_ip(models.Model):
ip_address =models.GenericIPAddressField()
date = models.ForeignKey(Data_date, on_delete=models.CASCADE)
exact_time = models.DateTimeField(auto_now_add=True)
class Meta:
db_table = 'access_ip'
ordering = ['ip_address']
|
2202_75604983/IPaddress
|
index/models.py
|
Python
|
mit
| 541
|
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>访问量监控页面</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Microsoft YaHei', Arial, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: rgba(255, 255, 255, 0.95);
border-radius: 15px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
padding: 30px;
}
.header {
text-align: center;
margin-bottom: 30px;
}
.header h1 {
color: #333;
font-size: 2.5em;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}
.header p {
color: #666;
font-size: 1.1em;
}
.dashboard {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 30px;
margin-bottom: 30px;
}
.chart-container {
background: white;
border-radius: 10px;
padding: 20px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
text-align: center;
}
.chart-container h2 {
color: #333;
margin-bottom: 20px;
font-size: 1.5em;
}
.chart-placeholder {
width: 100%;
height: 300px;
background: #f8f9fa;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
border: 2px dashed #ddd;
margin-bottom: 15px;
}
.chart-image {
max-width: 100%;
max-height: 300px;
border-radius: 8px;
}
.stats-container {
background: white;
border-radius: 10px;
padding: 20px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.stats-container h2 {
color: #333;
margin-bottom: 20px;
font-size: 1.5em;
}
.stats-list {
list-style: none;
}
.stats-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 0;
border-bottom: 1px solid #eee;
}
.stats-item:last-child {
border-bottom: none;
}
.stats-item .ip {
font-weight: bold;
color: #5238AF;
}
.stats-item .count {
background: #5238AF;
color: white;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.9em;
}
.loading {
color: #666;
font-style: italic;
}
.error {
color: #e74c3c;
background: #fdf2f2;
padding: 10px;
border-radius: 5px;
border-left: 4px solid #e74c3c;
}
.refresh-btn {
background: #5238AF;
color: white;
border: none;
padding: 12px 24px;
border-radius: 25px;
cursor: pointer;
font-size: 1em;
transition: all 0.3s ease;
margin: 20px auto;
display: block;
}
.refresh-btn:hover {
background: #4a2f9d;
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(82, 56, 175, 0.3);
}
.refresh-btn:disabled {
background: #ccc;
cursor: not-allowed;
transform: none;
}
@media (max-width: 768px) {
.dashboard {
grid-template-columns: 1fr;
}
.header h1 {
font-size: 2em;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>📊 访问量监控中心</h1>
<p>实时监控网站访问数据,掌握流量趋势</p>
</div>
<div class="dashboard">
<div class="chart-container">
<h2>📈 过去7天访问量趋势</h2>
<div id="chart-placeholder" class="chart-placeholder">
<span class="loading">正在加载图表数据...</span>
</div>
</div>
<div class="stats-container">
<h2>🔥 今日热门IP排行</h2>
<div id="stats-content">
<span class="loading">正在加载统计数据...</span>
</div>
</div>
</div>
<button id="refresh-btn" class="refresh-btn" onclick="loadData()">
🔄 刷新数据
</button>
</div>
<script>
// 页面加载时自动获取数据
window.onload = function() {
loadData();
};
// 加载数据的函数
function loadData() {
const refreshBtn = document.getElementById('refresh-btn');
const chartPlaceholder = document.getElementById('chart-placeholder');
const statsContent = document.getElementById('stats-content');
// 显示加载状态
refreshBtn.disabled = true;
refreshBtn.textContent = '📊 加载中...';
chartPlaceholder.innerHTML = '<span class="loading">正在加载图表数据...</span>';
statsContent.innerHTML = '<span class="loading">正在加载统计数据...</span>';
// 调用get_total接口
fetch('/get_total/')
.then(response => response.json())
.then(data => {
if (data.message === '获取成功') {
// 显示图表
if (data.image_base64) {
chartPlaceholder.innerHTML = `
<img src="data:image/png;base64,${data.image_base64}"
alt="访问量图表" class="chart-image">
`;
} else {
chartPlaceholder.innerHTML = '<div class="error">图表数据为空</div>';
}
// 显示统计数据
if (data.today_data && data.today_data.length > 0) {
let statsHTML = '<ul class="stats-list">';
data.today_data.forEach((item, index) => {
const rank = index + 1;
const medal = rank <= 3 ? ['🥇', '🥈', '🥉'][rank - 1] : `${rank}.`;
statsHTML += `
<li class="stats-item">
<span class="ip">${medal} ${item.ip || '未知IP'}</span>
<span class="count">${item.count || 0}次</span>
</li>
`;
});
statsHTML += '</ul>';
statsContent.innerHTML = statsHTML;
} else {
statsContent.innerHTML = '<p style="color: #666; text-align: center;">暂无今日访问数据</p>';
}
} else {
throw new Error(data.error || '获取数据失败');
}
})
.catch(error => {
console.error('Error loading data:', error);
chartPlaceholder.innerHTML = '<div class="error">图表加载失败:' + error.message + '</div>';
statsContent.innerHTML = '<div class="error">统计数据加载失败:' + error.message + '</div>';
})
.finally(() => {
// 恢复按钮状态
refreshBtn.disabled = false;
refreshBtn.textContent = '🔄 刷新数据';
});
}
// 自动刷新功能(每30秒刷新一次)
setInterval(function() {
if (!document.getElementById('refresh-btn').disabled) {
loadData();
}
}, 30000);
</script>
</body>
</html>
|
2202_75604983/IPaddress
|
index/templates/monitor.html
|
HTML
|
mit
| 8,990
|
from django.test import TestCase
# Create your tests here.
|
2202_75604983/IPaddress
|
index/tests.py
|
Python
|
mit
| 60
|
from django.urls import path
from . import views
urlpatterns = [
path('index/', views.monitor, name='monitor'), # 监控页面
path('get_total/', views.get_total, name='get_total'), # 获取总访问量
]
|
2202_75604983/IPaddress
|
index/urls.py
|
Python
|
mit
| 215
|
from django.shortcuts import render
from django.http import HttpResponse, JsonResponse
from matplotlib import pyplot as plt
from .models import Data_date, Access_ip
import matplotlib, numpy as np
import io,base64
from datetime import datetime, timedelta
#一些配置
matplotlib.use('Agg') # 使用非交互式后端
# 配置 matplotlib 中文显示
plt.rcParams['font.sans-serif'] = ['SimHei'] # 使用黑体字体
plt.rcParams['axes.unicode_minus'] = False # 解决负号显示为方块的问题
plt.rcParams['toolbar'] = 'None'# 关闭工具栏
# Create your views here.
#----监控页面----
def monitor(request):
return render(request, 'monitor.html')
#----功能接口----
def get_total(request):
try:
#从数据库获取数据
today = datetime.now().date()
data_7_bef = today - timedelta(days=7)
# 使用select_related优化查询,避免递归
date7 = Data_date.objects.filter(
date__gte=data_7_bef,
date__lte=today
).order_by('date').select_related()
dates = [d.date for d in date7] # 提取日期
dates.sort()
# 使用更高效的查询方式
counts = []
for d in date7:
count = Access_ip.objects.filter(date=d).count()
counts.append(count)
# 生成图片
if not dates or not counts:
# 如果没有数据,创建一个空图表
fig, ax = plt.subplots(figsize=(6, 4))
ax.text(0.5, 0.5, '暂无数据', ha='center', va='center', fontsize=14)
ax.set_xlim(0, 1)
ax.set_ylim(0, 1)
else:
fig, ax = plt.subplots(figsize=(6, 4)) # 设置较小的图表尺寸
fig.patch.set_facecolor("#FFFFFFFF") # 画布背景
ax.set_facecolor("#FFFFFFFF") # 坐标轴背景
bar = ax.bar(dates, counts, color="#5238AF", label='访问量', alpha=0.8)# 柱状图
ax.set_title('过去7天的访问量', fontsize=14, fontweight='bold', pad=20)
ax.set_ylabel('访问量', fontsize=12)
ax.set_xlabel('日期', fontsize=12)
ax.set_xticks(dates)# 设置X轴刻度
ax.set_xticklabels(dates, rotation=40, ha='right')# 设置X轴刻度标签
ax.legend(loc='best') # 自动选择最佳图例位置
if counts:
ax.set_ylim(0, max(counts) * 1.1) # 增加10%的上边距
plt.tight_layout()# 自动调整子图参数,使之填充整个图像区域
# 保存图片到内存
buffer = io.BytesIO()
plt.savefig(buffer, format='png', bbox_inches='tight', dpi=150, facecolor="#FFFFFFFF")
buffer.seek(0)
image_base64 = base64.b64encode(buffer.getvalue()).decode('utf-8')
buffer.close()
plt.close()
#获取今天的访问量
try:
data_today = Data_date.objects.get(date=today)
ips_today = Access_ip.objects.filter(date=data_today)
today_list = {}
for ip_obj in ips_today:
ip_address = ip_obj.ip_address
if ip_address not in today_list:
today_list[ip_address] = 1
else:
today_list[ip_address] += 1
today_list = sorted(today_list.items(), key=lambda x: x[1], reverse=True)[:5]# 取前5个
today_data = [{'ip': ip, 'count': count} for ip, count in today_list]# 转换为字典列表
except Data_date.DoesNotExist:
today_data = [] # 如果今天没有数据,返回空列表
return JsonResponse({
'message': '获取成功',
'image_base64': image_base64,
'today_data': today_data
},status=200)
except Exception as e:
return JsonResponse({'error': f'获取失败: {str(e)}'}, status=500)
|
2202_75604983/IPaddress
|
index/views.py
|
Python
|
mit
| 3,902
|
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "IPaddress.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == "__main__":
main()
|
2202_75604983/IPaddress
|
manage.py
|
Python
|
mit
| 665
|
#
# 'make' build executable file 'main'
# 'make clean' removes all .o and executable files
#
# define the C compiler to use
CC = gcc
# define any compile-time flags
CFLAGS := -Wall -Wextra -g
# define library paths in addition to /usr/lib
# if I wanted to include libraries not in /usr/lib I'd specify
# their path using -Lpath, something like:
LFLAGS =
# define output directory
OUTPUT := output
# define source directory
SRC := src
# define include directory
INCLUDE := include
# define lib directory
LIB := lib
ifeq ($(OS),Windows_NT)
MAIN := main.exe
SOURCEDIRS := $(SRC)
INCLUDEDIRS := $(INCLUDE)
LIBDIRS := $(LIB)
FIXPATH = $(subst /,\,$1)
RM := del /q /f
MD := mkdir
else
MAIN := main
SOURCEDIRS := $(shell find $(SRC) -type d)
INCLUDEDIRS := $(shell find $(INCLUDE) -type d)
LIBDIRS := $(shell find $(LIB) -type d)
FIXPATH = $1
RM = rm -f
MD := mkdir -p
endif
# define any directories containing header files other than /usr/include
INCLUDES := $(patsubst %,-I%, $(INCLUDEDIRS:%/=%))
# define the C libs
LIBS := $(patsubst %,-L%, $(LIBDIRS:%/=%))
# define the C source files
SOURCES := $(wildcard $(patsubst %,%/*.c, $(SOURCEDIRS)))
# define the C object files
OBJECTS := $(SOURCES:.c=.o)
# define the dependency output files
DEPS := $(OBJECTS:.o=.d)
#
# The following part of the makefile is generic; it can be used to
# build any executable just by changing the definitions above and by
# deleting dependencies appended to the file from 'make depend'
#
OUTPUTMAIN := $(call FIXPATH,$(OUTPUT)/$(MAIN))
all: $(OUTPUT) $(MAIN)
@echo Executing 'all' complete!
$(OUTPUT):
$(MD) $(OUTPUT)
$(MAIN): $(OBJECTS)
$(CC) $(CFLAGS) $(INCLUDES) -o $(OUTPUTMAIN) $(OBJECTS) $(LFLAGS) $(LIBS)
# include all .d files
-include $(DEPS)
# this is a suffix replacement rule for building .o's and .d's from .c's
# it uses automatic variables $<: the name of the prerequisite of
# the rule(a .c file) and $@: the name of the target of the rule (a .o file)
# -MMD generates dependency output files same name as the .o file
# (see the gnu make manual section about automatic variables)
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) -c -MMD $< -o $@
.PHONY: clean
clean:
$(RM) $(OUTPUTMAIN)
$(RM) $(call FIXPATH,$(OBJECTS))
$(RM) $(call FIXPATH,$(DEPS))
@echo Cleanup complete!
run: all
./$(OUTPUTMAIN)
@echo Executing 'run: all' complete!
|
2301_76233439/shujujiegou
|
Makefile
|
Makefile
|
unknown
| 2,371
|