first commit

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

View File

@@ -0,0 +1 @@
ef26bcb3-86a9-447a-ae76-e7363c338cff

View File

@@ -0,0 +1 @@
1132f392-7f44-4732-8be6-721f0dd5ea3a

View File

@@ -0,0 +1,84 @@
.banner {
position: relative;
}
.img_hidden {
height: 100%;
overflow: hidden;
}
.nav {
display: flex;
justify-content: space-between;
padding: 0 0.8rem;
box-sizing: border-box;
position: fixed;
width: 100%;
top: .8rem;
z-index: 999;
}
.nav .menu {
height: 1.5rem;
padding: 0 .6rem;
background: rgba(0,0,0,0.5);
border-radius: .75rem;
}
.nav .menu a p {
line-height: 1.5rem;
font-size: .7rem;
color: #fff;
}
.img_hidden{
width: 100%;
height: 380px;
}
.img_hidden img{
width: 100%;
height: 100%;
}
.content{
padding: 0px .8rem;
}
.content div p{
font-size: 14px;
color: #383838;
line-height: 25px;
padding: 12px 4px 0px;
}
.content_title{
font-size: 22px;
font-weight: 700;
color: #1b1b1b;
line-height: 1.8rem;
margin: .5rem 0px;
}
.foot{
padding: 0px .8rem;
}
.foot .footer_title{
font-size: 16px;
font-weight: 600;
color: #000;
margin-bottom: 1rem;
}
.foot .headportrait{
display: flex;
}
.foot .headportrait img{
width: 1.7rem;
height: 1.7rem;
border-radius: 100%;
margin-right: .6rem;
}
.foot .headportrait .xinxi h1{
color: #888;
font-size: 14px;
font-weight: bold;
}
.foot .headportrait .xinxi h2{
color: #bbb;
font-size: .5rem;
margin-bottom: .5rem;
}
.foot .headportrait .xinxi p{
font-size: 14px;
color: #383838;
}

View File

@@ -0,0 +1,32 @@
body,h1,h2,h3,h4,h5,h6,p,ul,li,i{
margin: 0;
padding: 0;
list-style: none;
}
a {
text-decoration: none;
}
html {
font-size: 20px
}
@media only screen and (min-width: 400px) {
html {
font-size: 21.33px !important
}
}
@media only screen and (min-width: 414px) {
html {
font-size: 22.08px !important
}
}
@media only screen and (min-width: 480px) {
html {
font-size: 25.6px !important
}
}

View File

@@ -0,0 +1,86 @@
html,body {
height: 100%;
background: #f5f5f5;
}
.header {
background: #fff;
position: fixed;
width: 100%;
height: 3.6rem;
left: 0;
top: 0;
display: flex;
align-items: center;
padding: 0 .8rem;
z-index: 999;
box-sizing: border-box;
}
.back {
background: #f5f5f5;
height: 2rem;
width: 100%;
border-radius: .2rem;
display: flex;
align-items: center;
padding-left: .8rem;
}
.back i{
color: #666;
}
.header a input {
height: 1.1rem;
width: 88%;
border: none;
background: #f5f5f5;
padding-left: .45rem;
outline: none;
}
.content{
width: 100%;
padding-left: .8rem;
padding-right: .8rem;
box-sizing: border-box;
margin-top: 4.6rem;
}
.content_list{
width: 100%;
background: #fff;
border-radius: 15px;
overflow: hidden;
}
.content_list ul li{
padding-left: 16px;
padding-top: 20px;
}
.content_list ul li a{
display: flex;
}
.content_list ul li a img{
height: 80px;
width: 112px;
border-radius: 8px;
margin-right: 10px;
}
.content_list ul li a .list_right p{
font-size: 17px;
color: #000;
}
.content_list ul li a .list_right img{
height: 12px;
width: 68px;
}
.content_list ul li a .list_right .evaluate{
display: flex;
align-items: center;
font-size: 12px;
color: #949494;
}
.content_list ul li a .list_right .evaluate i{
margin-right: 3px;
}
.content_list ul li a .list_right .evaluate span{
margin-right: 5px;
}

View File

