Compare commits

...

18 Commits

Author SHA1 Message Date
Dragon
bff8714b41 修改跳掉app逻辑 2024-02-01 14:46:45 +08:00
Dragon
7f12abf13f 新增唤起app逻辑 2024-02-01 11:55:34 +08:00
Dragon
c6410f6d33 调整弹窗 2024-01-25 16:00:50 +08:00
Dragon
fc98b7f93c 调整联系我们弹窗 2024-01-25 15:53:51 +08:00
Dragon
1fbc64721e 替换pc图 2024-01-25 14:30:12 +08:00
Dragon
1694d222d6 优化体验 2024-01-25 12:34:27 +08:00
Dragon
d44a302a2f 优化体验 2024-01-25 12:25:49 +08:00
Dragon
d459bb3a93 压缩图片 2024-01-24 20:22:59 +08:00
Dragon
9def117874 修改移动端判断 2024-01-24 20:14:49 +08:00
Dragon
6a84f98e41 适配官网 2024-01-24 20:10:25 +08:00
Dragon
ebc54bd4a0 修复点击字段传参 2024-01-23 17:20:11 +08:00
Dragon
c08811e593 修改点击下载传参 2024-01-23 15:59:37 +08:00
Dragon
08656587a1 修改下拉菜单异常问题 2024-01-23 15:35:12 +08:00
Dragon
195c550ef1 修复一直加载中问题 2024-01-23 15:15:42 +08:00
Dragon
c18cd57b9e 修复bug 2024-01-23 14:26:42 +08:00
Dragon
e717dd00ba 优化官网 2024-01-22 21:52:55 +08:00
Dragon
490a2e698d 暂存 2024-01-22 21:52:55 +08:00
Dragon
8da092a707 暂存 2024-01-22 21:52:54 +08:00
99 changed files with 4381 additions and 1046 deletions

7
view/peko/home/css/animate.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,252 +1,676 @@
@media screen and (min-width: 769px) {
.h5 {
display: none;
}
body, body,
html { html {
width: 100%; width: 100%;
height: 100%; height: 100%;
font-family: "Heiti SC", "Microsoft Sans Serif"; background: linear-gradient(180deg, #302286 0%, #0E0B24 100%);
font-family: Avenir, Avenir;
cursor: pointer;
} }
body .container,
.container { html .container {
position: relative; position: relative;
} }
body .pc-bg,
@media screen and (min-width: 769px) { html .pc-bg {
.m-bg {
display: none; display: none;
} }
.m-bg img { body .homePc,
display: block; html .homePc {
}
.homePc {
width: 100%; width: 100%;
height: 10rem; height: 10rem;
background: url(../images/homePc2.png) no-repeat; background: url(../images/pcBgBig.png) no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
position: relative; position: relative;
} }
.homePc .charge { body .homePc .diamound,
width: 1.11rem; html .homePc .diamound {
width: 1.2rem;
height: 0.5rem; height: 0.5rem;
line-height: 0.46667rem;
color: #FFFFFF;
font-size: 0.25rem;
text-align: center;
background: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.2);
border-radius: .13rem; border-radius: 0.53333rem;
font-size: 0.24rem; box-sizing: border-box;
color: #fff; border: 1px solid #fff;
text-align: center;
line-height: 0.5rem;
position: absolute; position: absolute;
top: 0.16rem; right: 3.46667rem;
right: 2.77rem; top: 0.3rem;
vertical-align: middle;
} }
.homePc .googlePlay { body .homePc .diamound img,
width: 2.2rem; html .homePc .diamound img {
height: 0.7rem; display: inline-block;
width: 0.33rem;
height: 0.33rem;
vertical-align: middle;
margin-top: -0.01rem;
}
body .homePc .pcIos,
html .homePc .pcIos {
width: 2.9rem;
height: 0.64rem;
position: absolute; position: absolute;
left: 2.4rem; right: 5rem;
bottom: 3.4rem; top: 5.855rem;
} }
.homePc .appleStore { body .homePc .pcAnd,
width: 2.2rem; html .homePc .pcAnd {
height: 0.7rem; width: 2.9rem;
height: 0.64rem;
position: absolute; position: absolute;
left: 2.4rem; right: 5rem;
bottom: 2.5rem; top: 6.79rem;
} }
.homePc .apk { body .bootom,
width: 2.2rem; html .bootom {
height: 0.7rem;
position: absolute;
left: 2.4rem;
bottom: 1.6rem;
}
.eori {
width: 100%; width: 100%;
background: #30312C; position: fixed;
color: white; left: 0;
padding: 0.2rem 0; bottom: 0;
vertical-align: top; background: #0F0B27;
}
.eori .gongsi {
display: flex;
justify-content: center;
text-align: center; text-align: center;
color: #fff;
padding-bottom: 0.2rem;
padding-top: 0.1rem;
} }
.eori .gongsi p { body .bootom p,
font-size: 0.2rem; html .bootom p {
} margin-bottom: 0.1rem;
.eori .gongsi p:nth-child(2) { font-size: 0.15rem;
margin: 0 0.2rem; color: #B8B7BF;
} }
} }
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
body { .pc,
background-color: #0C0122; .homePc {
}
.pc-bg {
display: none; display: none;
} }
.m-bg { body,
html {
width: 100%;
height: 100%;
background: #0E0B24;
}
body .header,
html .header {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 1.2rem;
box-sizing: border-box;
padding: 0 0.53333rem;
margin: 0.26667rem auto 0;
z-index: 3;
}
body .header .line,
html .header .line {
width: 90%;
height: 0.02667rem;
background: #fff;
opacity: .3;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0;
}
body .header .logo,
html .header .logo {
display: block; display: block;
width: 0.85333rem;
height: 0.85333rem;
margin-right: 0.21333rem;
float: left;
} }
.homeM { body .header .name,
width: 100%; html .header .name {
height: 14.89rem; font-size: 0.46667rem;
background: url(../images/homeM.png) no-repeat; color: #FFFFFF;
background-size: 100% 100%; font-weight: 800;
position: relative; float: left;
margin-top: 0.2rem;
} }
.homeM .charge { body .header .diamound,
width: 1.11rem; html .header .diamound {
height: 0.5rem; width: 1.86667rem;
background: rgba(255, 255, 255, 0.2); height: 0.74667rem;
border-radius: .13rem; line-height: 0.74667rem;
font-size: 0.24rem; box-sizing: border-box;
border: 1px solid #fff;
vertical-align: middle;
color: #fff; color: #fff;
font-size: 0.32rem;
float: right;
margin-top: 0.05333rem;
margin-right: 0.42667rem;
text-align: center; text-align: center;
line-height: 0.5rem; border-radius: 0.74667rem;
position: absolute;
top: 0.2rem;
right: 0.4rem;
} }
.homeM .swiper { body .header .diamound img,
html .header .diamound img {
vertical-align: middle;
width: 0.50667rem;
height: 0.42667rem;
display: inline-block;
margin-top: -0.1rem;
}
body .header .more,
html .header .more {
float: right;
width: 0.53333rem;
height: 0.53333rem;
display: block;
margin-top: 0.16rem;
}
body .h5,
html .h5 {
display: block;
width: 100%; width: 100%;
height: 8.6rem; height: 100%;
position: absolute;
top: 4.8rem;
overflow: hidden; overflow: hidden;
} }
.homeM .swiper .swiper-wrapper { body .h5 .pagesBox,
width: 60%; html .h5 .pagesBox {
height: 100%;
}
.homeM .swiper .swiper-wrapper .swiper-slide img {
width: 100%; width: 100%;
height: 100%; height: 100%;
transition: all .5s;
transform: translateY(0%);
} }
.homeM .swiper .swiper-wrapper .swiper-slide-prev { body .h5 .pagesBox .page1,
html .h5 .pagesBox .page1 {
width: 100%; width: 100%;
height: 90%; height: 100%;
margin-top: 0.6rem; position: relative;
overflow: hidden;
background: url(../images/h51.png) no-repeat center;
background-size: 10rem 100%;
} }
.homeM .swiper .swiper-wrapper .swiper-slide-next { body .h5 .pagesBox .page1 .pageTxte1,
width: 100%; html .h5 .pagesBox .page1 .pageTxte1 {
height: 90%; width: 6.42667rem;
margin-top: 0.6rem; height: 1.33333rem;
}
.homeM .logo {
position: absolute; position: absolute;
bottom: 0.6rem; left: 1.44rem;
left: 0; top: 5.01333rem;
width: 100%;
display: flex;
justify-content: space-evenly;
} }
.homeM .logo img { body .h5 .pagesBox .page1 .pageTxte2,
width: 2.2rem; html .h5 .pagesBox .page1 .pageTxte2 {
height: 0.7rem; width: 6.42667rem;
} height: 1.33333rem;
.button-wrapper {
display: block;
position: absolute; position: absolute;
left: 1.28rem; right: 1.44rem;
top: 17.52rem; top: 6.77333rem;
width: 7.46667rem; }
body .h5 .pagesBox .page1 .downioad,
html .h5 .pagesBox .page1 .downioad {
width: 4.98667rem;
height: 1.22667rem; height: 1.22667rem;
}
.button-wrapper a {
display: inline-block;
width: 100%;
height: 100%;
}
.button2-wrapper {
display: block;
position: absolute; position: absolute;
left: 3.09333rem; left: 50%;
bottom: 1.70667rem; transform: translateX(-50%);
width: 4rem; bottom: 2.96rem;
height: 0.8rem; display: block;
background: rgba(255, 255, 255, 0);
} }
.button2-wrapper a { body .h5 .pagesBox .page1 .down,
display: inline-block; html .h5 .pagesBox .page1 .down {
width: 0.50667rem;
height: 0.37333rem;
position: absolute;
left: 48%;
bottom: 0.26667rem;
}
body .h5 .pagesBox .page2,
html .h5 .pagesBox .page2 {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative;
overflow: hidden;
} }
.m-button { body .h5 .pagesBox .page2 .pageText2,
html .h5 .pagesBox .page2 .pageText2 {
width: 10rem;
height: 10.85333rem;
position: relative;
top: 3.44rem;
margin: 0 auto;
display: block;
display: none;
}
body .h5 .pagesBox .page2 .page2_in,
html .h5 .pagesBox .page2 .page2_in {
width: 10rem;
height: 11.65333rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 2.50667rem;
}
body .h5 .pagesBox .page2 .pagetx1,
html .h5 .pagesBox .page2 .pagetx1 {
width: 6.34667rem;
height: 4.10667rem;
position: absolute;
left: 3.12rem;
top: 4.56rem;
}
body .h5 .pagesBox .page2 .pagetx2,
html .h5 .pagesBox .page2 .pagetx2 {
width: 6.34667rem;
height: 4.10667rem;
position: absolute;
left: 0.53333rem;
top: 9.17333rem;
}
body .h5 .pagesBox .page2 .downioad,
html .h5 .pagesBox .page2 .downioad {
width: 4.98667rem;
height: 1.12rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 1.66667rem;
display: block; display: block;
} }
.text-wrapper { body .h5 .pagesBox .page2 .down,
padding-left: 0; html .h5 .pagesBox .page2 .down {
width: 90%; width: 0.50667rem;
margin-left: -45%;
padding-top: 108px;
}
.text-wrapper .text .txt1 {
margin-bottom: 10px;
}
.text-wrapper .text1,
.text-wrapper p {
text-align: center;
}
.eori {
width: 100%;
background: #30312C;
color: white;
padding: 0.2rem 0;
}
.eori .recordfoot {
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
.eori .recordfoot .record {
display: inline-block;
padding-right: 0.05333rem;
height: 0.37333rem; height: 0.37333rem;
width: 0.42667rem; position: absolute;
background: url(../images/icon_police.png) no-repeat; left: 48%;
bottom: 0.26667rem;
} }
.eori .gongsi { body .h5 .pagesBox .page3,
html .h5 .pagesBox .page3 {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}
body .h5 .pagesBox .page3 .pageText3,
html .h5 .pagesBox .page3 .pageText3 {
width: 6.82667rem;
height: 1.52rem;
position: relative;
display: block; display: block;
margin: 0 auto;
top: 2.8rem;
display: none;
}
body .h5 .pagesBox .page3 .page3_in,
html .h5 .pagesBox .page3 .page3_in {
width: 10rem;
height: 11.65333rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 2.50667rem;
}
body .h5 .pagesBox .page3 .page3Icon1,
html .h5 .pagesBox .page3 .page3Icon1 {
width: 4.09333rem;
height: 2.93333rem;
position: absolute;
left: 5.68rem;
top: 5.65333rem;
}
body .h5 .pagesBox .page3 .page3Icon2,
html .h5 .pagesBox .page3 .page3Icon2 {
width: 4.32rem;
height: 3.09333rem;
position: absolute;
left: 0rem;
top: 4.85333rem;
}
body .h5 .pagesBox .page3 .page3Icon3,
html .h5 .pagesBox .page3 .page3Icon3 {
width: 4.32rem;
height: 3.09333rem;
position: absolute;
right: 0rem;
top: 10rem;
}
body .h5 .pagesBox .page3 .page3Icon4,
html .h5 .pagesBox .page3 .page3Icon4 {
width: 3.78667rem;
height: 2.72rem;
position: absolute;
left: 0rem;
top: 11.14667rem;
}
body .h5 .pagesBox .page3 .downioad,
html .h5 .pagesBox .page3 .downioad {
width: 4.98667rem;
height: 1.12rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 1.66667rem;
display: block;
}
body .h5 .pagesBox .page3 .down,
html .h5 .pagesBox .page3 .down {
width: 0.50667rem;
height: 0.37333rem;
position: absolute;
left: 48%;
bottom: 0.26667rem;
}
body .h5 .pagesBox .page4,
html .h5 .pagesBox .page4 {
width: 100%;
height: 100%;
position: relative;
overflow: hidden;
}
body .h5 .pagesBox .page4 .pageText4,
html .h5 .pagesBox .page4 .pageText4 {
width: 6.4rem;
height: 1.52rem;
position: relative;
top: 2.8rem;
display: block;
margin: 0 auto;
display: none;
}
body .h5 .pagesBox .page4 .page4_in,
html .h5 .pagesBox .page4 .page4_in {
width: 10rem;
height: 11.65333rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 2.50667rem;
}
body .h5 .pagesBox .page4 .page4Icon1,
html .h5 .pagesBox .page4 .page4Icon1 {
width: 5.57333rem;
height: 5.12rem;
position: absolute;
left: 0rem;
top: 5.12rem;
}
body .h5 .pagesBox .page4 .page4Icon2,
html .h5 .pagesBox .page4 .page4Icon2 {
width: 5.57333rem;
height: 5.12rem;
position: absolute;
right: 0rem;
top: 8.58667rem;
}
body .h5 .pagesBox .page4 .downioad,
html .h5 .pagesBox .page4 .downioad {
width: 4.98667rem;
height: 1.12rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 1.66667rem;
display: block;
}
body .h5 .pagesBox .page4 .down,
html .h5 .pagesBox .page4 .down {
width: 0.50667rem;
height: 0.37333rem;
position: absolute;
left: 48%;
bottom: 0.26667rem;
}
body .h5 .pagesBox .page5,
html .h5 .pagesBox .page5 {
width: 100%;
height: 100%;
background: url(../images/h55.png) no-repeat center;
background-size: 100% 17.92rem;
position: relative;
overflow: hidden;
}
body .h5 .pagesBox .page5 .pageTxte5,
html .h5 .pagesBox .page5 .pageTxte5 {
width: 6.61333rem;
height: 4.42667rem;
position: relative;
top: 3.41333rem;
display: block;
margin: 0 auto;
}
body .h5 .pagesBox .page5 .contactUs,
html .h5 .pagesBox .page5 .contactUs {
width: 3.62667rem;
height: 1.22667rem;
position: absolute;
display: block;
margin: 0 auto;
left: 50%;
transform: translateX(-50%);
bottom: 5.14667rem;
}
body .h5 .pagesBox .page5 .bootom,
html .h5 .pagesBox .page5 .bootom {
width: 100%;
position: absolute;
bottom: 0.32rem;
left: 0;
text-align: center; text-align: center;
color: #B4B4BA;
font-size: 0.32rem;
} }
.eori .gongsi p { body .h5 .pagesBox .page5 .bootom p,
line-height: 1.3; html .h5 .pagesBox .page5 .bootom p {
font-size: 0.2rem; margin-bottom: 0.10667rem;
} }
.eori .gongsi p:nth-child(2) { body .h5 .pagesBox .page5 .downioad,
margin: 0; html .h5 .pagesBox .page5 .downioad {
width: 4.98667rem;
height: 1.22667rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 2.96rem;
display: block;
} }
.eori .tit { body .h5 .pagesBox .page5 .down,
height: 1.6rem; html .h5 .pagesBox .page5 .down {
line-height: 1.6rem; width: 0.50667rem;
text-align: center; height: 0.37333rem;
font-size: 20px; position: absolute;
left: 48%;
bottom: 0.26667rem;
} }
} body .h5 .menu,
html .h5 .menu {
.toast { width: 100%;
background: rgba(0, 0, 0, 0.9); height: 0%;
border-radius: 10px; background: #0E0B24;
width: 100px;
font-size: 16px;
position: fixed; position: fixed;
transition: all .2s;
left: 0;
top: 0;
overflow: hidden;
}
body .h5 .menu .top,
html .h5 .menu .top {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 1.2rem;
box-sizing: border-box;
padding: 0 0.53333rem;
margin: 0.26667rem auto 0;
z-index: 3;
top: 0;
left: 50%;
transform: translateX(-50%);
}
body .h5 .menu .top .line,
html .h5 .menu .top .line {
width: 90%;
height: 0.02667rem;
background: #fff;
opacity: .3;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0;
}
body .h5 .menu .top .logo,
html .h5 .menu .top .logo {
display: block;
width: 0.85333rem;
height: 0.85333rem;
margin-right: 0.21333rem;
float: left;
}
body .h5 .menu .top .name,
html .h5 .menu .top .name {
font-size: 0.46667rem;
color: #FFFFFF;
font-weight: 800;
float: left;
margin-top: 0.2rem;
}
body .h5 .menu .top .diamound,
html .h5 .menu .top .diamound {
width: 1.86667rem;
height: 0.74667rem;
line-height: 0.74667rem;
box-sizing: border-box;
border: 1px solid #fff;
vertical-align: middle;
color: #fff;
font-size: 0.32rem;
float: right;
margin-top: 0.05333rem;
margin-right: 0.42667rem;
text-align: center;
border-radius: 0.74667rem;
}
body .h5 .menu .top .diamound img,
html .h5 .menu .top .diamound img {
vertical-align: middle;
width: 0.50667rem;
height: 0.42667rem;
display: inline-block;
margin-top: -0.1rem;
}
body .h5 .menu .top .close,
html .h5 .menu .top .close {
float: right;
width: 0.53333rem;
height: 0.53333rem;
display: block;
margin-top: 0.16rem;
}
body .h5 .menu ul,
html .h5 .menu ul {
width: 100%;
height: 1.2rem;
box-sizing: border-box;
padding: 0 0.53333rem;
margin: 1.6rem auto 0;
}
body .h5 .menu ul li,
html .h5 .menu ul li {
width: 100%;
height: 1.54667rem;
line-height: 1.54667rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
display: flex;
justify-content: space-between;
}
body .h5 .menu ul li span,
html .h5 .menu ul li span {
color: #FFFFFF;
font-size: 0.42667rem;
}
body .h5 .menu ul li img,
html .h5 .menu ul li img {
width: 0.42667rem;
height: 0.42667rem;
display: block;
margin-top: 0.58667rem;
}
body .contactUs_pub,
html .contactUs_pub {
position: fixed;
z-index: 99;
left: 0;
top: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
display: none;
}
body .contactUs_pub .contactUs_pub_in,
html .contactUs_pub .contactUs_pub_in {
width: 7.8rem;
height: 6.4rem;
left: 50%; left: 50%;
top: 50%; top: 50%;
position: relative;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
color: #fff; background: #fff;
height: 40px; border-radius: 0.42667rem;
line-height: 40px; overflow: hidden;
}
body .contactUs_pub .contactUs_pub_in .sClose,
html .contactUs_pub .contactUs_pub_in .sClose {
width: 0.42667rem;
height: 0.42667rem;
position: absolute;
right: 0.42667rem;
top: 0.34667rem;
}
body .contactUs_pub .contactUs_pub_in .title,
html .contactUs_pub .contactUs_pub_in .title {
text-align: center; text-align: center;
display: none; width: 100%;
z-index: 9; margin-top: 0.48rem;
margin-bottom: 0.21333rem;
color: #1F1B4F;
font-size: 0.42667rem;
font-weight: 600;
}
body .contactUs_pub .contactUs_pub_in ul,
html .contactUs_pub .contactUs_pub_in ul {
width: 7.2rem;
margin: 0 auto 0;
}
body .contactUs_pub .contactUs_pub_in ul li,
html .contactUs_pub .contactUs_pub_in ul li {
width: 100%;
height: 1.49333rem;
line-height: 1.49333rem;
border-bottom: 0.02667rem solid #EBECF0;
}
body .contactUs_pub .contactUs_pub_in ul li img,
html .contactUs_pub .contactUs_pub_in ul li img {
display: block;
width: 0.64rem;
height: 0.64rem;
float: left;
margin-top: 0.42667rem;
margin-right: 0.58667rem;
}
body .contactUs_pub .contactUs_pub_in ul li span,
html .contactUs_pub .contactUs_pub_in ul li span {
display: block;
float: left;
height: 100%;
color: #1F1B4F;
font-size: 0.37333rem;
font-weight: 500;
}
body .contactUs_pub .contactUs_pub_in ul li span b,
html .contactUs_pub .contactUs_pub_in ul li span b {
color: #1F1B4F;
font-weight: bold;
} }
.tips {
display: none;
position: fixed;
top: 0;
right: 0.26667rem;
width: 6.13333rem;
z-index: 9;
} }

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 954 B

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 KiB

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -2,105 +2,168 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" <meta name="viewport" content="width=device-width, initial-scale=1.0">
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="renderer" content="webkit">
<meta name="format-detection" content="telphone=no, email=no" />
<meta name="HandheldFriendly" content="true">
<meta name="MobileOptimized" content="375">
<meta name="screen-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
<meta name="full-screen" content="yes">
<meta name="x5-fullscreen" content="true">
<meta name="browsermode" content="application">
<meta name="x5-page-mode" content="app">
<meta name="msapplication-tap-highlight" content="no">
<meta name="apple-mobile-web-app-capable" content="no" />
<meta name="format-detection" content="telephone=no">
<title>piko</title> <title>piko</title>
<link rel="shortcut icon" href="./images/logo.png" type="image/x-icon">
<!-- <link rel="stylesheet" href="./home/css/reset.css"> --> <link rel="stylesheet" href="../common/css/reset.css">
<link rel="shortcut icon" href="./images/pikolive.png" type="image/x-icon"> <link rel="stylesheet" href="./css/animate.css">
<link rel="stylesheet" href="./css/reset.css"> <link rel="stylesheet" href="./css/index.css?v=1.1">
<link rel="stylesheet" href="./css/index.css">
<!-- <link rel="stylesheet" href="./home/css/index.css"> -->
<link rel="stylesheet" href="./css/swiper.min.css">
<!-- <script src="./js/flexible.js"></script> -->
</head> </head>
<body> <body>
<div class="container"> <!-- pc端 -->
<div class="container pc">
<div class="pc-bg"> <div class="pc-bg">
<!-- <img src="./images/homePc.png" alt=""> --> <!-- <img src="./images/homePc.png" alt=""> -->
<div class="homePc"> <div class="homePc">
<div class="charge">儲值</div> <div class="diamound">
<div class="googlePlay"></div> <img src="./images/diamond.png" alt=""> 儲值
<div class="appleStore"></div>
<div class="apk"></div>
</div> </div>
<div class="pcIos"></div>
<div class="pcAnd"></div>
</div> </div>
<div class="m-bg"> <div class="bootom">
<!-- <img src="./images/homeM.png" alt=""> --> <p>Hongkong Han Fei Technology Co.,Limited</p>
<div class="homeM"> <p>CR No:3040005&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Address: BLDG. 19-21 HING YIP STREET KWUN TONG.KLN
<div class="charge">儲值</div> </p>
<!-- 轮播 --> </div>
<div class="swiper-container swiper"> </div>
<div class="swiper-wrapper"> </div>
<div class="swiper-slide"> <!-- h5端 -->
<img src="./images/pic1.png" alt=""> <div class="h5">
</div> <!-- 頭部 -->
<div class="swiper-slide"> <div class="header">
<img src="./images/pic2.png" alt=""> <!-- logo -->
</div> <img src="./images/logo.png" alt="" class="logo">
<div class="swiper-slide"> <!-- app -->
<img src="./images/pic3.png" alt=""> <div class="name">PIKO</div>
</div> <!-- 更多 -->
</div> <img src="./images/more.png" alt="" class="more">
<!-- <div class="swiper-pagination swp"></div> --> <!-- 儲值 -->
</div> <div class="diamound">
<div class="logo"> <img src="./images/diamond.png" alt=""> 儲值
<img class="googlePlay" src="./images/googlePlay2.png" alt=""> </div>
<img class="appleStore" src="./images/appleStore.png" alt=""> <!---->
<img class="apk" src="./images/apk.png" alt=""> <div class="line"></div>
</div> </div>
</div> <div class="pagesBox">
</div> <!-- 頁面1 -->
<!-- <div class="button-wrapper download"> <div class="pages page1 animate__animated">
</div> <img src="./images/pageTxte1.png" alt="" class="pageTxte1 animate__animated animate__slow__3s">
<div class="button2-wrapper download"> <img src="./images/pageTxte2.png" alt="" class="pageTxte2 animate__animated animate__slow__3s">
</div> --> <!-- <img src="./images/h5And.png" alt="" class="h5And animate__animated animate__slow__1.8s"> -->
<div class="eori"> <img style="display: none;" src="" alt="" class="downioad animate__animated animate__slow__1.8s">
<!-- <div class="recordfoot"> <img src="./images/down.png" alt="" class="down animate__animated animate__slideInDown animate__slow">
<i class="record"></i> </div>
<a href="https://beian.miit.gov.cn/#/Integrated/index">粤ICP备2020098441号</a>
</div> --> <!-- 頁面2 -->
<div class="gongsi"> <div class="pages page2">
<img src="./images/pageText2.png" alt="" class="pageText2 animate__animated ">
<img src="./images/page2.png" alt="" class="page2_in">
<img src="./images/pagetx1.png" alt="" class="pagetx1 animate__animated ">
<img src="./images/pagetx2.png" alt="" class="pagetx2 animate__animated ">
<img src="./images/downioad.png" alt="" class="downioad animate__animated ">
<img src="./images/down.png" alt="" class="down animate__animated animate__slideInDown animate__slow ">
</div>
<!-- 頁面3 -->
<div class="pages page3">
<img src="./images/pageText3.png" alt="" class="pageText3 animate__animated">
<img src="./images/page3.png" alt="" class="page3_in">
<img src="./images/page3Icon1.png" alt="" class="page3Icon1 animate__animated animate__delay-2s">
<img src="./images/page3Icon2.png" alt="" class="page3Icon2 animate__animated animate__delay-1s">
<img src="./images/page3Icon3.png" alt="" class="page3Icon3 animate__animated animate__delay-4s">
<img src="./images/page3Icon4.png" alt="" class="page3Icon4 animate__animated animate__delay-3s">
<img src="./images/downioad.png" alt="" class="downioad animate__animated">
<img src="./images/down.png" alt="" class="down animate__animated animate__slideInDown animate__slow ">
</div>
<!-- 頁面4 -->
<div class="pages page4">
<img src="./images/pageText4.png" alt="" class="pageText4 animate__animated">
<img src="./images/page4.png" alt="" class="page4_in">
<img src="./images/page4Icon2.png" alt="" class="page4Icon2 animate__animated">
<img src="./images/page4Icon1.png" alt="" class="page4Icon1 animate__animated">
<img src="./images/downioad.png" alt="" class="downioad animate__animated">
<img src="./images/down.png" alt="" class="down animate__animated animate__slideInDown animate__slow ">
</div>
<!-- 頁面5 -->
<div class="pages page5">
<img src="./images/pageTxte5.png" alt="" class="pageTxte5 animate__animated">
<img src="./images/contactUs.png" alt="" class="contactUs animate__animated">
<img src="./images/downioad.png" alt="" class="downioad animate__animated">
<!-- <img src="./images/down.png" alt="" class="down"> -->
<div class="bootom">
<p>Hongkong Han Fei Technology Co.,Limited</p> <p>Hongkong Han Fei Technology Co.,Limited</p>
<!-- <p>香港翰飞科技有限公司</p> -->
<p>CR No:3040005</p> <p>CR No:3040005</p>
<p>AddressBLDG. 19-21 HING YIP STREET KWUN TONG, KLN</p> <p style="margin-bottom:0">Address: BLDG. 19-21 HING YIP STREET KWUN TONG.KLN</p>
</div> </div>
</div> </div>
</div> </div>
<div class="toast">敬请期待</div>
<div class="tips"> <!-- 菜單 -->
<img src="./images/tips.png" alt=""> <div class="menu">
<!-- 頭部 -->
<div class="top">
<!-- logo -->
<img src="./images/logo.png" alt="" class="logo">
<!-- app -->
<div class="name">PIKO</div>
<!-- 更多 -->
<img src="./images/close.png" alt="" class="close">
<!-- 儲值 -->
<div class="diamound">
<img src="./images/diamond.png" alt=""> 儲值
</div> </div>
</div>
<ul>
<li>
<span>首頁</span>
<img src="./images/rightIcon.png" alt="">
</li>
<li>
<span>錢包</span>
<img src="./images/rightIcon.png" alt="">
</li>
<li>
<span>聯繫我們</span>
<img src="./images/rightIcon.png" alt="">
</li>
</ul>
</div>
<!-- 聯繫我們彈窗 -->
<div class="contactUs_pub">
<div class="contactUs_pub_in">
<img src="./images/sClose.png" alt="" class="sClose">
<div class="title">聯繫我們</div>
<ul>
<li class="li1">
<img src="./images/wx.png" alt="">
<span><b>Wehchat:</b> sd245376</span>
</li>
<li class="li2">
<img src="./images/line.png" alt="">
<span><b>Line:</b> pekoyuyin</span>
</li>
<li class="li3">
<img src="./images/email.png" alt="">
<span><b>Email:</b> pikoservice@outlook.com</span>
</li>
</ul>
</div>
</div>
</div>
<script src="../common/js/flexible.js"></script>
<script src="./js/jquery.min.js"></script> <script src="./js/jquery.min.js"></script>
<script src="./js/common.js"></script> <script src="./js/common.js"></script>
<script src="./js/jquery.qrcode.js"></script> <script src="../common/js/layer.js"></script>
<script src="http://static.lkme.cc/linkedme.min.js"></script> <script src="../common/js/vconsole.min.js"></script>
<script src="./js/utf.js"></script> <script src="./js/index.js?v=1.0"></script>
<script src="./js/swiper.min.js"></script>
<script src="./js/index.js?v=2.3"></script>
</body> </body>
</html> </html>

View File