@@ -0,0 +1,278 @@
.bar {
display: flex;
align-items: center;
background: #fff;
padding: 0 .5rem;
box-sizing: border-box;
height: 2.25rem;
position: fixed;
width: 100%;
z-index: 999;
}
.banner_swiper img {
width: 100%;
}
.content {
margin-bottom: 3rem;
padding-top: 2.5rem;
}
.icon-wode {
color: #666;
font-size: .9rem !important;
}
.bar a:nth-child(2){
width: 90%;
}
.bar a input {
width: 100%;
height: 1.5rem;
border: none;
padding-left: .95rem;
margin-left: .5rem;
background: #f1f1f4;
border-radius: 1.5rem;
font-size: .75rem;
}
.menu {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.menu li {
width: 20%;
text-align: center;
}
.menu img {
width: 2.5rem;
height: 2.5rem;
}
.menu p {
font-size: .6rem;
color: #666;
}
.mrsc {
margin-top: 1.6rem;
padding: 0 .8rem;
}
.pub_title{
font-size: .8rem;
font-weight: 600;
color: #999;
line-height: 1.1rem;
margin-bottom: .5rem;
}
.mrsc ul {
display: flex;
margin-bottom: .5rem;
align-items: flex-end;
}
.mrsc ul li{
position: relative;
font-size: .8rem;
margin-right: 1rem;
color: #666;
}
.mrsc ul .active::after,
.do_together_title .active::after {
content: '';
height: .3rem;
border-radius: .15rem;
width: 100%;
left: 0px;
bottom: .15rem;
background: #ff9d9b;
position: absolute;
z-index: 50;
display: block;
}
.active {
font-size: 1.4rem !important;
color: #333 !important;
}
.mrsc_list {
display: flex;
justify-content: space-between;
}
.mrsc_list .mrsc_list_item{
}
.mrsc_list img{
width: 8.35rem;
height: 11.9rem;
border-radius: .35rem;
}
.mrsc_list .tips_titles {
margin-top: .5rem;
font-size: .9rem;
font-weight: 600;
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 167px;
}
.tips_text {
padding: 0 .15rem;
background: #ff8d8d;
color: #fff;
font-size: .4rem;
}
.tips {
font-size: .55rem;
color: #ff8d8d;
line-height: .7rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
background: #fff2f2;
border-radius: .1rem;
padding: .2rem .3rem;
}
.recommend {
margin-top: 1.6rem;
}
.recommend ul {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.recommend ul li {
width: 5.2rem;
box-shadow: 0px 0px .6rem rgba(0,0,0,0.1);
background: #fff;
border-radius: 1.05rem;
margin-bottom: 1rem;
}
.recommend ul li a {
display: flex;
align-items: center;
justify-content: center;
}
.recommend_active {
background: #fe9b95 !important;
box-shadow: 0px 0px .6rem rgba(255,155,149,0.5) !important;
}
.recommend_active span {
color: #fff !important;
}
.recommend ul li img{
width: .9rem;
height: .9rem;
margin-right: .2rem;
}
.recommend ul li span {
font-size: .6rem;
color: #333;
line-height: 2.1rem;
display: inline-block;
vertical-align: top;
font-weight: 600;
}
.recommend_title {
font-size: 1.25rem;
font-weight: 600;
color: #333;
line-height: 1.8rem;
margin-bottom: .8rem;
}
.do_together_title {
display: flex;
justify-content: flex-start;
position: relative;
align-items: flex-end;
}
.do_together_title li {
margin-right: 1rem;
font-size: .8rem;
color: #666;
cursor: pointer;
position: relative;
}
.do_together_content {
margin-top: .5rem;
}
.do_together_content .roll_father {
margin-bottom: .8rem;
display: none;
-webkit-column-width: 7.6rem;
-o-colum-width: 7.6rem;
-webkit-column-gap: .6rem;
-moz-column-gap: .6rem;
-o-column-gap: .6rem;
}
.showRoll {
display: block !important;
}
.do_together_item{
margin-right: 0.33rem;
border-radius: .3rem;
box-shadow: 0 .15rem .3rem rgba(0,0,0,0.1);
padding-bottom: .6rem;
margin-bottom: 0.6rem;
width: 8.45rem;
}
.roll_father .do_together_item:nth-child(2n) {
margin-right: 0 !important;
}
.item_img {
position: relative;
}
.item_padd {
padding-left: .5rem;
padding-right: .5rem;
padding-bottom: .5rem;
box-sizing: border-box;
}
.item_pa {
padding-left: .5rem;
padding-right: .5rem;
}
.item_img img {
width: 100%;
border-top-left-radius: .3rem;
border-top-right-radius: .3rem;
}
.do_together_item .tips_titles {
font-size: .8rem !important;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #333;
font-weight: 600;
}
.item_avatr {
display: flex;
justify-content: space-between;
align-items: center;
}
.avatr_left,
.avatr_view{
display: flex;
align-items: center;
}
.avatr_left img {
width: .9rem;
height: .9rem;
margin-right: .25rem;
border-radius: 100%;
}
.avatr_left span {
font-size: .45rem;
color: #666;
}
.avatr_view .icon-yanjing {
font-size: .8rem;
color: #666;
}
.avatr_view span {
font-size: .45rem;
color: #666;
margin-left: .2rem;
}

View File

@@ -0,0 +1,266 @@
body{
background: #fafafa;
}
.banner {
height: 18.75rem;
position: relative;
}
.img_hidden {
height: 100%;
overflow: hidden;
}
.nav {
display: flex;
justify-content: space-between;
padding: 0 0.8rem;
box-sizing: border-box;
position: fixed;
width: 100%;
top: .8rem;
z-index: 999;
}
.nav .menu {
height: 1.5rem;
padding: 0 .6rem;
background: rgba(0,0,0,0.5);
border-radius: .75rem;
z-index: 14565269565;
}
.nav .menu a p {
line-height: 1.5rem;
font-size: .7rem;
color: #fff;
}
.banner img{
width: 100%;
position: relative;
top: -3.3rem;
}
.info_list {
margin: .8rem;
padding: 1rem .75rem .5rem;
background: #fff;
box-sizing: border-box;
position: relative;
box-shadow: 0px 0px 1.6rem rgba(0,0,0,0.1);
border-radius: .8rem;
margin-top: -3rem;
z-index: 999;
}
.info_list .list_title{
display: flex;
justify-content: space-between;
align-items: center;
}
.info_list h1 h2{
font-size: 1.4rem;
font-weight: 700;
color: #333;
}
.info_list .list_title i{
font-size: 1.25rem;
}
.info_list .posttime{
font-size: .6rem;
color: #999;
line-height: 1rem;
display: block;
padding: .2rem 0px 0px;
border-bottom: 1px solid #f5f5f5;
padding-bottom: .5rem;
}
.ddd {
display: flex;
justify-content: space-between;
margin-top: 1rem;
}
.ddd li {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.ddd p {
font-size: .6rem;
color: #666666;
}
.ddd .i{
height: 1.5rem;
width: 1.5rem;
background-position: 0px -1.5rem;
background: url("https://st-cn.meishij.net/p2/20200221/20200221173101_145.png");
background-size: 1.5rem 7.5rem;
}
.list_text {
overflow: hidden;
height: 2.1rem;
font-weight: 400;
text-align: justify;
font-size: .7rem;
color: #999999;
line-height: 1.05rem;
margin-top: 1rem;
position: relative;
}
.list_text .more {
position: absolute;
right: 0;
bottom: 0;
padding-left: 3rem;
font-size: .7rem;
color: #5a92f5;
background-image: linear-gradient(to right,rgba(255,255,255,0.1),rgba(255,255,255,0.5),rgba(255,255,255,1),rgba(255,255,255,1),rgba(255,255,255,1),rgba(255,255,255,1));
}
.icon-houtui-copy-copy {
font-size: .6rem !important;
}
.ms {
margin-top: 1rem;
}
.ms .main{
margin-bottom: .75rem;
}
.ms .title{
margin-bottom: .35rem;
border-bottom: 1px solid rgba(0,0,0,0.05);
padding-bottom: .5rem;
}
.ms .title span {
color: #999;
font-size: .6rem;
padding-left: .3rem;
font-weight: 300;
}
.ms ul{
}
.ms ul li{
display: flex;
justify-content: space-between;
height: 1.75rem;
align-items: center;
border-bottom: 1px solid rgba(0,0,0,0.05);
}
.ms ul li span{
font-size: .7rem;
color: #999;
font-weight: 400;
}
.content {
margin-top: 1rem;
}
.content_list {}
.content_list li {
position: relative;
}
.content_list li .step{
height: 2rem;
line-height: 2rem;
color: #333;
font-size: .9rem;
font-weight: 700;
display: inline-block;
vertical-align: top;
padding: 0px 1rem 0px .75rem;
background: rgba(255,255,255,0.9);
position: absolute;
left: 0px;
top: .75rem;
border-top-right-radius: 1rem;
border-bottom-right-radius: 1rem;
z-index: 100;
}
.content_list li img{
width: 100%;
}
.content_list li p{
padding: .75rem .75rem .75rem;
box-sizing: border-box;
}
.Otherpractices{
padding-left: .8rem;
padding-right: .8rem;
box-sizing: border-box;
margin-bottom: 2.5rem;
}
.Otherpractices_title{
height: 2.5rem;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.Otherpractices_title h3{
font-weight: 600;
}
.Otherpractices_title a{
font-size: .6rem;
color: #f15e51;
}
.Otherpractices ul{
padding: 1rem .8rem;
background: #fff;
border-radius: 16px;
box-shadow: 0px 0px 32px rgba(0,0,0,0.1);
overflow: hidden;
}
.Otherpractices ul li{
margin-right: .5rem;
float: left;
text-align: center;
margin-bottom: .3rem;
}
.Otherpractices ul li:nth-child(3n){
margin-right: 0px;
}
.Otherpractices ul li img{
width: 4.85rem;
height: 4.85rem;
margin-bottom: .5rem;
border-radius: 8px;
}
.Otherpractices ul li p{
font-size: 14px;
color: #000;
}
.recommend{
padding-left: .8rem;
padding-right: .8rem;
box-sizing: border-box;
margin-bottom: 2.5rem;
}
.recommend ul{
padding: 1rem .8rem;
background: #fff;
border-radius: 16px;
box-shadow: 0px 0px 32px rgba(0,0,0,0.1);
}
.recommend ul li{
margin-bottom: .8rem;
}
.recommend ul li a{
display: flex;
}
.recommend ul li img{
width: 7.2rem;
height: 4.8rem;
border-radius: .4rem;
margin-right: .8rem;
}
.recommend ul li .recommend_left{
display: flex;
flex-direction: column;
justify-content: space-between;
}
.recommend ul li .recommend_left h3{
font-size: 17px;
color: #000;
font-weight: 400;
}
.recommend ul li .recommend_left p{
font-size: 12px;
color: #949494;
}

View File

@@ -0,0 +1,115 @@
body{
background: #f5f5f5;
}
.header{
width: 100%;
height: 7.5rem;
background: url(../img/likebeijing.png) no-repeat center;
background-size: 100% 100%;
}
.like_headportrait{
width: 300px;
padding-top: 20px;
margin: auto;
color: #fff;
font-size: 16px;
}
.toux{
width: 100%;
display: flex;
align-items: center;
}
.head_lef img{
height: 66px;
width: 66px;
border: 3px solid rgba(255,255,255,0.5);
border-radius: 100%;
margin-right: 10px;
}
.head_right span{
font-size: 12px;
}
.head_list{
display: flex;
width: 100px;
font-size: 12px;
height: 24px;
line-height: 22px;
border-radius: 16px;
border: 1px solid rgba(255,255,255,0.5);
background: rgba(255,255,255,0.2);
padding: 0px 12px;
margin-left: 82px;
}
.head_list p{
margin-right: 5px;
}
.like_list li{
width: 6.2rem;
}
.like_list li:nth-child(2) a{
border-right: 1px solid #eee;
border-left: 1px solid #eee;
}
.like_list li a{
display: flex;
align-items: center;
justify-content: center;
margin: 10px 0px;
}
.like_list li a p{
color: #ff4c35;
}
.like_list li a{
font-size: 14px;
color: #999;
}
.information li{
padding: 0 .8rem;
box-sizing: border-box;
width: 100%;
height: 44px;
background: #fff;
border-bottom: 1px solid #f5f5f5;
}
.information li a{
height: 100%;
justify-content: space-between;
display: flex;
align-items: center;
}
.information li .information_left {
display: flex;
align-items: center;
font-size: 16px;
color: #333;
}
.information li .information_left img{
width: 1.35rem;
height: 1.35rem;
margin-right: .5rem;
}
.information li .information_right{
display: flex;
align-items: center;
}
.information li .information_right p{
font-size: 12px;
color: #ff4c35;
margin-right: 10px;
}
.information li .information_right span{
font-size: 20px;
color: #666;
}
.information li:nth-child(2){
margin-top: .5rem;
}
.information li:nth-child(3){
margin-top: .5rem;
}

View File

@@ -0,0 +1,112 @@
.header{
position: fixed;
display: flex;
justify-content: space-between;
width: 100%;
height: 2.25rem;
background: #fff;
padding: 0px .8rem;
box-sizing: border-box;
align-items: center;
border-bottom: 1px solid #f5f5f5;
z-index: 999;
overflow: hidden;
}
.back a{
font-size: .75rem;
color: #333;
}
.header p{
font-size: .9rem;
color: #000;
font-weight: 600;
}
html,body{
height: 100%;
}
.content{
height: 100%;
scroll-padding-left: .8rem;
scroll-padding-right: .8rem;
padding-top: 3.2rem;
padding-bottom: 3.2rem;
}
.content ul{
padding-left: .8rem;
padding-right: .8rem;
box-sizing: border-box;
}
.content ul li{
position: relative;
width: 8.05rem;
float: left;
margin-right: 1rem;
margin-bottom: .5rem;
text-align: center;
}
.content ul li:nth-child(2n){
margin-right: 0px;
}
.content li a{
width: 100%;
}
.content li a img{
width: 8.05rem;
height: 10.75rem;
border-radius: .4rem;
}
.content li p{
font-size: .8rem;
color: #000;
}
.content li .clear{
position: absolute;
width: 3rem;
height: 1.5rem;
background: #00000063;
top: 10px;
right: 10px;
}
.content li .clear p{
text-align: center;
line-height: 30px;
font-size: 17px;
color: red;
}
.shadow{
width: 100%;
height: 100%;
position: fixed;
z-index: 9999;
top: 0;
background: #00000073;
display: none;
}
.actionsheet{
position: fixed;
bottom: 0;
width: 100%;
box-sizing: border-box;
padding: 0 .8rem;
}
.cancel{
width: 100%;
height: 2.2rem;
border-radius: .4rem;
text-align: center;
line-height: 2.2rem;
color: #000;
background: #fff;
}
.delete{
margin-top: 10px;
width: 100%;
height: 2.2rem;
border-radius: .4rem;
text-align: center;
line-height: 2.2rem;
color: red;
background: #fff;
}

View File

@@ -0,0 +1,57 @@
.header{
display: flex;
align-items: center;
position: fixed;
width: 100%;
height: 2.25rem;
background: #fff;
padding: 0px .8rem;
box-sizing: border-box;
border-bottom: 1px solid #f5f5f5;
z-index: 999;
overflow: hidden;
}
.header p{
font-size: .9rem;
color: #000;
font-weight: 600;
margin: 0 auto;
}
.content{
width: 100%;
padding-top: 2.75rem;
}
.content li{
width: 100%;
padding-left: .8rem;
padding-right: .8rem;
border-bottom: 1px solid rgba(0,0,0,0.05);
box-sizing: border-box;
margin-bottom: .5rem;
}
.content li a .menu_title{
display: flex;
justify-content: space-between;
height: 2.2rem;
align-items: center;
}
.content li a .menu_title h3{
font-size: .9rem;
font-weight: 600;
color: #000000;
}
.content li a .menu_title p{
font-size: .7rem;
color: #999;
font-weight: 300;
}
.content li a .menu_pic{
display: flex;
justify-content: space-between;
padding-bottom: 1rem;
}
.content li a .menu_pic img{
width: 5.4rem;
height: 5.4rem;
}

View File

@@ -0,0 +1,33 @@
.padding {
padding: 0 .8rem;
}
.footer {
position: fixed;
width: 100%;
height: 2.5rem;
background: #fff;
display: flex;
justify-content: space-around;
align-items: center;
left: 0;
bottom: 0;
z-index: 999;
}
.footer a {
display: flex;
flex-direction: column;
text-align: center;
}
.footer a img {
width: 1.4rem;
height: 1.4rem;
}
.footer a p {
font-size: .6rem;
color: #666;
}
.footer a .jihuo{
color: #f15a4f;
}

View File

@@ -0,0 +1,86 @@
.header{
position: fixed;
display: flex;
justify-content: space-between;
width: 100%;
height: 2.25rem;
background: #fff;
padding: 0px .8rem;
box-sizing: border-box;
align-items: center;
border-bottom: 1px solid #f5f5f5;
z-index: 999;
overflow: hidden;
}
.header a{
width: 2.5rem;
height: 1.5rem;
background: #ff4c39;
text-align: center;
border-radius: .1rem;
}
.header a span{
color: #fff;
font-size: .7rem;
line-height: 1.5rem;
}
.header input{
padding-left: .95rem;
width: 60%;
height: 1.5rem;
background: #eee;
color: #333;
font-size: .7rem;
display: block;
line-height: 1.2rem;
border: 0px;
outline: none;
}
.header p{
width: 2.5rem;
height: 1.5rem;
background: #ff4c39;
border-radius: .1rem;
color: #fff;
font-size: .7rem;
box-sizing: border-box;
line-height: 1.5rem;
text-align: center;
}
.content{
padding-top: 2.25rem;
}
.content ul{}
.content ul li{
height: 5.5rem;
border-bottom: 1px solid #ccc;
padding: .8rem;
box-sizing: border-box;
}
.content ul li a{
width: 100%;
height: 100%;
display: flex;
align-items: center;
}
.content ul li a .img{
width: 6rem;
height: 4rem;
position: relative;
overflow: hidden;
margin-right: .5rem;
}
.content ul li a .img img{
display: block;
width: 100%;
margin-top: -1rem;
}
.content ul li a .name h3{
font-size: .9rem;
color: #333;
padding-bottom: 1.75rem;
}
.content ul li a .name p{
font-size: .7rem;
color: #999;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,92 @@
html,body {
height: 100%;
}
.header {
position: fixed;
width: 100%;
height: 3.6rem;
left: 0;
top: 0;
display: flex;
align-items: center;
padding: 0 .8rem;
box-sizing: border-box;
}
.back {
background: #f5f5f5;
height: 2rem;
width: 100%;
border-radius: .2rem;
display: flex;
align-items: center;
padding-left: .8rem;
}
.back i{
color: #666;
}
.header input {
height: 1.1rem;
width: 88%;
border: none;
background: #f5f5f5;
padding-left: .45rem;
outline: none;
}
.content {
height: calc(100% - 3.6rem);
padding-top: 3.6rem;
}
.left_menu {
width: 4rem;
height: 100%;
float: left;
overflow-y: scroll;
background: #f5f5f5;
}
.active_menu {
background: #fff !important;
}
.left_menu .img {
margin: 0 auto;
height: 25px;
width: 25px;
background: url("https://s1.st.meishij.net/p2/20191108/20191108113258_481.png");
background-position: 0 0;
background-size: 25px 500px;
}
.left_menu li {
height: 70px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.left_menu li p{
font-size: .6rem;
color: #333;
margin-top: 4px;
}
.right_content {
width: calc(100% - 4rem);
height: 100%;
float: left;
overflow-y: scroll;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
align-content: baseline;
}
.right_content li {
width: 33%;
height: 4.5rem;
text-align: center;
}
.right_content li img{
width: 3.1rem;
height: 3.1rem;
}
.right_content li p{
font-size: .6rem;
color: #333;
}

View File

@@ -0,0 +1,116 @@
.header{
position: fixed;
display: flex;
justify-content: space-between;
width: 100%;
height: 2.25rem;
background: #fff;
padding: 0px .8rem;
box-sizing: border-box;
align-items: center;
border-bottom: 1px solid #f5f5f5;
z-index: 999;
overflow: hidden;
}
.back a{
font-size: .75rem;
color: #333;
}
.back a i{
font-weight: 600;
}
.header p{
font-size: .9rem;
color: #000;
font-weight: 600;
}
.header .icon-sousuo{
font-size: 1.25rem;
}
.content{
padding-top: 2.2rem;
padding-left: .8rem;
padding-right: .8rem;
box-sizing: border-box;
}
.content li{
float: left;
margin-top: .8rem;
width: 8.3rem;
box-shadow: 0 .15rem .3rem rgba(0,0,0,0.1);
border-radius: .35rem;
}
.content li:nth-child(2n){
margin-left: .5rem;
}
.content li a .content_pic{
width: 8.3rem;
height: 11.1rem;
background-image: url(https://st-cn.meishij.net/p2/20181105/20181105110641_22213.jpg);
position: relative;
overflow: hidden;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
border-radius: .35rem;
}
.content li a .content_pic .pic_yingyin{
width: 1rem;
height: 1rem;
position: absolute;
top: .25rem;
right: .5rem;
text-align: center;
line-height: 1rem;
background: #00000085;
border-radius: 100%;
}
.content li a .content_pic .pic_yingyin .icon-play{
font-size: .6rem;
color: #fff;
position: absolute;
top: 0;
left: .25rem;
}
.content li a p{
margin: .5rem .5rem 0 .5rem;
font-size: 16px;
color: #333;
font-weight: 600;
}
.pic_pinglun{
margin: 1rem .5rem 0 .5rem;
padding-bottom: .5rem;
display: flex;
align-items: center;
justify-content: space-between;
}
.pic_pinglun .toux_left{
display: flex;
align-items: center;
}
.pic_pinglun .toux_left img{
width: .9rem;
height: .9rem;
border-radius: 100%;
}
.pic_pinglun .toux_left span{
font-size: .45rem;
color: #666;
margin-left: 5px;
}
.pic_pinglun .toux_right{
display: flex;
align-items: center;
}
.pic_pinglun .toux_right .icon-faxian{
font-size: .6rem;
color: #666;
}
.pic_pinglun .toux_right span{
font-size: .45rem;
color: #666;
}

View File

@@ -0,0 +1,38 @@
.banner {
position: relative;
}
.img_hidden {
height: 100%;
overflow: hidden;
}
.nav {
display: flex;
justify-content: space-between;
padding: 0 0.8rem;
box-sizing: border-box;
position: fixed;
width: 100%;
top: .8rem;
z-index: 999;
}
.nav .menu {
height: 1.5rem;
padding: 0 .6rem;
background: rgba(0,0,0,0.5);
border-radius: .75rem;
}
.nav .menu a p {
line-height: 1.5rem;
font-size: .7rem;
color: #fff;
}
.banner video{
width: 100%;
}
.conten{
padding: 0px .8rem;
}
.conten h1{
font-weight: 700;
margin-bottom: 1rem;
}

View File

@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./css/swiper-bundle.min.css">
<style>
img {
width: 100%;
}
</style>
</head>
<body>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="https://st-cn.meishij.net/p2/20200821/20200821114050_119.png" alt="">
</div>
<div class="swiper-slide">
<img src="https://st-cn.meishij.net/p2/20200820/20200820222119_267.jpg" alt="">
</div>
<div class="swiper-slide">
<img src="https://st-cn.meishij.net/p2/20200818/20200818225021_199.jpg" alt="">
</div>
</div>
<!-- 如果需要分页器 -->
<div class="swiper-pagination"></div>
<!-- 如果需要导航按钮 -->
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<!-- 如果需要滚动条 -->
<div class="swiper-scrollbar"></div>
</div>
</body>
<script src="./js/swiper-bundle.min.js"></script>
<script src="../js/less.min.js" type="text/javascript"></script>
<script> var mySwiper = new Swiper('.swiper-container', {
direction: 'horizontal',
loop: true,
// 如果需要分页器
pagination: {
el: '.swiper-pagination',
},
// 如果需要前进后退按钮
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
// 如果需要滚动条
scrollbar: {
el: '.swiper-scrollbar',
},
})
</script>
</html>

View File

@@ -0,0 +1 @@
ff1d2d4e-8c2d-49ac-b61c-b94cc04fd595

View File

@@ -0,0 +1,61 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Copyright (C) 2014 by original authors @ fontello.com</metadata>
<defs>
<font id="ratchicons" horiz-adv-x="1000" >
<font-face font-family="ratchicons" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
<missing-glyph horiz-adv-x="1000" />
<glyph glyph-name="and-caret" unicode="&#xe800;" d="m313 225l375 0v376" horiz-adv-x="1000" />
<glyph glyph-name="up-nav" unicode="&#xe81f;" d="m65 146l81-83l354 372l353-372l81 83l-434 456l-435-456z" horiz-adv-x="1000" />
<glyph glyph-name="and-download" unicode="&#xe802;" d="m875 38h-750v62h750v-62z m-312 375v250h-125v-250h-125l187-250l188 250h-125z" horiz-adv-x="1000" />
<glyph glyph-name="and-left" unicode="&#xe803;" d="m306 349l325 373l67-59l-273-314l273-315l-67-59l-325 373l0 1z" horiz-adv-x="1000" />
<glyph glyph-name="and-more-vertical" unicode="&#xe804;" d="m406-25v188h188v-188h-188z m0 563h188v188h-188v-188z m188-281v188h-188v-188h188z" horiz-adv-x="1000" />
<glyph glyph-name="and-more" unicode="&#xe805;" d="m125 444h188v-187h-188v187z m563 0v-187h187v187h-187z m-281-187h187v187h-187v-187z" horiz-adv-x="1000" />
<glyph glyph-name="and-right" unicode="&#xe806;" d="m698 348l-325-373l-67 59l274 315l-274 314l68 59l324-373l0-1z" horiz-adv-x="1000" />
<glyph glyph-name="and-search" unicode="&#xe807;" d="m928 51l-167 167c-17 17-47 15-66-4l-3-3l-69 69c42 54 67 121 67 194c0 173-140 313-314 313s-313-140-313-313s140-314 313-314c71 0 137 24 190 64l69-70c-18-19-19-48-2-65l166-166c17-17 47-16 66 4l59 58c19 19 21 49 4 66z m-801 423c0 137 112 249 249 249s249-112 249-249s-111-249-249-249s-249 111-249 249z" horiz-adv-x="1000" />
<glyph glyph-name="and-share" unicode="&#xe808;" d="m728 215c-33 0-63-14-84-36l-263 153c1 6 2 12 2 18c0 6-1 12-2 18l263 152c21-23 51-37 84-37c62 0 113 51 113 113s-51 114-113 114s-114-51-114-114c0-7 1-14 2-21l-261-150c-21 23-51 38-85 38c-63 0-114-50-114-113s51-113 114-113c33 0 64 15 85 38l261-151c-1-7-2-14-2-22c0-62 51-113 114-113s113 51 113 113s-51 113-113 113z" horiz-adv-x="1000" />
<glyph glyph-name="and-up" unicode="&#xe809;" d="m500 548l374-325l-59-67l-315 273l-314-273l-59 67l373 325l0 0z" horiz-adv-x="1000" />
<glyph glyph-name="back" unicode="&#xe80a;" d="m500 174l-313 176l313 176m312-352l-312 176l312 176" horiz-adv-x="1000" />
<glyph glyph-name="down" unicode="&#xe820;" d="m941 479l-124 127l-317-315l-318 315l-124-127l442-441l441 441z" horiz-adv-x="1000" />
<glyph glyph-name="gear" unicode="&#xe821;" d="m820 274l118 40l0 72l-118 40c-8 34-22 67-40 97l55 111l-51 51l-111-55c-30 18-62 32-97 40l-39 118l-73 0l-40-118c-34-8-67-22-97-40l-111 55l-51-51l55-111c-18-30-32-62-40-97l-117-39l0-73l117-40c9-34 22-67 41-96l-56-111l52-52l111 56c29-19 62-32 96-40l40-119l73 0l39 119c35 8 67 21 97 40l111-56l51 52l-55 111c18 29 32 62 40 96z m-320-174c-139 0-251 112-251 251s112 250 251 250s250-112 250-250s-112-251-250-251z" horiz-adv-x="1000" />
<glyph glyph-name="left" unicode="&#xe822;" d="m628-91l127 123l-314 318l314 318l-127 124l-441-442l441-441z" horiz-adv-x="1000" />
<glyph glyph-name="list" unicode="&#xe823;" d="m1000 632h-750v-62l750-1v63z m0-314v63h-750v-63h750z m-750-187v-61h750v61h-750z m-250 406l125 1v125l-125 0v-126z m0-249h125v125h-125v-125z m0-250h125v125h-125v-125z" horiz-adv-x="1000" />
<glyph glyph-name="pages" unicode="&#xe824;" d="m63 601v-689h687l0 688l-687 1z m625-63v-563h-563v563h563z m-500 250v-125h62v62h625v-625l-62 0v-62h125v750h-750z" horiz-adv-x="1000" />
<glyph glyph-name="refresh" unicode="&#xe825;" d="m813 288c-28-145-161-250-313-250c-172 0-312 139-312 312c0 173 141 312 312 313v-98l221 129l-221 128v-95c0-2 0-2 0-2c-206 0-375-167-375-375s169-375 375-375c187 0 347 133 375 313h-62z" horiz-adv-x="1000" />
<glyph glyph-name="right" unicode="&#xe826;" d="m372 792l-127-124l314-318l-314-318l127-123l441 441l-441 442z" horiz-adv-x="1000" />
<glyph glyph-name="sound" unicode="&#xe827;" d="m825-22c-2 0-3 0-5 0l-16 7c0 0 0 0 0 1c-5 1-8 3-10 6c-1 3-1 7 1 12c1 1 22 40 43 101c20 58 44 147 44 244c0 98-24 186-44 243c-21 61-42 100-43 102c-4 11-2 15 8 21l17 8c2 1 5 2 7 2c7 0 12-5 17-16c1-2 2-4 4-8c10-19 32-63 52-125c25-78 37-156 37-232c0-94-24-182-44-240c-22-63-44-104-45-104l-1-2c-5-11-9-20-22-20c0 0 0 0 0 0z m-574 248c0 0-1 0-1 0h-186v248h186c0 0 1 0 1 0l248 173v-595l-248 174z m474-124c-2 0-4 0-6 0l-16 8c0 0 0 0 0 0c-5 1-8 3-9 6c-2 3-2 7 0 12c1 1 16 26 30 64c14 37 30 94 30 157c0 65-16 121-30 157c-14 38-29 62-30 63c-4 11-2 15 9 21l15 8c3 1 5 2 8 2c6 0 12-5 17-16c1-3 3-6 5-11c17-31 61-115 61-229c0-63-16-120-30-156c-16-39-31-64-31-64c0 0 0 0 0 0l-1-2c-6-11-10-20-22-20c0 0 0 0 0 0z m-84 127c-2 0-4 0-6 0l-15 7c0 1 0 1 0 1c-5 1-8 3-9 6c-2 3-2 7 0 12c0 0 20 43 20 94c0 53-20 91-21 93c-4 11-2 16 9 21l15 8c3 1 5 2 8 2c6 0 12-5 17-16c1-3 3-6 4-9c10-19 23-45 23-104c0-33-21-91-22-93l-1-2c-6-11-10-20-22-20c0 0 0 0 0 0z" horiz-adv-x="1000" />
<glyph glyph-name="sound2" unicode="&#xe828;" d="m251 226c0 0-1 0-1 0h-186v248h186c0 0 1 0 1 0l248 173v-595l-248 174z m474-124c-2 0-4 0-6 0l-16 8c0 0 0 0 0 0c-5 1-8 3-9 6c-2 3-2 7 0 12c1 1 16 26 30 64c14 37 30 94 30 157c0 65-16 121-30 157c-14 38-29 62-30 63c-4 11-2 15 9 21l15 8c3 1 5 2 8 2c6 0 12-5 17-16c1-3 3-6 5-11c17-31 61-115 61-229c0-63-16-120-30-156c-16-39-31-64-31-64c0 0 0 0 0 0l-1-2c-6-11-10-20-22-20c0 0 0 0 0 0z m-84 127c-2 0-4 0-6 0l-15 7c0 1 0 1 0 1c-5 1-8 3-9 6c-2 3-2 7 0 12c0 0 20 43 20 94c0 53-20 91-21 93c-4 11-2 16 9 21l15 8c3 1 5 2 8 2c6 0 12-5 17-16c1-3 3-6 4-9c10-19 23-45 23-104c0-33-21-91-22-93l-1-2c-6-11-10-20-22-20c0 0 0 0 0 0z" horiz-adv-x="1000" />
<glyph glyph-name="sound3" unicode="&#xe80b;" d="m251 226c0 0-1 0-1 0h-186v248h186c0 0 1 0 1 0l248 173v-595l-248 174z m390 3c-2 0-4 0-6 0l-15 7c0 1 0 1 0 1c-5 1-8 3-9 6c-2 3-2 7 0 12c0 0 20 43 20 94c0 53-20 91-21 93c-4 11-2 16 9 21l15 8c3 1 5 2 8 2c6 0 12-5 17-16c1-3 3-6 4-9c10-19 23-45 23-104c0-33-21-91-22-93l-1-2c-6-11-10-20-22-20c0 0 0 0 0 0z" horiz-adv-x="1000" />
<glyph glyph-name="sound4" unicode="&#xe80c;" d="m251 226c0 0-1 0-1 0h-186v248h186c0 0 1 0 1 0l248 173v-595l-248 174z" horiz-adv-x="1000" />
<glyph glyph-name="up" unicode="&#xe80d;" d="m58 222l124-126l318 314l317-314l124 126l-441 441l-442-441z" horiz-adv-x="1000" />
<glyph glyph-name="bars" unicode="&#xe80e;" d="m875 632h-750v-62l750-1l0 63l0 0z m0-314v63h-750v-63h750z m-750-187v-61h750v61h-750z" horiz-adv-x="1000" />
<glyph glyph-name="caret" unicode="&#xe80f;" d="m438 475h-125l187-250l188 250h-125" horiz-adv-x="1000" />
<glyph glyph-name="and-down" unicode="&#xe801;" d="m500 156l-373 325l59 67l314-273l315 273l59-67l-374-325l0 0z" horiz-adv-x="1000" />
<glyph glyph-name="close" unicode="&#xe811;" d="m213 593l530-530l43 44l-529 530l-44-44l0 0z m530 44l-530-530l43-44l531 530l-44 44l0 0z" horiz-adv-x="1000" />
<glyph glyph-name="code" unicode="&#xe812;" d="m680 608l-74-72l184-186l-184-185l74-73l257 258l-257 258z m-360-516l74 72l-184 186l184 186l-74 72l-258-258l258-258z" horiz-adv-x="1000" />
<glyph glyph-name="compose" unicode="&#xe813;" d="m890 651l-405-404l-110-22l22 110l404 405l17-17l-405-404l56-56l404 405l17-17z m15 16l20 20c14 13 14 35 0 48l-40 40c-13 14-35 14-48 0l-20-20m-4-272v-445h-625v625h440l63 62h-566v-750h750v570l-62-62z" horiz-adv-x="1000" />
<glyph glyph-name="down-nav" unicode="&#xe814;" d="m934 537l-81 83l-354-372l-353 372l-81-83l435-455l434 455z" horiz-adv-x="1000" />
<glyph glyph-name="download" unicode="&#xe815;" d="m875 538h-187v-63h125v-500h-625v500h125v63h-188v-626h750v626z m-344-323v635l-62 0v-635l-115 112l-41-39l187-188l188 188l-42 40l-115-113z" horiz-adv-x="1000" />
<glyph glyph-name="edit" unicode="&#xe829;" d="m749 511l-404-404l-110-22l22 110l404 404l16-16l-404-405l56-55l404 404l16-16z m16 16l20 20c14 13 14 35 0 48l-40 40c-13 14-35 14-48 0l-20-20" horiz-adv-x="1000" />
<glyph glyph-name="forward" unicode="&#xe82a;" d="m500 526l313-176l-313-176m-312 352l312-176l-312-176" horiz-adv-x="1000" />
<glyph glyph-name="home" unicode="&#xe82b;" d="m939 350l-438 438l0 0l0 0l-438-438l48-47l54 54v-444h16h51h168h47h109h46h168h55h12v444l54-54l48 47z m-501-370v245h125v-245h-125z m332 444v-444h-161v291h-16h-30h-125h-34h-12v-291h-160v444h0l269 269l269-269h0z" horiz-adv-x="1000" />
<glyph glyph-name="info" unicode="&#xe82c;" d="m500 725c-207 0-375-168-375-375s168-375 375-375s375 168 375 375s-168 375-375 375z m63-625h-125v313h125v-313z m-63 375c-34 0-62 28-62 63c0 34 28 62 62 62s63-28 63-62c0-35-28-63-63-63z" horiz-adv-x="1000" />
<glyph glyph-name="left-nav" unicode="&#xe82d;" d="m663-84l83 81l-372 354l372 354l-83 81l-455-435l455-435z" horiz-adv-x="1000" />
<glyph glyph-name="more-vertical" unicode="&#xe82e;" d="m500 163c52 0 94-42 94-94c0-52-42-94-94-94s-94 42-94 94c0 52 42 94 94 94z m-94 468c0-51 42-93 94-93s94 42 94 93s-42 94-94 94s-94-42-94-94z m0-281c0-52 42-94 94-94s94 42 94 94s-42 94-94 94s-94-42-94-94z" horiz-adv-x="1000" />
<glyph glyph-name="more" unicode="&#xe82f;" d="m313 350c0-52-42-94-94-94s-94 42-94 94s42 94 94 94s94-42 94-94z m468 94c-52 0-93-42-93-94s41-94 93-94s94 42 94 94s-42 94-94 94z m-281 0c-52 0-94-42-94-94c0-52 42-94 94-94s94 42 94 94c0 52-42 94-94 94z" horiz-adv-x="1000" />
<glyph glyph-name="pause" unicode="&#xe830;" d="m438 37h-188v625h188v-625z m312 1h-187v625h187v-625z" horiz-adv-x="1000" />
<glyph glyph-name="person" unicode="&#xe832;" d="m501 847c-275 0-497-222-497-497s222-496 497-496s496 222 496 496s-222 497-496 497z m315-801c-25 11-53 26-79 28c-149 12-152 43-152 106c0 47 30 8 52 118c8 36 15 29 36 95c13 47-12 41-12 41s8 35 12 72c10 96-32 187-175 187c-64 0-94-27-133-57c-41-32-55-76-44-130c7-39 21-77 12-72c0 0-22 6-12-41c21-59 32-59 38-95c18-107 47-70 53-118c6-63-7-94-148-106c-25-2-55-16-79-27c-76 79-123 186-123 303c0 242 197 439 439 439s438-197 438-439c0-118-47-226-123-304z" horiz-adv-x="1000" />
<glyph glyph-name="play" unicode="&#xe816;" d="m250 663l567-313l-567-312" horiz-adv-x="1000" />
<glyph glyph-name="plus" unicode="&#xe817;" d="m469 725v-750h61l1 750l-62 0l0 0z m406-344h-750v-61l750-1l0 62l0 0z" horiz-adv-x="1000" />
<glyph glyph-name="right-nav" unicode="&#xe818;" d="m291 786l-83-81l372-354l-372-354l83-81l455 435l-455 435z" horiz-adv-x="1000" />
<glyph glyph-name="search" unicode="&#xe819;" d="m935-10l-279 279c39 54 62 120 62 191c0 181-147 328-328 328s-327-147-327-328s147-327 327-327c71 0 136 22 190 61l279-280l76 76z m-808 470c0 146 118 263 263 263s264-117 264-263s-118-263-264-263s-263 118-263 263z" horiz-adv-x="1000" />
<glyph glyph-name="share" unicode="&#xe81a;" d="m875 538h-187v-63h125v-500h-625v500h125v63h-188v-626h750v626z m-406 197v-572h62v572l115-112l42 40l-188 187l-187-187l41-41l115 113z" horiz-adv-x="1000" />
<glyph glyph-name="star-filled" unicode="&#xe81b;" d="m500 812l116-354l371 0l-300-218l115-353l-301 218l-300-218l114 353l-300 218l371 0l114 354z" horiz-adv-x="1000" />
<glyph glyph-name="star" unicode="&#xe81c;" d="m987 458l-372 0l-115 354l-114-354l-371 0l301-218l-115-353l301 218l299-218l-115 353l301 218z m-252-478l-234 174l-234-174l99 274l-252 171l295 0l92 290l91-290l296 0l-253-175l100-270z" horiz-adv-x="1000" />
<glyph glyph-name="stop" unicode="&#xe81d;" d="m812 37h-625v625h625v-625z" horiz-adv-x="1000" />
<glyph glyph-name="trash" unicode="&#xe81e;" d="m875 725h-250c0 22 0 50 0 62c0 18-15 34-34 34h-182c-19 0-34-16-34-34c0-14 0-41 0-62h-250v-63h69l57-715c0-19 16-34 34-34h432c19 0 34 15 34 34l58 715h66v63z m-459 33c0 14 11 25 24 25h120c13 0 24-11 24-25c0-6 0-20 0-33h-168c0 12 0 26 0 33z m287-757c0-15-11-26-26-26h-355c-14 0-25 11-25 26l-42 661h490l-42-661z m-273 37h-47l-39 562l46 0l40-562z m187 0l-46 0l39 562l47 0l-40-562z m-94 0h-47v562h47v-562z" horiz-adv-x="1000" />
<glyph glyph-name="check" unicode="&#xe810;" d="m857 537l-81 83l-354-372l-135 128l-81-83l216-211l435 455z" horiz-adv-x="1000" />
</font>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
48a0690a-7b12-43b3-919f-73fe5b598d80

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1 @@
74b4dba3-856d-4dc2-9442-162049334bd9

View File

@@ -0,0 +1 @@
05806f36-cac1-4a03-9646-80afb0b98b10

View File

@@ -0,0 +1,20 @@
var Config = {
// 开发阶段测试基地址
BaseUrl: 'http://127.0.0.1:3000/api',
// 上线阶段的正式基地址
// BaseUrl: 'http://xxx.com/aaaa/api',
apiUrl: {
bannerIndex: '/index/banner', // 获取banner列表接口
bannerInfo: '/index/bannerInfo', // 获取banner详情接口
threeMeals: '/index/threeMeals', // 每日三餐接口
type: '/index/type', // 九宫格菜单
indexClass: '/index/class', // 大家都在做接口
Foodrecipes:'/video/list',//美食视频
leftMenu:'/type/leftMenu',//分类左边的小类
rightMenu: '/type/rightMenu', // 右边接口
rightMenuList: '/type/rightMenuList', // 点击右边小分类获取分类列表
indexInfo: '/index/info',//详情页面
BanerInfo: '/index/bannerInfo',//banner详情页面
search:'/search/list',//搜索接口
}
}

View File

@@ -0,0 +1 @@
b7260bde-637b-451b-b883-0f65c005233c

View File

@@ -0,0 +1,23 @@
class Banerinfo {
constructor() {
this.bannerinfoMenu();
}
async bannerinfoMenu() {
let res = await Banerservice.BanerInfo({
url: GetQueryString("url"),
});
console.log(res);
$(".img_hidden img").attr("src", res.banner)
$(".content .content_title").text(res.title)
$(".content").append(`${res.content}`)
$(".goodsitem").remove()
$(".headportrait").attr("src", res.comment.img)
$(".content .content_title").text(res.comment.name)
$(".content .content_title").text(res.comment.time)
$(".content .content_title").text(res.comment.content)
}
}
new Banerinfo()

View File

@@ -0,0 +1,49 @@
class ListService {
constructor(props) {
this.page = 1
this.list()
this.scrollLoadData()
}
async list() {
let res = await listervice.rightMenuList({
url: GetQueryString("url"),
p: this.page
});
res.forEach((v,i)=>{
$(".content .content_list ul").append(`
<li>
<a href="info.html?url=${v.url}">
<img src="${v.img}" alt="">
<div class="list_right">
<p>${v.title}</p>
<img src="../img/xingxing.png" alt="">
<div class="evaluate">
<i class="iconfont icon-xin"></i>
<span>${v.like}</span>
<i class="iconfont icon-faxian"></i>
<span>${v.view}</span>
</div>
</div>
</a>
</li>
`)
})
}
scrollLoadData() {
var scroll = new auiScroll({
listen: true,
distance: 10 //判断到达底部的距离isToBottom为true
}, (ret) => {
if(ret.isToBottom){
this.page += 1;
this.list()
}
});
}
}
new ListService()

View File

@@ -0,0 +1,259 @@
class Index {
constructor() {
this.index = 0;
this.doTogetherData = [
{
type: 1,
title: '推荐',
content: [],
page: 1
},
{
type: 2,
title: '时令',
content: [],
page: 1
},
{
type: 3,
title: '食肉',
content: [],
page: 1
},
{
type: 4,
title: '素食',
content: [],
page: 1
},
{
type: 5,
title: '烘焙',
content: [],
page: 1
}
];
this.getBannerList();
this.renderMenu();
this.getThreeMeals();
this.renderDoTogether();
this.DoTogether();
this.scrollLoadData();
}
/**
* 获取轮播图列表
*/
async getBannerList() {
var banner = $(".banner_swiper .swiper-wrapper");
let res = await indexService.bannerIndex({ id: 1 });
res.forEach((val,index) => {
banner.append(`
<div class="swiper-slide">
<a href="./bannerinfo.html?url=${val.url}">
<img src="${val.img}" alt=""/>
</a>
</div>
`)
});
this.initBannerSwiper();
}
// 初始化banner轮播图
initBannerSwiper() {
var mySwiper = new Swiper('.banner_swiper', {
direction: 'horizontal',
loop: true,
// 如果需要分页器
pagination: {
el: '.swiper-pagination',
}
})
}
async getThreeMeals() {
var mrscUl = $(".mrsc ul");
var mrscSwiper = $(".mrsc_swiper .swiper-wrapper");
let res = await indexService.threeMeals({});
console.log(res)
res.forEach((val,index)=>{
mrscUl.append(`
<li class="${index==0? 'active': ''}">${val.title}</li>
`)
mrscSwiper.append(
`
<div class="swiper-slide">
<div class="mrsc_list">
</div>
</div>
`
);
val.content.forEach((v,i)=>{
$(".mrsc_swiper .swiper-wrapper .mrsc_list")
.eq(index).append(
` <a href="./info.html?url=${v.url}">
<div class="mrsc_list_item">
<img src="${v.img}" alt="">
<p class="tips_titles">${v.title}</p>
<span class="tips_text">养</span>
<p class="tips">${v.des}</p>
</div>
</a>
`
);
})
});
this.initMrsc()
}
initMrsc() {
var MrscUl = $(".mrsc ul li");
var MrscSwiper = new Swiper('.mrsc_swiper', {
direction: 'horizontal',
on: {
slideChangeTransitionEnd: function(){
console.log(this.activeIndex);
MrscUl.eq(this.activeIndex).addClass("active").siblings().removeClass("active")
},
},
});
MrscUl.each(function(i,e) {
$(this).on("click", function() {
MrscSwiper.slideTo(i)
});
});
}
async renderMenu() {
let res = await indexService.type({});
console.log(res)
res.forEach((v,i)=>{
$(".menu").append(`
<li>
<a href="./fllist.html?url=${v.href}">
<img src="${v.img}" alt="">
<p>${v.title}</p>
</a>
</li>
`)
})
}
/**
* 渲染内容的
* @returns {Promise<void>}
* @constructor
*/
async DoTogether() {
let res = await indexService.indexClass({
type: this.doTogetherData[this.index].type,
page: this.doTogetherData[this.index].page
});
this.doTogetherData[this.index].content
= [ ...this.doTogetherData[this.index].content, ...res.items ]
$(".do_together_content .roll_father").eq(this.index).empty()
// 渲染列表的
this.doTogetherData[this.index].content.forEach((v,i)=>{
$(".do_together_content .roll_father").eq(this.index).append(`
<div class="do_together_item"
style="height: ${ typeof v.img == 'string' ? 'auto' : '12rem !important' }">
<a href="info.html?url=${v.path}">
<div class="item_img">
${
typeof v.img == 'string'
? `<img src="${v.img}" alt="">`
: `<img src="${v.img[0]}" alt="">`
}
</div>
<div class="item_padd">
<div class="tips_titles">${v.title}</div>
<span class="tips_text">养</span>
${
v.label == null || v.label.length == 0
? ''
: `<p class="tips">${v.label.desc}</p>`
}
</div>
${
v.author.hasOwnProperty("avatar_url")
? `<div class="item_avatr item_pa">
<div class="avatr_left">
<img src="${v.author.avatar_url}" alt="">
<span>${v.author.nickname}</span>
</div>
<div class="avatr_view">
<i class="iconfont icon-yanjing"></i>
<span>${v.viewed_amount}</span>
</div>
</div>`
: ''
}
</div>
</a>
`)
})
// console.log("RenderDoTogether: ", res);
}
/**
* 渲染标题
*/
renderDoTogether() {
this.doTogetherData.forEach((v,i)=>{
$(".do_together_title").append(`
<li class="${i==0?'active':''}">${v.title}</li>
`);
$(".do_together_content").append(`
<div class="roll_father ${i==0?'showRoll':''}"></div>
`)
});
var titleLi = $(".do_together_title li"),
RollFather = $(".do_together_content .roll_father");
var a = this;
titleLi.on('click', function () {
a.index = $(this).index();
$(this).addClass("active").siblings().removeClass("active")
if (a.doTogetherData[a.index].content.length == 0) {
a.DoTogether()
}
RollFather.eq($(this).index()).addClass("showRoll").siblings().removeClass("showRoll")
})
}
scrollLoadData() {
var scroll = new auiScroll({
listen:true,
distance: 10 //判断到达底部的距离isToBottom为true
}, (ret) => {
if(ret.isToBottom){
console.log("滚动到底部")
this.doTogetherData[this.index].page += 1;
this.DoTogether()
}
});
}
}
new Index()

View File

@@ -0,0 +1,178 @@
class Info {
constructor() {
this.getIndexInfo();
this.Url = GetQueryString("url")
}
async getIndexInfo() {
let res = await indexfoService.indexInfo({
url: GetQueryString("url")
})
$(".img_hidden img").attr("src", res.backImg)
$(".info_list .list_title h2").text(res.title)
$(".posttime").text(res.posttime)
res.stepInfo.arr.forEach((v,i)=>{
$(".ddd").append(`
<li>
<div class="i" style="background-position: 0px ${v.position /20}rem;"></div>
<p>${v.title}</p>
</li>
`)
});
$(".list_text p").text(res.stepInfo.message)
if(res.stepInfo.message.length > 44) {
$(".list_text").append(`
<div class="more">
<span>展开</span>
<i class="iconfont icon-houtui-copy-copy"></i>
</div>
`);
$(".more").on("click", function() {
$(".list_text").css({
height: 'auto'
})
$(".list_text .more").remove()
});
};
res.material.main.forEach((v,i)=>{
$(".ms .main ul").eq(0).append(`
<li>
<span>${v.title}</span>
<span>${v.nums}</span>
</li>
`)
})
res.material.accessories.forEach((v,i)=>{
$(".ms .main ul").eq(1).append(`
<li>
<span>${v.title}</span>
<span>${v.nums}</span>
</li>
`)
})
var successImg = 0;
res.DetailedSteps.forEach((v,i)=>{
if(Array.isArray(v.step_img) && v.step_img.length >=2) {
successImg = i
$(".content_list").append(`
<li>
<div class="step 2">${v.step_title}</div>
<img src="${v.step_img[0]}" alt="">
<p>${v.step_text || ''}</p>
<div class="tabs_img">
</div>
</li>
`)
} else{
$(".content_list").append(`
<li>
<div class="step">${v.step_title}</div>
<img src="${v.step_img}" alt="">
<p>${v.step_text || ''}</p>
</li>
`)
}
});
if (successImg != 0) {
res.DetailedSteps[successImg].step_img.forEach((a,b)=>{
$(".content_list li").eq(successImg).find(".tabs_img").append(`
<img style="width: 70px;height:70px;margin-right: .5rem;" src="${a}" alt=""/>
`)
})
$(".content_list li").eq(successImg).find(".tabs_img img").on("click", function(){
$(".content_list li").eq(successImg).find("img").eq(0).attr('src', $(this).attr("src"))
})
}
//收藏
var arr = [],
self = this;
if (localStorage.getItem("like") != null) {
arr = JSON.parse(localStorage.getItem("like"))
}
// 如果已经收藏了
// (arr.filter((v,index)=> v.url == self.Url).length == 0) ? '' : $(".icon-shoucang1").removeClass().addClass("iconfont icon-shoucang")
for (let i = 0; i < arr.length; i++) {
if (arr[i].url.includes(self.Url)) {
$(".icon-shoucang1").removeClass().addClass("iconfont icon-shoucang");
}
}
var xxx;
$(".icon-shoucang1").on("click", function (){
if (arr.length === 0){
addData()
}else{
for (let i = 0; i < arr.length; i++) {
if (arr[i].url.includes(self.Url)) {
xxx = true
break;
}
else {
xxx = false
}
}
if (xxx) {
console.log("已经收藏了");
} else {
addData()
}
}
}) ;
function addData() {
$(".icon-shoucang1").removeClass().addClass("iconfont icon-shoucang");
arr.push({
title: res.title,
url: self.Url,
img: res.backImg
})
localStorage.setItem("like", JSON.stringify(arr))
}
res.OtherRecommen.forEach((v,i)=>{
$(".Otherpractices ul").append(`
<li>
<a href="info.html?url=${v.url}">
<img src="${v.img}" alt="">
<p>${v.title.substring(0,6)}</p>
</a>
</li>
`)
})
res.RelatedRecommen.forEach((v,i)=>{
$(".recommend ul").append(`
<li>
<a href="info.html?url=${v.url}">
<img src="${v.img}" alt="">
<div class="recommend_left">
<h3>${v.title}</h3>
<p>${v.view}</p>
</div>
</a>
</li>
`)
})
}
}
new Info()

View File

@@ -0,0 +1,83 @@
class LikeInfo {
constructor() {
this.ListData = JSON.parse(localStorage.getItem("like"))
this.actionsheet = new auiActionsheet();
this.renderList()
this.deleat()
// this.deleatli()
}
renderList() {
this.ListData.forEach((v, ix) => {
$(".content ul").append(`
<li>
<a href="./info.html?url=${v.url}">
<img src="${v.img}" alt="">
</a>
<p>${v.title}</p>
</li>
`)
});
}
// deleatli(){
// var sss = this;
// $(".content ul li").each(function(i,v){
// console.log(sss.ListData.splice($(this).i, 1));
// })
// // localStorage.setItem("like", JSON.stringify(sss.ListData))
// // $.remove()
// }
deleat() {
var self = this;
var longClick = 0,
timeOutEvent;
$(".content ul li").on({
touchstart: function (e) {
longClick = 0;//设置初始为0
timeOutEvent = setTimeout(function () {
//此处为长按事件-----在此显示遮罩层及删除按钮
// longClick = 1;//假如长按则设置为1
// $(".shadow").css("display", "block")
self.openActionsheet()
e.preventDefault();
}, 300);
},
touchmove: function () {
clearTimeout(timeOutEvent);
timeOutEvent = 0;
e.preventDefault();
},
});
$(".cancel").on("click", function () {
$(".shadow").css("display", "none")
})
}
openActionsheet(){
var ss =this
this.actionsheet.init({
frameBounces:true,//当前页面是否弹动,(主要针对安卓端)
destructiveTitle:'删除',
buttons:['取消']
},function(ret){
if(ret){
if (ret.buttonIndex == 2) {
// ss.deleatli()
ss.ListData.splice($(this).attr("data-index"), 1)
localStorage.setItem("like", JSON.stringify(ss.ListData))
$(this).attr("data-index").remove()
}
}
})
}
}
new LikeInfo()

View File

@@ -0,0 +1,50 @@
class search {
constructor() {
this.page = 1
this.searchfunction();
this.scrollLoadData()
}
searchfunction(){
var dd = this;
$(".header p").on('click',()=>{
this.searchss()
})
}
async searchss(){
var dd=this,
value =$(".header input").val();
console.log($(".header input").val());
let res = await SearchService.search({
q:value,
page:this.page
});
res.forEach((v,i)=>{
$(".content ul").append(`
<li>
<a href="./info.html?url=${v.href}">
<div class="img">
<img src="${v.img}" alt="">
</div>
<div class="name">
<h3>${v.title}</h3>
<p>${v.des}</p>
</div>
</a>
</li>
`)
})
}
scrollLoadData() {
var scroll = new auiScroll({
listen: true,
distance: 10 //判断到达底部的距离isToBottom为true
}, (ret) => {
if(ret.isToBottom){
this.page += 1;
this.searchss()
}
});
}
}
new search()

View File

@@ -0,0 +1,42 @@
class Type {
constructor() {
this.leftMenu()
this.renderRight("/fenlei/shiyongfenlei/")
}
async leftMenu() {
let res = await TypeService.leftMenu({});
res.forEach((value, index) => {
$(".content .left_menu").append(`
<li class="${index==0?'active_menu':''}">
<div class="img" style="background-position: 0 ${value.position}px;"></div>
<p>${value.title}</p>
</li>
`)
});
var leftMenuLi = $(".left_menu li"),
index = 0,
self = this;
$(".left_menu li").on('click', function () {
index = $(this).index();
self.renderRight(res[index].url)
leftMenuLi.eq($(this).index()).addClass("active_menu").siblings().removeClass("active_menu")
});
}
async renderRight(index) {
let res = await TypeService.rightMenu({ url: index })
$(".right_content").empty();
res.forEach((v,i)=>{
$(".right_content").append(`
<li>
<a href="./fllist.html?url=${v.id}">
<img src="${v.img}" alt="">
<p>${v.title.substring(0,4)}</p>
</a>
</li>
`);
})
}
}
new Type()

View File

@@ -0,0 +1,73 @@
class Video {
constructor() {
this.videoMenu();
// this.Url = GetQueryString("url")\
this.page = 1
this.scrollLoadData()
}
async videoMenu() {
let res = await VideoService.Foodrecipes({
page:this.page
});
res.items.forEach((v, i) => {
$(".content").append(`
<li>
<a >
<div class="content_pic" style="background-image: url(${v.bd_photo});">
<div class="pic_yingyin">
<i class="iconfont icon-play"></i>
</div>
</div>
<p>${v.seo_title.substring(0,7)}</p>
<div class="pic_pinglun">
<div class="toux_left">
<img src="../img/ms.jpg" alt="">
<span>美食杰</span>
</div>
<div class="toux_right">
<i class="iconfont icon-faxian"></i>
<span>${v.click_num}</span>
</div>
</div>
</a>
</li>
`)
})
var videoarr = {};
$(function() {
$('.content').find('li').each(function() {
$(this).click(function() {
addData($(this).index());
})
})
})
function addData(index) {
videoarr.title= res.items[index].seo_title,
videoarr.practice= res.items[index].intro,
videoarr.video= res.items[index].xhz_video_url
console.log(videoarr);
localStorage.setItem("video", JSON.stringify(videoarr))
location.href = "./videoinfo.html"
}
}
scrollLoadData(){
var scroll = new auiScroll({
listen: true,
distance: 10 //判断到达底部的距离isToBottom为true
}, (ret) => {
if(ret.isToBottom){
this.page += 1;
this.videoMenu()
}
});
}
}
new Video()

View File

@@ -0,0 +1,16 @@
class VideoInfo {
constructor() {
this.ListData = JSON.parse(localStorage.getItem("video"))
this.renderList()
}
renderList() {
var data =this
console.log(this.ListData);
$(".img_hidden a video").attr("src", data.ListData.video)
$(".conten h1").text(data.ListData.title)
$(".conten p").text(data.ListData.practice)
}
}
new VideoInfo()

View File

@@ -0,0 +1 @@
499e3d1c-bef5-4f71-8adb-499da89a5146

View File

@@ -0,0 +1 @@
15bd74fb-ad5b-4faf-bb52-6dd71da96ab7

View File

@@ -0,0 +1 @@
31a9ea4e-bbee-40b0-994f-e226d9cb333a

View File

@@ -0,0 +1,50 @@
.aui-fold-active {
background: #f4f4f4;
}
.aui-fold-active .aui-fold-content {
display:block;
}
.aui-fold-content {
position: relative;
display: none;
margin: 12px -15px -12px;
padding-left: 15px;
background: #fff;
}
.aui-fold .aui-arrow-right {
position: relative;
display: block;
overflow: hidden;
margin: -12px -15px;
padding: inherit;
white-space: nowrap;
text-overflow: ellipsis;
color: inherit;
}
.aui-fold-ccontent-full {
margin-left: -15px;
margin-right: -15px;
padding: 0;
width: auto;
}
.aui-fold > .aui-arrow-right:after {
content: "\e661";
}
.aui-fold-active > .aui-arrow-right:after{
content: "\e6de"
}
.aui-fold-content .aui-list-view,
.aui-fold-content .aui-user-view {
margin-bottom: 0;
}
.aui-fold-content .aui-list-view:after,
.aui-fold-content .aui-user-view:after,
.aui-fold-content .aui-input-row:first-child:after {
border-top: 0;
}
.aui-fold-content .aui-list-view-cell:last-child:after,
.aui-fold-content .aui-user-view-cell:last-child:after,
.aui-fold-content .aui-input-row:last-child:after,
.aui-fold-content .aui-btn-row:last-child:after {
border-bottom: 0;
}

View File

@@ -0,0 +1,272 @@
/*
* =========================================================================
* APIClud - AUI UI 框架 流浪男 QQ343757327 http://www.auicss.com
* Verson 1.0
* =========================================================================
*/
@charset "UTF-8";
html{
font-family: "Helvetica Neue", Helvetica, sans-serif;
font-size: 20px;
}
html,body {
-webkit-touch-callout:none;
-webkit-text-size-adjust:none;
-webkit-tap-highlight-color:rgba(0, 0, 0, 0);
-webkit-user-select:none;
width: 100%;
}
body {
line-height: 1.5;
font-size: 0.8rem;
color: #212121;
background-color: #f5f5f5;
outline: 0;
}
html,body,header,section,footer,div,ul,ol,li,img,a,span,em,del,legend,center,strong,var,fieldset,form,label,dl,dt,dd,cite,input,hr,time,mark,code,figcaption,figure,textarea,h1,h2,h3,h4,h5,h6,p{
margin:0;
border:0;
padding:0;
font-style:normal;
}
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-user-select: none;
-webkit-tap-highlight-color: transparent;
outline: none;
}
@media only screen and (min-width: 400px) {
html {
font-size: 21.33333333px !important;
}
}
@media only screen and (min-width: 414px) {
html {
font-size: 21px !important;
}
}
@media only screen and (min-width: 480px) {
html {
font-size: 25.6px !important;
}
}
.aui-flex-col,
.aui-flex-row {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
.aui-flex-col:before,
.aui-flex-row:before,
.aui-flex-col:after,
.aui-flex-row:after {
content: " ";
display: -webkit-box;
display: -webkit-flex;
display: flex;
box-sizing: border-box;
}
.aui-flex-col:after,
.aui-flex-row:after {
clear: both;
}
.aui-flex-col {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
}
.aui-flex-row {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
}
/*栅格*/
.aui-flex-item-1 {
float: left;
width: 8.33333333%;
}
.aui-flex-offset-1 {
margin-left: 8.33333333%;
}
.aui-flex-item-2 {
float: left;
width: 16.66666667%;
}
.aui-flex-offset-2 {
margin-left: 16.66666667%;
}
.aui-flex-item-3 {
float: left;
width: 25%;
}
.aui-flex-offset-3 {
margin-left: 25%;
}
.aui-flex-item-4 {
float: left;
width: 33.33333333%;
}
.aui-flex-offset-4 {
margin-left: 33.33333333%;
}
.aui-flex-item-5 {
float: left;
width: 41.66666667%;
}
.aui-flex-offset-5 {
margin-left: 41.66666667%;
}
.aui-flex-item-6 {
float: left;
width: 50%;
}
.aui-flex-offset-6 {
margin-left: 50%;
}
.aui-flex-item-7 {
float: left;
width: 58.33333333%;
}
.aui-flex-offset-7 {
margin-left: 58.33333333%;
}
.aui-flex-item-8 {
float: left;
width: 66.66666667%;
}
.aui-flex-offset-8 {
margin-left: 66.66666667%;
}
.aui-flex-item-9 {
float: left;
width: 75%;
}
.aui-flex-offset-9 {
margin-left: 75%;
}
.aui-flex-item-10 {
float: left;
width: 83.33333333%;
}
.aui-flex-offset-10 {
margin-left: 83.33333333%;
}
.aui-flex-order-10 {
-webkit-box-ordinal-group: 11;
-webkit-order: 10;
order: 10;
}
.aui-flex-item-11 {
float: left;
width: 91.66666667%;
}
.aui-flex-offset-11 {
margin-left: 91.66666667%;
}
.aui-flex-item-12 {
float: left;
width: 100%;
}
.aui-flex-offset-12 {
margin-left: 100%;
}
.aui-flex-auto {
float: left;
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
flex-grow: 1;
}
.aui-flex-between {
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
/*对齐*/
.aui-flex-col.aui-flex-left {
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
}
.aui-flex-col.aui-flex-right {
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.aui-flex-col.aui-flex-top {
-webkit-box-align: start;
-webkit-align-items: flex-start;
align-items: flex-start;
}
.aui-flex-col.aui-flex-bottom {
-webkit-box-align: end;
-webkit-align-items: flex-end;
align-items: flex-end;
}
.aui-flex-col.aui-flex-center {
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
.aui-flex-col.aui-flex-middle {
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
}
.aui-flex-row.aui-flex-left {
-webkit-box-align: start;
-webkit-align-items: flex-start;
align-items: flex-start;
}
.aui-flex-row.aui-flex-right {
-webkit-box-align: end;
-webkit-align-items: flex-end;
align-items: flex-end;
}
.aui-flex-row.aui-flex-top {
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
}
.aui-flex-row.aui-flex-bottom {
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.aui-flex-row.aui-flex-center {
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
}
.aui-flex-row.aui-flex-middle {
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
[class*=aui-flex-item-]{
position: relative;
}
[class*=aui-flex-auto].aui-flex-left {
margin-right: auto;
}
[class*=aui-flex-auto].aui-flex-right {
margin-left: auto;
}
[class*=aui-flex-auto].aui-flex-top {
margin-bottom: auto;
}
[class*=aui-flex-auto].aui-flex-bottom {
margin-top: auto;
}
[class*=aui-flex-auto].aui-flex-center {
margin-left: auto;
margin-right: auto;
}
[class*=aui-flex-auto].aui-flex-middle {
margin-top: auto;
margin-bottom: auto;
}

View File

@@ -0,0 +1,54 @@
/**
* aui-pull-refresh.css 下拉刷新
* verson 0.0.1
* @author 流浪男 && Beck
* http://www.auicss.com
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
.aui-refresh-content {
position: relative;
-webkit-overflow-scrolling: touch;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.aui-refresh-load {
width: 100%;
height: 2.2rem;
position: absolute;
top: -2.2rem;
left: 0;
padding: 0.75rem 0;
}
.aui-refresh-pull-arrow {
width: 1.2rem;
height: 1.2rem;
position: absolute;
left: 50%;
top: 50%;
visibility: visible;
margin-left: -0.6rem;
margin-top: -0.6rem;
background: no-repeat center;
background-image: url('data:image/svg+xml;charset=utf-8,<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path d="M99.225 3.528c8.34 0 15.104 6.763 15.104 15.105 0 8.34-6.766 15.105-15.105 15.105-8.342 0-15.105-6.763-15.105-15.105S90.883 3.528 99.225 3.528zM76.567 48.843h45.315c4.17 0 7.552 3.38 7.552 7.552v5.035c0 4.172-3.382 7.552-7.552 7.552H76.567c-4.172 0-7.553-3.38-7.553-7.552v-5.035c0-4.172 3.38-7.552 7.553-7.552zm-10.07 35.245h65.455c4.17 0 7.552 3.38 7.552 7.552v5.035c0 4.172-3.382 7.552-7.552 7.552H66.497c-4.172 0-7.553-3.38-7.553-7.552V91.64c0-4.172 3.38-7.552 7.553-7.552zm8.044 87.596c-20.397-23.16-45.805-52.352-45.805-52.352h140.98s-25.146 28.735-45.4 51.884c-33.454 38.234-18.118 36.4-49.774.468z" fill="#707070" class="transform-group"/></svg>');
background-size: 1.2rem 1.2rem;
z-index: 10;
-webkit-transform: rotate(0deg) translate3d(0, 0, 0);
transform: rotate(0deg) translate3d(0, 0, 0);
-webkit-transition-duration: 300ms;
transition-duration: 300ms;
}
.aui-refresh-content.aui-refresh-pull-down .aui-refresh-pull-arrow {
-webkit-transform: rotate(0deg) translate3d(0,0,0);
transform: rotate(0deg) translate3d(0,0,0);
}
.aui-refresh-content.aui-refresh-pull-up .aui-refresh-pull-arrow {
-webkit-transform: rotate(180deg) translate3d(0,0,0);
transform: rotate(180deg) translate3d(0,0,0);
}
.aui-refreshing .aui-refresh-pull-arrow{
background-image: url('data:image/svg+xml;charset=utf-8,<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path d="M99.917.167C45.52.167 1.28 43.642.03 97.737c1.153-47.204 37.045-85.08 81.153-85.08 44.834 0 81.184 39.147 81.184 87.426 0 10.346 8.387 18.738 18.733 18.738 10.342 0 18.733-8.39 18.733-18.737C199.833 44.9 155.1.167 99.917.167zm0 199.833c54.395 0 98.637-43.475 99.883-97.57-1.15 47.2-37.042 85.082-81.15 85.082-44.833 0-81.183-39.15-81.183-87.43 0-10.34-8.392-18.732-18.738-18.732C8.39 81.35 0 89.737 0 100.083 0 155.267 44.733 200 99.917 200z" fill="#707070" class="transform-group"/></svg>');
-webkit-animation: rotate 1s 0s linear infinite;
animation: rotate 1s 0s linear infinite;
}

View File

@@ -0,0 +1,277 @@
/*
* ===================================================================================================
* APIClud - AUI UI 框架 流浪男 QQ343757327 http://www.auicss.com
* Verson 2.0.0 自定义主题样式
* explain自定义主题样式可以完成AUI内所有背景、控件颜色、字号等的修改可以方便快速的搭建属于自己项目的一套主题色
* ===================================================================================================
*/
/*body背景色及色值*/
body {
color: #d1d1d1;
background-color: #1a1a1a;
}
p {
color: #757575;
}
a {
color: #0062cc;
}
.aui-text-default {
color: #212121 !important;
}
.aui-bg-default {
background-color: #f5f5f5 !important;
}
/*label*/
.aui-label {
padding: 0.3em 0.35em;
font-size: 0.6rem;
color: #616161;
background-color: #e0e0e0;
}
.aui-label-outlined {
border: 1px solid #d9d9d9;
background-color: transparent;
}
.aui-label .aui-iconfont {
font-size: 0.6rem;
}
/*角标*/
.aui-badge {
color: #ffffff;
background-color: #ff2600;
}
/*按钮*/
.aui-btn {
color: #212121;
background: #e0e0e0;
}
.aui-btn:active {
color: #212121;
background-color: #bdbdbd;
}
.aui-btn-outlined {
background: transparent;
border: 1px solid #bdbdbd;
}
.aui-btn-outlined:active {
background: transparent;
}
/*tab*/
.aui-tab .aui-tab-item {
height: 2.2rem;
line-height: 2.2rem;
font-size: 0.7rem;
color: #212121;
background-color: #ffffff;
}
/*tab选中时样式*/
.aui-tab .aui-tab-item.active {
color: #039be5;
border-bottom: 2px solid #039be5;
}
/*单选选中样式*/
.aui-radio:checked,
.aui-radio.aui-checked {
background-color: #edfb3f;
border: solid 1px #edfb3f;
}
/* 单选选中时中间对号颜色*/
.aui-radio:checked:before,
.aui-radio.aui-checked:before,
.aui-radio:checked:after,
.aui-radio.aui-checked:after {
border-color: #212121;
}
/*多选选中样式*/
.aui-checkbox:checked,
.aui-checkbox.aui-checked {
background-color: #edfb3f;
border: solid 1px #edfb3f;
}
/* 多选选中时中间对号颜色*/
.aui-checkbox:checked:before,
.aui-checkbox.aui-checked:before,
.aui-checkbox:checked:after,
.aui-checkbox.aui-checked:after{
border-color: #212121;
}
/*滑动开关*/
.aui-switch:checked {
border-color: #edfb3f;
background-color: #edfb3f;
}
.aui-switch:before {
background-color: #212121;
}
/*顶部导航栏*/
.aui-bar-nav {
background-color: #00bbd4;
color: #212121;
}
.aui-bar-nav .aui-iconfont {
color: #212121;
}
.aui-bar-nav .aui-btn .aui-iconfont {
color: #212121;
}
/*浅色顶部导航拦*/
.aui-bar-light {
color: #03a9f4;
background-color: #ffffff;
}
.aui-bar.aui-bar-light .aui-iconfont {
color: #03a9f4;
}
.aui-bar.aui-bar-light .aui-btn-outlined {
border-color: #03a9f4;
}
/*底部工具栏*/
.aui-bar-tab {
background-color: #ffffff;
color: #757575;
}
/*底部工具栏选中时颜色*/
.aui-bar-tab .active {
color: #039be5;
}
/*按钮工具栏*/
.aui-bar-btn .aui-bar-btn-item {
border-color: #edfb3f;
color: #edfb3f;
}
.aui-bar-btn .aui-bar-btn-item.active {
background-color: #edfb3f;
color: #ffffff;
}
/*顶部导航存在按钮组工具栏时样式*/
.aui-bar-nav .aui-bar-btn-item {
border-color: #ffffff;
}
/*浅色顶部导航存在按钮组工具栏时样式*/
.aui-bar-nav.aui-bar-light .aui-bar-btn-item {
border-color: #03a9f4;
}
/*顶部导航存在按钮组工具栏时选中样式*/
.aui-bar-nav .aui-bar-btn .aui-bar-btn-item.active {
background-color: #ffffff;
color: #03a9f4;
}
/*浅色顶部导航存在按钮组工具栏时选中样式*/
.aui-bar-nav.aui-bar-light .aui-bar-btn .aui-bar-btn-item.active {
background-color: #03a9f4;
color: #ffffff;
}
/*进度条*/
.aui-progress {
background-color: #f0f0f0;
}
/*进度条色带*/
.aui-progress .aui-progress-bar {
background-color: #eefb3f;
}
/*滑块*/
.aui-range input[type='range']{
/*滑块线条背景色*/
background-color: #f0f0f0;
}
.aui-range input[type='range']::-webkit-slider-thumb {
/*滑块圆圈样式*/
border-color: #edfb3f;
background-color: #edfb3f;
}
/*提示条*/
.aui-tips {
background-color: rgba(0,0,0,.6);
}
/*搜索条*/
.aui-searchbar {
background-color: #ebeced;
color: #9e9e9e;
}
/*列表背景色*/
.aui-list .aui-list-item {
color: #d1d1d1;
background-color: #1a1a1a;
}
/*列表头部*/
.aui-list .aui-list-header {
background-color: #242424;
color: #9e9e9e;
}
/*列表项内Ttitle标题*/
.aui-list .aui-list-item-title {
font-size: 0.8rem;
color: #d1d1d1;
}
/*列表文本区域字体*/
.aui-list .aui-list-item-text {
font-size: 0.7rem;
color: #d1d1d1;
}
/*列表右侧箭头*/
.aui-list-item-arrow:before {
border-color: #edfb3f;
}
/*列表右侧其他信息字体颜色*/
.aui-list .aui-list-item-right,
.aui-list-item-title-row em {
color: #edfb3f;
}
/*列表线条颜色*/
.aui-list:before,
.aui-list:after,
.aui-list .aui-list-item:after,
.aui-list.aui-list-in .aui-list-item-inner:after {
background-color: #242424;
}
/*列表项点击颜色*/
.aui-list .aui-list-item:active {
background-color: #f5f5f5;
}
/*媒体列表布局左(右)媒体宽度控制*/
.aui-list .aui-list-item-media {
width: 4.5rem;
}
/*列表内label、icon字体颜色*/
.aui-list .aui-list-item-label,
.aui-list .aui-list-item-label-icon {
color: #d1d1d1;
}
/*卡片列表顶部字体*/
.aui-card-list-header {
font-size: 0.8rem;
color: #212121;
}
/* 卡片列表内容区域*/
.aui-card-list-content,
.aui-card-list-content-padded {
font-size: 0.7rem;
color: #212121;
}
/*卡片列表底部*/
.aui-card-list-footer {
font-size: 0.7rem;
color: #757575;
}
/*信息条*/
.aui-info {
font-size: 0.7rem;
color: #757575;
background-color: transparent;
}
/*输入框类字体颜色*/
input[type="text"],
input[type="password"],
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="number"],
select,
textarea {
color: #424242;
}

View File

@@ -0,0 +1,278 @@
/*
* ===================================================================================================
* APIClud - AUI UI 框架 流浪男 QQ343757327 http://www.auicss.com
* Verson 2.0.0 自定义主题样式
* explain自定义主题样式可以完成AUI内所有背景、控件颜色、字号等的修改可以方便快速的搭建属于自己项目的一套主题色
* ===================================================================================================
*/
/*body背景色及色值*/
body {
color: #212121;
background-color: #f5f5f5;
}
p {
color: #757575;
}
a {
color: #0062cc;
}
.aui-text-default {
color: #212121 !important;
}
.aui-bg-default {
background-color: #f5f5f5 !important;
}
/*label*/
.aui-label {
padding: 0.3em 0.35em;
font-size: 0.6rem;
color: #616161;
background-color: #e0e0e0;
}
.aui-label-outlined {
border: 1px solid #d9d9d9;
background-color: transparent;
}
.aui-label .aui-iconfont {
font-size: 0.6rem;
}
/*角标*/
.aui-badge {
color: #ffffff;
background-color: #ff2600;
}
/*按钮*/
.aui-btn {
color: #212121;
background: #e0e0e0;
}
.aui-btn:active {
color: #212121;
background-color: #bdbdbd;
}
.aui-btn-outlined {
background: transparent;
border: 1px solid #bdbdbd;
}
.aui-btn-outlined:active {
background: transparent;
}
/*tab*/
.aui-tab .aui-tab-item {
height: 2.2rem;
line-height: 2.2rem;
font-size: 0.7rem;
color: #212121;
background-color: #ffffff;
}
/*tab选中时样式*/
.aui-tab .aui-tab-item.aui-active {
color: #039be5;
border-bottom: 2px solid #039be5;
}
/*单选选中样式*/
.aui-radio:checked,
.aui-radio.aui-checked {
background-color: #03a9f4;
border: solid 1px #03a9f4;
}
/* 单选选中时中间对号颜色*/
.aui-radio:checked:before,
.aui-radio.aui-checked:before,
.aui-radio:checked:after,
.aui-radio.aui-checked:after {
border-color: #ffffff;
}
/*多选选中样式*/
.aui-checkbox:checked,
.aui-checkbox.aui-checked {
background-color: #03a9f4;
border: solid 1px #03a9f4;
}
/* 多选选中时中间对号颜色*/
.aui-checkbox:checked:before,
.aui-checkbox.aui-checked:before,
.aui-checkbox:checked:after,
.aui-checkbox.aui-checked:after{
border-color: #ffffff;
}
/*滑动开关*/
.aui-switch:checked {
border-color: #03a9f4;
background-color: #03a9f4;
}
/*滑动开关圆圈颜色*/
.aui-switch:before {
background-color: #ffffff;
}
/*顶部导航栏*/
.aui-bar-nav {
background-color: #03a9f4;
color: #ffffff;
}
.aui-bar-nav .aui-iconfont {
color: #ffffff;
}
.aui-bar-nav .aui-btn .aui-iconfont {
color: #ffffff;
}
/*浅色顶部导航拦*/
.aui-bar-light {
color: #03a9f4;
background-color: #ffffff;
}
.aui-bar.aui-bar-light .aui-iconfont {
color: #03a9f4;
}
.aui-bar.aui-bar-light .aui-btn-outlined {
border-color: #03a9f4;
}
/*底部工具栏*/
.aui-bar-tab {
background-color: #ffffff;
color: #757575;
}
/*底部工具栏选中时颜色*/
.aui-bar-tab .aui-active {
color: #039be5;
}
/*按钮工具栏*/
.aui-bar-btn .aui-bar-btn-item {
border-color: #03a9f4;
color: #212121;
}
.aui-bar-btn .aui-bar-btn-item.aui-active {
background-color: #03a9f4;
color: #ffffff;
}
/*顶部导航存在按钮组工具栏时样式*/
.aui-bar-nav .aui-bar-btn-item {
border-color: #ffffff;
}
/*浅色顶部导航存在按钮组工具栏时样式*/
.aui-bar-nav.aui-bar-light .aui-bar-btn-item {
border-color: #03a9f4;
}
/*顶部导航存在按钮组工具栏时选中样式*/
.aui-bar-nav .aui-bar-btn .aui-bar-btn-item.aui-active {
background-color: #ffffff;
color: #03a9f4;
}
/*浅色顶部导航存在按钮组工具栏时选中样式*/
.aui-bar-nav.aui-bar-light .aui-bar-btn .aui-bar-btn-item.aui-active {
background-color: #03a9f4;
color: #ffffff;
}
/*进度条*/
.aui-progress {
background-color: #f0f0f0;
}
/*进度条色带*/
.aui-progress .aui-progress-bar {
background-color: #03a9f4;
}
/*滑块*/
.aui-range input[type='range']{
/*滑块线条背景色*/
background-color: #f0f0f0;
}
.aui-range input[type='range']::-webkit-slider-thumb {
/*滑块圆圈样式*/
border-color: #03a9f4;
background-color: #03a9f4;
}
/*提示条*/
.aui-tips {
background-color: rgba(0,0,0,.6);
}
/*搜索条*/
.aui-searchbar {
background-color: #ebeced;
color: #9e9e9e;
}
/*列表背景色*/
.aui-list .aui-list-item {
color: #212121;
background-color: #ffffff;
}
/*列表头部*/
.aui-list .aui-list-header {
background-color: #e0e0e0;
color: #212121;
}
/*列表项内Ttitle标题*/
.aui-list .aui-list-item-title {
font-size: 0.8rem;
color: #212121;
}
/*列表文本区域字体*/
.aui-list .aui-list-item-text {
font-size: 0.7rem;
color: #757575;
}
/*列表右侧箭头*/
.aui-list-item-arrow:before {
border-color: #dddddd;
}
/*列表右侧其他信息字体颜色*/
.aui-list .aui-list-item-right,
.aui-list-item-title-row em {
color: #757575;
}
/*列表线条颜色*/
.aui-list:before,
.aui-list:after,
.aui-list .aui-list-item:after,
.aui-list.aui-list-in .aui-list-item-inner:after {
background-color: #dddddd;
}
/*列表项点击颜色*/
.aui-list .aui-list-item:active {
background-color: #f5f5f5;
}
/*媒体列表布局左(右)媒体宽度控制*/
.aui-list .aui-list-item-media {
width: 4.5rem;
}
/*列表内label、icon字体颜色*/
.aui-list .aui-list-item-label,
.aui-list .aui-list-item-label-icon {
color: #212121;
}
/*卡片列表顶部字体*/
.aui-card-list-header {
font-size: 0.8rem;
color: #212121;
}
/* 卡片列表内容区域*/
.aui-card-list-content,
.aui-card-list-content-padded {
font-size: 0.7rem;
color: #212121;
}
/*卡片列表底部*/
.aui-card-list-footer {
font-size: 0.7rem;
color: #757575;
}
/*信息条*/
.aui-info {
font-size: 0.7rem;
color: #757575;
background-color: transparent;
}
/*输入框类字体颜色*/
input[type="text"],
input[type="password"],
input[type="search"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="number"],
select,
textarea {
color: #424242;
}

View File

@@ -0,0 +1,113 @@
/**
* aui-slide.css 轮播样式
* verson 0.0.2
* @author 流浪男
* http://www.auicss.com
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
.aui-slide-wrap {
display: block;
position: relative;
list-style: none;
margin: 0;
padding: 0;
height: 100%;
width: 100%;
overflow: hidden;
}
.aui-slide-wrap .aui-slide-node {
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
list-style: none;
overflow: hidden;
background: #ffffff;
}
.aui-slide-node-center {
display: -moz-box;
display: -webkit-box;
display: box;
-moz-box-pack: center;
-webkit-box-pack: center;
box-pack: center;
}
.aui-slide-node-middle {
display: -moz-box;
display: -webkit-box;
display: box;
-moz-box-align: center;
-webkit-box-align: center;
box-align: center;
}
.aui-slide-node img {
width: 100%;
height: 100%;
}
.aui-slide-page-wrap {
width: 100%;
height: 30px;
line-height: 30px;
position: absolute;
padding: 0;
left: 0;
right: 0;
bottom: 5px;
z-index: 9999;
text-align: center;
}
.aui-slide-page-dot {
position: relative;
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
list-style: none;
margin: 5px 3px 0 3px;
background: #c7c7c7;
-webkit-transition: all 0.5s;
transition: all 0.5s;
}
.aui-slide-page-line {
position: absolute;
bottom: -14px;
height: 1px !important;
position: relative;
display: inline-block;
background: #eeeeee;
-webkit-transition: all 0.5s;
transition: all 0.5s;
}
.aui-slide-page-active {
background: #1abc9c;
from { opacity: 0.3; }
to { opacity: 1 }
}
.aui-slide-prev-btn,
.aui-slide-next-btn {
display: inline-block;
width: 50px;
height: 30px;
line-height: 30px;
font-size: 1.2em;
color: #1abc9c;
background: rgba(249,249,249,0.6);
position: relative;
}
.aui-slide-prev-btn {
border-top-left-radius: 15px;
border-bottom-left-radius: 15px;
}
.aui-slide-next-btn {
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
}
.aui-slide-prev-btn:active,
.aui-slide-next-btn:active {
color: #f1c40f;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
38835eee-9291-48ce-9422-53733b0d79f3

View File

@@ -0,0 +1,607 @@
/*
* APICloud JavaScript Library
* Copyright (c) 2014 apicloud.com
*/
(function(window){
var u = {};
var isAndroid = (/android/gi).test(navigator.appVersion);
var uzStorage = function(){
var ls = window.localStorage;
if(isAndroid){
ls = os.localStorage();
}
return ls;
};
function parseArguments(url, data, fnSuc, dataType) {
if (typeof(data) == 'function') {
dataType = fnSuc;
fnSuc = data;
data = undefined;
}
if (typeof(fnSuc) != 'function') {
dataType = fnSuc;
fnSuc = undefined;
}
return {
url: url,
data: data,
fnSuc: fnSuc,
dataType: dataType
};
}
u.trim = function(str){
if(String.prototype.trim){
return str == null ? "" : String.prototype.trim.call(str);
}else{
return str.replace(/(^\s*)|(\s*$)/g, "");
}
};
u.trimAll = function(str){
return str.replace(/\s*/g,'');
};
u.isElement = function(obj){
return !!(obj && obj.nodeType == 1);
};
u.isArray = function(obj){
if(Array.isArray){
return Array.isArray(obj);
}else{
return obj instanceof Array;
}
};
u.isEmptyObject = function(obj){
if(JSON.stringify(obj) === '{}'){
return true;
}
return false;
};
u.addEvt = function(el, name, fn, useCapture){
if(!u.isElement(el)){
console.warn('$api.addEvt Function need el param, el param must be DOM Element');
return;
}
useCapture = useCapture || false;
if(el.addEventListener) {
el.addEventListener(name, fn, useCapture);
}
};
u.rmEvt = function(el, name, fn, useCapture){
if(!u.isElement(el)){
console.warn('$api.rmEvt Function need el param, el param must be DOM Element');
return;
}
useCapture = useCapture || false;
if (el.removeEventListener) {
el.removeEventListener(name, fn, useCapture);
}
};
u.one = function(el, name, fn, useCapture){
if(!u.isElement(el)){
console.warn('$api.one Function need el param, el param must be DOM Element');
return;
}
useCapture = useCapture || false;
var that = this;
var cb = function(){
fn && fn();
that.rmEvt(el, name, cb, useCapture);
};
that.addEvt(el, name, cb, useCapture);
};
u.dom = function(el, selector){
if(arguments.length === 1 && typeof arguments[0] == 'string'){
if(document.querySelector){
return document.querySelector(arguments[0]);
}
}else if(arguments.length === 2){
if(el.querySelector){
return el.querySelector(selector);
}
}
};
u.domAll = function(el, selector){
if(arguments.length === 1 && typeof arguments[0] == 'string'){
if(document.querySelectorAll){
return document.querySelectorAll(arguments[0]);
}
}else if(arguments.length === 2){
if(el.querySelectorAll){
return el.querySelectorAll(selector);
}
}
};
u.byId = function(id){
return document.getElementById(id);
};
u.first = function(el, selector){
if(arguments.length === 1){
if(!u.isElement(el)){
console.warn('$api.first Function need el param, el param must be DOM Element');
return;
}
return el.children[0];
}
if(arguments.length === 2){
return this.dom(el, selector+':first-child');
}
};
u.last = function(el, selector){
if(arguments.length === 1){
if(!u.isElement(el)){
console.warn('$api.last Function need el param, el param must be DOM Element');
return;
}
var children = el.children;
return children[children.length - 1];
}
if(arguments.length === 2){
return this.dom(el, selector+':last-child');
}
};
u.eq = function(el, index){
return this.dom(el, ':nth-child('+ index +')');
};
u.not = function(el, selector){
return this.domAll(el, ':not('+ selector +')');
};
u.prev = function(el){
if(!u.isElement(el)){
console.warn('$api.prev Function need el param, el param must be DOM Element');
return;
}
var node = el.previousSibling;
if(node.nodeType && node.nodeType === 3){
node = node.previousSibling;
return node;
}
};
u.next = function(el){
if(!u.isElement(el)){
console.warn('$api.next Function need el param, el param must be DOM Element');
return;
}
var node = el.nextSibling;
if(node.nodeType && node.nodeType === 3){
node = node.nextSibling;
return node;
}
};
u.closest = function(el, selector){
if(!u.isElement(el)){
console.warn('$api.closest Function need el param, el param must be DOM Element');
return;
}
var doms, targetDom;
var isSame = function(doms, el){
var i = 0, len = doms.length;
for(i; i<len; i++){
if(doms[i].isEqualNode(el)){
return doms[i];
}
}
return false;
};
var traversal = function(el, selector){
doms = u.domAll(el.parentNode, selector);
targetDom = isSame(doms, el);
while(!targetDom){
el = el.parentNode;
if(el != null && el.nodeType == el.DOCUMENT_NODE){
return false;
}
traversal(el, selector);
}
return targetDom;
};
return traversal(el, selector);
};
u.contains = function(parent,el){
var mark = false;
if(el === parent){
mark = true;
return mark;
}else{
do{
el = el.parentNode;
if(el === parent){
mark = true;
return mark;
}
}while(el === document.body || el === document.documentElement);
return mark;
}
};
u.remove = function(el){
if(el && el.parentNode){
el.parentNode.removeChild(el);
}
};
u.attr = function(el, name, value){
if(!u.isElement(el)){
console.warn('$api.attr Function need el param, el param must be DOM Element');
return;
}
if(arguments.length == 2){
return el.getAttribute(name);
}else if(arguments.length == 3){
el.setAttribute(name, value);
return el;
}
};
u.removeAttr = function(el, name){
if(!u.isElement(el)){
console.warn('$api.removeAttr Function need el param, el param must be DOM Element');
return;
}
if(arguments.length === 2){
el.removeAttribute(name);
}
};
u.hasCls = function(el, cls){
if(!u.isElement(el)){
console.warn('$api.hasCls Function need el param, el param must be DOM Element');
return;
}
if(el.className.indexOf(cls) > -1){
return true;
}else{
return false;
}
};
u.addCls = function(el, cls){
if(!u.isElement(el)){
console.warn('$api.addCls Function need el param, el param must be DOM Element');
return;
}
if('classList' in el){
el.classList.add(cls);
}else{
var preCls = el.className;
var newCls = preCls +' '+ cls;
el.className = newCls;
}
return el;
};
u.removeCls = function(el, cls){
if(!u.isElement(el)){
console.warn('$api.removeCls Function need el param, el param must be DOM Element');
return;
}
if('classList' in el){
el.classList.remove(cls);
}else{
var preCls = el.className;
var newCls = preCls.replace(cls, '');
el.className = newCls;
}
return el;
};
u.toggleCls = function(el, cls){
if(!u.isElement(el)){
console.warn('$api.toggleCls Function need el param, el param must be DOM Element');
return;
}
if('classList' in el){
el.classList.toggle(cls);
}else{
if(u.hasCls(el, cls)){
u.removeCls(el, cls);
}else{
u.addCls(el, cls);
}
}
return el;
};
u.val = function(el, val){
if(!u.isElement(el)){
console.warn('$api.val Function need el param, el param must be DOM Element');
return;
}
if(arguments.length === 1){
switch(el.tagName){
case 'SELECT':
var value = el.options[el.selectedIndex].value;
return value;
break;
case 'INPUT':
return el.value;
break;
case 'TEXTAREA':
return el.value;
break;
}
}
if(arguments.length === 2){
switch(el.tagName){
case 'SELECT':
el.options[el.selectedIndex].value = val;
return el;
break;
case 'INPUT':
el.value = val;
return el;
break;
case 'TEXTAREA':
el.value = val;
return el;
break;
}
}
};
u.prepend = function(el, html){
if(!u.isElement(el)){
console.warn('$api.prepend Function need el param, el param must be DOM Element');
return;
}
el.insertAdjacentHTML('afterbegin', html);
return el;
};
u.append = function(el, html){
if(!u.isElement(el)){
console.warn('$api.append Function need el param, el param must be DOM Element');
return;
}
el.insertAdjacentHTML('beforeend', html);
return el;
};
u.before = function(el, html){
if(!u.isElement(el)){
console.warn('$api.before Function need el param, el param must be DOM Element');
return;
}
el.insertAdjacentHTML('beforebegin', html);
return el;
};
u.after = function(el, html){
if(!u.isElement(el)){
console.warn('$api.after Function need el param, el param must be DOM Element');
return;
}
el.insertAdjacentHTML('afterend', html);
return el;
};
u.html = function(el, html){
if(!u.isElement(el)){
console.warn('$api.html Function need el param, el param must be DOM Element');
return;
}
if(arguments.length === 1){
return el.innerHTML;
}else if(arguments.length === 2){
el.innerHTML = html;
return el;
}
};
u.text = function(el, txt){
if(!u.isElement(el)){
console.warn('$api.text Function need el param, el param must be DOM Element');
return;
}
if(arguments.length === 1){
return el.textContent;
}else if(arguments.length === 2){
el.textContent = txt;
return el;
}
};
u.offset = function(el){
if(!u.isElement(el)){
console.warn('$api.offset Function need el param, el param must be DOM Element');
return;
}
var sl = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
var st = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
var rect = el.getBoundingClientRect();
return {
l: rect.left + sl,
t: rect.top + st,
w: el.offsetWidth,
h: el.offsetHeight
};
};
u.css = function(el, css){
if(!u.isElement(el)){
console.warn('$api.css Function need el param, el param must be DOM Element');
return;
}
if(typeof css == 'string' && css.indexOf(':') > 0){
el.style && (el.style.cssText += ';' + css);
}
};
u.cssVal = function(el, prop){
if(!u.isElement(el)){
console.warn('$api.cssVal Function need el param, el param must be DOM Element');
return;
}
if(arguments.length === 2){
var computedStyle = window.getComputedStyle(el, null);
return computedStyle.getPropertyValue(prop);
}
};
u.jsonToStr = function(json){
if(typeof json === 'object'){
return JSON && JSON.stringify(json);
}
};
u.strToJson = function(str){
if(typeof str === 'string'){
return JSON && JSON.parse(str);
}
};
u.setStorage = function(key, value){
if(arguments.length === 2){
var v = value;
if(typeof v == 'object'){
v = JSON.stringify(v);
v = 'obj-'+ v;
}else{
v = 'str-'+ v;
}
var ls = uzStorage();
if(ls){
ls.setItem(key, v);
}
}
};
u.getStorage = function(key){
var ls = uzStorage();
if(ls){
var v = ls.getItem(key);
if(!v){return;}
if(v.indexOf('obj-') === 0){
v = v.slice(4);
return JSON.parse(v);
}else if(v.indexOf('str-') === 0){
return v.slice(4);
}
}
};
u.rmStorage = function(key){
var ls = uzStorage();
if(ls && key){
ls.removeItem(key);
}
};
u.clearStorage = function(){
var ls = uzStorage();
if(ls){
ls.clear();
}
};
/*by king*/
u.fixIos7Bar = function(el){
if(!u.isElement(el)){
console.warn('$api.fixIos7Bar Function need el param, el param must be DOM Element');
return;
}
var strDM = api.systemType;
if (strDM == 'ios') {
var strSV = api.systemVersion;
var numSV = parseInt(strSV,10);
var fullScreen = api.fullScreen;
var iOS7StatusBarAppearance = api.iOS7StatusBarAppearance;
if (numSV >= 7 && !fullScreen && iOS7StatusBarAppearance) {
el.style.paddingTop = '20px';
}
}
};
u.fixStatusBar = function(el){
if(!u.isElement(el)){
console.warn('$api.fixStatusBar Function need el param, el param must be DOM Element');
return;
}
var sysType = api.systemType;
if(sysType == 'ios'){
u.fixIos7Bar(el);
}else if(sysType == 'android'){
var ver = api.systemVersion;
ver = parseFloat(ver);
if(ver >= 4.4){
el.style.paddingTop = '25px';
}
}
};
u.toast = function(title, text, time){
var opts = {};
var show = function(opts, time){
api.showProgress(opts);
setTimeout(function(){
api.hideProgress();
},time);
};
if(arguments.length === 1){
var time = time || 500;
if(typeof title === 'number'){
time = title;
}else{
opts.title = title+'';
}
show(opts, time);
}else if(arguments.length === 2){
var time = time || 500;
var text = text;
if(typeof text === "number"){
var tmp = text;
time = tmp;
text = null;
}
if(title){
opts.title = title;
}
if(text){
opts.text = text;
}
show(opts, time);
}
if(title){
opts.title = title;
}
if(text){
opts.text = text;
}
time = time || 500;
show(opts, time);
};
u.post = function(/*url,data,fnSuc,dataType*/){
var argsToJson = parseArguments.apply(null, arguments);
var json = {};
var fnSuc = argsToJson.fnSuc;
argsToJson.url && (json.url = argsToJson.url);
argsToJson.data && (json.data = argsToJson.data);
if(argsToJson.dataType){
var type = argsToJson.dataType.toLowerCase();
if (type == 'text'||type == 'json') {
json.dataType = type;
}
}else{
json.dataType = 'json';
}
json.method = 'post';
api.ajax(json,
function(ret,err){
if (ret) {
fnSuc && fnSuc(ret);
}
}
);
};
u.get = function(/*url,fnSuc,dataType*/){
var argsToJson = parseArguments.apply(null, arguments);
var json = {};
var fnSuc = argsToJson.fnSuc;
argsToJson.url && (json.url = argsToJson.url);
//argsToJson.data && (json.data = argsToJson.data);
if(argsToJson.dataType){
var type = argsToJson.dataType.toLowerCase();
if (type == 'text'||type == 'json') {
json.dataType = type;
}
}else{
json.dataType = 'text';
}
json.method = 'get';
api.ajax(json,
function(ret,err){
if (ret) {
fnSuc && fnSuc(ret);
}
}
);
};
/*end*/
window.$api = u;
})(window);

View File

@@ -0,0 +1,118 @@
/**
* aui-actionsheet.js
* @author 流浪男
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiActionsheet = function() {
};
var isShow = false;
auiActionsheet.prototype = {
init: function(params,callback){
this.frameBounces = params.frameBounces;
this.title = params.title;
this.buttons = params.buttons;
this.cancelTitle = params.cancelTitle;
this.destructiveTitle = params.destructiveTitle;
this.maskDiv;
this.actionsheetDiv;
var self = this;
self.open(params,callback);
},
open: function(params,callback) {
var titleHtml='',buttonsHtml='',destructiveHtml='',cancelHtml='',btnHtml='';
var self = this;
if(self.actionsheetDiv || (!self.title && !self.buttons && !self.cancelTitle && !self.destructiveTitle))return;
if(!self.maskDiv){
self.maskDiv = document.createElement("div");
self.maskDiv.className = "aui-mask";
document.body.appendChild(self.maskDiv);
}
self.actionsheetDiv = document.createElement("div");
self.actionsheetDiv.className = "aui-actionsheet";
document.body.appendChild(self.actionsheetDiv);
if(self.title){
titleHtml = '<div class="aui-actionsheet-title aui-border-b aui-font-size-12">'+self.title+'</div>';
}
if(self.buttons && self.buttons.length){
for(var i = 0; i < self.buttons.length;i++){
if(i == self.buttons.length-1){
buttonsHtml += '<div class="aui-actionsheet-btn-item">'+self.buttons[i]+'</div>';
}else{
buttonsHtml += '<div class="aui-actionsheet-btn-item aui-border-b">'+self.buttons[i]+'</div>';
}
}
}
if(self.destructiveTitle){
destructiveHtml = '<div class="aui-actionsheet-btn-item aui-border-t aui-text-danger">'+self.destructiveTitle+'</div>';
}else{
var destructiveHtml = '';
}
if(self.title || (self.buttons && self.buttons.length)){
btnHtml = '<div class="aui-actionsheet-btn">'+titleHtml+''+buttonsHtml+''+destructiveHtml+'</div>';
}
if(self.cancelTitle){
cancelHtml = '<div class="aui-actionsheet-btn"><div class="aui-actionsheet-btn-item">'+self.cancelTitle+'</div></div>';
}
self.actionsheetDiv.insertAdjacentHTML('beforeend', btnHtml+cancelHtml);
var actionsheetHeight = document.querySelector(".aui-actionsheet").offsetHeight;
self.maskDiv.classList.add("aui-mask-in");
self.actionsheetDiv.style.webkitTransform = self.actionsheetDiv.style.transform = "translate3d(0,0,0)";
self.actionsheetDiv.style.opacity = 1;
self.actionsheetDiv.addEventListener("touchmove", function(event){
event.preventDefault();
})
self.maskDiv.addEventListener("touchmove", function(event){
event.preventDefault();
})
if(typeof(api) != 'undefined' && typeof(api) == 'object' && self.frameBounces){
api.setFrameAttr({
bounces:false
});
}
var actionsheetButtons = document.querySelectorAll(".aui-actionsheet-btn-item");
if(actionsheetButtons && actionsheetButtons.length > 0){
setTimeout(function(){
self.maskDiv.onclick = function(){self.close();return;};
for(var ii = 0; ii < actionsheetButtons.length; ii++){
(function(e){
actionsheetButtons[e].onclick = function(){
if(callback){
callback({
buttonIndex: e+1,
buttonTitle: this.textContent
});
};
self.close();
return;
}
})(ii)
}
}, 350)
}
},
close: function(){
var self = this;
if(typeof(api) != 'undefined' && typeof(api) == 'object' && self.frameBounces){
api.setFrameAttr({
bounces:true
});
}
if(self.actionsheetDiv){
var actionsheetHeight = self.actionsheetDiv.offsetHeight;
self.actionsheetDiv.style.webkitTransform = self.actionsheetDiv.style.transform = "translate3d(0,"+actionsheetHeight+"px,0)";
self.maskDiv.style.opacity = 0;
setTimeout(function(){
if(self.maskDiv){
self.maskDiv.parentNode.removeChild(self.maskDiv);
}
self.actionsheetDiv.parentNode.removeChild(self.actionsheetDiv);
self.actionsheetDiv = self.maskDiv = false;
}, 300)
}
}
};
window.auiActionsheet = auiActionsheet;
})(window);

View File

@@ -0,0 +1,44 @@
/**
* aui-collapse.js
* @author 流浪男
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiCollapse = function(params) {
this.init(params);
};
auiCollapse.prototype = {
init: function(params,callback){
var collapseHeader = document.querySelectorAll(".aui-collapse-header");
if(collapseHeader.length){
for(var i=0;i<collapseHeader.length;i++){
(function(e){
collapseHeader[e].onclick = function(){
if(collapseHeader[e].nextSibling.nextElementSibling.className.indexOf("aui-collapse-content") > -1){
if(collapseHeader[e].nextSibling.nextElementSibling.className.indexOf("aui-show") > -1){
collapseHeader[e].nextSibling.nextElementSibling.classList.remove("aui-show");
collapseHeader[e].classList.remove("aui-active");
}else{
if(params.autoHide){
if(document.querySelector(".aui-collapse-header.aui-active")){
document.querySelector(".aui-collapse-header.aui-active").classList.remove("aui-active");
}
if(document.querySelector(".aui-collapse-content.aui-show")){
document.querySelector(".aui-collapse-content.aui-show").classList.remove("aui-show");
}
}
collapseHeader[e].nextSibling.nextElementSibling.classList.toggle("aui-show");
collapseHeader[e].classList.toggle("aui-active");
}
}
}
})(i)
}
}
}
};
window.auiCollapse = auiCollapse;
})(window);

View File

@@ -0,0 +1,125 @@
/**
* aui-dialog.js
* @author 流浪男
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiDialog = function() {
};
var isShow = false;
auiDialog.prototype = {
params: {
title:'',
msg:'',
buttons: ['取消','确定'],
input:false
},
create: function(params,callback) {
var self = this;
var dialogHtml = '';
var buttonsHtml = '';
var headerHtml = params.title ? '<div class="aui-dialog-header">' + params.title + '</div>' : '<div class="aui-dialog-header">' + self.params.title + '</div>';
if(params.input){
params.text = params.text ? params.text: '';
var msgHtml = '<div class="aui-dialog-body"><input type="text" placeholder="'+params.text+'"></div>';
}else{
var msgHtml = params.msg ? '<div class="aui-dialog-body">' + params.msg + '</div>' : '<div class="aui-dialog-body">' + self.params.msg + '</div>';
}
var buttons = params.buttons ? params.buttons : self.params.buttons;
if (buttons && buttons.length > 0) {
for (var i = 0; i < buttons.length; i++) {
buttonsHtml += '<div class="aui-dialog-btn" tapmode button-index="'+i+'">'+buttons[i]+'</div>';
}
}
var footerHtml = '<div class="aui-dialog-footer">'+buttonsHtml+'</div>';
dialogHtml = '<div class="aui-dialog">'+headerHtml+msgHtml+footerHtml+'</div>';
document.body.insertAdjacentHTML('beforeend', dialogHtml);
// listen buttons click
var dialogButtons = document.querySelectorAll(".aui-dialog-btn");
if(dialogButtons && dialogButtons.length > 0){
for(var ii = 0; ii < dialogButtons.length; ii++){
dialogButtons[ii].onclick = function(){
if(callback){
if(params.input){
callback({
buttonIndex: parseInt(this.getAttribute("button-index"))+1,
text: document.querySelector("input").value
});
}else{
callback({
buttonIndex: parseInt(this.getAttribute("button-index"))+1
});
}
};
self.close();
return;
}
}
}
self.open();
},
open: function(){
if(!document.querySelector(".aui-dialog"))return;
var self = this;
document.querySelector(".aui-dialog").style.marginTop = "-"+Math.round(document.querySelector(".aui-dialog").offsetHeight/2)+"px";
if(!document.querySelector(".aui-mask")){
var maskHtml = '<div class="aui-mask"></div>';
document.body.insertAdjacentHTML('beforeend', maskHtml);
}
// document.querySelector(".aui-dialog").style.display = "block";
setTimeout(function(){
document.querySelector(".aui-dialog").classList.add("aui-dialog-in");
document.querySelector(".aui-mask").classList.add("aui-mask-in");
document.querySelector(".aui-dialog").classList.add("aui-dialog-in");
}, 10)
document.querySelector(".aui-mask").addEventListener("touchmove", function(e){
e.preventDefault();
})
document.querySelector(".aui-dialog").addEventListener("touchmove", function(e){
e.preventDefault();
})
return;
},
close: function(){
var self = this;
document.querySelector(".aui-mask").classList.remove("aui-mask-in");
document.querySelector(".aui-dialog").classList.remove("aui-dialog-in");
document.querySelector(".aui-dialog").classList.add("aui-dialog-out");
if (document.querySelector(".aui-dialog:not(.aui-dialog-out)")) {
setTimeout(function(){
if(document.querySelector(".aui-dialog"))document.querySelector(".aui-dialog").parentNode.removeChild(document.querySelector(".aui-dialog"));
self.open();
return true;
},200)
}else{
document.querySelector(".aui-mask").classList.add("aui-mask-out");
document.querySelector(".aui-dialog").addEventListener("webkitTransitionEnd", function(){
self.remove();
})
document.querySelector(".aui-dialog").addEventListener("transitionend", function(){
self.remove();
})
}
},
remove: function(){
if(document.querySelector(".aui-dialog"))document.querySelector(".aui-dialog").parentNode.removeChild(document.querySelector(".aui-dialog"));
if(document.querySelector(".aui-mask")){
document.querySelector(".aui-mask").classList.remove("aui-mask-out");
}
return true;
},
alert: function(params,callback){
var self = this;
return self.create(params,callback);
},
prompt:function(params,callback){
var self = this;
params.input = true;
return self.create(params,callback);
}
};
window.auiDialog = auiDialog;
})(window);

View File

@@ -0,0 +1,48 @@
/**
* aui-lazyload.js
* @author 流浪男
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var _loadImgNodes;
var auiLazyload = function(params) {
this.errorImage = params.errorImage||false;
this._init(params);
};
auiLazyload.prototype = {
_init: function(params) {
var self = this;
_loadImgNodes = document.querySelectorAll('[data-src]');
self._judgeImages();
window.addEventListener('scroll', function(){
_loadImgNodes = document.querySelectorAll('[data-src]');
self._judgeImages();
}, false);
},
_judgeImages:function() {
var self = this;
if(_loadImgNodes.length){
for(var i = 0; i < _loadImgNodes.length; i++){
if (_loadImgNodes[i].getBoundingClientRect().top < window.innerHeight) {
self._loadImage(_loadImgNodes[i]);
}
}
}
},
_loadImage:function(el){
var self = this;
var img = new Image();
img.src = el.getAttribute('data-src');
el.src = el.getAttribute('data-src');
el.removeAttribute("data-src");
// // 图片加载失败
img.onerror = function() {
el.src = self.errorImage || el.getAttribute('src');
el.removeAttribute("data-src");
};
}
}
window.auiLazyload = auiLazyload;
})(window);

View File

@@ -0,0 +1,243 @@
/**
* aui-list-swipe.js 列表页滑动菜单
* verson 0.0.3
* @author 流浪男 && Beck
* http://www.auicss.com
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function(window) {
"use strict";
var translateVal,
friction = 1,
firstTouchX,
firstTouchxy,
firstTouchY,
firstTouch,
firstTouchTime,
touchXDelta,
handleTranslateVal;
var TranslateZero = "translate3d(0,0,0)",
TranslateCent = "translate3d(100%,0,0)";
var swipeHandle = false,
btnWidth = false,
swipeBtnsRight = false;
var isMoved = false,isOpened=false;
var d = false;
var auiListSwipe = function (callback) {
this._init(callback);
}
auiListSwipe.prototype = {
// var self = this;
_init: function(callback){
var self = this;
// var d = document.querySelectorAll("selectors")
window.addEventListener('touchstart', function(event){
if(isOpened){
console.log(1)
// return;
isOpened = false;
return;
}
if(swipeHandle){
event.preventDefault();
self.setTranslate(swipeHandle,"0px");
swipeHandle.classList.remove("aui-swipe-opened");
swipeHandle = false;
return;
}
isMoved = false;
swipeHandle = false;
var target = event.target;
// 过滤点击
for(; target && target !== document; target = target.parentNode){
// console.log(target.classList)
if (target.classList){
if (target.classList.contains("aui-swipe-handle")) {
swipeHandle = target;
firstTouch = event.changedTouches[0];
firstTouchX = firstTouch.clientX;
firstTouchY = firstTouch.clientY;
firstTouchTime = event.timeStamp;
if(swipeHandle.className.indexOf("aui-swipe-opened") > -1){
// console.log(1)
// self.setTranslate(swipeHandle,"0px");
// swipeHandle.classList.remove("aui-swipe-opened");
event.preventDefault();
return;
}else{
// setTimeout(function(){
self.toggleEvents(swipeHandle,callback);
// }, 100)
}
}
}
}
})
// window.addEventListener('touchmove', function(event){
// if(swipeHandle){
// // event.preventDefault();
// // self.setTranslate(swipeHandle,"0px");
// // swipeHandle.classList.remove("aui-swipe-opened");
// // swipeHandle = false;
// // return;
// }
// if(document.querySelector(".aui-swipe-opened")){
// event.preventDefault();
// if(swipeHandle != document.querySelector(".aui-swipe-opened")){
// self.setTranslate(document.querySelector(".aui-swipe-opened"),"0px");
// document.querySelector(".aui-swipe-opened").classList.remove("aui-swipe-opened");
// isOpened = false;
// event.stopPropagation()
// return;
// }
// }
// })
window.addEventListener("touchmove", function(){
})
},
toggleEvents:function(element,callback){
if(!swipeHandle){
return;
}
var self = this;
self.setTransform(element,300);
element.addEventListener('touchstart', function(event){
// if(element.className.indexOf("aui-swipe-opened") > -1){
// self.setTranslate(element,"0px");
// element.classList.remove("aui-swipe-opened");
// return;
// }
//:active样式引起列表背景色冲突
element.parentNode.style.backgroundColor = "#ffffff";
if(!element.nextSibling)return;
},false)
element.addEventListener('touchmove', function(event){
if(document.querySelector(".aui-swipe-opened")){
event.preventDefault();
if(swipeHandle != document.querySelector(".aui-swipe-opened")){
self.setTranslate(document.querySelector(".aui-swipe-opened"),"0px");
document.querySelector(".aui-swipe-opened").classList.remove("aui-swipe-opened");
isOpened = false;
event.stopPropagation()
return;
}
}
// self.getAngle(event)
self.setTransform(element,0);
// if(element.className.indexOf("aui-swipe-opened") > -1)return;
if(element.parentNode.querySelector(".aui-swipe-btn")){
btnWidth = element.parentNode.querySelector(".aui-swipe-btn").offsetWidth;
}
// 列表触摸滑动时如果有已经显示的将其关闭,并退出。
var touchMoveObj = event.changedTouches[0],
touchX = touchMoveObj.clientX;
touchXDelta = -Math.pow(firstTouchX-touchX, 0.85);
handleTranslateVal = touchXDelta/friction;
// touchXDelta = touchX - firstTouchX;
// handleTranslateVal = touchXDelta/0.15;
// console.log(handleTranslateVal)
var moveX = touchMoveObj.clientX - firstTouchX;
var moveY = touchMoveObj.clientY - firstTouchY;
var direction = self.getDirection(moveX,moveY);
var angle = self.getAngle(Math.abs(moveX),Math.abs(moveY));
// console.log(isMoved);
// // 解决滑动屏幕返回时事件冲突,主要针对部分特殊机型
// if(touchMoveObj.screenX < 0){
// firstTouchxy = '';
// }
if(direction == "right"){
isMoved = false;
event.preventDefault();
}
if(direction == "top" || direction == "down"){
isMoved = false;
return;
}
if(angle <= 15 && direction === 'left'){
event.preventDefault()
isMoved = true;
}
// console.log(handleTranslateVal)
// if(isMoved)self.setTranslate(element,""+(handleTranslateVal+10)+"px");
if((event.timeStamp - firstTouchTime) >= 100 && touchXDelta < 0 && touchMoveObj.screenX > 0 && isMoved){
// event.stopPropagation();
// element.classList.add("aui-swipe-moving");
// event.preventDefault();
if(element.className.indexOf("aui-swipe-opened") <= -1){
if((handleTranslateVal+10) > -btnWidth){
self.setTranslate(element,""+(handleTranslateVal+10)+"px");
}
}else{
return
}
}
},false)
element.addEventListener('touchend', function(event){
self.setTransform(element,300);
var touchEndObj = event.changedTouches[0];
var touchEndxy = {
x: touchEndObj.clientX || 0,
y: touchEndObj.clientY || 0
};
var toucheEndX = touchEndObj.clientX - firstTouchX;
var toucheEndY = touchEndObj.clientY - firstTouchY;
var direction = self.getDirection(toucheEndX,toucheEndY);
// element.classList.remove("aui-swipe-moving");
if(direction=='left' && handleTranslateVal < (-btnWidth/3) && isMoved){
self.setTranslate(element,""+-btnWidth+"px");
element.classList.add("aui-swipe-opened");
callback({
'status':true,
'dom':element
})
isOpened = true;
}else{
element.classList.remove("aui-swipe-opened");
self.setTranslate(element,"0px");
isOpened = false;
}
// isMoved = false;
console.log(isOpened)
},true)
},
setTransform : function (el,value){
el.style.webkitTransitionDuration = el.style.transitionDuration = value+'ms';
},
setTranslate : function (el,value){
if(el)el.style.webkitTransform = el.style.transform = "translate3d("+value+",0,0)";
},
getDistance : function(p1, p2, props) {
if (!props) { props = ['x', 'y'];}
var x = p2[props[0]] - p1[props[0]];
var y = p2[props[1]] - p1[props[1]];
return Math.sqrt((x * x) + (y * y));
},
getAngle:function(moveX, moveY){
// var x = Math.abs(x1 - x2);
// var y = Math.abs(y1 - y2);
var z = Math.sqrt(moveX*moveX + moveY*moveY);
return Math.round((Math.asin(moveY / z) / Math.PI*180));
},
getDirection : function(x, y) {
if (x === y) { return '';}
if (Math.abs(x) >= Math.abs(y)) {
return x > 0 ? 'right' : 'left';
} else {
return y > 0 ? 'down' : 'up';
}
}
}
window.auiListSwipe = auiListSwipe;
})(window);

View File

@@ -0,0 +1,221 @@
/**
* aui-list-swipe.js 列表页滑动菜单
* verson 0.0.3
* @author 流浪男 && Beck
* http://www.auicss.com
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function(window) {
"use strict";
var translateVal,
friction = 1,
firstTouchX,
firstTouchxy,
firstTouchY,
firstTouch,
firstTouchTime,
touchXDelta,
handleTranslateVal;
var TranslateZero = "translate3d(0,0,0)",
TranslateCent = "translate3d(100%,0,0)";
var swipeHandle = false,
btnWidth = false,
swipeBtnsRight = false;
var isMoved = false,isOpened=false;
var d = false;
var auiListSwipe = function (callback) {
this._init(callback);
}
auiListSwipe.prototype = {
// var self = this;
_init: function(callback){
var self = this;
// var d = document.querySelectorAll("selectors")
window.addEventListener('touchstart', function(event){
// 如果已经打开,将已经打开的关闭
if(isOpened && swipeHandle){
// isOpened = false;
self.setTranslate(swipeHandle,"0px");
swipeHandle.classList.remove("aui-swipe-opened");
return;
}else{
var target = event.target;
// 过滤点击
for(; target && target !== document; target = target.parentNode){
// console.log(target.classList)
if (target.classList){
if (target.classList.contains("aui-swipe-handle")) {
swipeHandle = target;
firstTouch = event.changedTouches[0];
firstTouchX = firstTouch.clientX;
firstTouchY = firstTouch.clientY;
firstTouchTime = event.timeStamp;
if(swipeHandle.className.indexOf("aui-swipe-opened") > -1){
// console.log(1)
// self.setTranslate(swipeHandle,"0px");
// swipeHandle.classList.remove("aui-swipe-opened");
event.preventDefault();
return;
}else{
// setTimeout(function(){
self.toggleEvents(swipeHandle,callback);
// }, 100)
}
}
}
}
}
// if(swipeHandle){
// event.preventDefault();
// self.setTranslate(swipeHandle,"0px");
// swipeHandle.classList.remove("aui-swipe-opened");
// swipeHandle = false;
// return;
// }
// isMoved = false;
// swipeHandle = false;
})
},
toggleEvents:function(element,callback){
if(!swipeHandle){
return;
}
var self = this;
self.setTransform(element,300);
element.addEventListener('touchstart', function(event){
// if(element.className.indexOf("aui-swipe-opened") > -1){
// self.setTranslate(element,"0px");
// element.classList.remove("aui-swipe-opened");
// return;
// }
//:active样式引起列表背景色冲突
element.parentNode.style.backgroundColor = "#ffffff";
if(!element.nextSibling)return;
},false)
element.addEventListener('touchmove', function(event){
event.preventDefault();
if(document.querySelector(".aui-swipe-opened")){
event.preventDefault();
if(swipeHandle != document.querySelector(".aui-swipe-opened")){
self.setTranslate(document.querySelector(".aui-swipe-opened"),"0px");
document.querySelector(".aui-swipe-opened").classList.remove("aui-swipe-opened");
isOpened = false;
event.stopPropagation()
return;
}
}
// self.getAngle(event)
self.setTransform(element,0);
// if(element.className.indexOf("aui-swipe-opened") > -1)return;
if(element.parentNode.querySelector(".aui-swipe-btn")){
btnWidth = element.parentNode.querySelector(".aui-swipe-btn").offsetWidth;
}
// 列表触摸滑动时如果有已经显示的将其关闭,并退出。
var touchMoveObj = event.changedTouches[0],
touchX = touchMoveObj.clientX;
touchXDelta = -Math.pow(firstTouchX-touchX, 0.85);
handleTranslateVal = touchXDelta/friction;
// touchXDelta = touchX - firstTouchX;
// handleTranslateVal = touchXDelta/0.15;
// console.log(handleTranslateVal)
var moveX = touchMoveObj.clientX - firstTouchX;
var moveY = touchMoveObj.clientY - firstTouchY;
var direction = self.getDirection(moveX,moveY);
var angle = self.getAngle(Math.abs(moveX),Math.abs(moveY));
// console.log(isMoved);
// // 解决滑动屏幕返回时事件冲突,主要针对部分特殊机型
// if(touchMoveObj.screenX < 0){
// firstTouchxy = '';
// }
if(direction == "right"){
isMoved = false;
event.preventDefault();
}
if(direction == "top" || direction == "down"){
isMoved = false;
return;
}
if(angle <= 15 && direction === 'left'){
event.preventDefault()
isMoved = true;
}
// console.log(handleTranslateVal)
// if(isMoved)self.setTranslate(element,""+(handleTranslateVal+10)+"px");
if((event.timeStamp - firstTouchTime) >= 100 && touchXDelta < 0 && touchMoveObj.screenX > 0 && isMoved){
// event.stopPropagation();
// element.classList.add("aui-swipe-moving");
// event.preventDefault();
if(element.className.indexOf("aui-swipe-opened") <= -1){
if((handleTranslateVal+10) > -btnWidth){
self.setTranslate(element,""+(handleTranslateVal+10)+"px");
}
}else{
return
}
}
},false)
element.addEventListener('touchend', function(event){
self.setTransform(element,300);
var touchEndObj = event.changedTouches[0];
var touchEndxy = {
x: touchEndObj.clientX || 0,
y: touchEndObj.clientY || 0
};
var toucheEndX = touchEndObj.clientX - firstTouchX;
var toucheEndY = touchEndObj.clientY - firstTouchY;
var direction = self.getDirection(toucheEndX,toucheEndY);
// element.classList.remove("aui-swipe-moving");
if(direction=='left' && handleTranslateVal < (-btnWidth/3) && isMoved){
self.setTranslate(element,""+-btnWidth+"px");
element.classList.add("aui-swipe-opened");
callback({
'status':true,
'dom':element
})
// isOpened = true;
}else{
element.classList.remove("aui-swipe-opened");
self.setTranslate(element,"0px");
isOpened = false;
}
// isMoved = false;
console.log(isOpened)
},true)
},
setTransform : function (el,value){
el.style.webkitTransitionDuration = el.style.transitionDuration = value+'ms';
},
setTranslate : function (el,value){
if(el)el.style.webkitTransform = el.style.transform = "translate3d("+value+",0,0)";
},
getDistance : function(p1, p2, props) {
if (!props) { props = ['x', 'y'];}
var x = p2[props[0]] - p1[props[0]];
var y = p2[props[1]] - p1[props[1]];
return Math.sqrt((x * x) + (y * y));
},
getAngle:function(moveX, moveY){
// var x = Math.abs(x1 - x2);
// var y = Math.abs(y1 - y2);
var z = Math.sqrt(moveX*moveX + moveY*moveY);
return Math.round((Math.asin(moveY / z) / Math.PI*180));
},
getDirection : function(x, y) {
if (x === y) { return '';}
if (Math.abs(x) >= Math.abs(y)) {
return x > 0 ? 'right' : 'left';
} else {
return y > 0 ? 'down' : 'up';
}
}
}
window.auiListSwipe = auiListSwipe;
})(window);

View File

@@ -0,0 +1,135 @@
/**
* aui-popup.js
* @author 流浪男
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiPopup = function() {
};
var isShow = false;
auiPopup.prototype = {
init: function(params,callback){
this.frameBounces = params.frameBounces;
this.location = params.location;
this.buttons = params.buttons;
this.maskDiv;
this.popupDiv;
var self = this;
self.open(params,callback);
},
open: function(params,callback) {
var buttonsHtml='',locationClass = 'aui-popup-top';
var self = this;
if(self.popupDiv){
self.close();
return;
}
if(!self.maskDiv){
self.maskDiv = document.createElement("div");
self.maskDiv.className = "aui-mask";
document.body.appendChild(self.maskDiv);
}
switch (self.location) {
case "top":
locationClass = 'aui-popup-top';
break;
case "top-left":
locationClass = 'aui-popup-top-left';
break;
case "top-right":
locationClass = 'aui-popup-top-right';
break;
case "bottom":
locationClass = 'aui-popup-bottom';
break;
case "bottom-left":
locationClass = 'aui-popup-bottom-left';
break;
case "bottom-right":
locationClass = 'aui-popup-bottom-right';
break;
default:
locationClass = 'aui-popup-top';
break;
}
self.popupDiv = document.createElement("div");
self.popupDiv.className = "aui-popup "+locationClass;
self.popupDiv.innerHTML = '<div class="aui-popup-arrow"></div><div class="aui-popup-content"></div>';
document.body.appendChild(self.popupDiv);
if(self.buttons && self.buttons.length){
buttonsHtml += '<ul class="aui-list aui-list-noborder">';
for(var i = 0; i < self.buttons.length;i++){
buttonsHtml += '<li class="aui-list-item aui-list-item-middle">';
buttonsHtml += '<div class="aui-list-item-label-icon"><img src="'+self.buttons[i].image+'"></div>';
buttonsHtml += '<div class="aui-list-item-inner">'+self.buttons[i].text+'</div>';
buttonsHtml += '</li>';
}
buttonsHtml += '</ul>';
}
document.querySelector(".aui-popup .aui-popup-content").insertAdjacentHTML('beforeend', buttonsHtml);
var actionsheetHeight = document.querySelector(".aui-popup").offsetHeight;
self.maskDiv.classList.add("aui-mask-in");
self.popupDiv.classList.add("aui-popup-in");
self.popupDiv.addEventListener("touchmove", function(event){
event.preventDefault();
})
self.maskDiv.addEventListener("touchmove", function(event){
event.preventDefault();
})
if(typeof(api) != 'undefined' && typeof(api) == 'object' && self.frameBounces){
api.setFrameAttr({
bounces:false
});
}
var popupButtons = document.querySelectorAll(".aui-popup .aui-list-item");
if(popupButtons && popupButtons.length > 0){
setTimeout(function(){
self.maskDiv.onclick = function(){self.close();return;};
for(var ii = 0; ii < popupButtons.length; ii++){
(function(e){
popupButtons[e].onclick = function(){
if(self.buttons[e].value){
var _value = self.buttons[e].value;
}else{
var _value = null;
}
if(callback){
callback({
buttonIndex: e+1,
buttonTitle: this.textContent,
buttonValue: _value
});
};
self.close();
return;
}
})(ii)
}
}, 350)
}
},
close: function(){
var self = this;
if(typeof(api) != 'undefined' && typeof(api) == 'object' && self.frameBounces){
api.setFrameAttr({
bounces:true
});
}
if(self.popupDiv){
var actionsheetHeight = self.popupDiv.offsetHeight;
self.popupDiv.classList.add("aui-popup-out");
self.maskDiv.style.opacity = 0;
setTimeout(function(){
if(self.maskDiv){
self.maskDiv.parentNode.removeChild(self.maskDiv);
}
self.popupDiv.parentNode.removeChild(self.popupDiv);
self.maskDiv = self.popupDiv = false;
}, 300)
}
}
};
window.auiPopup = auiPopup;
})(window);

View File

@@ -0,0 +1,94 @@
/**
* aui-popup.js
* @author 流浪男
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiPopup = function() {
this._init();
};
var CLASS_MASK = "aui-mask",
CLASS_MASK_IN = 'aui-mask-in',
CLASS_MASK_OUT = 'aui-mask-out',
CLASS_POPUP = 'aui-popup',
CLASS_POPUP_IN = 'aui-popup-in',
CLASS_POPUP_OUT = 'aui-popup-out',
CLASS_POPUP_FOR = 'aui-popup-for';
var __MASK = '.'+CLASS_MASK,
__MASK_IN = '.'+CLASS_MASK_IN,
__MASK_OUT = '.'+CLASS_MASK_OUT,
__POPUP = '.'+CLASS_POPUP,
__POPUP_IN = '.'+CLASS_POPUP_IN,
__POPUP_OUT = '.'+CLASS_POPUP_OUT;
var popupStatus = false;
auiPopup.prototype = {
_init: function() {
var self = this;
var _btn = document.querySelectorAll("["+CLASS_POPUP_FOR+"]");
if(_btn){
for(var i=0;i<_btn.length;i++){
_btn[i].setAttribute("tapmode", "");
_btn[i].onclick = function(e){
var popupId = this.getAttribute(CLASS_POPUP_FOR);
var popupDom = document.getElementById(popupId);
if(popupDom){
if(popupDom.className.indexOf(CLASS_POPUP_IN) > -1 || document.querySelector(__POPUP_IN)){
self.hide(popupDom);
}else{
self.show(popupDom);
}
}else{
return;
}
}
}
}
},
show: function(el){
var self = this;
if(el.className.indexOf(CLASS_POPUP_IN) > -1 || document.querySelector(__POPUP_IN)){
self.hide(el);
return;
}
if(popupStatus) return;
if(!document.querySelector(__MASK)){
var maskHtml = '<div class="aui-mask"></div>';
document.body.insertAdjacentHTML('beforeend', maskHtml);
}
el.style.display = "block";
setTimeout(function(){
document.querySelector(__MASK).classList.add(CLASS_MASK_IN);
el.classList.add(CLASS_POPUP_IN);
popupStatus = true;
}, 10)
document.querySelector(__MASK).addEventListener("touchstart", function(event){
event.preventDefault();
self.hide(el);
})
el.addEventListener("touchmove", function(event){
event.preventDefault();
},false)
},
hide: function(el){
if(!popupStatus) return;
document.querySelector(__MASK).classList.remove(CLASS_MASK_IN);
document.querySelector(__MASK).classList.add(CLASS_MASK_OUT);
if(!document.querySelector(__POPUP_IN))return;
document.querySelector(__POPUP_IN).classList.add(CLASS_POPUP_OUT);
document.querySelector(__POPUP_IN).classList.remove(CLASS_POPUP_IN);
setTimeout(function(){
if(!document.querySelector(__POPUP_OUT))return;
document.querySelector(__POPUP_OUT).style.display = "none";
document.querySelector(__POPUP_OUT).classList.remove(CLASS_POPUP_OUT);
if(document.querySelector(__MASK)){
document.querySelector(__MASK).parentNode.removeChild(document.querySelector(__MASK));
}
popupStatus = false;
}, 300)
}
};
window.auiPopup = auiPopup;
})(window);

View File

@@ -0,0 +1,174 @@
/**
* aui-pull-refresh.js
* @author 流浪男
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function(window) {
'use strict';
/**
* Extend obj function
*
* This is an object extender function. It allows us to extend an object
* by passing in additional variables and overwriting the defaults.
*/
var auiPullToRefresh = function (params,callback) {
this.extend(this.params, params);
this._init(callback);
}
var touchYDelta;
var isLoading = false;
var docElem = window.document.documentElement,
loadWrapH,
win = {width: window.innerWidth, height: window.innerHeight},
winfactor= 0.2,
translateVal,
isMoved = false,
firstTouchY, initialScroll;
auiPullToRefresh.prototype = {
params: {
container: document.querySelector('.aui-refresh-content'),
friction: 2.5,
triggerDistance: 100,
callback:false
},
_init : function(callback) {
var self = this;
var loadingHtml = '<div class="aui-refresh-load"><div class="aui-refresh-pull-arrow"></div></div>';
self.params.container.insertAdjacentHTML('afterbegin', loadingHtml);
self.params.container.addEventListener('touchstart', function(ev){
self.touchStart(ev)
});
self.params.container.addEventListener('touchmove', function(ev){
self.touchMove(ev)
});
self.params.container.addEventListener('touchend', function(ev){
self.touchEnd(ev,callback);
});
},
touchStart : function(ev) {
// this.params.container.classList.remove("refreshing");
if (isLoading) {
return;
}
isMoved = false;
this.params.container.style.webkitTransitionDuration =
this.params.container.style.transitionDuration = '0ms';
touchYDelta = '';
var touchobj = ev.changedTouches[0];
// register first touch "y"
firstTouchY = parseInt(touchobj.clientY);
initialScroll = this.scrollY();
},
touchMove : function (ev) {
if (isLoading) {
ev.preventDefault();
return;
}
var self = this;
var moving = function() {
var touchobj = ev.changedTouches[0], // reference first touch point for this event
touchY = parseInt(touchobj.clientY);
touchYDelta = touchY - firstTouchY;
if ( self.scrollY() === 0 && touchYDelta > 0 ) {
ev.preventDefault();
}
if ( initialScroll > 0 || self.scrollY() > 0 || self.scrollY() === 0 && touchYDelta < 0 ) {
firstTouchY = touchY;
return;
}
translateVal = Math.pow(touchYDelta, 0.85);
self.params.container.style.webkitTransform = self.params.container.style.transform = 'translate3d(0, ' + translateVal + 'px, 0)';
isMoved = true;
if(touchYDelta > self.params.triggerDistance){
self.params.container.classList.add("aui-refresh-pull-up");
self.params.container.classList.remove("aui-refresh-pull-down");
}else{
self.params.container.classList.add("aui-refresh-pull-down");
self.params.container.classList.remove("aui-refresh-pull-up");
}
};
this.throttle(moving(), 20);
},
touchEnd : function (ev,callback) {
var self =this;
if (isLoading|| !isMoved) {
isMoved = false;
return;
}
// 根据下拉高度判断是否加载
if( touchYDelta >= this.params.triggerDistance) {
isLoading = true; //正在加载中
ev.preventDefault();
this.params.container.style.webkitTransitionDuration =
this.params.container.style.transitionDuration = '300ms';
this.params.container.style.webkitTransform =
this.params.container.style.transform = 'translate3d(0,60px,0)';
document.querySelector(".aui-refresh-pull-arrow").style.webkitTransitionDuration =
document.querySelector(".aui-refresh-pull-arrow").style.transitionDuration = '0ms';
self.params.container.classList.add("aui-refreshing");
if(callback){
callback({
status:"success"
});
}
}else{
this.params.container.style.webkitTransitionDuration =
this.params.container.style.transitionDuration = '300ms';
this.params.container.style.webkitTransform =
this.params.container.style.transform = 'translate3d(0,0,0)';
if(callback){
callback({
status:"fail"
});
}
}
isMoved = false;
return;
},
cancelLoading : function () {
var self =this;
isLoading = false;
self.params.container.classList.remove("aui-refreshing");
document.querySelector(".aui-refresh-pull-arrow").style.webkitTransitionDuration =
document.querySelector(".aui-refresh-pull-arrow").style.transitionDuration = '300ms';
this.params.container.style.webkitTransitionDuration =
this.params.container.style.transitionDuration = '0ms';
self.params.container.style.webkitTransform =
self.params.container.style.transform = 'translate3d(0,0,0)';
self.params.container.classList.remove("aui-refresh-pull-up");
self.params.container.classList.add("aui-refresh-pull-down");
return;
},
scrollY : function() {
return window.pageYOffset || docElem.scrollTop;
},
throttle : function(fn, delay) {
var allowSample = true;
return function(e) {
if (allowSample) {
allowSample = false;
setTimeout(function() { allowSample = true; }, delay);
fn(e);
}
};
},
winresize : function () {
var resize = function() {
win = {width: window.innerWidth, height: window.innerHeight};
};
throttle(resize(), 10);
},
extend: function(a, b) {
for (var key in b) {
if (b.hasOwnProperty(key)) {
a[key] = b[key];
}
}
return a;
}
}
window.auiPullToRefresh = auiPullToRefresh;
})(window);

View File

@@ -0,0 +1,53 @@
/*
* AUI JAVASCRIPT PLUGIN
* 滑动 aui-range
* Copyright (c) 2015 auicss.com @流浪男 QQ343757327 群344869952
*/
(function( window, undefined ) {
"use strict";
var auiRange = function(params,callback) {
this._init(params,callback);
};
var time=null;
var distance,offsetLeft,tooltipWidth;
auiRange.prototype = {
_init: function(params,callback) {
var self = this;
distance = Math.abs(params.element.max - params.element.min);
offsetLeft = params.element.offsetLeft;
tooltipWidth = params.element.offsetWidth - 28;
params.element.insertAdjacentHTML('afterend','<div class="aui-range-tip aui-hide">'+params.element.value+'</div>');
var scaleWidth = (tooltipWidth / distance) * Math.abs(params.element.value - params.element.min);
params.element.nextSibling.style.left = (offsetLeft + scaleWidth - 11)+'px';
params.element.addEventListener("input",function(){
self._showTip(params.element,callback);
});
params.element.addEventListener("touchmove",function(){
self._showTip(params.element,callback);
});
params.element.addEventListener("touchend",function(){
self._hideTip(params.element);
});
},
_showTip: function(el,callback){
el.nextSibling.classList.remove("aui-hide");
var scaleWidth = (tooltipWidth / distance) * Math.abs(el.value - el.min);
el.nextSibling.style.left = (offsetLeft + scaleWidth - 11)+'px';
el.nextSibling.innerText = el.value;
callback({
value:el.value
});
},
_hideTip : function(el){
if (time) {
clearTimeout(time);
}
time = setTimeout(function() {
el.nextSibling.classList.add("aui-hide");
}, 1500);
}
}
window.auiRange = auiRange;
})(window);

View File

@@ -0,0 +1,66 @@
/**
* aui-scroll.js
* @author 流浪男
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function(window) {
'use strict';
var isToBottom = false,isMoved = false;
var auiScroll = function (params,callback) {
this.extend(this.params, params);
this._init(params,callback);
}
auiScroll.prototype = {
params: {
listren:false,
distance: 100
},
_init : function(params,callback) {
var self = this;
if(self.params.listen){
document.body.addEventListener("touchmove", function(e){
self.scroll(callback);
});
document.body.addEventListener("touchend", function(e){
self.scroll(callback);
});
}
window.onscroll = function(){
self.scroll(callback);
}
},
scroll : function (callback) {
var self = this;
var clientHeight = document.documentElement.scrollTop === 0 ? document.body.clientHeight : document.documentElement.clientHeight;
var scrollTop = document.documentElement.scrollTop === 0 ? document.body.scrollTop : document.documentElement.scrollTop;
var scrollHeight = document.documentElement.scrollTop === 0 ? document.body.scrollHeight : document.documentElement.scrollHeight;
if (scrollHeight-scrollTop-self.params.distance <= window.innerHeight) {
isToBottom = true;
if(isToBottom){
callback({
"scrollTop":scrollTop,
"isToBottom":true
})
}
}else{
isToBottom = false;
callback({
"scrollTop":scrollTop,
"isToBottom":false
})
}
},
extend: function(a, b) {
for (var key in b) {
if (b.hasOwnProperty(key)) {
a[key] = b[key];
}
}
return a;
}
}
window.auiScroll = auiScroll;
})(window);

View File

@@ -0,0 +1,119 @@
/**
* aui-sharebox.js
* @author 流浪男
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiSharebox = function() {
};
var isShow = false;
auiSharebox.prototype = {
init: function(params,callback){
this.frameBounces = params.frameBounces;
this.col = params.col;
this.buttons = params.buttons;
this.cancelTitle = params.cancelTitle;
this.maskDiv;
this.shareBoxDiv;
var self = this;
self.open(params,callback);
},
open: function(params,callback) {
var shareboxHtml='',buttonsHtml = '';
var self = this;
if(self.shareBoxDiv || !self.buttons)return;
if(!self.maskDiv){
self.maskDiv = document.createElement("div");
self.maskDiv.className = "aui-mask";
document.body.appendChild(self.maskDiv);
}
if(!self.col)self.col = 5;
self.shareBoxDiv = document.createElement("div");
self.shareBoxDiv.className = "aui-sharebox aui-grid";
document.body.appendChild(self.shareBoxDiv);
if(self.buttons && self.buttons.length){
buttonsHtml = '<div class="aui-row aui-row-padded">';
for(var i = 0; i < self.buttons.length;i++){
if(self.col == 5){
buttonsHtml += '<div class="aui-col-5 aui-sharebox-btn">';
}else{
buttonsHtml += '<div class="aui-col-xs-'+(12/self.col)+' aui-sharebox-btn">';
}
if(self.buttons[i].image)buttonsHtml += '<img src="'+self.buttons[i].image+'">';
if(self.buttons[i].text)buttonsHtml += '<div class="aui-grid-label">'+self.buttons[i].text+'</div>';
buttonsHtml += '</div>';
}
buttonsHtml += '</div>';
}
if(self.cancelTitle){
buttonsHtml += '<div class="aui-sharebox-close-btn aui-border-t">'+this.cancelTitle+'</div>';
}
self.shareBoxDiv.innerHTML = buttonsHtml;
var actionsheetHeight = self.shareBoxDiv.offsetHeight;
self.maskDiv.classList.add("aui-mask-in");
self.shareBoxDiv.style.webkitTransform = self.shareBoxDiv.style.transform = "translate3d(0,0,0)";
self.shareBoxDiv.style.opacity = 1;
self.shareBoxDiv.addEventListener("touchmove", function(event){
event.preventDefault();
})
self.maskDiv.addEventListener("touchmove", function(event){
event.preventDefault();
})
if(typeof(api) != 'undefined' && typeof(api) == 'object' && self.frameBounces){
api.setFrameAttr({
bounces:false
});
}
var shareboxButtons = document.querySelectorAll(".aui-sharebox-btn");
if(shareboxButtons && shareboxButtons.length > 0){
setTimeout(function(){
self.maskDiv.onclick = function(){self.close();return;};
for(var ii = 0; ii < shareboxButtons.length; ii++){
(function(e){
shareboxButtons[e].onclick = function(){
if(self.buttons[e].value){
var _value = self.buttons[e].value;
}else{
var _value = null;
}
if(callback){
callback({
buttonIndex: e+1,
buttonValue:_value
});
};
self.close();
return;
}
})(ii)
}
}, 350)
}
document.querySelector(".aui-sharebox-close-btn").onclick = function(){self.close();return;};
},
close: function(){
var self = this;
if(typeof(api) != 'undefined' && typeof(api) == 'object' && self.frameBounces){
api.setFrameAttr({
bounces:true
});
}
if(self.shareBoxDiv){
var actionsheetHeight = self.shareBoxDiv.offsetHeight;
self.shareBoxDiv.style.webkitTransform = self.shareBoxDiv.style.transform = "translate3d(0,"+actionsheetHeight+"px,0)";
self.maskDiv.style.opacity = 0;
setTimeout(function(){
if(self.maskDiv){
self.maskDiv.parentNode.removeChild(self.maskDiv);
}
self.shareBoxDiv.parentNode.removeChild(self.shareBoxDiv);
self.maskDiv = self.shareBoxDiv = false;
}, 300)
}
}
};
window.auiSharebox = auiSharebox;
})(window);

View File

@@ -0,0 +1,89 @@
/**
* aui-skin.js
* @author 流浪男
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiSkin = function(params) {
this.extend(this.params, params);
this._init();
};
var fileRef;
auiSkin.prototype = {
params: {
name: "", //主题名字
skinPath: "",//主题路径
default: false, //默认是否立即使用
beginTime: "",//开始时间
endTime: ""//结束时间
},
_init: function() {
var self = this;
if(!self.params.name)return;
if(!self.params.skinPath)return;
fileRef = document.createElement('link');
fileRef.setAttribute("rel","stylesheet");
fileRef.setAttribute("type","text/css");
fileRef.setAttribute("aui-skin-name",self.params.name);
fileRef.setAttribute("href",self.params.skinPath);
if(self.params.default){
document.getElementsByTagName("head")[0].appendChild(fileRef);
}else{
if(!self.params.beginTime || !self.params.endTime)return;
if(!self.check(self.params.beginTime,self.params.endTime))return;
var _date = new Date();
if(_date.getMinutes() < 10){
var nowM = "0"+_date.getMinutes();
}else{
var nowM = _date.getMinutes();
}
var nowTime = _date.getHours()+":"+nowM;
var b = parseInt(self.params.beginTime.replace(":", ''));
var e = parseInt(self.params.endTime.replace(":", ''));
var n = parseInt(nowTime.replace(":", ''));
if(b > e){
if(n >= b || n <= e)self.setSkin();
}else if(b < e){
if(n >= b && n <= e)self.setSkin();
}else{
self.removeSkin();
}
}
},
setSkin:function(){
document.getElementsByTagName("head")[0].appendChild(fileRef);
},
removeSkin:function(){
var self = this;
if(document.querySelector("link[aui-skin-name='"+self.params.name+"']"))
document.querySelector("link[aui-skin-name='"+self.params.name+"']").parentNode.removeChild(document.querySelector("link[aui-skin-name='"+self.params.name+"']"));
},
check:function(beginTime,endTime){
var strb = beginTime.split (":");
if (strb.length != 2)return false;
var stre = endTime.split (":");
if (stre.length != 2)return false;
var b = new Date ();
var e = new Date ();
b.setHours (strb[0]);
b.setMinutes (strb[1]);
e.setHours (stre[0]);
e.setMinutes (stre[1]);
if(strb[0] > 24 || strb[0] < 0 || stre[0] > 24 || stre[0] < 0)return false;
if(strb[1] > 59 || strb[1] < 0 || stre[1] > 59 || stre[1] < 0)return false;
return true;
},
extend: function(a, b) {
for (var key in b) {
if (b.hasOwnProperty(key)) {
a[key] = b[key];
}
}
return a;
}
};
window.auiSkin = auiSkin;
})(window);

View File

@@ -0,0 +1,333 @@
/**
* aui-slide.js 轮播组件
* @author 流浪男
* http://www.auicss.com
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function(window) {
"use strict";
var translateVal,
firstTouchX,
firstTouchY,
touchXDelta,
handleTranslateVal;
var touchStartTime; //开始触摸事件
var offsetX,
offsetY,
isScrolling;
// CLASS 组装
var CLASS_SLIDER_NODE = "aui-slide-node",
CLASS_SLIDE_PAGE_WRAP = "aui-slide-page-wrap",
CLASS_SLIDE_PAGE = "aui-slide-page",
CLASS_SLIDE_PAGE_ACTIVE = "aui-slide-page-active",
CLASS_SLIDE_PAGE_DOT = "aui-slide-page-dot",
CLASS_SLIDE_PAGE_LINE = "aui-slide-page-line";
var __SLIDER_NODE = "."+CLASS_SLIDER_NODE,
__SLIDE_PAGE_WRAP = "."+CLASS_SLIDE_PAGE_WRAP,
__SLIDE_PAGE = "."+CLASS_SLIDE_PAGE,
__SLIDE_PAGE_ACTIVE = "."+CLASS_SLIDE_PAGE_ACTIVE;
auiSlide.prototype.options = {
container:'',
width:'auto',
height:'auto',
speed: 300, //滑动速速
autoPlay: 0, //自动播放
pageShow: true, //是否显示分页器
pageStyle: 'dot',
dotPosition: 'center',
friction:1, //阻力
loop:true,
currentPage:false,
PageCount:false
};
auiSlide.prototype._init = function(options) {
extend(this.options, options);
if(!this.options.container){
return;
}
this.index = 0; //索引值
this.continuous = true;//用于判断长度为2时的特殊处理
this.container = this.options.container;
// console.log(this.options.loop);
this.loop = this.options.loop;
this.speed = this.options.speed;
this.container.style.position = "relative";
this.container.style.width = this.options.width+"px";
this.container.style.height = this.options.height+"px";
var element = this.container.children[0];
this.slideWrap = element;
this.slideNodeList = this.slideWrap.querySelectorAll(__SLIDER_NODE);
if(!element || !this.slideNodeList){
return;
}
// this.options.pageCount(this.slideNodeList.length);
this.slideWrapWidth = this.slideWrap.offsetWidth;
this.slideNodeListLength = this.slideNodeList.length;
if (this.slideNodeListLength == 2) { //当长度为2时作特殊处理
element.appendChild(this.slideWrap.children[0].cloneNode(true));
element.appendChild(this.slideWrap.children[1].cloneNode(true));
this.slideWrap = element;
this.slideNodeList = this.slideWrap.querySelectorAll(__SLIDER_NODE);
this.slideNodeListLength = this.slideNodeList.length;
this.continuous = false;
}
for (var i = 0; i < this.slideNodeListLength; i++) {
this.slideNodeList[i] && (this.slideNodeList[i].style.webkitTransform = this.slideNodeList[i].style.transform = "translate3d("+(this.slideWrapWidth*i)+"px,0,0)");
}
if(this.slideNodeListLength > 1) {
if(this.options.pageShow){
this.createPagination(0);
this.setPageDotPosition();
}
if(this.options.autoPlay > 500 && this.loop){
this.autoPlay(0);
}
this.slideWrap.addEventListener('touchstart', this.touchStart.bind(this), false);
this.slideWrap.addEventListener('touchmove', this.touchMove.bind(this), false);
this.slideWrap.addEventListener('touchend', this.touchEnd.bind(this), false);
}
};
// 当分页器为圆点时位置设置
auiSlide.prototype.setPageDotPosition = function(){
var self = this;
var pageDotPosition = self.options.dotPosition;
this.container.querySelector(__SLIDE_PAGE_WRAP).style.textAlign = pageDotPosition;
};
// 自动播放
auiSlide.prototype.autoPlay = function (index) {
var self = this;
setInterval(function(){
self.slideTo(self.getCircle(self.index-1), -self.slideWrapWidth, 0);
self.slideTo(self.getCircle(self.index+2), self.slideWrapWidth, 0);
self.slideTo(self.index, -self.slideWrapWidth, self.options.speed);
self.slideTo(self.getCircle(self.index+1), 0, self.options.speed);
self.index = self.getCircle(self.index+1);
self.setPaginationActive(self.index);
}, self.options.autoPlay)
};
// 设置当前分页
auiSlide.prototype.setPaginationActive = function(index){
var self = this;
if(self.options.currentPage){
self.options.currentPage(index);
}
if(!this.container.querySelector(__SLIDE_PAGE_WRAP)){
return;
}
var pageList = this.container.querySelectorAll(__SLIDE_PAGE);
if(this.container.querySelector(__SLIDE_PAGE+__SLIDE_PAGE_ACTIVE)){
this.container.querySelector(__SLIDE_PAGE+__SLIDE_PAGE_ACTIVE).classList.remove(CLASS_SLIDE_PAGE_ACTIVE);
}
if(!this.continuous){
if(this.index == 3){
pageList[1].classList.add(CLASS_SLIDE_PAGE_ACTIVE);
}else if(this.index==2){
pageList[0].classList.add(CLASS_SLIDE_PAGE_ACTIVE);
}else{
pageList[this.index].classList.add(CLASS_SLIDE_PAGE_ACTIVE);
}
}else{
pageList[this.index].classList.add(CLASS_SLIDE_PAGE_ACTIVE);
}
};
// 创建分页器
auiSlide.prototype.createPagination = function(index){
var self = this;
var pageWrap = this.container.querySelector(__SLIDE_PAGE_WRAP);
if(!pageWrap){
return;
}
pageWrap.innerHTML = '';
var pageShowHtml = '';
switch (self.options.pageStyle) {
case "dot":// 原点
if (!this.continuous) {
for (var i = 0; i < 2; i++) {
pageShowHtml += '<span class="'+CLASS_SLIDE_PAGE+' '+CLASS_SLIDE_PAGE_DOT+'"></span>';
}
}else{
for (var i = 0; i < this.slideNodeListLength; i++) {
pageShowHtml += '<span class="'+CLASS_SLIDE_PAGE+' '+CLASS_SLIDE_PAGE_DOT+'"></span>';
}
}
pageWrap.innerHTML = pageShowHtml;
self.setPaginationActive(0);
break;
case "line":// 线条
if (!this.continuous) {
for (var i = 0; i < 2; i++) {
pageShowHtml += '<span class="'+CLASS_SLIDE_PAGE+' '+CLASS_SLIDE_PAGE_LINE+'" style="width:50%"></span>';
}
}else{
for (var i = 0; i < this.slideNodeListLength; i++) {
pageShowHtml += '<span class="'+CLASS_SLIDE_PAGE+' '+CLASS_SLIDE_PAGE_LINE+'" style="width:'+(100/this.slideNodeListLength)+'%"></span>';
}
}
pageWrap.innerHTML = pageShowHtml;
self.setPaginationActive(0);
break;
}
};
// 总页数
auiSlide.prototype.pageCount = function() {
var self = this;
return self.slideNodeList.length;
};
auiSlide.prototype.touchStart = function(event) {
touchStartTime = new Date() * 1;
firstTouchX = parseInt(event.changedTouches[0].pageX);
firstTouchY = parseInt(event.changedTouches[0].pageY);
isScrolling = undefined;
};
auiSlide.prototype.touchMove = function(event) {
var touchMoveObj = event.changedTouches[0],
touchX = parseInt(touchMoveObj.pageX);
touchXDelta = touchX - firstTouchX;
handleTranslateVal = touchXDelta/this.options.friction;
// 滑动位移
offsetX = parseInt(touchMoveObj.pageX) - firstTouchX;
offsetY = parseInt(touchMoveObj.pageY) - firstTouchY;
var direction = this.getDirection(offsetX,offsetY);
if ( typeof isScrolling == 'undefined') {
isScrolling = !!( isScrolling || Math.abs(offsetX) < Math.abs(offsetY) );
}
if(!isScrolling){
event.preventDefault();
if(!this.loop){ //不循环
if(!this.continuous && this.index==1 && direction=='left'){
return;
}
if(!this.continuous && this.index==0 && direction=='right'){
return;
}
if(this.index == this.slideNodeList.length-1){
if(handleTranslateVal <= 0){
return;
}
this.setTranslate(this.getCircle(this.index-1), handleTranslateVal - this.slideWrapWidth, 0);
}else if(this.index == 0){
if(handleTranslateVal >= 0){
return;
}
this.setTranslate(this.getCircle(this.index+1), this.slideWrapWidth, 0);
}
}
this.setTranslate(this.getCircle(this.index-1), handleTranslateVal - this.slideWrapWidth, 0);
this.setTranslate(this.index, handleTranslateVal , 0);
this.setTranslate(this.getCircle(this.index+1), handleTranslateVal + this.slideWrapWidth, 0);
}
};
auiSlide.prototype.touchEnd = function(event) {
var touchEndObj = event.changedTouches[0];
var touchEndX = parseInt(touchEndObj.pageX) - firstTouchX;
var touchEndY = parseInt(touchEndObj.pageY) - firstTouchY;
var touchEndxy = {
x: touchEndObj.pageX || 0,
y: touchEndObj.pageY || 0
};
var moveDirection = this.getDirection(touchEndX,touchEndY); //滑动方向
var boundary = this.slideWrapWidth/4;
var duration = (new Date() * 1) - touchStartTime;
var isValid = Number(duration) < 250 && Math.abs(offsetX) > 20 || Math.abs(offsetX) > boundary;
if (isScrolling) {
return;
}
if(isValid){
if(offsetX < 0){
if(!this.loop && this.index == this.slideNodeList.length-1){
return;
}
if(!this.loop && !this.continuous && this.index==1){
return;
}
if(offsetX < -boundary && moveDirection == 'left'){
// left
this.slideTo(this.getCircle(this.index-1), -this.slideWrapWidth, 0);
this.slideTo(this.getCircle(this.index+2), this.slideWrapWidth, 0);
this.slideTo(this.index, -this.slideWrapWidth, this.speed);
this.slideTo(this.getCircle(this.index+1), 0, this.speed);
this.index = this.getCircle(this.index+1);
}else{
// this.slideTo(this.getCircle(this.index-1), -this.slideWrapWidth, this.speed);
this.slideTo(this.index, 0, this.speed);
this.slideTo(this.getCircle(this.index+1), this.slideWrapWidth, this.speed);
}
}else if(offsetX > 0){
if(!this.loop && this.index == 0){
return;
}
if(!this.loop && !this.continuous && this.index==0){
return;
}
if(offsetX > boundary && moveDirection == 'right'){
// right
this.slideTo(this.getCircle(this.index+1), this.slideWrapWidth, 0);
this.slideTo(this.getCircle(this.index-2), -this.slideWrapWidth, 0);
this.slideTo(this.index, this.slideWrapWidth, this.speed);
this.slideTo(this.getCircle(this.index-1), 0, this.speed);
this.index = this.getCircle(this.index-1);
}else{
// this.slideTo(this.getCircle(this.index-1), -this.slideWrapWidth, this.speed);
this.slideTo(this.index, 0, this.speed);
this.slideTo(this.getCircle(this.index+1), this.slideWrapWidth, this.speed);
}
}
}else{
if(offsetX){
this.slideTo(this.getCircle(this.index-1), -this.slideWrapWidth, this.speed);
this.slideTo(this.index, 0, this.speed);
this.slideTo(this.getCircle(this.index+1), this.slideWrapWidth, this.speed);
}
}
this.setPaginationActive(this.index);
};
auiSlide.prototype.setTranslate = function (index,dist,speed){
if(this.slideNodeList[index]){
this.slideNodeList[index].style.webkitTransitionDuration =
this.slideNodeList[index].style.transitionDuration = speed + 'ms';
this.slideNodeList[index].style.webkitTransform =
this.slideNodeList[index].style.transform = "translate3d("+dist+"px,0,0)";
}
};
auiSlide.prototype.slideTo = function (index, dist, speed) {
this.setTranslate(index, dist, speed);
// index = dist;
};
auiSlide.prototype.getCircle = function (index) {
return (this.slideNodeListLength + (index % this.slideNodeListLength)) % this.slideNodeListLength;
};
auiSlide.prototype.getDirection = function(x, y) {
if (x === y) { return '';}
if (Math.abs(x) >= Math.abs(y)) {
return x > 0 ? 'right' : 'left';
} else {
return y > 0 ? 'down' : 'up';
}
}
function extend (a, b) {
for (var key in b) {
if (b.hasOwnProperty(key)) {
a[key] = b[key];
}
}
return a;
}
function auiSlide (options) {
this._init(options);
}
window.auiSlide = auiSlide;
})(window);

View File

@@ -0,0 +1,69 @@
/**
* aui-tab.js
* @author 流浪男
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiTab = function(params,callback) {
this.extend(this.params, params);
this._init(callback);
};
var tabItems;
auiTab.prototype = {
params: {
element: false,
index: 1, //默认选中
repeatClick: false //是否允许重复点击
},
_init: function(callback) {
var self = this;
if(!self.params.element || self.params.element.nodeType!=1){
return;
}
tabItems = self.params.element.children;
if(tabItems){
self.setActive();
for(var i=0; i<tabItems.length; i++){
tabItems[i].setAttribute("tapmode","");
tabItems[i].setAttribute("data-item-order",i);
tabItems[i].onclick = function(e){
if(!self.params.repeatClick){
if(this.className.indexOf("aui-active") > -1)return;
}
if(callback){
callback({
index: parseInt(this.getAttribute("data-item-order"))+1,
dom:this
})
};
this.parentNode.querySelector(".aui-active").classList.remove("aui-active");
this.classList.add("aui-active");
}
}
}
},
setRepeat:function(value){
var self = this;
self.params.repeatClick = value ? value : false;
},
setActive: function(index){
var self = this;
index = index ? index : self.params.index;
var _tab = tabItems[index-1];
if(_tab.parentNode.querySelector(".aui-active"))_tab.parentNode.querySelector(".aui-active").classList.remove("aui-active");
_tab.classList.add("aui-active");
},
extend: function(a, b) {
for (var key in b) {
if (b.hasOwnProperty(key)) {
a[key] = b[key];
}
}
return a;
}
};
window.auiTab = auiTab;
})(window);

View File

@@ -0,0 +1,92 @@
/**
* aui-popup.js
* @author 流浪男
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
(function( window, undefined ) {
"use strict";
var auiToast = function() {
// this.create();
};
var isShow = false;
auiToast.prototype = {
create: function(params,callback) {
var self = this;
var toastHtml = '';
switch (params.type) {
case "success":
var iconHtml = '<i class="aui-iconfont aui-icon-correct"></i>';
break;
case "fail":
var iconHtml = '<i class="aui-iconfont aui-icon-close"></i>';
break;
case "custom":
var iconHtml = params.html;
break;
case "loading":
var iconHtml = '<div class="aui-toast-loading"></div>';
break;
}
var titleHtml = params.title ? '<div class="aui-toast-content">'+params.title+'</div>' : '';
toastHtml = '<div class="aui-toast">'+iconHtml+titleHtml+'</div>';
if(document.querySelector(".aui-toast"))return;
document.body.insertAdjacentHTML('beforeend', toastHtml);
var duration = params.duration ? params.duration : "2000";
self.show();
if(params.type == 'loading'){
if(callback){
callback({
status: "success"
});
};
}else{
setTimeout(function(){
self.hide();
}, duration)
}
},
show: function(){
var self = this;
document.querySelector(".aui-toast").style.display = "block";
document.querySelector(".aui-toast").style.marginTop = "-"+Math.round(document.querySelector(".aui-toast").offsetHeight/2)+"px";
if(document.querySelector(".aui-toast"))return;
},
hide: function(){
var self = this;
if(document.querySelector(".aui-toast")){
document.querySelector(".aui-toast").parentNode.removeChild(document.querySelector(".aui-toast"));
}
},
remove: function(){
if(document.querySelector(".aui-dialog"))document.querySelector(".aui-dialog").parentNode.removeChild(document.querySelector(".aui-dialog"));
if(document.querySelector(".aui-mask")){
document.querySelector(".aui-mask").classList.remove("aui-mask-out");
}
return true;
},
success: function(params,callback){
var self = this;
params.type = "success";
return self.create(params,callback);
},
fail: function(params,callback){
var self = this;
params.type = "fail";
return self.create(params,callback);
},
custom:function(params,callback){
var self = this;
params.type = "custom";
return self.create(params,callback);
},
loading:function(params,callback){
var self = this;
params.type = "loading";
return self.create(params,callback);
}
};
window.auiToast = auiToast;
})(window);

View File

@@ -0,0 +1 @@
35a5fb8e-2e97-4fb3-a98f-b9aacda15eec

View File

@@ -0,0 +1 @@
64075eee-f75d-4737-a507-00cce54221f7

View File

@@ -0,0 +1,50 @@
.aui-fold-active {
background: #f4f4f4;
}
.aui-fold-active .aui-fold-content {
display:block;
}
.aui-fold-content {
position: relative;
display: none;
margin: 12px -15px -12px;
padding-left: 15px;
background: #fff;
}
.aui-fold .aui-arrow-right {
position: relative;
display: block;
overflow: hidden;
margin: -12px -15px;
padding: inherit;
white-space: nowrap;
text-overflow: ellipsis;
color: inherit;
}
.aui-fold-ccontent-full {
margin-left: -15px;
margin-right: -15px;
padding: 0;
width: auto;
}
.aui-fold > .aui-arrow-right:after {
content: "\e661";
}
.aui-fold-active > .aui-arrow-right:after{
content: "\e6de"
}
.aui-fold-content .aui-list-view,
.aui-fold-content .aui-user-view {
margin-bottom: 0;
}
.aui-fold-content .aui-list-view:after,
.aui-fold-content .aui-user-view:after,
.aui-fold-content .aui-input-row:first-child:after {
border-top: 0;
}
.aui-fold-content .aui-list-view-cell:last-child:after,
.aui-fold-content .aui-user-view-cell:last-child:after,
.aui-fold-content .aui-input-row:last-child:after,
.aui-fold-content .aui-btn-row:last-child:after {
border-bottom: 0;
}

View File

@@ -0,0 +1,272 @@
/*
* =========================================================================
* APIClud - AUI UI 框架 流浪男 QQ343757327 http://www.auicss.com
* Verson 1.0
* =========================================================================
*/
@charset "UTF-8";
html{
font-family: "Helvetica Neue", Helvetica, sans-serif;
font-size: 20px;
}
html,body {
-webkit-touch-callout:none;
-webkit-text-size-adjust:none;
-webkit-tap-highlight-color:rgba(0, 0, 0, 0);
-webkit-user-select:none;
width: 100%;
}
body {
line-height: 1.5;
font-size: 0.8rem;
color: #212121;
background-color: #f5f5f5;
outline: 0;
}
html,body,header,section,footer,div,ul,ol,li,img,a,span,em,del,legend,center,strong,var,fieldset,form,label,dl,dt,dd,cite,input,hr,time,mark,code,figcaption,figure,textarea,h1,h2,h3,h4,h5,h6,p{
margin:0;
border:0;
padding:0;
font-style:normal;
}
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-user-select: none;
-webkit-tap-highlight-color: transparent;
outline: none;
}
@media only screen and (min-width: 400px) {
html {
font-size: 21.33333333px !important;
}
}
@media only screen and (min-width: 414px) {
html {
font-size: 21px !important;
}
}
@media only screen and (min-width: 480px) {
html {
font-size: 25.6px !important;
}
}
.aui-flex-col,
.aui-flex-row {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
.aui-flex-col:before,
.aui-flex-row:before,
.aui-flex-col:after,
.aui-flex-row:after {
content: " ";
display: -webkit-box;
display: -webkit-flex;
display: flex;
box-sizing: border-box;
}
.aui-flex-col:after,
.aui-flex-row:after {
clear: both;
}
.aui-flex-col {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-webkit-flex-direction: row;
flex-direction: row;
}
.aui-flex-row {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
}
/*栅格*/
.aui-flex-item-1 {
float: left;
width: 8.33333333%;
}
.aui-flex-offset-1 {
margin-left: 8.33333333%;
}
.aui-flex-item-2 {
float: left;
width: 16.66666667%;
}
.aui-flex-offset-2 {
margin-left: 16.66666667%;
}
.aui-flex-item-3 {
float: left;
width: 25%;
}
.aui-flex-offset-3 {
margin-left: 25%;
}
.aui-flex-item-4 {
float: left;
width: 33.33333333%;
}
.aui-flex-offset-4 {
margin-left: 33.33333333%;
}
.aui-flex-item-5 {
float: left;
width: 41.66666667%;
}
.aui-flex-offset-5 {
margin-left: 41.66666667%;
}
.aui-flex-item-6 {
float: left;
width: 50%;
}
.aui-flex-offset-6 {
margin-left: 50%;
}
.aui-flex-item-7 {
float: left;
width: 58.33333333%;
}
.aui-flex-offset-7 {
margin-left: 58.33333333%;
}
.aui-flex-item-8 {
float: left;
width: 66.66666667%;
}
.aui-flex-offset-8 {
margin-left: 66.66666667%;
}
.aui-flex-item-9 {
float: left;
width: 75%;
}
.aui-flex-offset-9 {
margin-left: 75%;
}
.aui-flex-item-10 {
float: left;
width: 83.33333333%;
}
.aui-flex-offset-10 {
margin-left: 83.33333333%;
}
.aui-flex-order-10 {
-webkit-box-ordinal-group: 11;
-webkit-order: 10;
order: 10;
}
.aui-flex-item-11 {
float: left;
width: 91.66666667%;
}
.aui-flex-offset-11 {
margin-left: 91.66666667%;
}
.aui-flex-item-12 {
float: left;
width: 100%;
}
.aui-flex-offset-12 {
margin-left: 100%;
}
.aui-flex-auto {
float: left;
-webkit-box-flex: 1;
-webkit-flex-grow: 1;
flex-grow: 1;
}
.aui-flex-between {
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between;
}
/*对齐*/
.aui-flex-col.aui-flex-left {
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
}
.aui-flex-col.aui-flex-right {
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.aui-flex-col.aui-flex-top {
-webkit-box-align: start;
-webkit-align-items: flex-start;
align-items: flex-start;
}
.aui-flex-col.aui-flex-bottom {
-webkit-box-align: end;
-webkit-align-items: flex-end;
align-items: flex-end;
}
.aui-flex-col.aui-flex-center {
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
.aui-flex-col.aui-flex-middle {
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
}
.aui-flex-row.aui-flex-left {
-webkit-box-align: start;
-webkit-align-items: flex-start;
align-items: flex-start;
}
.aui-flex-row.aui-flex-right {
-webkit-box-align: end;
-webkit-align-items: flex-end;
align-items: flex-end;
}
.aui-flex-row.aui-flex-top {
-webkit-box-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start;
}
.aui-flex-row.aui-flex-bottom {
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end;
}
.aui-flex-row.aui-flex-center {
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
}
.aui-flex-row.aui-flex-middle {
-webkit-box-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
[class*=aui-flex-item-]{
position: relative;
}
[class*=aui-flex-auto].aui-flex-left {
margin-right: auto;
}
[class*=aui-flex-auto].aui-flex-right {
margin-left: auto;
}
[class*=aui-flex-auto].aui-flex-top {
margin-bottom: auto;
}
[class*=aui-flex-auto].aui-flex-bottom {
margin-top: auto;
}
[class*=aui-flex-auto].aui-flex-center {
margin-left: auto;
margin-right: auto;
}
[class*=aui-flex-auto].aui-flex-middle {
margin-top: auto;
margin-bottom: auto;
}

View File

@@ -0,0 +1,54 @@
/**
* aui-pull-refresh.css 下拉刷新
* verson 0.0.1
* @author 流浪男 && Beck
* http://www.auicss.com
* @todo more things to abstract, e.g. Loading css etc.
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
.aui-refresh-content {
position: relative;
-webkit-overflow-scrolling: touch;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.aui-refresh-load {
width: 100%;
height: 2.2rem;
position: absolute;
top: -2.2rem;
left: 0;
padding: 0.75rem 0;
}
.aui-refresh-pull-arrow {
width: 1.2rem;
height: 1.2rem;
position: absolute;
left: 50%;
top: 50%;
visibility: visible;
margin-left: -0.6rem;
margin-top: -0.6rem;
background: no-repeat center;
background-image: url('data:image/svg+xml;charset=utf-8,<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path d="M99.225 3.528c8.34 0 15.104 6.763 15.104 15.105 0 8.34-6.766 15.105-15.105 15.105-8.342 0-15.105-6.763-15.105-15.105S90.883 3.528 99.225 3.528zM76.567 48.843h45.315c4.17 0 7.552 3.38 7.552 7.552v5.035c0 4.172-3.382 7.552-7.552 7.552H76.567c-4.172 0-7.553-3.38-7.553-7.552v-5.035c0-4.172 3.38-7.552 7.553-7.552zm-10.07 35.245h65.455c4.17 0 7.552 3.38 7.552 7.552v5.035c0 4.172-3.382 7.552-7.552 7.552H66.497c-4.172 0-7.553-3.38-7.553-7.552V91.64c0-4.172 3.38-7.552 7.553-7.552zm8.044 87.596c-20.397-23.16-45.805-52.352-45.805-52.352h140.98s-25.146 28.735-45.4 51.884c-33.454 38.234-18.118 36.4-49.774.468z" fill="#707070" class="transform-group"/></svg>');
background-size: 1.2rem 1.2rem;
z-index: 10;
-webkit-transform: rotate(0deg) translate3d(0, 0, 0);
transform: rotate(0deg) translate3d(0, 0, 0);
-webkit-transition-duration: 300ms;
transition-duration: 300ms;
}
.aui-refresh-content.aui-refresh-pull-down .aui-refresh-pull-arrow {
-webkit-transform: rotate(0deg) translate3d(0,0,0);
transform: rotate(0deg) translate3d(0,0,0);
}
.aui-refresh-content.aui-refresh-pull-up .aui-refresh-pull-arrow {
-webkit-transform: rotate(180deg) translate3d(0,0,0);
transform: rotate(180deg) translate3d(0,0,0);
}
.aui-refreshing .aui-refresh-pull-arrow{
background-image: url('data:image/svg+xml;charset=utf-8,<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path d="M99.917.167C45.52.167 1.28 43.642.03 97.737c1.153-47.204 37.045-85.08 81.153-85.08 44.834 0 81.184 39.147 81.184 87.426 0 10.346 8.387 18.738 18.733 18.738 10.342 0 18.733-8.39 18.733-18.737C199.833 44.9 155.1.167 99.917.167zm0 199.833c54.395 0 98.637-43.475 99.883-97.57-1.15 47.2-37.042 85.082-81.15 85.082-44.833 0-81.183-39.15-81.183-87.43 0-10.34-8.392-18.732-18.738-18.732C8.39 81.35 0 89.737 0 100.083 0 155.267 44.733 200 99.917 200z" fill="#707070" class="transform-group"/></svg>');
-webkit-animation: rotate 1s 0s linear infinite;
animation: rotate 1s 0s linear infinite;
}

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