@@ -1,17 +1,12 @@
const productUrl = 'https://api.pekolive.com'; // 正式环境 const productUrl = 'https://api.pekolive.com'; // 正式环境
const testUrl = 'http://beta.api.pekolive.com'; // 测试环境 const testUrl = 'http://beta.api.pekolive.com'; // 测试环境
function render (templateId, templateData, target) { function render (templateId, templateData, target) {
var html = template(templateId, templateData); var html = template(templateId, templateData);
target.innerHTML += html; target.innerHTML += html;
} }
var tranUrl = 'https://api.pekolive.com';
// 根据域名判断 正式环境(含www)/测试环境(含beta), 并返回所需url前缀
// written by zxfxiong
function getUrlPrefix () {
if (!EnvCheck()) return undefined;
return EnvCheck() === 'live' ? productUrl : testUrl;
}
function dateFormat (date, fmt) { function dateFormat (date, fmt) {
date = new Date(date); date = new Date(date);
@@ -55,14 +50,14 @@ function convert (_url) {
// 传递分享信息给客户端,showUrl为分享的页面链接,为空时表示不分享 // 传递分享信息给客户端,showUrl为分享的页面链接,为空时表示不分享
// function shareInfo () { // function shareInfo () {
// var _url = 'http://www.erbanyy.com/modules/bonus/fight.html'; // var _url = 'https://api.kawayisound.xyz/modules/bonus/fight.html';
// var res = EnvCheck(); // var res = EnvCheck();
// if (res == 'test'){ // if (res == 'test'){
// _url = 'http://beta.erbanyy.com/modules/bonus/fight.html'; // _url = 'http://apibeta.kawayisound.xyz/modules/bonus/fight.html';
// } // }
// var info = { // var info = {
// title: '耳伴与你一起红', // title: '轻寻与你一起红',
// imgUrl: 'http://www.erbanyy.com/home/images/logo.png', // imgUrl: 'https://img.erbanyy.com/qingxunlogo-256.png',
// desc: '登录即送20红包每天还有分享红包邀请红包分成红包四重红包大礼等你来拿', // desc: '登录即送20红包每天还有分享红包邀请红包分成红包四重红包大礼等你来拿',
// showUrl: _url // showUrl: _url
// }; // };
@@ -85,11 +80,22 @@ function EnvCheck () {
} }
} }
} }
// 根据域名判断 正式环境(含www)/测试环境(含beta), 并返回所需url前缀
// written by zxfxiong
function getUrlPrefix () {
if (!EnvCheck()) return undefined;
return EnvCheck() === 'live' ? productUrl : testUrl;
}
// 根据域名判断是本地打开还是服务器打开 // 根据域名判断是本地打开还是服务器打开
function locateJudge () { function locateJudge () {
if (window.location.href) { if (window.location.href) {
var _url = window.location.href; var _url = window.location.href;
var res = _url.match(/test/); var res = _url.match(/test|localhost/);
if (res) { if (res) {
return '/api'; return '/api';
} else { } else {
@@ -114,7 +120,8 @@ function getQueryString(){
// 判断浏览器内核,手机类型 // 判断浏览器内核,手机类型
function checkVersion () { function checkVersion () {
var u = navigator.userAgent, app = navigator.appVersion; var u = navigator.userAgent,
app = navigator.appVersion;
return { return {
trident: u.indexOf('Trident') > -1, //IE内核 trident: u.indexOf('Trident') > -1, //IE内核
presto: u.indexOf('Presto') > -1, //opera内核 presto: u.indexOf('Presto') > -1, //opera内核
@@ -125,16 +132,19 @@ function checkVersion(){
android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端 android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器 iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
iPad: u.indexOf('iPad') > -1, //是否iPad iPad: u.indexOf('iPad') > -1, //是否iPad
webApp: u.indexOf('Safari') == -1, //是否web应该程序没有头部与底部 webApp: u.indexOf('Safari') > -1, //是否web应该程序没有头部与底部
weixin: u.indexOf('MicroMessenger') > -1, //是否微信 weixin: u.indexOf('MicroMessenger') > -1, //是否微信
qq: u.match(/\sQQ/i) == " qq", //是否QQ qq: u.match(/\sQQ/i) == " qq", //是否QQ
app: u.match('mengshengApp') == 'mengshengApp' //是否在app内 pekoApp: u.match('pekoApp'),
app: u.match('pekoApp') //是否在app内
}; };
} }
// 图片预加载 // 图片预加载
function preloadImage (obj) { function preloadImage (obj) {
var loadLength = 0,newImages = []; console.log(obj)
var loadLength = 0,
newImages = [];
for (var i = 0; i < obj.imageArr.length; i++) { for (var i = 0; i < obj.imageArr.length; i++) {
newImages[i] = new Image(); newImages[i] = new Image();
newImages[i].src = obj.imageArr[i]; newImages[i].src = obj.imageArr[i];
@@ -163,12 +173,36 @@ function isApp() {
} }
function msMask(channel,tags,params) { function UrlSearch () {
//此函数用于一般的耳伴底层面罩 var name, value;
var str = location.href;
var num = str.indexOf("?")
str = str.substr(num + 1);
var arr = str.split("&");
for (var i = 0; i < arr.length; i++) {
num = arr[i].indexOf("=");
if (num > 0) {
name = arr[i].substring(0, num);
value = arr[i].substr(num + 1);
this[name] = value;
}
}
return value;
}
function erbanMask (channel, tags, params) {
//此函数用于一般的轻寻底层面罩
var browser = checkVersion(); var browser = checkVersion();
var env = EnvCheck(); var env = EnvCheck();
// params = params? params:0; // params = params? params:0;
var bol = $.isEmptyObject(params); var bol = $.isEmptyObject(params);
var keyId = "978cd79c98264f836450afda1228762e";
if (browser.ios) {
if (env == 'test') {
keyId = '33f560a83c9c40d465711c0038653ca0'
}
console.log('ios_linkedme_keyId:', keyId)
}
var jsonStr = ''; var jsonStr = '';
if (!bol) { if (!bol) {
jsonStr = JSON.stringify(params); jsonStr = JSON.stringify(params);
@@ -181,10 +215,11 @@ function msMask(channel,tags,params) {
tags: tags, tags: tags,
// ios_custom_url: "https://itunes.apple.com/cn/app/id1252542069?mt=8", // ios_custom_url: "https://itunes.apple.com/cn/app/id1252542069?mt=8",
params: jsonStr params: jsonStr
// '{"uid":"' + params + '"}'
}; };
linkedme.init("414571f0698afaa1c194f345f0dcc328", {type: env}, null); linkedme.init(keyId, {
type: env
}, null);
linkedme.link(linkData, function (err, response) { linkedme.link(linkData, function (err, response) {
if (err) { if (err) {
@@ -197,9 +232,10 @@ function msMask(channel,tags,params) {
} }
}, false); }, false);
} else { } else {
$('#share-mask').css('display','flex'); $('#mask').hide();
} }
} }
function wxConfig () { function wxConfig () {
var wxurl = encodeURIComponent(location.href.split('#')[0]); var wxurl = encodeURIComponent(location.href.split('#')[0]);
var data = "url=" + wxurl; var data = "url=" + wxurl;
@@ -213,7 +249,7 @@ function wxConfig() {
if (data.code = 200) { if (data.code = 200) {
wx.config({ wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来若要查看传入的参数可以在pc端打开参数信息会通过log打出仅在pc端时才会打印。 debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来若要查看传入的参数可以在pc端打开参数信息会通过log打出仅在pc端时才会打印。
appId: data.data.appId, // 必填,公众号的唯一标识 appId: 'wx009d793f92c24eec', // 必填,公众号的唯一标识
timestamp: data.data.timestamp, // 必填,生成签名的时间戳 timestamp: data.data.timestamp, // 必填,生成签名的时间戳
nonceStr: data.data.nonceStr, // 必填,生成签名的随机串 nonceStr: data.data.nonceStr, // 必填,生成签名的随机串
signature: data.data.signature, // 必填签名见附录1 signature: data.data.signature, // 必填签名见附录1
@@ -230,43 +266,17 @@ function wxConfig() {
}) })
} }
// function refreshWeb() { function refreshWeb () {
// window.location.href = window.location.href; window.location.href = window.location.href;
// }
$('#share-mask .shareBtn').on('click',function () {
var browser = checkVersion();
if (browser.app) {
if (browser.android) {
window.androidJsObj.openSharePage();
} else if (browser.ios) {
window.webkit.messageHandlers.openSharePage.postMessage(null);
} }
}
})
/** function shareInfo (urlMsg) {
* 渲染列表组件 if (urlMsg) {
* @param templateId 组件的id var env = EnvCheck();
* @param $target 渲染目标dom if (env == 'test') {
* @param attrParam 属性名,格式 {'.class':['dataAttr',type]} return 'http://apibeta.kawayisound.xyz/' + urlMsg;
* @param data 渲染数据的数组 } else {
*/ return 'https://api.kawayisound.xyz/' + urlMsg;
function templateList(templateId,$target,attrParam,data){
var $template = $(templateId);
var str = $template.html();
for(var i = 0;i < data.length;i++){
var $list = $(str);
$target.append($list);
for(var j in attrParam){
if(attrParam[j][1] == 1){
$list.find(j + ' img').attr('src',data[i][attrParam[j][0]]);
}else if(attrParam[j][1] == 2){
$list.find(j).html(data[i][attrParam[j][0]]);
}
} }
} }
} }
@@ -276,6 +286,7 @@ function initNav(obj) {
return; return;
} }
var browser = checkVersion(); var browser = checkVersion();
console.log(browser);
if (browser.app) { if (browser.app) {
if (browser.ios) { if (browser.ios) {
window.webkit.messageHandlers.initNav.postMessage(obj); window.webkit.messageHandlers.initNav.postMessage(obj);
@@ -286,8 +297,6 @@ function initNav(obj) {
} }
} }
var tranUrl = 'http://www.if66.cn';
var tools = { var tools = {
cookieUtils: { cookieUtils: {
set: function (key, val, time) { set: function (key, val, time) {
@@ -298,8 +307,7 @@ var tools = {
}, },
get: function (key) { get: function (key) {
// 获取cookie参数 var getCookie = document.cookie.replace(/[ ]/g, "");
var getCookie = document.cookie.replace(/[ ]/g,'');
var arrCookie = getCookie.split(';'); var arrCookie = getCookie.split(';');
var val; var val;
for (var i = 0; i < arrCookie.length; i++) { for (var i = 0; i < arrCookie.length; i++) {
@@ -312,10 +320,491 @@ var tools = {
return val; return val;
}, },
delete: function(key) { //删除cookie方法 delete: function (key) {
var date = new Date(); //获取当前时间 var date = new Date();
date.setTime(date.getTime() - 10000); //将date设置为过去的时间 date.setTime(date.getTime() - 10000);
document.cookie = key + '=v; expires =' + date.toGMTString(); //设置cookie document.cookie = key + "+v; expires =" + date.toGMTString();
}
},
nativeUtils: {
jumpAppointPage: function (type, val) {
// routerType 跳转名称
// routerVal 跳转需要传的参数
var browser = checkVersion();
var jumpObj = {};
jumpObj.routerType = routeTypeConstant[type];
if (val) {
jumpObj.routerVal = val;
}
if (browser.app) {
if (browser.ios) {
if (type.indexOf('_') > -1) {
window.webkit.messageHandlers.jumpAppointPage.postMessage(jumpObj);
} else {
if (val) {
window.webkit.messageHandlers.type.postMessage(val);
} else {
window.webkit.messageHandlers.type.postMessage(null);
}
}
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
if (type.indexOf('_') > -1) {
window.androidJsObj.jumpAppointPage(JSON.stringify(jumpObj));
} else {
if (val) {
window.androidJsObj.type(val);
} else {
window.androidJsObj.type();
} }
} }
} }
}
}
},
getUid: function () {
var browser = checkVersion();
console.log(browser);
var val;
if (browser.app) {
if (browser.ios) {
val = tools.cookieUtils.get('uid');
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
val = parseInt(window.androidJsObj.getUid());
}
}
} else {
var locate = getQueryString();
if (!locate.uid && !locate.shareUid) {
val = 901189;
} else {
if (locate.shareUid) {
val = locate.shareUid;
} else {
val = locate.uid;
}
}
}
return val;
},
getTicket: function () {
var browser = checkVersion();
var val;
if (browser.app) {
if (browser.ios) {
val = window.webkit.messageHandlers.getTicket.postMessage(null);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
val = window.androidJsObj.getTicket();
}
}
} else {
val = 'app外'
}
return val;
}
}
}
// 透明loading层
var $Loading = {
count: 0,
isFadeOut: false,
show: function () {
this.count++;
if ($('#loadingToast').length >= 1) {
if (this.isFadeOut) {
this.isFadeOut = false;
$('#loadingToast').stop(true).fadeTo(0, 1);
}
} else {
$('body').append('<div id="loadingToast" style="display: none; position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 9999;"></div>')
$('#loadingToast').fadeIn(100);
}
},
hide: function () {
this.count--;
if (this.count === 0) {
this.isFadeOut = true;
$('#loadingToast').fadeOut(200, function () {
$Loading.isFadeOut = false;
$(this).remove();
});
}
}
};
var requestBaseUrl = locateJudge();
// ajax
function request (type, option) {
return $.ajax({
type: type,
url: requestBaseUrl + option.url,
data: option.data,
headers: option.headers,
beforeSend: function (xhr) {
!option.isHideLoading && $Loading.show();
},
success: function (res, status, xhr) {
!option.isHideLoading && $Loading.hide();
typeof option.success === 'function' && option.success(res, status, xhr);
},
error: function (xhr, status, error) {
!option.isHideLoading && $Loading.hide();
typeof option.error === 'function' && option.error(xhr, status, error);
}
})
}
// ajax get
function getJSON (option) {
request('get', option)
}
// ajax post
function postJSON (option) {
request('post', option);
}
// 封装 获取公共参数的方法(客户端提供)
// written by zxfxiong
const methodsFromClient = {
// 注意ios 提供的方法属异步操作
"uid": {
android: () => window.androidJsObj.getUid(),
ios: function () {
window.webkit.messageHandlers.getUid.postMessage(null);
// let allcookies = document.cookie;
// let $uid = allcookies.match(/\d+/);
// console.log($uid[0]);
}
},
"ticket": {
android: () => window.androidJsObj.getTicket(),
ios: function () {
window.webkit.messageHandlers.getTicket.postMessage(null);
}
},
"roomUid": {
android: () => window.androidJsObj.getRoomUid(),
ios: function () {
window.webkit.messageHandlers.getRoomUid.postMessage(null);
}
},
"deviceId": {
android: () => window.androidJsObj.getDeviceId(),
ios: function () {
window.webkit.messageHandlers.getDeviceId.postMessage(null);
}
},
"deviceInfo": {
android: () => window.androidJsObj.getDeviceInfo(),
ios: function () {
window.webkit.messageHandlers.getDeviceInfo.postMessage(null);
}
},
"encryptPwd": {
android: (data) => window.androidJsObj.encryptPwd(data),
ios: function (data) {
window.webkit.messageHandlers.encryptPwd.postMessage(data);
}
}
}
// 全局获取并配置公共参数
// written by zxfxiong
const pubInfo = {};
function getInfoFromClient () {
const browser = checkVersion();
if (browser.app) {
console.log('从客户端获取了用户信息设备信息此信息来源common2.js');
if (browser.android) {
pubInfo.uid = methodsFromClient.uid.android();
pubInfo.roomUid = methodsFromClient.roomUid.android();
pubInfo.ticket = methodsFromClient.ticket.android();
pubInfo.deviceId = methodsFromClient.deviceId.android();
pubInfo.deviceInfo = methodsFromClient.deviceInfo.android();
} else {
methodsFromClient.uid.ios();
methodsFromClient.roomUid.ios();
methodsFromClient.ticket.ios();
methodsFromClient.deviceId.ios();
methodsFromClient.deviceInfo.ios();
}
} else {
// 非app环境调试参数
pubInfo.uid = sessionStorage.getItem("uid") ? sessionStorage.getItem("uid") : '';
// pubInfo.ticket = sessionStorage.getItem("ticket") ? sessionStorage.getItem("ticket") : '';
pubInfo.h5_token = sessionStorage.getItem("ticket") ? sessionStorage.getItem("ticket") : '';
pubInfo.deviceId = "0";
pubInfo.deviceInfo = {
app: 'peko',
appVersion: '9.9.9',
os: '0.0.0',
osVersion: '0.0.0',
channel: 'browser',
client: 'h5'
};
}
};
// 繁体字转换方法
// fontConvert(true);//调用字体转换函数
// setTimeout(function () {
fontConvert(true);//调用字体转换函数
// }, 1000)
function fontConvert (fontConvertBool) {
if (window.location.pathname.match(/identity/)) {
return false;
}
function SconvertT () {//简体转换繁体
document.head.innerHTML = s2t(document.head.innerHTML);
document.body.innerHTML = s2t(document.body.innerHTML);
// document.body.innerHTML
}
function TconvertS () {//繁体转换简体
document.head.innerHTML = t2s(document.head.innerHTML);
document.body.innerHTML = t2s(document.body.innerHTML);
}
if (fontConvertBool) {
SconvertT();//转换繁体字
} else {
TconvertS()//转换简体字
}
//功能:转换对象,使用递归,逐层剥到文本;
function transformContent (switcherId, fobj) {
if (typeof (fobj) == "object") {
var obj = fobj.childNodes
} else {
if (parseInt(fobj) != 0) { //在页面初始化时控制不更新当前页面语言状态;
var switcherObj = document.getElementById(switcherId);
with (switcherObj) {
if (parseInt(isCurrentFt)) {
innerHTML = innerHTML.replace('简', '繁')
title = title.replace('简', '繁')
} else {
innerHTML = innerHTML.replace('繁', '简')
title = title.replace('繁', '简')
}
}
switcherObj.innerHTML = transformText(switcherObj.innerHTML, isCurrentFt)
switcherObj.title = transformText(switcherObj.title, isCurrentFt)
if (isCurrentFt == "1") { isCurrentFt = "0" } else { isCurrentFt = "1" }
writeCookie("isCurrentFt", isCurrentFt)
}
var obj = document.body.childNodes
}
for (var i = 0; i < obj.length; i++) {
var OO = obj.item(i)
if ("||BR|HR|TEXTAREA|".indexOf("|" + OO.tagName + "|") > 0 || OO.id == switcherId) continue;
if (OO.title != "" && OO.title != null) OO.title = transformText(OO.title, isCurrentFt);
if (OO.alt != "" && OO.alt != null) OO.alt = transformText(OO.alt, isCurrentFt);
if (OO.tagName == "INPUT" && OO.value != "" && OO.type != "text" && OO.type != "hidden") OO.value = transformText(OO.value, isCurrentFt);
if (OO.nodeType == 3) { OO.data = transformText(OO.data, isCurrentFt) }
else transformContent(switcherId, OO)
}
}
//功能:转换指定字符串;
function transformText (txt, isFt) {
if (txt == null || txt == "") return ""
if (parseInt(isFt)) { return s2t(txt) } else { return t2s(txt) }
}
//功能:简体字符转为繁体字符;
function s2t (cc) {
var str = '', ss = jtpy(), tt = ftpy();
for (var i = 0; i < cc.length; i++) {
var c = cc.charAt(i);
if (c.charCodeAt(0) > 10000 && ss.indexOf(c) != -1) str += tt.charAt(ss.indexOf(c));
else str += c;
}
return str;
}
//功能:繁体字符转为简体字符;
function t2s (cc) {
var str = '', ss = jtpy(), tt = ftpy();
for (var i = 0; i < cc.length; i++) {
var c = cc.charAt(i);
if (c.charCodeAt(0) > 10000 && tt.indexOf(c) != -1) str += ss.charAt(tt.indexOf(c));
else str += c;
}
return str;
}
function jtpy () {
return '号隐爱的魔力之旅週金币榜皑蔼碍翱袄奥坝罢摆败颁办绊帮绑镑谤剥饱宝报鲍辈贝钡狈备惫绷笔毕毙闭边编贬变辩辫鼈瘪濒滨宾摈饼拨钵铂驳卜补参蚕残惭惨灿苍舱仓沧厕侧册测层诧搀掺蝉馋谗缠铲産阐颤场尝长偿肠厂畅钞车彻尘陈衬撑称惩诚骋痴迟驰耻齿炽冲虫宠畴踌筹绸丑橱厨锄雏础储触处传疮闯创锤纯绰辞词赐聪葱囱从丛凑窜错达带贷担单郸掸胆惮诞弹当挡党荡档捣岛祷导盗灯邓敌涤递缔点垫电淀钓调迭谍迭钉顶锭订东动栋冻斗犊独读赌镀锻断缎兑队对吨顿钝夺鹅额讹恶饿儿尔饵贰发罚阀珐矾钒烦范贩饭访纺飞废费纷坟奋愤粪丰枫锋风疯冯缝讽凤肤辐抚辅赋複负讣妇缚该钙盖干赶秆赣冈刚钢纲岗皋镐搁鸽阁铬个给龚宫巩贡鈎沟构购够蛊顾剐关观馆惯贯广规硅归龟闺轨诡柜贵刽辊滚锅国过骇韩汉阂鹤贺横轰鸿红后壶护沪户哗华画划话怀坏欢环还缓换唤痪焕涣黄谎挥辉毁贿秽会烩彙讳诲绘荤浑伙获货祸击机积饥讥鸡绩缉极辑级挤几蓟剂济计记际继纪夹荚颊贾钾价驾歼监坚笺间艰缄茧检碱硷拣捡简俭减荐槛鉴践贱见键舰剑饯渐溅涧浆蒋桨奖讲酱胶浇骄娇搅铰矫侥脚饺缴绞轿较秸阶节茎惊经颈静镜径痉竞淨纠厩旧驹举据锯惧剧鹃绢杰洁结诫届紧锦仅谨进晋烬尽劲荆觉决诀绝钧军骏开凯颗壳课垦恳抠库裤夸块侩宽矿旷况亏岿窥馈溃扩阔蜡腊莱来赖蓝栏拦篮阑兰澜谰揽览懒缆烂滥捞劳涝乐镭垒类泪篱离里鲤礼丽厉励砾曆沥隶俩联莲连镰怜涟帘敛脸链恋炼练粮凉两辆谅疗辽镣猎临邻鳞凛赁龄铃凌灵岭领馏刘龙聋咙笼垄拢陇楼娄搂篓芦卢颅庐炉掳卤虏鲁赂禄录陆驴吕铝侣屡缕虑滤绿峦挛孪滦乱抡轮伦仑沦纶论萝罗逻锣箩骡骆络妈玛码蚂马骂吗买麦卖迈脉瞒馒蛮满谩猫锚铆贸么霉没镁门闷们锰梦谜弥觅绵缅庙灭悯闽鸣铭谬谋亩钠纳难挠脑恼闹馁腻撵捻酿鸟聂齧镊镍柠狞甯拧泞钮纽脓浓农疟诺欧鸥殴呕沤盘庞国爱赔喷鹏骗飘频贫苹凭评泼颇扑铺朴谱脐齐骑岂啓气弃讫牵扦釺铅迁签谦钱钳潜浅谴堑枪呛牆蔷强抢锹桥乔侨翘窍窃钦亲轻氢倾顷请庆琼穷趋区躯驱龋颧权劝却鹊让饶扰绕热韧认纫荣绒软锐闰润洒萨鳃赛伞丧骚扫涩杀纱筛晒闪陝赡缮伤赏烧绍赊摄慑设绅审婶肾渗声绳胜圣师狮湿诗尸时蚀实识驶势释饰视试寿兽枢输书赎属术树竖数帅双谁税顺说硕烁丝饲耸怂颂讼诵擞苏诉肃虽绥岁孙损笋缩琐锁獭挞抬摊贪瘫滩坛谭谈歎汤烫涛縧腾誊锑题体屉条贴铁厅听烃铜统头图涂团颓蜕脱鸵驮驼椭洼袜弯湾顽万网韦违围爲潍维苇伟僞纬谓卫温闻纹稳问瓮挝蜗涡窝呜钨乌诬无芜吴坞雾务误锡牺袭习铣戏细虾辖峡侠狭厦锨鲜纤咸贤衔闲显险现献县馅羡宪线厢镶乡详响项萧销晓啸蝎协挟携胁谐写泻谢锌衅兴汹鏽绣虚嘘须许绪续轩悬选癣绚学勳询寻驯训讯逊压鸦鸭哑亚讶阉烟盐严顔阎豔厌砚彦谚验鸯杨扬疡阳痒养样瑶摇尧遥窑谣药爷页业叶医铱颐遗仪彝蚁艺亿忆义诣议谊译异绎荫阴银饮樱婴鹰应缨莹萤营荧蝇颖哟拥佣痈踊咏涌优忧邮铀犹游诱舆鱼渔娱与屿语吁御狱誉预驭鸳渊辕园员圆缘远愿约跃钥岳粤悦阅云郧匀陨运蕴酝晕韵杂灾载攒暂赞赃髒凿枣灶责择则泽贼赠扎札轧铡闸诈斋债毡盏斩辗崭栈战绽张涨帐账胀赵蛰辙锗这贞针侦诊镇阵挣睁狰帧郑证织职执纸挚掷帜质锺终种肿衆诌轴皱昼骤猪诸诛烛瞩嘱贮铸筑驻专砖转赚桩庄装妆壮状锥赘坠缀谆浊兹资渍踪综总纵邹诅组鑽緻钟么为隻凶准启闆裡雳馀鍊洩并';
}
function ftpy () {
return '號隱愛的魔力之旅週金幣榜皚藹礙翺襖奧壩罷擺敗頒辦絆幫綁鎊謗剝飽寶報鮑輩貝鋇狽備憊繃筆畢斃閉邊編貶變辯辮鼈癟瀕濱賓擯餅撥缽鉑駁蔔補參蠶殘慚慘燦蒼艙倉滄廁側冊測層詫攙摻蟬饞讒纏鏟産闡顫場嘗長償腸廠暢鈔車徹塵陳襯撐稱懲誠騁癡遲馳恥齒熾沖蟲寵疇躊籌綢醜櫥廚鋤雛礎儲觸處傳瘡闖創錘純綽辭詞賜聰蔥囪從叢湊竄錯達帶貸擔單鄲撣膽憚誕彈當擋黨蕩檔搗島禱導盜燈鄧敵滌遞締點墊電澱釣調疊諜疊釘頂錠訂東動棟凍鬥犢獨讀賭鍍鍛斷緞兌隊對噸頓鈍奪鵝額訛惡餓兒爾餌貳發罰閥琺礬釩煩範販飯訪紡飛廢費紛墳奮憤糞豐楓鋒風瘋馮縫諷鳳膚輻撫輔賦複負訃婦縛該鈣蓋幹趕稈贛岡剛鋼綱崗臯鎬擱鴿閣鉻個給龔宮鞏貢鈎溝構購夠蠱顧剮關觀館慣貫廣規矽歸龜閨軌詭櫃貴劊輥滾鍋國過駭韓漢閡鶴賀橫轟鴻紅後壺護滬戶嘩華畫劃話懷壞歡環還緩換喚瘓煥渙黃謊揮輝毀賄穢會燴彙諱誨繪葷渾夥獲貨禍擊機積饑譏雞績緝極輯級擠幾薊劑濟計記際繼紀夾莢頰賈鉀價駕殲監堅箋間艱緘繭檢堿鹼揀撿簡儉減薦檻鑒踐賤見鍵艦劍餞漸濺澗漿蔣槳獎講醬膠澆驕嬌攪鉸矯僥腳餃繳絞轎較稭階節莖驚經頸靜鏡徑痙競淨糾廄舊駒舉據鋸懼劇鵑絹傑潔結誡屆緊錦僅謹進晉燼盡勁荊覺決訣絕鈞軍駿開凱顆殼課墾懇摳庫褲誇塊儈寬礦曠況虧巋窺饋潰擴闊蠟臘萊來賴藍欄攔籃闌蘭瀾讕攬覽懶纜爛濫撈勞澇樂鐳壘類淚籬離裏鯉禮麗厲勵礫曆瀝隸倆聯蓮連鐮憐漣簾斂臉鏈戀煉練糧涼兩輛諒療遼鐐獵臨鄰鱗凜賃齡鈴淩靈嶺領餾劉龍聾嚨籠壟攏隴樓婁摟簍蘆盧顱廬爐擄鹵虜魯賂祿錄陸驢呂鋁侶屢縷慮濾綠巒攣孿灤亂掄輪倫侖淪綸論蘿羅邏鑼籮騾駱絡媽瑪碼螞馬罵嗎買麥賣邁脈瞞饅蠻滿謾貓錨鉚貿麼黴沒鎂門悶們錳夢謎彌覓綿緬廟滅憫閩鳴銘謬謀畝鈉納難撓腦惱鬧餒膩攆撚釀鳥聶齧鑷鎳檸獰寧擰濘鈕紐膿濃農瘧諾歐鷗毆嘔漚盤龐國愛賠噴鵬騙飄頻貧蘋憑評潑頗撲鋪樸譜臍齊騎豈啓氣棄訖牽扡釺鉛遷簽謙錢鉗潛淺譴塹槍嗆牆薔強搶鍬橋喬僑翹竅竊欽親輕氫傾頃請慶瓊窮趨區軀驅齲顴權勸卻鵲讓饒擾繞熱韌認紉榮絨軟銳閏潤灑薩鰓賽傘喪騷掃澀殺紗篩曬閃陝贍繕傷賞燒紹賒攝懾設紳審嬸腎滲聲繩勝聖師獅濕詩屍時蝕實識駛勢釋飾視試壽獸樞輸書贖屬術樹豎數帥雙誰稅順說碩爍絲飼聳慫頌訟誦擻蘇訴肅雖綏歲孫損筍縮瑣鎖獺撻擡攤貪癱灘壇譚談歎湯燙濤縧騰謄銻題體屜條貼鐵廳聽烴銅統頭圖塗團頹蛻脫鴕馱駝橢窪襪彎灣頑萬網韋違圍爲濰維葦偉僞緯謂衛溫聞紋穩問甕撾蝸渦窩嗚鎢烏誣無蕪吳塢霧務誤錫犧襲習銑戲細蝦轄峽俠狹廈鍁鮮纖鹹賢銜閑顯險現獻縣餡羨憲線廂鑲鄉詳響項蕭銷曉嘯蠍協挾攜脅諧寫瀉謝鋅釁興洶鏽繡虛噓須許緒續軒懸選癬絢學勳詢尋馴訓訊遜壓鴉鴨啞亞訝閹煙鹽嚴顔閻豔厭硯彥諺驗鴦楊揚瘍陽癢養樣瑤搖堯遙窯謠藥爺頁業葉醫銥頤遺儀彜蟻藝億憶義詣議誼譯異繹蔭陰銀飲櫻嬰鷹應纓瑩螢營熒蠅穎喲擁傭癰踴詠湧優憂郵鈾猶遊誘輿魚漁娛與嶼語籲禦獄譽預馭鴛淵轅園員圓緣遠願約躍鑰嶽粵悅閱雲鄖勻隕運蘊醞暈韻雜災載攢暫贊贓髒鑿棗竈責擇則澤賊贈紮劄軋鍘閘詐齋債氈盞斬輾嶄棧戰綻張漲帳賬脹趙蟄轍鍺這貞針偵診鎮陣掙睜猙幀鄭證織職執紙摯擲幟質鍾終種腫衆謅軸皺晝驟豬諸誅燭矚囑貯鑄築駐專磚轉賺樁莊裝妝壯狀錐贅墜綴諄濁茲資漬蹤綜總縱鄒詛組鑽緻鐘麼為隻兇準啟闆裡靂餘鍊洩並';
}
//功能:获取指定名称的 Cookie 值;
function readCookie (name) {
var value = "";
if (document.cookie.length > 0) {
var prefix = name + "=";
var begin = document.cookie.indexOf(prefix);
if (begin != -1) {
begin += prefix.length;
var end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
value = unescape(document.cookie.substring(begin, end));
}
}
return value;
}
//功能:设置指定名称的 Cookie 值;
function writeCookie (name, value, days) {
var argv = writeCookie.arguments;
var argc = writeCookie.arguments.length;
var days = (argc > 2) ? argv[2] : null;
if (days != null) {
var expireDate = new Date();
expireDate.setTime(expireDate.getTime() + (days * 1000 * 3600 * 24));
}
document.cookie = name + "=" + escape(value) + ((days == null) ? "" : ("; expires=" + expireDate.toGMTString())) + "; path=/";
}
var isCurrentFt;
//功能:页面初始化函数
// switcherId 文字链接,点击负责简繁切换,建议:<a id="switcher_link" href="#">繁体中文</a>
// isDefaultFt 当前文档默认是否为繁体中文;
// delay 页面加载后的转换延迟时间,单位毫秒;
// 使用的 Cookie 变量名称isCurrentFt
function initPageLanguage (switcherId, isDefaultFt, delay) {
isDefaultFt = isDefaultFt ? "1" : "0";
var switcherObj = document.getElementById(switcherId)
isCurrentFt = readCookie("isCurrentFt")
if (isCurrentFt == null || isCurrentFt == "") isCurrentFt = isDefaultFt
with (switcherObj) {
if (typeof (document.all) != "object") {//非IE浏览器
href = "javascript:transformContent('" + switcherId + "');"
} else {
href = "#";
onclick = new Function("transformContent('" + switcherId + "');return false;")
}
if (title == null || title == "") title = "点击以繁体中文方式浏览";
if (parseInt(isCurrentFt)) {
innerHTML = innerHTML.replace('繁', '简')
title = title.replace('繁', '简')
}
innerHTML = transformText(innerHTML, parseInt(isCurrentFt) ? 0 : 1)
title = transformText(title, parseInt(isCurrentFt) ? 0 : 1)
}
if (isCurrentFt != isDefaultFt) { setTimeout("transformContent('" + switcherId + "',0)", delay) }
}
// 初始化调用接口
//initPageLanguage("switcher_link", false, 50);
}
// 封装数值超过最大数位处理单位
function unitProcessing (val, num, toFixeds, text) { //值 以什么为单位 保留几位小数 单位后最w
return val >= num ? (Math.floor(val / 1000) / 10).toFixed(toFixeds) + text : val;
}
// 封装 在ios环境中 配置公共参数的回调函数
// 配合 methodsFromClient[infoName].ios 方法
// written by zxfxiong
function getMessage (key, value) {
pubInfo[key] = value;
}
function objToParam (a) {
var s = [],
rbracket = /\[\]$/,
isArray = function (obj) {
return Object.prototype.toString.call(obj) === '[object Array]';
},
add = function (k, v) {
v = typeof v === 'function' ? v() : v === null ? '' : v === undefined ? '' : v;
s[s.length] = encodeURIComponent(k) + '=' + encodeURIComponent(v);
},
buildParams = function (prefix, obj) {
var i, len, key;
if (prefix) {
if (isArray(obj)) {
for (i = 0, len = obj.length; i < len; i++) {
if (rbracket.test(prefix)) {
add(prefix, obj[i]);
} else {
buildParams(prefix + '[' + (typeof obj[i] === 'object' ? i : '') + ']', obj[i]);
}
}
} else if (obj && String(obj) === '[object Object]') {
for (key in obj) {
buildParams(prefix + '[' + key + ']', obj[key]);
}
} else {
add(prefix, obj);
}
} else if (isArray(obj)) {
for (i = 0, len = obj.length; i < len; i++) {
add(obj[i].name, obj[i].value);
}
} else {
for (key in obj) {
buildParams(key, obj[key]);
}
}
return s;
};
return buildParams('', a).join('&').replace(/%20/g, '+');
}
// 封装 jquery 请求
// written by zxfxiong
function networkRequest (reqObj = {}, type) {
// 关于reqObj内部参数与 调用原生$.ajax()时传参一致
// 调用该函数前:须保证事先调用了 getInfoFromClient()
if (typeof pubInfo.deviceInfo === 'string') {
pubInfo.deviceInfo = JSON.parse(pubInfo.deviceInfo);
};
var browser = checkVersion();
const pubHeader = {};
pubHeader.app = type != 'yinbaos' ? pubInfo.deviceInfo.app : 'yinbao'
// app: 'piko',
// app: pubInfo.deviceInfo.app.indexOf('piko') != -1 ? 'piko' : 'PlanetStar',
pubHeader.appVersion = pubInfo.deviceInfo.appVersion || ''
pubHeader.os = pubInfo.deviceInfo.os || ''
pubHeader.os_version = pubInfo.deviceInfo.osVersion || ''
pubHeader.channel = pubInfo.deviceInfo.channel || ''
pubHeader.client = 'h5'
pubHeader.pub_uid = window.location.pathname.match(/login.html/) ? 0 : pubInfo.uid
if (browser.app) {
pubHeader.pub_ticket = pubInfo.ticket
} else {
pubHeader.h5_token = sessionStorage.getItem("ticket") ? sessionStorage.getItem("ticket") : '';
}
const url = reqObj.url;
const commParams = objToParam(pubHeader);
if (url.indexOf('?') >= 0) {
reqObj.url = `${url}&${commParams}`
} else {
reqObj.url = `${url}?${commParams}`
}
if (!reqObj.headers || typeof reqObj.headers !== 'object') {
reqObj.headers = {};
};
Object.assign(reqObj.headers, pubHeader);
const response = $.ajax(reqObj);
return response;
}
// 控制body是否可以滑动
function bodyScroolFun (bool) {
if (bool) {
$('body').css('overflow', 'hidden');
} else {
$('body').css('overflow', 'auto');
}
}

View File

@@ -1,84 +1,44 @@
/* eslint-disable semi */ let urlPrefix = getUrlPrefix()
/* eslint-disable no-undef */ let browser = checkVersion()
let version = checkVersion() let env = EnvCheck();
let urlData = getQueryString() if (env == 'test') {
const urlPrefix = getUrlPrefix() new VConsole();
//获取url参数
let channelData = urlData.channel
//定义官方渠道包
const channelDict = {
'poke0': 'https://image.lecheng163.com/poke_poke0.apk',
'poke1': 'https://image.lecheng163.com/poke_poke1.apk',
'poke2': 'https://image.lecheng163.com/poke_poke2.apk',
'poke3': 'https://image.lecheng163.com/poke_poke3.apk',
'poke4': 'https://image.lecheng163.com/poke_poke4.apk',
'poke5': 'https://image.lecheng163.com/poke_poke5.apk',
'poke6': 'https://image.lecheng163.com/poke_poke6.apk',
'poke7': 'https://image.lecheng163.com/poke_poke7.apk',
'poke8': 'https://image.lecheng163.com/poke_poke8.apk',
'poke9': 'https://image.lecheng163.com/poke_poke9.apk',
'poke10': 'https://image.lecheng163.com/poke_poke10.apk',
'gongzhonghao': 'https://image.lecheng163.com/poke_gongzhonghao.apk',
'zhaohui': 'https://image.lecheng163.com/zhaohui.apk'
// 'baomihua01': 'https://image.lecheng163.com/accompany_release_v_213_1_baomihua01_sign.apk'
} }
$(function () { // 封裝layer消息提醒框
let layerIndex
//判断url参数是否是与渠道包名一致 const showLoading = (content = '加載中...') => {
let androidUrl = null; layer.open({
channelDict.hasOwnProperty(channelData) ? androidUrl = channelDict[channelData] : androidUrl = 'https://play.google.com/store/apps/details?id=com.vele.pekolive'; type: 2,
let iosUrl = 'http://doudouyue.com/8axv' //ios企业包 shadeClose: false,
// let iosUrl = 'https://apps.apple.com/cn/app/id1571083482' //ios商店包 content,
success (e) {
if (version.ios) { layerIndex = $(e).attr('index')
$('.button-wrapper').on('click', function () {
if (version.weixin) {
$('.tips').show()
return
} }
window.location.href = iosUrl;
})
} else if (version.android) {
$('.button-wrapper').on('click', function () {
if (version.weixin) {
$('.tips').show()
return
}
window.location.href = androidUrl;
})
} else {
$('.button-wrapper').on('click', function () {
window.location.href = androidUrl;
})
$('.button2-wrapper').on('click', function () {
window.location.href = iosUrl;
}) })
} }
const hideLoading = (index) => {
}) layer.close(index)
function swiperFun () {
var swiper = new Swiper('.swiper', {
direction: 'horizontal',
loop: true,
autoplay: 5000,
slidesPerView: "auto",
centeredSlides: true,
spaceBetween: 0,
initialSlide: 1,//默认第二个居中
});
} }
const toastMsg = (content = '操作完成', time = 2) => {
layer.open({
content,
time,
skin: 'msg'
})
}
var ios;
var and;
var url;
var androidSkipType;
var iosSkipType;
// 初始化函數
$(function () { $(function () {
$(document).ready(function () { $(document).ready(function () {
var deviceWidth = document.documentElement.clientWidth; var deviceWidth = document.documentElement.clientWidth;
if (deviceWidth > 768) { if (deviceWidth > 768) {
document.documentElement.style.fontSize = deviceWidth / 19.20 + 'px'; document.documentElement.style.fontSize = deviceWidth / 19.20 + 'px';
} else { } else {
document.documentElement.style.fontSize = deviceWidth / 7.50 + 'px'; // document.documentElement.style.fontSize = deviceWidth / 7.50 + 'px';
} }
}); });
window.onresize = function () { window.onresize = function () {
@@ -87,35 +47,232 @@ $(function () {
if (deviceWidth > 768) { if (deviceWidth > 768) {
document.documentElement.style.fontSize = deviceWidth / 19.20 + 'px'; document.documentElement.style.fontSize = deviceWidth / 19.20 + 'px';
} else { } else {
document.documentElement.style.fontSize = deviceWidth / 7.50 + 'px'; // document.documentElement.style.fontSize = deviceWidth / 7.50 + 'px';
} }
} }
getInfoFromClient();
getConfig();
})
// 獲取配置接口
function getConfig () {
showLoading();
networkRequest({
type: 'GET',
url: urlPrefix + '/official/config',
success (res) {
// 處理聯繫方式
$(`.contactUs_pub .contactUs_pub_in ul .li1 span`).html(`<b>Wehchat:</b> ${res.data.contact0}`);
$(`.contactUs_pub .contactUs_pub_in ul .li2 span`).html(`<b>Line:</b> ${res.data.contact1}`);
$(`.contactUs_pub .contactUs_pub_in ul .li3 span`).html(`<b>Email:</b> ${res.data.contact2}`);
// 賦值下載
and = res.data.androidUrl;
ios = res.data.iosUrl;
androidSkipType = res.data.androidSkipType;
iosSkipType = res.data.iosSkipType;
// console.log(browser);
$('body .h5 .pagesBox .pages .downioad').show();
if (browser.ios) {
url = ios;
$('body .h5 .pagesBox .pages .downioad').attr('src', './images/h5Ios.png');
} else if (browser.android) {
url = and;
$('body .h5 .pagesBox .pages .downioad').attr('src', './images/h5And.png');
}
$('body .h5 .pagesBox .page2 .downioad,body .h5 .pagesBox .page3 .downioad,body .h5 .pagesBox .page4 .downioad').attr('src', './images/downioad.png');
$('.pc-bg').show();
hideLoading(layerIndex)
animatedImplementFun(0);
},
error (err) {
hideLoading(layerIndex)
}
})
}
// 点击记录接口
function officialClick (downloadType, downloadUrl) {
// showLoading();
networkRequest({
type: 'GET',
url: urlPrefix + '/official/click',
data: { downloadType, downloadUrl },
success (res) {
},
error (err) {
hideLoading(layerIndex)
}
})
}
// 監聽滑動事件
let startY
var length = $('.h5 .pages').length - 1;//
var index = 0;
var touchLength = 100;
$('body .h5').on('touchstart', function (e) {
startY = e.touches[0].pageY
})
$('body .h5').on('touchend', function (e) {
let endY = e.originalEvent.changedTouches[0].pageY
// 上滑
if (startY - endY >= 50) {
if (index > length - 1) {
return;
} else {
index = index + 1;
$('.pagesBox').css("transform", `translateY(-${index * touchLength}%)`);
animatedImplementFun(index);
}
}
//下滑
else if (endY - startY >= 50) {
if (index > 0) {
index = index - 1;
$('.pagesBox').css("transform", `translateY(-${index * touchLength}%)`);
animatedImplementFun(index);
}
}
})
// 動畫調用
function animatedImplementFun (index) {
if (index == 0) {
animatedFun($(`body .h5 .pagesBox .page1 .pageTxte1`), ['animate__fadeInLeft',]);
animatedFun($(`body .h5 .pagesBox .page1 .pageTxte2`), ['animate__fadeInRight',]);
// animatedFun($(`body .h5 .pagesBox .page1 .downioad`), ['animate__wobble',]);
// animatedFun($(`body .h5 .pagesBox .page1 .down`), ['animate__slideInDown',]);
} else if (index == 1) {
// animatedFun($(`body .h5 .pagesBox .page2 .pageText2`), ['animate__bounce',]);
animatedFun($(`body .h5 .pagesBox .page2 .pagetx1`), ['animate__bounceInRight',]);
animatedFun($(`body .h5 .pagesBox .page2 .pagetx2`), ['animate__bounceInLeft',]);
// animatedFun($(`body .h5 .pagesBox .page2 .down`), ['animate__slideInDown',]);
// animatedFun($(`body .h5 .pagesBox .page2 .downioad`), ['animate__wobble',]);
} else if (index == 2) {
// animatedFun($(`body .h5 .pagesBox .page3 .pageText3`), ['animate__rubberBand',]);
animatedFun($(`body .h5 .pagesBox .page3 .page3Icon1`), ['animate__lightSpeedInRight',]);
animatedFun($(`body .h5 .pagesBox .page3 .page3Icon2`), ['animate__lightSpeedInLeft',]);
animatedFun($(`body .h5 .pagesBox .page3 .page3Icon3`), ['animate__lightSpeedInRight',]);
animatedFun($(`body .h5 .pagesBox .page3 .page3Icon4`), ['animate__lightSpeedInLeft',]);
// animatedFun($(`body .h5 .pagesBox .page3 .down`), ['animate__slideInDown',]);
// animatedFun($(`body .h5 .pagesBox .page3 .downioad`), ['animate__slideInUp',]);
swiperFun(); } else if (index == 3) {
// animatedFun($(`body .h5 .pagesBox .page4 .pageText4 `), ['animate__rubberBand',]);
animatedFun($(`body .h5 .pagesBox .page4 .page4Icon1 `), ['animate__lightSpeedInLeft',]);
animatedFun($(`body .h5 .pagesBox .page4 .page4Icon2 `), ['animate__lightSpeedInRight',]);
// animatedFun($(`body .h5 .pagesBox .page4 .down`), ['animate__slideInDown',]);
// animatedFun($(`body .h5 .pagesBox .page4 .downioad `), ['animate__slideInUp',]);
} else if (index == 4) {
// animatedFun($(`body .h5 .pagesBox .page5 .pageTxte5 `), ['animate__jackInTheBox',]);
// animatedFun($(`body .h5 .pagesBox .page5 .contactUs `), ['animate__flipInY',]);
// animatedFun($(`body .h5 .pagesBox .page5 .downioad `), ['animate__slideInUp',]);
}
}
// 處理動畫
function animatedFun (dom, arrClass) {
// 獲取元素
const element = dom;
// 添加動畫
element.addClass(...arrClass);
// 監聽動畫結束
element[0].addEventListener('animationend', () => {
element.removeClass(...arrClass);
});
}
// pc跳轉充值
$('body .pc .header .diamound, html .pc .header .diamound,body .homePc .diamound, html .homePc .diamound').click(function () {
window.location = 'https://api.pekolive.com/peko/modules/payPc/index.html?channelType=4'
})
// PC蘋果下載按鈕
$('html .pc .pcIos').click(function () {
if (ios) {
officialClick(0, ios);
window.location = ios;
} else {
toastMsg('暫未開放下載,詳情請聯繫客服')
}
})
// PC安卓下載按鈕
$('html .pc .pcAnd').click(function () {
if (and) {
officialClick(1, and);
window.location = and;
} else {
toastMsg('暫未開放下載,詳情請聯繫客服')
}
})
// h5跳轉充值
$('body .header .diamound, html .header .diamound').click(function () {
window.location = 'https://api.pekolive.com/peko/modules/pay/index.html?channelType=4'
})
// h5展開菜單
$('body .header .more, html .header .more').click(function () {
$('.menu').css("z-index", "4");
$('.menu').css("height", "100%");
})
// h5收起菜單
$('body .h5 .menu .top .close, html .h5 .menu .top .close').click(function () {
$('.menu').css("z-index", "1");
$('.menu').css("height", "0%");
})
// 菜單選項按鈕
$('body .h5 .menu ul li, html .h5 .menu ul li').click(function () {
var i = $(this).index() + 1;
if (i == 1) {
$('.menu').css("z-index", "1");
$('.menu').css("height", "0%");
$('.pagesBox').css("transform", `translateY(-${0}%)`);
index = 0;
} else if (i == 2) {
window.location = 'https://api.pekolive.com/peko/modules/h5Income/login.html'
} else {
$('.menu').css("height", "0%");
$('.contactUs_pub').show();
}
})
// 關閉聯繫我們彈窗
$('body .contactUs_pub .contactUs_pub_in .sClose').click(function () {
$('.contactUs_pub').hide();
})
// 打開聯繫我們彈窗
$('.page5 .contactUs').click(function () {
$('.contactUs_pub').show();
})
// h5首頁安卓下載
$('body .h5 .pagesBox .page1 .h5And').click(function () {
if (and) {
officialClick(1, and);
window.location = and;
} else {
toastMsg('暫未開放下載,詳情請聯繫客服')
}
})
// h5首頁蘋果下載
$('body .h5 .pagesBox .page1 .h5Ios').click(function () {
if (ios) {
officialClick(0, ios);
window.location = ios;
} else {
toastMsg('暫未開放下載,詳情請聯繫客服')
}
})
// h5自動識別普通下載
$('body .h5 .pagesBox .pages .downioad').click(function () {
if (url) {
if (browser.ios) {
officialClick(0, url);
window.location = url;
} else if (browser.android) {
officialClick(1, url);
window.location = url;
} else {
$('.menu').css("z-index", "1");
$('.pagesBox').css("transform", `translateY(-${0}%)`);
index = 0;
}
} else {
toastMsg('暫未開放下載,詳情請聯繫客服')
}
})
// 禁止瀏覽器下拉刷新
//跳转pc端充值 document.addEventListener('touchmove', event => {
$('.homePc .charge').click(function () { event.preventDefault()
window.location.href = urlPrefix + '/peko/modules/payPc/index.html?channelType=4'; }, { passive: false })
})
// 跳转移动端h5充值
$('.homeM .charge').click(function () {
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
})
// logo跳转
$('.googlePlay').click(function () {
return
window.location.href = 'https://play.google.com/store/apps/details?id=com.vele.pekolive'
})
$('.appleStore').click(function () {
// console.log(version, 'version');
if (version.webKit && version.ios) {
window.location.href = 'https://apps.apple.com/cn/app/id6446155565'
}
else {
window.location.href = 'http://doudouyue.com/3gh2'
}
})
$('.apk').click(function () {
window.location.href = 'https://img.pekolive.com/piko_official.apk'
})
})

View File

@@ -0,0 +1,2 @@
//本插件由www.swiper.com.cn提供
function swiperAnimateCache(){for(allBoxes=window.document.documentElement.querySelectorAll(".ani"),i=0;i<allBoxes.length;i++)allBoxes[i].attributes["style"]?allBoxes[i].setAttribute("swiper-animate-style-cache",allBoxes[i].attributes["style"].value):allBoxes[i].setAttribute("swiper-animate-style-cache"," "),allBoxes[i].style.visibility="hidden"}function swiperAnimate(a){clearSwiperAnimate();var b=a.slides[a.activeIndex].querySelectorAll(".ani");for(i=0;i<b.length;i++)b[i].style.visibility="visible",effect=b[i].attributes["swiper-animate-effect"]?b[i].attributes["swiper-animate-effect"].value:"",b[i].className=b[i].className+" "+effect+" "+"animated",style=b[i].attributes["style"].value,duration=b[i].attributes["swiper-animate-duration"]?b[i].attributes["swiper-animate-duration"].value:"",duration&&(style=style+"animation-duration:"+duration+";-webkit-animation-duration:"+duration+";"),delay=b[i].attributes["swiper-animate-delay"]?b[i].attributes["swiper-animate-delay"].value:"",delay&&(style=style+"animation-delay:"+delay+";-webkit-animation-delay:"+delay+";"),b[i].setAttribute("style",style)}function clearSwiperAnimate(){for(allBoxes=window.document.documentElement.querySelectorAll(".ani"),i=0;i<allBoxes.length;i++)allBoxes[i].attributes["swiper-animate-style-cache"]&&allBoxes[i].setAttribute("style",allBoxes[i].attributes["swiper-animate-style-cache"].value),allBoxes[i].style.visibility="hidden",allBoxes[i].className=allBoxes[i].className.replace("animated"," "),allBoxes[i].attributes["swiper-animate-effect"]&&(effect=allBoxes[i].attributes["swiper-animate-effect"].value,allBoxes[i].className=allBoxes[i].className.replace(effect," "))}

View File

@@ -0,0 +1,252 @@
body,
html {
width: 100%;
height: 100%;
font-family: "Heiti SC", "Microsoft Sans Serif";
}
.container {
position: relative;
}
@media screen and (min-width: 769px) {
.m-bg {
display: none;
}
.m-bg img {
display: block;
}
.homePc {
width: 100%;
height: 10rem;
background: url(../images/homePc2.png) no-repeat;
background-size: 100% 100%;
position: relative;
}
.homePc .charge {
width: 1.11rem;
height: 0.5rem;
background: rgba(255, 255, 255, 0.2);
border-radius: .13rem;
font-size: 0.24rem;
color: #fff;
text-align: center;
line-height: 0.5rem;
position: absolute;
top: 0.16rem;
right: 2.77rem;
}
.homePc .googlePlay {
width: 2.2rem;
height: 0.7rem;
position: absolute;
left: 2.4rem;
bottom: 3.4rem;
}
.homePc .appleStore {
width: 2.2rem;
height: 0.7rem;
position: absolute;
left: 2.4rem;
bottom: 2.5rem;
}
.homePc .apk {
width: 2.2rem;
height: 0.7rem;
position: absolute;
left: 2.4rem;
bottom: 1.6rem;
}
.eori {
width: 100%;
background: #30312C;
color: white;
padding: 0.2rem 0;
vertical-align: top;
}
.eori .gongsi {
display: flex;
justify-content: center;
text-align: center;
}
.eori .gongsi p {
font-size: 0.2rem;
}
.eori .gongsi p:nth-child(2) {
margin: 0 0.2rem;
}
}
@media screen and (max-width: 768px) {
body {
background-color: #0C0122;
}
.pc-bg {
display: none;
}
.m-bg {
display: block;
}
.homeM {
width: 100%;
height: 14.89rem;
background: url(../images/homeM.png) no-repeat;
background-size: 100% 100%;
position: relative;
}
.homeM .charge {
width: 1.11rem;
height: 0.5rem;
background: rgba(255, 255, 255, 0.2);
border-radius: .13rem;
font-size: 0.24rem;
color: #fff;
text-align: center;
line-height: 0.5rem;
position: absolute;
top: 0.2rem;
right: 0.4rem;
}
.homeM .swiper {
width: 100%;
height: 8.6rem;
position: absolute;
top: 4.8rem;
overflow: hidden;
}
.homeM .swiper .swiper-wrapper {
width: 60%;
height: 100%;
}
.homeM .swiper .swiper-wrapper .swiper-slide img {
width: 100%;
height: 100%;
}
.homeM .swiper .swiper-wrapper .swiper-slide-prev {
width: 100%;
height: 90%;
margin-top: 0.6rem;
}
.homeM .swiper .swiper-wrapper .swiper-slide-next {
width: 100%;
height: 90%;
margin-top: 0.6rem;
}
.homeM .logo {
position: absolute;
bottom: 0.6rem;
left: 0;
width: 100%;
display: flex;
justify-content: space-evenly;
}
.homeM .logo img {
width: 2.2rem;
height: 0.7rem;
}
.button-wrapper {
display: block;
position: absolute;
left: 1.28rem;
top: 17.52rem;
width: 7.46667rem;
height: 1.22667rem;
}
.button-wrapper a {
display: inline-block;
width: 100%;
height: 100%;
}
.button2-wrapper {
display: block;
position: absolute;
left: 3.09333rem;
bottom: 1.70667rem;
width: 4rem;
height: 0.8rem;
background: rgba(255, 255, 255, 0);
}
.button2-wrapper a {
display: inline-block;
width: 100%;
height: 100%;
}
.m-button {
display: block;
}
.text-wrapper {
padding-left: 0;
width: 90%;
margin-left: -45%;
padding-top: 108px;
}
.text-wrapper .text .txt1 {
margin-bottom: 10px;
}
.text-wrapper .text1,
.text-wrapper p {
text-align: center;
}
.eori {
width: 100%;
background: #30312C;
color: white;
padding: 0.2rem 0;
}
.eori .recordfoot {
color: #fff;
display: flex;
justify-content: center;
align-items: center;
}
.eori .recordfoot .record {
display: inline-block;
padding-right: 0.05333rem;
height: 0.37333rem;
width: 0.42667rem;
background: url(../images/icon_police.png) no-repeat;
}
.eori .gongsi {
display: block;
text-align: center;
}
.eori .gongsi p {
line-height: 1.3;
font-size: 0.2rem;
}
.eori .gongsi p:nth-child(2) {
margin: 0;
}
.eori .tit {
height: 1.6rem;
line-height: 1.6rem;
text-align: center;
font-size: 20px;
}
}
.toast {
background: rgba(0, 0, 0, 0.9);
border-radius: 10px;
width: 100px;
font-size: 16px;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: #fff;
height: 40px;
line-height: 40px;
text-align: center;
display: none;
z-index: 9;
}
.tips {
display: none;
position: fixed;
top: 0;
right: 0.26667rem;
width: 6.13333rem;
z-index: 9;
}

View File

@@ -0,0 +1,336 @@
@function px2rem($px) {
@return $px / 75+rem;
}
body,
html {
width: 100%;
height: 100%;
font-family: "Heiti SC", "Microsoft Sans Serif";
//overflow: hidden;
}
.container {
position: relative;
}
// pc端
@media screen and (min-width:769px) {
.m-bg {
display: none;
img {
display: block;
}
}
.homePc {
width: 100%;
height: 10rem;
background: url(../images/homePc2.png) no-repeat;
background-size: 100% 100%;
position: relative;
.charge {
width: 1.11rem;
height: 0.5rem;
background: rgba(255, 255, 255, 0.2);
border-radius: .13rem;
font-size: 0.24rem;
color: #fff;
text-align: center;
line-height: 0.5rem;
position: absolute;
top: 0.16rem;
right: 2.77rem;
}
.googlePlay {
width: 2.2rem;
height: 0.7rem;
position: absolute;
left: 2.4rem;
bottom: 3.4rem;
}
.appleStore {
width: 2.2rem;
height: 0.7rem;
position: absolute;
left: 2.4rem;
bottom: 2.5rem;
}
.apk {
width: 2.2rem;
height: 0.7rem;
position: absolute;
left: 2.4rem;
bottom: 1.6rem;
}
}
.eori {
// height: 1.2rem;
width: 100%;
background: #30312C;
color: rgb(255, 255, 255);
padding: 0.2rem 0;
vertical-align: top;
// position: absolute;
// top: 0.8rem;
.gongsi {
display: flex;
justify-content: center;
text-align: center;
p {
font-size: 0.2rem;
&:nth-child(2) {
margin: 0 0.2rem;
}
}
}
}
}
// 移动端
@media screen and (max-width:768px) {
body {
background-color: #0C0122;
}
.pc-bg {
display: none;
}
.m-bg {
display: block;
}
.homeM {
width: 100%;
// width: px2rem(750);
// height: px2rem(1489);
// height: 19.88rem;
height: 14.89rem;
background: url(../images/homeM.png) no-repeat;
background-size: 100% 100%;
position: relative;
.charge {
width: 1.11rem;
height: 0.5rem;
background: rgba(255, 255, 255, 0.2);
border-radius: .13rem;
font-size: 0.24rem;
color: #fff;
text-align: center;
line-height: 0.5rem;
position: absolute;
top: 0.2rem;
right: 0.4rem;
// left: 50%;
// transform: translateX(-50%);
}
.swiper {
width: 100%;
height: 8.6rem;
position: absolute;
top: 4.8rem;
overflow: hidden;
.swiper-wrapper {
width: 60%;
height: 100%;
.swiper-slide {
img {
width: 100%;
height: 100%;
}
}
.swiper-slide-prev {
width: 100%;
height: 90%;
margin-top: 0.6rem;
}
.swiper-slide-next {
width: 100%;
height: 90%;
margin-top: 0.6rem;
}
}
}
.logo {
position: absolute;
bottom: 0.6rem;
left: 0;
width: 100%;
display: flex;
justify-content: space-evenly;
img {
width: 2.2rem;
height: 0.7rem;
}
}
}
.button-wrapper {
display: block;
position: absolute;
left: px2rem(96);
top: px2rem(1314);
width: px2rem(560);
height: px2rem(92);
a {
display: inline-block;
width: 100%;
height: 100%;
}
}
.button2-wrapper {
display: block;
position: absolute;
left: px2rem(232);
// top: px2rem(1208);
bottom: px2rem(128);
width: px2rem(300);
height: px2rem(60);
background: rgba(255, 255, 255, 0);
a {
display: inline-block;
width: 100%;
height: 100%;
}
}
.m-button {
display: block;
}
.text-wrapper {
padding-left: 0;
width: 90%;
margin-left: -45%;
padding-top: 108px;
.text {
.txt1 {
margin-bottom: 10px;
}
}
.text1,
p {
text-align: center;
}
}
.eori {
// height: 1.2rem;
width: 100%;
background: #30312C;
color: rgb(255, 255, 255);
padding: 0.2rem 0;
// position: absolute;
// top: 0.75rem;
.recordfoot {
color: #fff;
display: flex;
justify-content: center;
align-items: center;
.record {
display: inline-block;
padding-right: px2rem(4);
height: px2rem(28);
width: px2rem(32);
background: url(../images/icon_police.png) no-repeat;
}
}
.gongsi {
display: block;
text-align: center;
p {
line-height: 1.3;
font-size: 0.2rem;
&:nth-child(2) {
margin: 0;
}
}
}
// div {
// // height: 30px;
// width: 100%;
// text-align: center;
// // line-height: 30px;
// font-size: 14px;
// }
.tit {
height: px2rem(120);
line-height: px2rem(120);
text-align: center;
font-size: 20px;
}
}
}
// @media screen and (max-width:375px) {
// .text-wrapper {
// bottom: 0px;
// }
// .button-wrapper,
// .button-wrapper {
// display: block;
// }
// }
.toast {
background: rgba(0, 0, 0, 0.9);
border-radius: 10px;
width: 100px;
font-size: 16px;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: #fff;
height: 40px;
line-height: 40px;
text-align: center;
display: none;
z-index: 9;
}
.tips {
display: none;
position: fixed;
top: 0;
right: px2rem(20);
width: px2rem(460);
z-index: 9;
}

View File

@@ -0,0 +1,144 @@
/**
* Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
* http://cssreset.com
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header,
menu, nav, output, ruby, section, summary,
time, mark, audio, video, input {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font-weight: normal;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* custom */
a {
color: #7e8c8d;
text-decoration: none;
-webkit-backface-visibility: hidden;
}
li {
list-style: none;
}
::-webkit-scrollbar {
width: 5px;
height: 5px;
}
::-webkit-scrollbar-track-piece {
background-color: rgba(0, 0, 0, 0.2);
-webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:vertical {
height: 5px;
background-color: rgba(125, 125, 125, 0.7);
-webkit-border-radius: 6px;
}
::-webkit-scrollbar-thumb:horizontal {
width: 5px;
background-color: rgba(125, 125, 125, 0.7);
-webkit-border-radius: 6px;
}
html, body {
width: 100%;
}
body {
-webkit-text-size-adjust: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
img{
width: 100%;
vertical-align: top;
}
.mask,.share-mask {
position: fixed;
width: 100%;
left: 0;
bottom: 0;
display: flex;
height: 60px;
align-items: center;
background: rgba(0, 0, 0, 0.5);
justify-content: space-between;
padding: 0 8px;
box-sizing: border-box;
color:#fff;
display: none; }
.mask .logo {
width: 40px;
}
.mask .slogan {
color: #fff;
margin: 0 8px;
}
#download {
border: 1px solid #fff;
color: #fff;
width: 80px;
text-align: center;
border-radius: 15px;
line-height: 30px; }
#download a{
color: #fff; }
.share-mask{
padding: 0 16px;
}
.share-mask .shareBtn{
border-radius: 6px;
background: linear-gradient(to right,#fe95c0,#ff83b5);
height: 30px;
line-height: 30px;
width: 80px;
text-align: center;
}
.singleTemplate{
display: none;
}

15
view/peko/home1/css/swiper.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1012 B

After

Width:  |  Height:  |  Size: 1012 B

View File

Before

Width:  |  Height:  |  Size: 1021 B

After

Width:  |  Height:  |  Size: 1021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 954 B

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 554 KiB

After

Width:  |  Height:  |  Size: 554 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

View File

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 133 KiB

View File

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

Before

Width:  |  Height:  |  Size: 215 KiB

After

Width:  |  Height:  |  Size: 215 KiB

View File

Before

Width:  |  Height:  |  Size: 247 KiB

After

Width:  |  Height:  |  Size: 247 KiB

View File

Before

Width:  |  Height:  |  Size: 200 KiB

After

Width:  |  Height:  |  Size: 200 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

106
view/peko/home1/index.html Normal file
View File

@@ -0,0 +1,106 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta name="renderer" content="webkit">
<meta name="format-detection" content="telphone=no, email=no" />
<meta name="HandheldFriendly" content="true">
<meta name="MobileOptimized" content="375">
<meta name="screen-orientation" content="portrait">
<meta name="x5-orientation" content="portrait">
<meta name="full-screen" content="yes">
<meta name="x5-fullscreen" content="true">
<meta name="browsermode" content="application">
<meta name="x5-page-mode" content="app">
<meta name="msapplication-tap-highlight" content="no">
<meta name="apple-mobile-web-app-capable" content="no" />
<meta name="format-detection" content="telephone=no">
<title>piko</title>
<!-- <link rel="stylesheet" href="./home/css/reset.css"> -->
<link rel="shortcut icon" href="./images/pikolive.png" type="image/x-icon">
<link rel="stylesheet" href="./css/reset.css">
<link rel="stylesheet" href="./css/index.css">
<!-- <link rel="stylesheet" href="./home/css/index.css"> -->
<link rel="stylesheet" href="./css/swiper.min.css">
<!-- <script src="./js/flexible.js"></script> -->
</head>
<body>
<div class="container">
<div class="pc-bg">
<!-- <img src="./images/homePc.png" alt=""> -->
<div class="homePc">
<div class="charge">儲值</div>
<div class="googlePlay"></div>
<div class="appleStore"></div>
<div class="apk"></div>
</div>
</div>
<div class="m-bg">
<!-- <img src="./images/homeM.png" alt=""> -->
<div class="homeM">
<div class="charge">儲值</div>
<!-- 轮播 -->
<div class="swiper-container swiper">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="./images/pic1.png" alt="">
</div>
<div class="swiper-slide">
<img src="./images/pic2.png" alt="">
</div>
<div class="swiper-slide">
<img src="./images/pic3.png" alt="">
</div>
</div>
<!-- <div class="swiper-pagination swp"></div> -->
</div>
<div class="logo">
<img class="googlePlay" src="./images/googlePlay2.png" alt="">
<img class="appleStore" src="./images/appleStore.png" alt="">
<img class="apk" src="./images/apk.png" alt="">
</div>
</div>
</div>
<!-- <div class="button-wrapper download">
</div>
<div class="button2-wrapper download">
</div> -->
<div class="eori">
<!-- <div class="recordfoot">
<i class="record"></i>
<a href="https://beian.miit.gov.cn/#/Integrated/index">粤ICP备2020098441号</a>
</div> -->
<div class="gongsi">
<p>Hongkong Han Fei Technology Co., Limited</p>
<!-- <p>香港翰飞科技有限公司</p> -->
<p>CR No:3040005 </p>
<p>AddressBLDG. 19-21 HING YIP STREET KWUN TONG, KLN</p>
</div>
</div>
</div>
<div class="toast">敬请期待</div>
<div class="tips">
<img src="./images/tips.png" alt="">
</div>
<script src="./js/jquery.min.js"></script>
<script src="./js/common.js"></script>
<script src="./js/jquery.qrcode.js"></script>
<script src="http://static.lkme.cc/linkedme.min.js"></script>
<script src="./js/utf.js"></script>
<script src="./js/swiper.min.js"></script>
<script src="./js/index.js?v=2.2"></script>
</body>
</html>

View File

@@ -0,0 +1,321 @@
const productUrl = 'https://api.pekolive.com'; // 正式环境
const testUrl = 'http://beta.api.pekolive.com'; // 测试环境
function render (templateId, templateData, target) {
var html = template(templateId, templateData);
target.innerHTML += html;
}
// 根据域名判断 正式环境(含www)/测试环境(含beta), 并返回所需url前缀
// written by zxfxiong
function getUrlPrefix () {
if (!EnvCheck()) return undefined;
return EnvCheck() === 'live' ? productUrl : testUrl;
}
function dateFormat (date, fmt) {
date = new Date(date);
var o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds()
};
// 补全0
function padLeftZero(str) {
return('00' + str).substr(str.length);
}
// 年份
if(/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
}
// 月日时分秒
for(var k in o) {
if(new RegExp('(' + k + ')').test(fmt)) {
var str = o[k] + '';
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str));
}
}
date = o = padLeftZero = null;
return fmt;
}
function convert (_url) {
var patt=/\d+/;
var num=_url.match(patt);
var rs={};
rs.uid=num[0];
return rs;
}
// 传递分享信息给客户端,showUrl为分享的页面链接,为空时表示不分享
// function shareInfo () {
// var _url = 'http://www.erbanyy.com/modules/bonus/fight.html';
// var res = EnvCheck();
// if (res == 'test'){
// _url = 'http://beta.erbanyy.com/modules/bonus/fight.html';
// }
// var info = {
// title: '耳伴与你一起红',
// imgUrl: 'http://www.erbanyy.com/home/images/logo.png',
// desc: '登录即送20红包每天还有分享红包邀请红包分成红包四重红包大礼等你来拿',
// showUrl: _url
// };
// return JSON.stringify(info);
// }
// 根据域名适配环境
function EnvCheck () {
if (window.location.href) {
var _url = window.location.href;
var res = _url.match(/uat/);
var res1 = _url.match(/120.79.211.243/);
var res2 = _url.match(/192.168./)
var res3 = _url.match(/127.0/)
var res4 = _url.match(/beta/)
if (res || res1 || res2 || res3 || res4) {
return 'test';
} else {
return 'live';
}
}
}
// 根据域名判断是本地打开还是服务器打开
function locateJudge() {
if(window.location.href){
var _url = window.location.href;
var res = _url.match(/test/);
if(res){
return '/api';
}else{
return '';
}
}
}
// 获取地址栏参数
function getQueryString(){
var _url = location.search;
var theRequest = new Object();
if(_url.indexOf('?') != -1){
var str = _url.substr(1);
strs = str.split('&');
for(var i in strs){
theRequest[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
}
}
return theRequest;
}
// 判断浏览器内核,手机类型
function checkVersion(){
var u = navigator.userAgent, app = navigator.appVersion;
return {
trident: u.indexOf('Trident') > -1, //IE内核
presto: u.indexOf('Presto') > -1, //opera内核
webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,//火狐内核
mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
iPhone: u.indexOf('iPhone') > -1 , //是否为iPhone或者QQHD浏览器
iPad: u.indexOf('iPad') > -1, //是否iPad
webApp: u.indexOf('Safari') == -1, //是否web应该程序没有头部与底部
weixin: u.indexOf('MicroMessenger') > -1, //是否微信
qq: u.match(/\sQQ/i) == " qq", //是否QQ
app: u.match('mengshengApp') == 'mengshengApp' //是否在app内
};
}
// 图片预加载
function preloadImage(obj){
var loadLength = 0,newImages = [];
for(var i = 0;i < obj.imageArr.length;i++){
newImages[i] = new Image();
newImages[i].src = obj.imageArr[i];
newImages[i].onload = newImages[i].onerror = function(){
loadLength++;
typeof obj.preloadPreFunc === 'function' && obj.preloadPreFunc(loadLength);
if(loadLength == obj.imageArr.length){
typeof obj.doneFunc === 'function' && obj.doneFunc();
}
}
}
}
// 判断是否在App内
function isApp() {
var androidBol = false;
var osBol = false;
if(window.androidJsObj && typeof window.androidJsObj === 'object'){
androidBol = true;
}
if(window.webkit){
console.log(window.webkit);
osBol = true;
}
return (androidBol || osBol);
}
function msMask(channel,tags,params) {
//此函数用于一般的耳伴底层面罩
var browser = checkVersion();
var env = EnvCheck();
// params = params? params:0;
var bol = $.isEmptyObject(params);
var jsonStr = '';
if(!bol) {
jsonStr = JSON.stringify(params);
}
if(!browser.app){
$('#mask').css('display','flex');
var linkData = {
type: env,
channel: channel,
tags: tags,
// ios_custom_url: "https://itunes.apple.com/cn/app/id1252542069?mt=8",
params: jsonStr
// '{"uid":"' + params + '"}'
};
linkedme.init("414571f0698afaa1c194f345f0dcc328", {type: env}, null);
linkedme.link(linkData, function(err, response){
if(err){
// 生成深度链接失败返回错误对象err
console.log('err:',err);
} else {
console.log(response);
$('#download a').attr("href",response.url);
$('.download a').attr('href',response.url);
}
},false);
}else{
$('#share-mask').css('display','flex');
}
}
function wxConfig() {
var wxurl = encodeURIComponent(location.href.split('#')[0]);
var data ="url=" + wxurl;
console.log(data);
$.ajax({
type:'GET',
url: '/wx/config',
data: data,
asyc: true,
success: function (data) {
if(data.code = 200){
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来若要查看传入的参数可以在pc端打开参数信息会通过log打出仅在pc端时才会打印。
appId: data.data.appId, // 必填,公众号的唯一标识
timestamp: data.data.timestamp, // 必填,生成签名的时间戳
nonceStr: data.data.nonceStr, // 必填,生成签名的随机串
signature: data.data.signature,// 必填签名见附录1
jsApiList: data.data.jsApiList // 必填需要使用的JS接口列表所有JS接口列表见附录2
});
wx.error(function(res){
console.log('config error,msg:'+res);
});
}
},
error:function(res){
console.log('config error,msg:'+res);
}
})
}
// function refreshWeb() {
// window.location.href = window.location.href;
// }
$('#share-mask .shareBtn').on('click',function () {
var browser = checkVersion();
if (browser.app) {
if (browser.android) {
window.androidJsObj.openSharePage();
} else if (browser.ios) {
window.webkit.messageHandlers.openSharePage.postMessage(null);
}
}
})
/**
* 渲染列表组件
* @param templateId 组件的id
* @param $target 渲染目标dom
* @param attrParam 属性名,格式 {'.class':['dataAttr',type]}
* @param data 渲染数据的数组
*/
function templateList(templateId,$target,attrParam,data){
var $template = $(templateId);
var str = $template.html();
for(var i = 0;i < data.length;i++){
var $list = $(str);
$target.append($list);
for(var j in attrParam){
if(attrParam[j][1] == 1){
$list.find(j + ' img').attr('src',data[i][attrParam[j][0]]);
}else if(attrParam[j][1] == 2){
$list.find(j).html(data[i][attrParam[j][0]]);
}
}
}
}
function initNav(obj) {
if($.isEmptyObject(obj)){
return;
}
var browser = checkVersion();
if(browser.app){
if(browser.ios){
window.webkit.messageHandlers.initNav.postMessage(obj);
}else if(browser.android){
var json = JSON.stringify(obj);
window.androidJsObj.initNav(json);
}
}
}
var tranUrl = 'http://www.if66.cn';
var tools = {
cookieUtils: {
set: function(key, val, time) {
var date = new Date();
var expiresDays = time;
date.setTime(date.getTime() + expiresDays * 24 * 3600 * 1000);
document.cookie = key + '=' + val + ';expires=' + date.toGMTString();
},
get: function(key) {
// 获取cookie参数
var getCookie = document.cookie.replace(/[ ]/g,'');
var arrCookie = getCookie.split(';');
var val;
for(var i = 0 ; i < arrCookie.length ; i++) {
var arr = arrCookie[i].split('=');
if(key === arr[0]) {
val = arr[1];
break;
}
}
return val;
},
delete: function(key) { //删除cookie方法
var date = new Date(); //获取当前时间
date.setTime(date.getTime() - 10000); //将date设置为过去的时间
document.cookie = key + '=v; expires =' + date.toGMTString(); //设置cookie
}
}
}

View File

@@ -0,0 +1,109 @@
;(function(win, lib) {
var doc = win.document;
var docEl = doc.documentElement;
var metaEl = doc.querySelector('meta[name="viewport"]');
var flexibleEl = doc.querySelector('meta[name="flexible"]');
var dpr = 0;
var scale = 0;
var tid;
var flexible = lib.flexible || (lib.flexible = {});
if (metaEl) {
console.warn('将根据已有的meta标签来设置缩放比例');
var match = metaEl.getAttribute('content').match(/initial\-scale=([\d\.]+)/);
if (match) {
scale = parseFloat(match[1]);
dpr = parseInt(1 / scale);
}
} else if (flexibleEl) {
var content = flexibleEl.getAttribute('content');
if (content) {
var initialDpr = content.match(/initial\-dpr=([\d\.]+)/);
var maximumDpr = content.match(/maximum\-dpr=([\d\.]+)/);
if (initialDpr) {
dpr = parseFloat(initialDpr[1]);
scale = parseFloat((1 / dpr).toFixed(2));
}
if (maximumDpr) {
dpr = parseFloat(maximumDpr[1]);
scale = parseFloat((1 / dpr).toFixed(2));
}
}
}
if (!dpr && !scale) {
var isAndroid = win.navigator.appVersion.match(/android/gi);
var isIPhone = win.navigator.appVersion.match(/iphone/gi);
var devicePixelRatio = win.devicePixelRatio;
if (isIPhone) {
// iOS下对于2和3的屏用2倍的方案其余的用1倍方案
if (devicePixelRatio >= 3 && (!dpr || dpr >= 3)) {
dpr = 3;
} else if (devicePixelRatio >= 2 && (!dpr || dpr >= 2)){
dpr = 2;
} else {
dpr = 1;
}
} else {
// 其他设备下仍旧使用1倍的方案
dpr = 1;
}
scale = 1 / dpr;
}
docEl.setAttribute('data-dpr', dpr);
if (!metaEl) {
metaEl = doc.createElement('meta');
metaEl.setAttribute('name', 'viewport');
metaEl.setAttribute('content', 'initial-scale=' + scale + ', maximum-scale=' + scale + ', minimum-scale=' + scale + ', user-scalable=no');
if (docEl.firstElementChild) {
docEl.firstElementChild.appendChild(metaEl);
} else {
var wrap = doc.createElement('div');
wrap.appendChild(metaEl);
doc.write(wrap.innerHTML);
}
}
function refreshRem(){
var width = docEl.getBoundingClientRect().width;
if (width / dpr > 730) {
width = 730 * dpr;
}
var rem = width / 10;
docEl.style.fontSize = rem + 'px';
flexible.rem = win.rem = rem;
}
win.addEventListener('resize', function() {
clearTimeout(tid);
tid = setTimeout(refreshRem, 300);
}, false);
win.addEventListener('pageshow', function(e) {
if (e.persisted) {
clearTimeout(tid);
tid = setTimeout(refreshRem, 300);
}
}, false);
if (doc.readyState === 'complete') {
doc.body.style.fontSize = 12 * dpr + 'px';
} else {
doc.addEventListener('DOMContentLoaded', function(e) {
doc.body.style.fontSize = 12 * dpr + 'px';
}, false);
}
refreshRem();
flexible.dpr = win.dpr = dpr;
flexible.refreshRem = refreshRem;
flexible.rem2px = function(d) {
var val = parseFloat(d) * this.rem;
if (typeof d === 'string' && d.match(/rem$/)) {
val += 'px';
}
return val;
}
flexible.px2rem = function(d) {
var val = parseFloat(d) / this.rem;
if (typeof d === 'string' && d.match(/px$/)) {
val += 'rem';
}
return val;
}
})(window, window['lib'] || (window['lib'] = {}));

121
view/peko/home1/js/index.js Normal file
View File

@@ -0,0 +1,121 @@
/* eslint-disable semi */
/* eslint-disable no-undef */
let version = checkVersion()
let urlData = getQueryString()
const urlPrefix = getUrlPrefix()
//获取url参数
let channelData = urlData.channel
//定义官方渠道包
const channelDict = {
'poke0': 'https://image.lecheng163.com/poke_poke0.apk',
'poke1': 'https://image.lecheng163.com/poke_poke1.apk',
'poke2': 'https://image.lecheng163.com/poke_poke2.apk',
'poke3': 'https://image.lecheng163.com/poke_poke3.apk',
'poke4': 'https://image.lecheng163.com/poke_poke4.apk',
'poke5': 'https://image.lecheng163.com/poke_poke5.apk',
'poke6': 'https://image.lecheng163.com/poke_poke6.apk',
'poke7': 'https://image.lecheng163.com/poke_poke7.apk',
'poke8': 'https://image.lecheng163.com/poke_poke8.apk',
'poke9': 'https://image.lecheng163.com/poke_poke9.apk',
'poke10': 'https://image.lecheng163.com/poke_poke10.apk',
'gongzhonghao': 'https://image.lecheng163.com/poke_gongzhonghao.apk',
'zhaohui': 'https://image.lecheng163.com/zhaohui.apk'
// 'baomihua01': 'https://image.lecheng163.com/accompany_release_v_213_1_baomihua01_sign.apk'
}
$(function () {
//判断url参数是否是与渠道包名一致
let androidUrl = null;
channelDict.hasOwnProperty(channelData) ? androidUrl = channelDict[channelData] : androidUrl = 'https://play.google.com/store/apps/details?id=com.vele.pekolive';
let iosUrl = 'http://doudouyue.com/8axv' //ios企业包
// let iosUrl = 'https://apps.apple.com/cn/app/id1571083482' //ios商店包
if (version.ios) {
$('.button-wrapper').on('click', function () {
if (version.weixin) {
$('.tips').show()
return
}
window.location.href = iosUrl;
})
} else if (version.android) {
$('.button-wrapper').on('click', function () {
if (version.weixin) {
$('.tips').show()
return
}
window.location.href = androidUrl;
})
} else {
$('.button-wrapper').on('click', function () {
window.location.href = androidUrl;
})
$('.button2-wrapper').on('click', function () {
window.location.href = iosUrl;
})
}
})
function swiperFun () {
var swiper = new Swiper('.swiper', {
direction: 'horizontal',
loop: true,
autoplay: 5000,
slidesPerView: "auto",
centeredSlides: true,
spaceBetween: 0,
initialSlide: 1,//默认第二个居中
});
}
$(function () {
$(document).ready(function () {
var deviceWidth = document.documentElement.clientWidth;
if (deviceWidth > 768) {
document.documentElement.style.fontSize = deviceWidth / 19.20 + 'px';
} else {
document.documentElement.style.fontSize = deviceWidth / 7.50 + 'px';
}
});
window.onresize = function () {
var deviceWidth = document.documentElement.clientWidth;
// console.log('deviceWidth', deviceWidth);
if (deviceWidth > 768) {
document.documentElement.style.fontSize = deviceWidth / 19.20 + 'px';
} else {
document.documentElement.style.fontSize = deviceWidth / 7.50 + 'px';
}
}
swiperFun();
//跳转pc端充值
$('.homePc .charge').click(function () {
window.location.href = urlPrefix + '/peko/modules/payPc/index.html?channelType=4';
})
// 跳转移动端h5充值
$('.homeM .charge').click(function () {
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
})
// logo跳转
$('.googlePlay').click(function () {
return
window.location.href = 'https://play.google.com/store/apps/details?id=com.vele.pekolive'
})
$('.appleStore').click(function () {
// console.log(version, 'version');
if (version.webKit && version.ios) {
window.location.href = 'https://apps.apple.com/cn/app/id6446155565'
}
else {
window.location.href = 'http://doudouyue.com/3gh2'
}
})
$('.apk').click(function () {
window.location.href = 'https://img.pekolive.com/piko_official.apk'
})
})

4
view/peko/home1/js/jquery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>piko技术服务支持</title>
<link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/index.css">
<style>
*{
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<img src="./images/support.png" alt="" style="width: 100%;">
<!-- <script src="../../common/js/flexible.js"></script> -->
</body>
</html>

View File

@@ -0,0 +1,32 @@
html, body {
min-height: 100%;
background: #084f70;
font-family: "Helvetica Neue","Helvetica",Arial,sans-serif;
font-weight: 100;
font-size: 14px;
color: #fff;
text-align: center;
margin: 0;
padding: 0;
}
body {
padding: 20px;
}
.title {
font-size: 18px;
}
.subtitle {
font-size: 16px;
margin: 20px 0;
}
.note {
font-style: italic;
font-size: 14px;
}
b {
font-weight: 300;
}

View File

@@ -1,5 +1,4 @@
@charset "UTF-8"; @charset "UTF-8";
@import url("../../../common/css/flex.scss");
body { body {
width: 100%; width: 100%;
background: #fff; background: #fff;

View File

@@ -1,4 +1,4 @@
@import url('../../../common/css/flex.scss'); // @import url('../../../common/css/flex.scss');
@function px2rem($px) { @function px2rem($px) {
@return $px / 75+rem; @return $px / 75+rem;

View File

@@ -7,10 +7,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>充值</title> <title>充值</title>
<link rel="stylesheet" href="../../common/css/reset.css"> <link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/index.css?v=1.0"> <link rel="stylesheet" href="../../common/css/flex.css">
<link rel="stylesheet" href="./css/index.css?v=1.1">
</head> </head>
<body> <body>
<div class="box_box" style="display: none;">
<!-- header --> <!-- header -->
<div class="header"> <div class="header">
<div class="box"> <div class="box">
@@ -160,6 +162,7 @@
<div class="guidd"> <div class="guidd">
<img src="./images/guide.png" alt=""> <img src="./images/guide.png" alt="">
</div> </div>
</div>
</body> </body>
</html> </html>
@@ -168,4 +171,4 @@
<script src="../../common/js/common2.js"></script> <script src="../../common/js/common2.js"></script>
<script src="../../common/js/layer.js"></script> <script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script> <script src="../../common/js/vconsole.min.js"></script>
<script src="./js/index.js?v=1.0"></script> <script src="./js/index.js?v1.0"></script>

View File

@@ -54,6 +54,9 @@ $(function () {
channelType = getUrl.channelType; channelType = getUrl.channelType;
getArea(); getArea();
}, 100) }, 100)
setTimeout(function () {
$('.box_box').show()
}, 800)
}) })
// 请求地区列表 // 请求地区列表
function getArea () { function getArea () {
@@ -216,6 +219,11 @@ $('.page1 .position').on('click', 'div', function () {
}) })
// 充值接口 // 充值接口
function apply2New () { function apply2New () {
if (border.app) {
failureUrl = urlPrefix + '/peko/modules/pay/result.html?channelType=4&app=1';
} else {
failureUrl = urlPrefix + '/peko/modules/pay/result.html?channelType=4&app=0';
}
apply2NewLock = false; apply2NewLock = false;
showLoading(); showLoading();
networkRequest({ networkRequest({

View File

@@ -0,0 +1,141 @@
// Written by Daniel Cohen Gindi
// danielgindi@gmail.com
// http://github.com/danielgindi/app-redirect
(function () {
var queryString = {},
browserMovedToBackground = false;
// Parse the query string so we can take individual query string params
(function (search) {
search = (search || '').split(/[\&\?]/g);
for (var i = 0, count = search.length; i < count; i++) {
if (!search[i]) continue;
var pair = search[i].split('=');
queryString[pair[0]] = queryString[pair[0]] !== undefined ?
([pair[1] || ''].concat(queryString[pair[0]])) :
(pair[1] || '');
}
})(window.location.search);
// Listen to visibility change to prevent next url
window.document.addEventListener("visibilitychange", function(e) {
browserMovedToBackground = window.document.visibilityState === 'hidden' || window.document.visibilityState === 'unloaded';
});
window.addEventListener("blur", function(e) {
browserMovedToBackground = true;
});
var AppRedirect = {
/**
* @expose
* @public
* */
queryString: queryString,
redirect: function (options) {
var hasIos = !!(options.iosApp || options.iosAppStore);
var hasAndroid = !!(options.android);
var hasOverallFallback = !!(options.overallFallback);
/**
* What happens now is:
* 1. We select the correct platform based on userAgent
* 2. We try to open the app using the special schema
*
* └───> If it succeded, the we have left the browser, and went to the app.
* *. If the user goes back to the browser at this stage, he will be sadly redirected to the second url (AppStore etc.)
* └───> If opening the app failed (schema not recognized), then:
* 1. An error will be shown
* 2. The user will be redirected to the second url.
* *. Returning to the browser later will show the error.
*
* For Android it's different. There's the intent:// url, which takes the "package" argument in order to fallback to the Store.
* But if you want to aggregate arguments to the store, you can use the "fallback" argument for that, and supply a Store url.
* QueryString arguments will be automatically aggregated.
*/
var tryToOpenInMultiplePhases = function(urls) {
browserMovedToBackground = false;
var currentIndex = 0;
var redirectTime = new Date();
window.location = urls[currentIndex++];
var next = function () {
if (urls.length > currentIndex) {
setTimeout(function () {
if (browserMovedToBackground) {
console.log('Browser moved to the background, we assume that we are done here')
return;
}
if (new Date() - redirectTime > 3000) {
console.log('Enough time has passed, the app is probably open');
} else {
redirectTime = new Date();
window.location = urls[currentIndex++];
next();
}
}, 10);
}
};
next();
};
// var chromeVersion = /Chrome\/([0-9\.]+)/.test(navigator.userAgent) ? navigator.userAgent.match(/Chrome\/([0-9\.]+)/)[1] : '';
if (hasIos && /iP(hone|ad|od)/.test(navigator.userAgent)) {
var urls = [];
if (options.iosApp) {
urls.push(options.iosApp);
}
if (options.iosAppStore) {
urls.push(options.iosAppStore);
}
tryToOpenInMultiplePhases(urls);
} else if (hasAndroid && /Android/.test(navigator.userAgent)) {
var intent = options.android;
var intentUrl = 'intent://' + intent.host + '#Intent;' +
'scheme=' + encodeURIComponent(intent.scheme) + ';' +
'package=' + encodeURIComponent(intent.package) + ';' +
(intent.action ? 'action=' + encodeURIComponent(intent.action) + ';': '') +
(intent.category ? 'category=' + encodeURIComponent(intent.category) + ';': '') +
(intent.component ? 'component=' + encodeURIComponent(intent.component) + ';': '') +
(intent.fallback ? 'S.browser_fallback_url=' + encodeURIComponent(intent.fallback) + ';': '') +
'end';
var anchor = document.createElement('a');
document.body.appendChild(anchor);
anchor.href = intentUrl;
if (anchor.click) {
anchor.click();
} else {
window.location = intentUrl;
}
} else if(hasOverallFallback) {
window.location = options.overallFallback;
} else {
console.log('Unknown platform and no overallFallback URL, nothing to do');
}
}
};
/** @expose */
window.AppRedirect = AppRedirect;
})();

View File

@@ -24,6 +24,8 @@ const toastMsg = (content = '操作完成', time = 2) => {
}) })
} }
var chargeRecordId = null;//订单号 var chargeRecordId = null;//订单号
var chargeStatus = 0;
var isApp = 0;
$(function () { $(function () {
if (EnvCheck() == 'test') {//degBug if (EnvCheck() == 'test') {//degBug
new VConsole(); new VConsole();
@@ -44,11 +46,12 @@ function getChargeResult () {
success: function (res) { success: function (res) {
if (res.code == 200) { if (res.code == 200) {
$('.success').show(); $('.success').show();
chargeStatus = 1;
} else { } else {
chargeStatus = 0;
$('.result span').text(`原因:${res.message}`); $('.result span').text(`原因:${res.message}`);
$('.err').show(); $('.err').show();
hideLoading(layerIndex); hideLoading(layerIndex);
// toastMsg(res.message);
} }
hideLoading(layerIndex); hideLoading(layerIndex);
}, },
@@ -59,5 +62,34 @@ function getChargeResult () {
}); });
} }
$('.result .but').click(function () { $('.result .but').click(function () {
isApp = getUrl.app;
if (isApp == 1) {
if (browser.app) {
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
} else {
window.location.href = `pekoapp://payment/result?status=${chargeStatus}`;
}
} else {
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
}
return
var qs = AppRedirect.queryString;
// Here we initiate the redirect process
AppRedirect.redirect({
iosApp: 'twitter://post?message=' + qs['message'],
iosAppStore: 'https://itunes.apple.com/il/app/twitter/id333903271?mt=8&message=' + qs['message'],
// 为此,你的应用需要有一个类别过滤器:android.intent.category.BROWSABLE
android: {
// 'host': 'post/?message=' + encodeURIComponent(qs['message']), // 自定义方案URL中的Host/path/querystring部分
// 'action': " //相当于intent中的action
// 'category': ' //相当于intent中的category
// 'component': ' //相当于intent中的component
// 'scheme': 'twitter', // 自定义方案URL中的方案部分
// 'package': 'com.twitter.android', // Play store中的包名
// 'fallback': 'https://play.google.com/store/apps/details?id=com.twitter.android&hl=en&message=' + qs['message']
'scheme': 'pekoapp',
'host': 'payment/result'
}
});
}) })

View File

@@ -7,6 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>储值结果</title> <title>储值结果</title>
<link rel="stylesheet" href="../../common/css/reset.css"> <link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/default.css">
<link rel="stylesheet" href="./css/result.css"> <link rel="stylesheet" href="./css/result.css">
</head> </head>
@@ -15,7 +16,7 @@
<img src="./images/err.png" alt=""> <img src="./images/err.png" alt="">
<p>储值失败</p> <p>储值失败</p>
<span>原因xxxxx</span> <span>原因xxxxx</span>
<div class="but">返回储值页面</div> <div class="but">返回</div>
</div> </div>
<div class="result success"> <div class="result success">
<img src="./images/success.png" alt=""> <img src="./images/success.png" alt="">
@@ -30,4 +31,5 @@
<script src="../../common/js/common2.js"></script> <script src="../../common/js/common2.js"></script>
<script src="../../common/js/layer.js"></script> <script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script> <script src="../../common/js/vconsole.min.js"></script>
<script src="./js/result.js"></script> <script src="./js/redirect.js"></script>
<script src="./js/result.js?v1.0"></script>