完成糖果树以及星级厨房

This commit is contained in:
Dragon
2022-10-20 18:44:45 +08:00
parent 7931c60a68
commit fabea89a1c
56 changed files with 717 additions and 626 deletions

View File

@@ -1,80 +1,75 @@
@font-face {
font-family: 'pingfang-medium';
font-family: "pingfang-medium";
src: url("../../../common/fonts/PingFang-Medium.ttf");
src: url("../../../common/fonts/PingFang-Medium.ttf") format("woff"), url("../../../common/fonts/PingFang-Medium.ttf") format("truetype"), url("../../../common/fonts/PingFang-Medium.ttf") format("svg");
}
@font-face {
font-family: 'pingfang-bold';
font-family: "pingfang-bold";
src: url("../../../common/fonts/PingFang-Bold.ttf");
src: url("../../../common/fonts/PingFang-Bold.ttf") format("woff"), url("../../../common/fonts/PingFang-Bold.ttf") format("truetype"), url("../../../common/fonts/PingFang-Bold.ttf") format("svg");
}
@font-face {
font-family: 'pingfang-regular';
font-family: "pingfang-regular";
src: url("../../../common/fonts/PingFang-Regular.ttf");
src: url("../../../common/fonts/PingFang-Regular.ttf") format("woff"), url("../../../common/fonts/PingFang-Regular.ttf") format("truetype"), url("../../../common/fonts/PingFang-Regular.ttf") format("svg");
}
body {
font-family: 'pingfang-medium';
font-family: "pingfang-medium";
background: #7956F2;
}
.wrap {
background: url("../images/bg.png") no-repeat 0 0/100%;
overflow: hidden;
}
.wrap .rule-btn {
position: relative;
}
.wrap .rule-btn img {
.wrap .rule-btn div {
position: absolute;
top: 0.61333rem;
top: 0.6133333333rem;
right: 0;
width: 1.84rem;
height: 0.64rem;
line-height: 0.64rem;
background: url(../images/introduce.png) no-repeat;
background-size: 100% 100%;
text-align: center;
color: #FFFFFF;
font-size: 0.3466666667rem;
}
.wrap ul.buy-area {
margin-top: 10.13333rem;
margin-top: 4.133333rem;
margin-bottom: 3.2rem;
overflow: hidden;
}
.wrap ul.buy-area li {
position: relative;
width: 8rem;
height: 6.13333rem;
margin: 0.82667rem auto 0;
height: 6.1333333333rem;
margin: 0.8266666667rem auto 0;
overflow: hidden;
}
.wrap ul.buy-area li .headwear-info {
margin-left: 3.86667rem;
margin-left: 3.8666666667rem;
margin-top: 2.4rem;
}
.wrap ul.buy-area li .headwear-info .headwear-name {
font-family: 'pingfang-bold';
font-family: "pingfang-bold";
font-size: 0.4rem;
font-weight: bold;
color: #FFF600;
}
.wrap ul.buy-area li .headwear-info .headwear-price {
line-height: 0.53333rem;
line-height: 0.5333333333rem;
color: #fff;
font-size: 0.29333rem;
font-size: 0.2933333333rem;
}
.wrap ul.buy-area li .headwear-info .headwear-award {
color: #4946D8;
font-size: 0.29333rem;
margin-top: 0.26667rem;
color: #fff;
font-size: 0.2933333333rem;
margin-top: 0.2666666667rem;
}
.wrap ul.buy-area li .headwear-info .buy-btn {
position: absolute;
left: 50%;
@@ -82,19 +77,22 @@ body {
bottom: 0.4rem;
width: 4.8rem;
height: 0.96rem;
line-height: 0.96rem;
background: url("../images/buy-btn.png") no-repeat 0 0/100% 100%;
font-size: 0.4rem;
cursor: pointer;
color: #7944DA;
font-size: 0.4266666667rem;
text-align: center;
font-weight: bold;
}
.wrap ul.buy-area li .headwear-info .buy-btn .headwear-price-wrap img.icon {
width: 0.50667rem;
width: 0.5066666667rem;
height: 0.4rem;
margin-left: 0.26667rem;
margin-left: 0.2666666667rem;
}
.wrap ul.buy-area li .headwear-info .buy-btn .tip {
width: 2.66667rem;
width: 2.6666666667rem;
height: 0.8rem;
line-height: 0.8rem;
background: url("../images/buy-btn.png") no-repeat 0 0/100% 100%;
@@ -110,23 +108,20 @@ body {
z-index: 99;
width: 100%;
height: 1.6rem;
background-color: #6D49EF;
background: url(../images/bottom.png) no-repeat;
display: flex;
align-items: center;
}
.mine .avatar {
width: 1.06667rem;
height: 1.06667rem;
width: 1.0666666667rem;
height: 1.0666666667rem;
margin-left: 0.4rem;
margin-right: 0.26667rem;
margin-right: 0.2666666667rem;
}
.mine .avatar img {
width: 100%;
border-radius: 50%;
}
.mine .info-wrap {
flex: 1;
display: flex;
@@ -136,28 +131,25 @@ body {
font-size: 0.4rem;
color: #fff;
}
.mine .info-wrap .nick {
font-size: 0.4rem;
}
.mine .info-wrap div {
display: flex;
font-family: 'pingfang-regular';
font-size: 0.29333rem;
font-family: "pingfang-regular";
font-size: 0.2933333333rem;
}
.mine .info-wrap div p {
margin-right: 0.53333rem;
margin-right: 0.5333333333rem;
}
.rule-mask {
width: 7.46667rem;
width: 7.4666666667rem;
height: 8rem;
position: fixed;
left: 50%;
top: 50%;
margin-left: -3.73333rem;
margin-left: -3.7333333333rem;
margin-top: -4rem;
z-index: 1001;
background-color: white;
@@ -165,40 +157,35 @@ body {
overflow: hidden;
display: none;
}
.rule-mask .title {
width: 100%;
text-align: center;
font-size: 0.42667rem;
font-size: 0.4266666667rem;
color: #5B1DC2;
margin-top: 0.4rem;
font-weight: bold;
}
.rule-mask .content {
width: 100%;
height: 6rem;
margin: 0 auto;
margin-top: 0.4rem;
overflow: auto;
padding: 0 0.53333rem 0 0.93333rem;
padding: 0 0.5333333333rem 0 0.9333333333rem;
box-sizing: border-box;
-webkit-overflow-scrolling: touch;
}
.rule-mask .content::-webkit-scrollbar {
display: none;
}
.rule-mask .content p {
margin-bottom: 0.26667rem;
margin-bottom: 0.2666666667rem;
font-size: 0.4rem;
line-height: 0.50667rem;
line-height: 0.5066666667rem;
width: 100%;
text-indent: -0.45333rem;
text-indent: -0.4533333333rem;
color: #666;
}
.rule-mask .cancel {
width: 0.32rem;
height: 0.32rem;
@@ -206,7 +193,6 @@ body {
right: 10px;
top: 10px;
}
.rule-mask .cancel img {
width: 100%;
}
@@ -219,7 +205,7 @@ body {
top: 0;
height: 100%;
background: black;
opacity: .7;
opacity: 0.7;
display: none;
}
@@ -233,7 +219,6 @@ body {
height: 100vh;
background-color: rgba(0, 0, 0, 0.4);
}
.shade-mask-buy .shade-content-buy {
position: absolute;
top: 50%;
@@ -244,135 +229,136 @@ body {
border-radius: 0.32rem;
background-color: white;
}
.shade-mask-buy .shade-content-buy .title {
font-family: 'pingfang-bold';
font-family: "pingfang-bold";
font-size: 0.48rem;
font-weight: bold;
color: #333333;
text-align: center;
margin: 0.48rem 0 0.58667rem;
margin: 0.48rem 0 0.5866666667rem;
}
.shade-mask-buy .shade-content-buy .title span {
font-weight: bold;
}
.shade-mask-buy .shade-content-buy .buy-num, .shade-mask-buy .shade-content-buy .buy-day, .shade-mask-buy .shade-content-buy .buy-price {
.shade-mask-buy .shade-content-buy .buy-num,
.shade-mask-buy .shade-content-buy .buy-day,
.shade-mask-buy .shade-content-buy .buy-price {
font-size: 0.4rem;
color: #333333;
margin-bottom: 0.85333rem;
margin-bottom: 0.8533333333rem;
margin-left: 0.64rem;
}
.shade-mask-buy .shade-content-buy .buy-num p, .shade-mask-buy .shade-content-buy .buy-day p, .shade-mask-buy .shade-content-buy .buy-price p {
.shade-mask-buy .shade-content-buy .buy-num p,
.shade-mask-buy .shade-content-buy .buy-day p,
.shade-mask-buy .shade-content-buy .buy-price p {
font-weight: 550;
}
.shade-mask-buy .shade-content-buy .buy-num {
display: flex;
align-items: center;
height: 0.8rem;
}
.shade-mask-buy .shade-content-buy .buy-num .decrease, .shade-mask-buy .shade-content-buy .buy-num .increase {
.shade-mask-buy .shade-content-buy .buy-num .decrease,
.shade-mask-buy .shade-content-buy .buy-num .increase {
width: 0.8rem;
height: 0.8rem;
margin-right: 0.26667rem;
margin-right: 0.2666666667rem;
}
.shade-mask-buy .shade-content-buy .buy-num .decrease img, .shade-mask-buy .shade-content-buy .buy-num .increase img {
.shade-mask-buy .shade-content-buy .buy-num .decrease img,
.shade-mask-buy .shade-content-buy .buy-num .increase img {
width: 100%;
}
.shade-mask-buy .shade-content-buy .buy-num input {
width: 2.13333rem;
width: 2.1333333333rem;
height: 0.8rem;
border-radius: 0.4rem;
background-color: #EAE5FC;
color: #7154EE;
text-align: center;
margin-right: 0.26667rem;
margin-right: 0.2666666667rem;
outline: none;
caret-color: #7154EE;
}
.shade-mask-buy .shade-content-buy .buy-day, .shade-mask-buy .shade-content-buy .buy-price {
.shade-mask-buy .shade-content-buy .buy-day,
.shade-mask-buy .shade-content-buy .buy-price {
display: flex;
align-items: center;
}
.shade-mask-buy .shade-content-buy .buy-confirm-btn {
display: flex;
justify-content: space-between;
width: 6.82667rem;
height: 1.01333rem;
width: 6.8266666667rem;
height: 1.0133333333rem;
margin: 1.2rem auto 0;
}
.shade-mask-buy .shade-content-buy .buy-confirm-btn .cancel, .shade-mask-buy .shade-content-buy .buy-confirm-btn .confirm {
.shade-mask-buy .shade-content-buy .buy-confirm-btn .cancel,
.shade-mask-buy .shade-content-buy .buy-confirm-btn .confirm {
width: 3.2rem;
height: 1.01333rem;
line-height: 1.01333rem;
height: 1.0133333333rem;
line-height: 1.0133333333rem;
background-color: #EAE5FC;
font-size: 0.37333rem;
font-size: 0.3733333333rem;
color: #7154EE;
text-align: center;
border-radius: 0.50667rem;
border-radius: 0.5066666667rem;
}
.shade-mask-buy .shade-content-buy .buy-confirm-btn .confirm {
background-image: linear-gradient(#735FFE, #8776FF);
color: white;
}
.shade-mask-success, .shade-mask-no-money {
.shade-mask-success,
.shade-mask-no-money {
display: none;
width: 7.46667rem;
height: 6.13333rem;
width: 7.4666666667rem;
height: 6.1333333333rem;
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
z-index: 1001;
border-radius: 0.21333rem;
border-radius: 0.2133333333rem;
background-color: white;
}
.shade-mask-success .title, .shade-mask-no-money .title {
font-size: 0.45333rem;
.shade-mask-success .title,
.shade-mask-no-money .title {
font-size: 0.4533333333rem;
color: #333;
text-align: center;
margin-top: 0.53333rem;
margin-top: 0.5333333333rem;
}
.shade-mask-success .pic-icon, .shade-mask-no-money .pic-icon {
width: 1.62667rem;
height: 1.62667rem;
.shade-mask-success .pic-icon,
.shade-mask-no-money .pic-icon {
width: 1.6266666667rem;
height: 1.6266666667rem;
margin: 0 auto;
margin-top: 0.34667rem;
margin-top: 0.3466666667rem;
}
.shade-mask-success .pic-icon img, .shade-mask-no-money .pic-icon img {
.shade-mask-success .pic-icon img,
.shade-mask-no-money .pic-icon img {
width: 100%;
}
.shade-mask-success .tip, .shade-mask-no-money .tip {
.shade-mask-success .tip,
.shade-mask-no-money .tip {
text-align: center;
font-size: 13px;
color: #999;
margin-top: 0.34667rem;
margin-top: 0.3466666667rem;
}
.shade-mask-success .in-btn, .shade-mask-success .recharge, .shade-mask-no-money .in-btn, .shade-mask-no-money .recharge {
.shade-mask-success .in-btn,
.shade-mask-success .recharge,
.shade-mask-no-money .in-btn,
.shade-mask-no-money .recharge {
width: 2.8rem;
height: 1.01333rem;
border-radius: 0.66667rem;
height: 1.0133333333rem;
border-radius: 0.6666666667rem;
background-color: #7154EE;
color: #fff;
font-size: 0.4rem;
text-align: center;
line-height: 1.01333rem;
line-height: 1.0133333333rem;
margin: 0 auto;
margin-top: 0.53333rem;
margin-top: 0.5333333333rem;
}
/*# sourceMappingURL=index.css.map */

View File

@@ -2,7 +2,7 @@
@return $px / $rem+rem;
}
@font-face{
@font-face {
font-family: 'pingfang-medium';
src: url('../../../common/fonts/PingFang-Medium.ttf');
src: url('../../../common/fonts/PingFang-Medium.ttf') format('woff'),
@@ -10,7 +10,7 @@
url('../../../common/fonts/PingFang-Medium.ttf') format('svg');
}
@font-face{
@font-face {
font-family: 'pingfang-bold';
src: url('../../../common/fonts/PingFang-Bold.ttf');
src: url('../../../common/fonts/PingFang-Bold.ttf') format('woff'),
@@ -18,7 +18,7 @@
url('../../../common/fonts/PingFang-Bold.ttf') format('svg');
}
@font-face{
@font-face {
font-family: 'pingfang-regular';
src: url('../../../common/fonts/PingFang-Regular.ttf');
src: url('../../../common/fonts/PingFang-Regular.ttf') format('woff'),
@@ -26,74 +26,96 @@
url('../../../common/fonts/PingFang-Regular.ttf') format('svg');
}
body{
body {
font-family: 'pingfang-medium';
background: #7956F2;
}
.wrap{
.wrap {
// display: none;
background: url('../images/bg.png') no-repeat 0 0/100%;
// min-height: px2rem(2896);
overflow: hidden;
.rule-btn{
.rule-btn {
position: relative;
img {
div {
position: absolute;
top: px2rem(46);
right: 0;
width: px2rem(138);
height: px2rem(48);
}
line-height: px2rem(48, );
background: url(../images/introduce.png) no-repeat;
background-size: 100% 100%;
text-align: center;
color: #FFFFFF;
font-size: px2rem(26, );
}
}
ul.buy-area{
margin-top: px2rem(760);
ul.buy-area {
margin-top: 4.133333rem;
margin-bottom: px2rem(240);
overflow: hidden;
li{
li {
position: relative;
width: px2rem(600);
height: px2rem(460);
margin: px2rem(62) auto 0;
overflow: hidden;
.headwear-info{
.headwear-info {
margin-left: px2rem(290);
margin-top: px2rem(180);
.headwear-name{
.headwear-name {
font-family: 'pingfang-bold';
font-size: px2rem(30);
font-weight: bold;
color: #FFF600;
}
.headwear-price{
.headwear-price {
line-height: px2rem(40);
color: #fff;
font-size: px2rem(22);
}
.headwear-award{
color: #4946D8;
.headwear-award {
color: #fff;
font-size: px2rem(22);
margin-top: px2rem(20);
}
.buy-btn{
.buy-btn {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: px2rem(30);
width: px2rem(360);
height: px2rem(72);
line-height: px2rem(72, );
background: url('../images/buy-btn.png') no-repeat 0 0/100% 100%;
font-size: px2rem(30);
cursor: pointer;
.headwear-price-wrap{
img.icon{
color: #7944DA;
font-size: px2rem(32, );
text-align: center;
font-weight: bold;
.headwear-price-wrap {
img.icon {
width: px2rem(38);
height: px2rem(30);
margin-left: px2rem(20);
}
}
.tip{
.tip {
width: px2rem(200);
height: px2rem(60);
line-height: px2rem(60);
@@ -109,28 +131,32 @@ body{
}
.mine{
.mine {
position: fixed;
bottom: 0;
left: 0;
z-index: 99;
width: 100%;
height: px2rem(120);
background-color: #6D49EF;
// background-color: #6D49EF;
background: url(../images/bottom.png) no-repeat;
// border-top: 2px solid #BFFFFF;
display: flex;
align-items: center;
.avatar{
.avatar {
width: px2rem(80);
height: px2rem(80);
margin-left: px2rem(30);
margin-right: px2rem(20);
img{
img {
width: 100%;
border-radius: 50%;
}
}
.info-wrap{
.info-wrap {
flex: 1;
display: flex;
flex-direction: column;
@@ -138,14 +164,17 @@ body{
height: 68%;
font-size: px2rem(30);
color: #fff;
.nick{
.nick {
font-size: px2rem(30);
}
div{
div {
display: flex;
font-family: 'pingfang-regular';
font-size: px2rem(22, );
p{
p {
margin-right: px2rem(40, );
}
}
@@ -168,48 +197,48 @@ body{
display: none;
.title {
width: 100%;
text-align: center;
font-size: px2rem(32);
color: #5B1DC2;
margin-top: px2rem(30);
font-weight: bold;
width: 100%;
text-align: center;
font-size: px2rem(32);
color: #5B1DC2;
margin-top: px2rem(30);
font-weight: bold;
}
.content {
width: 100%;
height: px2rem(450);
margin: 0 auto;
margin-top: px2rem(30);
overflow: auto;
padding: 0 px2rem(40) 0 px2rem(70);
box-sizing: border-box;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar {
display: none;
}
p {
margin-bottom: px2rem(20);
font-size: px2rem(30);
line-height: px2rem(38);
width: 100%;
text-indent: px2rem(-34);
color: #666;
}
height: px2rem(450);
margin: 0 auto;
margin-top: px2rem(30);
overflow: auto;
padding: 0 px2rem(40) 0 px2rem(70);
box-sizing: border-box;
-webkit-overflow-scrolling: touch;
&::-webkit-scrollbar {
display: none;
}
p {
margin-bottom: px2rem(20);
font-size: px2rem(30);
line-height: px2rem(38);
width: 100%;
text-indent: px2rem(-34);
color: #666;
}
}
.cancel {
width: px2rem(24);
height: px2rem(24);
position: absolute;
right: 10px;
top: 10px;
width: px2rem(24);
height: px2rem(24);
position: absolute;
right: 10px;
top: 10px;
img {
width: 100%;
}
img {
width: 100%;
}
}
}
@@ -226,7 +255,7 @@ body{
}
// 购买弹窗
.shade-mask-buy{
.shade-mask-buy {
display: none;
position: fixed;
top: 0;
@@ -235,7 +264,8 @@ body{
width: 100vw;
height: 100vh;
background-color: rgba($color: #000000, $alpha: 0.4);
.shade-content-buy{
.shade-content-buy {
position: absolute;
top: 50%;
left: 50%;
@@ -244,39 +274,50 @@ body{
height: px2rem(600);
border-radius: px2rem(24);
background-color: white;
.title{
.title {
font-family: 'pingfang-bold';
font-size: px2rem(36);
font-weight: bold;
color: #333333;
text-align: center;
margin: px2rem(36) 0 px2rem(44);
span{
span {
font-weight: bold;
}
}
.buy-num, .buy-day, .buy-price{
.buy-num,
.buy-day,
.buy-price {
font-size: px2rem(30);
color: #333333;
margin-bottom: px2rem(64);
margin-left: px2rem(48);
p{
p {
font-weight: 550;
}
}
.buy-num{
.buy-num {
display: flex;
align-items: center;
height: px2rem(60);
.decrease, .increase{
.decrease,
.increase {
width: px2rem(60);
height: px2rem(60);
margin-right: px2rem(20);
img{
img {
width: 100%;
}
}
input{
input {
width: px2rem(160);
height: px2rem(60);
border-radius: px2rem(30);
@@ -288,17 +329,22 @@ body{
caret-color: #7154EE;
}
}
.buy-day, .buy-price{
.buy-day,
.buy-price {
display: flex;
align-items: center;
}
.buy-confirm-btn{
.buy-confirm-btn {
display: flex;
justify-content: space-between;
width: px2rem(512);
height: px2rem(76);
margin: px2rem(90) auto 0;
.cancel, .confirm{
.cancel,
.confirm {
width: px2rem(240);
height: px2rem(76);
line-height: px2rem(76);
@@ -308,15 +354,18 @@ body{
text-align: center;
border-radius: px2rem(38);
}
.confirm{
.confirm {
background-image: linear-gradient(#735FFE, #8776FF);
color: white;
}
}
}
}
// 购买成功弹窗
.shade-mask-success, .shade-mask-no-money{
.shade-mask-success,
.shade-mask-no-money {
display: none;
width: px2rem(560);
height: px2rem(460);
@@ -327,28 +376,34 @@ body{
z-index: 1001;
border-radius: px2rem(16);
background-color: white;
.title{
.title {
font-size: px2rem(34);
color: #333;
text-align: center;
margin-top: px2rem(40);
}
.pic-icon{
.pic-icon {
width: px2rem(122);
height: px2rem(122);
margin: 0 auto;
margin-top: px2rem(26);
img{
img {
width: 100%;
}
}
.tip{
.tip {
text-align: center;
font-size: 13px;
color: #999;
margin-top: px2rem(26);
}
.in-btn, .recharge{
.in-btn,
.recharge {
width: px2rem(210);
height: px2rem(76);
border-radius: px2rem(50);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 656 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 479 B

View File

@@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
@@ -14,7 +15,8 @@
<div class="wrap">
<!-- 规则弹窗 -->
<div class="rule-btn">
<img src="./images/introduce.png" alt="">
<!-- <img src="./images/introduce.png" alt=""> -->
<div>玩法介绍</div>
</div>
<ul class="buy-area">
<li>
@@ -22,7 +24,7 @@
<p class="headwear-name"></p>
<p class="headwear-price"></p>
<p class="headwear-award"></p>
<p class="buy-btn"></p>
<p class="buy-btn">立即購買</p>
<!-- <div class="buy-btn">
<p class="headwear-price-wrap">
<img src="./images/diamond.png" alt="" class="icon">
@@ -37,7 +39,7 @@
<p class="headwear-name"></p>
<p class="headwear-price"></p>
<p class="headwear-award"></p>
<p class="buy-btn"></p>
<p class="buy-btn">立即購買</p>
<!-- <div class="buy-btn">
<p class="headwear-price-wrap">
<img src="./images/diamond.png" alt="" class="icon">
@@ -52,7 +54,7 @@
<p class="headwear-name"></p>
<p class="headwear-price"></p>
<p class="headwear-award"></p>
<p class="buy-btn"></p>
<p class="buy-btn">立即購買</p>
<!-- <div class="buy-btn">
<p class="headwear-price-wrap">
<img src="./images/diamond.png" alt="" class="icon">
@@ -67,7 +69,7 @@
<p class="headwear-name"></p>
<p class="headwear-price"></p>
<p class="headwear-award"></p>
<p class="buy-btn"></p>
<p class="buy-btn">立即購買</p>
<!-- <div class="buy-btn">
<p class="headwear-price-wrap">
<img src="./images/diamond.png" alt="" class="icon">
@@ -83,31 +85,31 @@
<div class="info-wrap">
<p class="nick"></p>
<div>
<p class="meteor-num">我的糖果<span></span></p>
<p class="meteor-num">我的幸运<span></span></p>
<p class="diamond-num">我的钻石数量:<span></span></p>
</div>
</div>
</div>
</div>
<!-- 玩法介绍 -->
<div class="rule-mask">
<div class="cancel">
<img src="./images/common/cancel.png" alt="">
<img src="./images/common/cancel.png" alt="">
</div>
<div class="title">玩法介绍</div>
<div class="content">
<p>1. 促销活动期间,购买限定装扮即可获赠相应会场糖果,参与活动。</p>
<p>2. 购买梦幻限定装扮1“<span></span>”,可获赠糖果1个;<br>
购买梦幻限定装扮2“<span></span>”,可随机获赠糖果7-10个;<br>
购买梦幻限定装扮3“<span></span>”,可随机获赠糖果70~100个<br>
购买梦幻限定装扮4“<span></span>”,可随机获赠糖果700~1000个。</p>
<p>3. 该活动赠送给您的糖果为参与该活动的虛拟道具,不具任何价值也不能转赠其他用户。</p>
<p>4. 活动结束将关闭页面,剩余糖果将会清空,请留意活动关闭时间。</p>
<p>5. 本活动与Apple Inc.无关,最终解释权归平台所有。</p>
<div class="content">
<p>1. 促销活动期间,购买限定装扮即可获赠相应会场游戏币,参与活动。</p>
<p>2. 购买限定装扮1“<span></span>”,可获赠幸运1个;<br>
购买限定装扮2“<span></span>”,可随机获赠幸运7-10个;<br>
购买限定装扮3“<span></span>”,可随机获赠幸运70~100个<br>
购买限定装扮4“<span></span>”,可随机获赠幸运700~1000个。</p>
<p>3. 该活动赠送给您的游戏币为参与该活动的虛拟道具,不具任何价值也不能转赠其他用户。</p>
<p>4. 活动结束将关闭页面,剩余游戏币将会清空,请留意活动关闭时间。</p>
<p>5. 本活动与Apple Inc.无关,最终解释权归平台所有。</p>
</div>
</div>
</div>
<!-- 阴影 -->
<div class="shade"></div>
@@ -117,9 +119,9 @@
<div class="title">购买<span></span></div>
<div class="buy-num">
<p>数量:</p>
<p class="decrease"><img src="./images/decrease.png" alt="" ></p>
<p class="decrease"><img src="./images/decrease.png" alt=""></p>
<input type="text" value="1" class="inputNum">
<p class="increase"><img src="./images/increase.png" alt="" ></p>
<p class="increase"><img src="./images/increase.png" alt=""></p>
</div>
<div class="buy-day">
<p>天数:</p>

View File

@@ -1,3 +1,4 @@
@charset "UTF-8";
@font-face {
font-family: "pingfang-medium";
src: url("../../../common/fonts/PingFang-Medium.ttf");
@@ -133,6 +134,15 @@ body {
box-sizing: border-box;
position: relative;
}
.invite-record-wrap::before {
content: "邀請記錄";
color: #141949;
font-size: 0.32rem;
font-weight: bold;
position: absolute;
left: 0.2533333333rem;
top: 0.2266666667rem;
}
.invite-record-wrap .text {
color: #141949;
font-size: 0.32rem;

View File

@@ -157,6 +157,16 @@ body {
box-sizing: border-box;
position: relative;
&::before {
content: '邀請記錄';
color: #141949;
font-size: px2rem(24, );
font-weight: bold;
position: absolute;
left: px2rem(19, );
top: px2rem(17, );
}
.text {
color: #141949;
font-size: px2rem(24, );

View File

@@ -144,7 +144,7 @@ body {
z-index: 999;
width: px2rem(750);
height: px2rem(126);
background: linear-gradient(-90deg, #A493FC 0%, #40D3F8 100%);;
background: linear-gradient(-90deg, #A493FC 0%, #40D3F8 100%);
display: inline-flex;
align-items: center;

View File

@@ -33,7 +33,7 @@
<p>3.每位新用戶僅能填寫一次邀請碼, 填寫後不可修改。</p>
</div>
<ul class="invite-record-wrap">
<div class="text">邀請記錄</div>
<!-- <li class="text">邀請記錄</li> -->
<!-- <li>
<div class="item-avatar"><img src="./images/default.png" alt=""></div>
<div class="item-info">

View File

@@ -5,19 +5,19 @@ if (env == 'test') {
new VConsole();
}
// const productUrlNew = 'https://api.99park.cn'; // 正式
// const testUrlNew = 'http://beta.99park.cn'; // 测试环
// const productUrlNew = 'https://api.99park.cn'; // 正式
// const testUrlNew = 'http://beta.99park.cn'; // 測試環
const productUrlNew = 'https://api.pekolive.com'; // 正式
const testUrlNew = 'https://beta.api.pekolive.com'; // 测试环
//取新域名前
const productUrlNew = 'https://api.pekolive.com'; // 正式
const testUrlNew = 'https://beta.api.pekolive.com'; // 測試環
//取新域名前
function getUrlPrefixNew() {
if (!EnvCheck()) return undefined;
return EnvCheck() === 'live' ? productUrlNew : testUrlNew;
}
const urlPrefixNew = getUrlPrefixNew()
// 封layer消息提醒框
// 封layer消息提醒框
let layerIndex
const showLoading = (content = '加載中...') => {
layer.open({
@@ -44,9 +44,9 @@ let shareObj = {
type: 2,
data: {
msg: 'llllll',
title: '玩游戏交朋友来peko',
imgUrl: 'https://beta.api.pekolive.com/peko/modules/wxPubPay/images/logo.png',
desc: '人美声甜小姐姐在线连麦陪玩,有趣的人正在等你~',
title: '來peko邂逅你的專屬聲音',
imgUrl: 'http://beta.img.pekolive.com/logo.png',
desc: '聽聲音玩遊戲交朋友來peko~',
}
}
@@ -117,10 +117,10 @@ const getRule = () => {
tickets = res.data.tickets
let desc = ''
tickets.map((item, index) => {
desc += `${item.ticketName}${item.ticketNum}${index === tickets.length-1 ? '。' : ''}`
desc += `${item.ticketName}${item.ticketNum}${index === tickets.length-1 ? '。' : ''}`
})
let str = `
<p>4.每成功邀${taskLimit}位好友注册且报名比,可获赠${desc}</p>
<p>4.每成功邀${taskLimit}位好友註冊且報名比,可獲贈${desc}</p>
`
$('.rule-wrap').append(str)
}
@@ -150,9 +150,9 @@ const renderInviteList = () => {
item.gender ? `<img src="${item.gender === 1 ? `./images/male.png` : `./images/female.png`}" alt="">` : ''
}
</p>
<div class="item-date"><span>${dateFormat(item.createTime, "yyyy-MM-dd hh:mm")}</span>&nbsp;&nbsp;注册</div>
<div class="item-date"><span>${dateFormat(item.createTime, "yyyy-MM-dd hh:mm")}</span>&nbsp;&nbsp;註冊</div>
</div>
<div class="isActive ${item.hasLoginActived ? '' : 'inactive'}">${item.hasLoginActived ? '已登激活' : '未登激活'}</div>
<div class="isActive ${item.hasLoginActived ? '' : 'inactive'}">${item.hasLoginActived ? '已登激活' : '未登激活'}</div>
</li>
`
} )

View File

@@ -6,6 +6,16 @@
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title class="appName">邀请好友</title>
<meta property="og:url" content="" />
<meta property="fb:app_id" content="1266232494209868" />
<meta property="og:type" content="website" />
<meta property="og:title" content="來peko邂逅你的專屬聲音" />
<meta property="og:description" content="聽聲音玩遊戲交朋友來peko" />
<!-- https://pic.lecheng163.com/ananLogo256.png -->
<meta class="content_image" property="og:image" content="http://beta.img.pekolive.com/logo-512.png?from_wecom=1" />
<meta property="og:image:width" content="256">
<meta property="og:image:height" content="256">
<meta property="og:image:type" content="image/png">
<link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/register.css?v=3.0">
</head>

View File

@@ -1,13 +1,12 @@
@font-face {
font-family: 'pingfang-medium';
font-family: "pingfang-medium";
src: url("../../../common/fonts/PingFang-Medium.ttf");
src: url("../../../common/fonts/PingFang-Medium.ttf") format("woff"), url("../../../common/fonts/PingFang-Medium.ttf") format("truetype"), url("../../../common/fonts/PingFang-Medium.ttf") format("svg");
}
html,
body {
font-family: 'pingfang-medium';
background: #9B251E;
font-family: "pingfang-medium";
background: #2FA07C;
}
.banner {
@@ -15,151 +14,134 @@ body {
width: 100%;
height: 8.56rem;
}
.banner img {
width: 100%;
height: 100%;
}
.banner p {
position: absolute;
top: 7.62667rem;
top: 7.6266666667rem;
left: 50%;
transform: translateX(-50%);
color: #fff;
font-size: 0.34667rem;
font-size: 0.3466666667rem;
font-weight: bold;
}
.wrap {
width: 100%;
height: 23.73333rem;
height: 23.7333333333rem;
background: url("../image/bg.png") no-repeat 0 0/100% 100%;
overflow: hidden;
}
.wrap .time {
width: 6.61333rem;
height: 1.04rem;
width: 6.6133333333rem;
height: 0.7466666667rem;
background: url("../image/time-bg.png") no-repeat 0 0/100% 100%;
margin: 5.97333rem auto 0.66667rem;
color: #FDE6B5;
font-size: 0.45333rem;
margin: 5.9733333333rem auto 0.6666666667rem;
color: #fff;
font-size: 0.3733333333rem;
text-align: center;
line-height: 1.04rem;
line-height: 0.7466666667rem;
}
.wrap .headwear-wrap {
position: relative;
display: flex;
justify-content: space-around;
width: 9.46667rem;
width: 9.4666666667rem;
height: 5.52rem;
background: url("../image/headwear-wrap-bg.png") no-repeat 0 0/100% 100%;
margin: 0rem auto 0.66667rem;
margin: 0rem auto 0.6666666667rem;
}
.wrap .headwear-wrap .title {
position: absolute;
top: 0.66667rem;
top: 0.6666666667rem;
z-index: 9;
width: 100%;
font-size: 0.34667rem;
font-size: 0.32rem;
text-align: center;
color: #9D1F11;
color: #34846B;
}
.wrap .headwear-wrap .headwear-item {
text-align: center;
color: #9D1F11;
font-size: 0.32rem;
margin-top: 1.30667rem;
margin-top: 1.3066666667rem;
}
.wrap .headwear-wrap .headwear-item .pic-wrap {
position: relative;
width: 2.50667rem;
height: 2.66667rem;
width: 2.5066666667rem;
height: 2.6666666667rem;
background: url("../image/headwear-bg.png") no-repeat 0 0/100% 100%;
margin-bottom: 0.24rem;
}
.wrap .headwear-wrap .headwear-item .pic-wrap.active {
background-image: url("../image/headwear-active-bg.png");
}
.wrap .headwear-wrap .headwear-item .pic-wrap img {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 2.05333rem;
height: 2.05333rem;
width: 2.0533333333rem;
height: 2.0533333333rem;
}
.wrap .headwear-wrap .headwear-item .headwear-name {
margin-bottom: 0.10667rem;
margin-bottom: 0.1066666667rem;
color: #34846B;
font-size: 0.32rem;
}
.wrap .headwear-wrap .headwear-item .headwear-price {
color: #FF5105;
font-size: 0.37333rem;
color: #FC9362;
font-size: 0.2666666667rem;
}
.wrap .headwear-wrap .headwear-item .headwear-price .diamond-icon {
width: 0.50667rem;
width: 0.5066666667rem;
height: 0.4rem;
}
.wrap .day-wrap {
width: 9.46667rem;
height: 9.06667rem;
width: 9.4666666667rem;
height: 9.0666666667rem;
background: url("../image/day-wrap-bg.png") no-repeat 0 0/100% 100%;
overflow: hidden;
margin: 0 auto 0.82667rem;
margin: 0 auto 0.8266666667rem;
}
.wrap .day-wrap .select-title {
width: 4.4rem;
height: 0.93333rem;
line-height: 0.93333rem;
margin: 0rem auto 0.48rem;
height: 0.9333333333rem;
line-height: 0.9333333333rem;
margin: 0.5333333333rem auto 0.48rem;
text-align: center;
color: #FDE6B5;
font-size: 0.45333rem;
color: #4FA989;
font-size: 0.48rem;
font-weight: bold;
}
.wrap .day-wrap .advertising {
width: 100%;
height: 0.32rem;
margin: auto;
overflow: hidden;
}
.wrap .day-wrap .advertising ul li {
display: flex;
justify-content: center;
color: #AA3826;
font-size: 0.26667rem;
font-size: 0.2666666667rem;
}
.wrap .day-wrap .advertising ul li div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.wrap .day-wrap .advertising ul li .nick, .wrap .day-wrap .advertising ul li .diamond-num {
.wrap .day-wrap .advertising ul li .nick,
.wrap .day-wrap .advertising ul li .diamond-num {
color: #FF5105;
}
.wrap .day-wrap .advertising ul li img {
width: 0.4rem;
height: 0.32rem;
margin-right: 0.21333rem;
margin-right: 0.2133333333rem;
}
.wrap .day-wrap .select-item {
width: 92%;
display: flex;
@@ -167,37 +149,35 @@ body {
justify-content: space-around;
margin: 0.4rem auto 0;
}
.wrap .day-wrap .select-item p {
width: 2.32rem;
height: 1.06667rem;
line-height: 1.06667rem;
background: url("../image/unselected.png") no-repeat 0 0/100% 100%;
color: white;
font-size: 0.37333rem;
width: 2.5333333333rem;
height: 0.8533333333rem;
line-height: 0.8533333333rem;
background: #5CC6A4;
color: #FFFFFF;
font-size: 0.3733333333rem;
text-align: center;
margin-bottom: 0.42667rem;
margin-bottom: 0.4266666667rem;
border-radius: 0.2666666667rem;
}
.wrap .day-wrap .select-item p.active {
background: url("../image/selected.png") no-repeat 0 0/100% 100%;
background: #FD8D5D;
color: #FFFFFF;
}
.wrap .day-wrap .total-price {
text-align: center;
color: #9D1F11;
font-size: 0.34667rem;
color: #4FA989;
font-size: 0.32rem;
}
.wrap .day-wrap .buy-btn {
width: 6.58667rem;
background: url("../image/buy-btn.png") no-repeat 0 0/100% 100%;
line-height: 1.13333rem;
width: 6.0666666667rem;
background: url("../image/know.png") no-repeat 0 0/100% 100%;
line-height: 1.1466666667rem;
text-align: center;
color: #FFEB8D;
font-size: 0.42667rem;
font-size: 0.4266666667rem;
margin: 0.32rem auto 0;
height: 1.1466666667rem;
}
.shade-mask {
@@ -210,7 +190,6 @@ body {
height: 100vh;
background-color: rgba(0, 0, 0, 0.7);
}
.shade-mask .shade-content {
display: flex;
flex-direction: column;
@@ -219,62 +198,63 @@ body {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 9.46667rem;
height: 7.38667rem;
width: 9.4666666667rem;
height: 7.3866666667rem;
background: url("../image/index-panel.png") no-repeat 0 0/100% 100%;
color: #9D1F11;
font-size: 0.32rem;
}
.shade-mask .shade-content .content-title {
font-size: 0.34667rem;
margin-top: 0.66667rem;
font-size: 0.3466666667rem;
margin-top: 0.6666666667rem;
margin-bottom: 0.32rem;
color: #4FA989;
font-size: 0.48rem;
font-weight: bold;
}
.shade-mask .shade-content .headwear-info-wrap {
width: 100%;
display: flex;
justify-content: center;
margin-bottom: 0.56rem;
}
.shade-mask .shade-content .headwear-info-wrap .headwear-info {
width: 32%;
display: flex;
flex-direction: column;
align-items: center;
}
.shade-mask .shade-content .headwear-info-wrap .headwear-info .hw-pic {
width: 2.50667rem;
height: 2.66667rem;
width: 2.5066666667rem;
height: 2.6666666667rem;
background: url("../image/panel-item-bg.png") no-repeat 0 0/100% 100%;
border-radius: 0.13333rem;
border-radius: 0.1333333333rem;
display: flex;
justify-content: center;
align-items: center;
}
.shade-mask .shade-content .headwear-info-wrap .headwear-info .hw-pic img {
width: 80%;
}
.shade-mask .shade-content .headwear-info-wrap .headwear-info .hw-name {
margin: 0.13333rem 0;
margin: 0.1333333333rem 0;
color: #34846B;
font-weight: bold;
font-size: 0.32rem;
}
.shade-mask .shade-content .headwear-info-wrap .headwear-info .hw-days {
color: #FF5105;
font-size: 0.37333rem;
color: #FC9362;
font-size: 0.2666666667rem;
}
.shade-mask .shade-content .know {
width: 4.4533333333rem;
height: 1.1466666667rem;
background: url("../image/know.png") no-repeat;
background-size: 100% 100%;
line-height: 1.1466666667rem;
font-size: 0.4266666667rem;
text-align: center;
color: #FFFFFF;
}
.shade-mask .shade-content .know {
width: 4.45333rem;
height: 1.14667rem;
background: url("../image/know.png") no-repeat 0 0/100% 100%;
line-height: 1.14667rem;
font-size: 0.48rem;
text-align: center;
color: #FFEB8D;
}
/*# sourceMappingURL=index.css.map */

View File

@@ -4,7 +4,7 @@
@return $px / $rem+rem;
}
@font-face{
@font-face {
font-family: 'pingfang-medium';
src: url('../../../common/fonts/PingFang-Medium.ttf');
src: url('../../../common/fonts/PingFang-Medium.ttf') format('woff'),
@@ -16,20 +16,22 @@ html,
body {
font-family: 'pingfang-medium';
// height: 100%;
background: #9B251E;
background: #2FA07C;
// margin-bottom: px2rem(90, );
// overflow-y: hidden;
}
.banner{
.banner {
position: relative;
width: 100%;
height: px2rem(642, );
img{
img {
width: 100%;
height: 100%;
}
p{
p {
position: absolute;
top: px2rem(572, );
left: 50%;
@@ -40,23 +42,24 @@ body {
}
}
.wrap{
.wrap {
width: 100%;
height: px2rem(1780, );
background: url('../image/bg.png') no-repeat 0 0/100% 100%;
overflow: hidden;
.time{
.time {
width: px2rem(496, );
height: px2rem(78, );
height: px2rem(56, );
background: url('../image/time-bg.png') no-repeat 0 0/100% 100%;
margin: px2rem(448, ) auto px2rem(50, );
color: #FDE6B5;
font-size: px2rem(34, );
color: #fff;
font-size: px2rem(28, );
text-align: center;
line-height: px2rem(78, );
line-height: px2rem(56, );
}
.headwear-wrap{
.headwear-wrap {
position: relative;
display: flex;
justify-content: space-around;
@@ -65,30 +68,35 @@ body {
height: px2rem(414, );
background: url('../image/headwear-wrap-bg.png') no-repeat 0 0/100% 100%;
margin: px2rem(0, ) auto px2rem(50, );
.title{
.title {
position: absolute;
top: px2rem(50, );
z-index: 9;
width: 100%;
font-size: px2rem(26, );
font-size: px2rem(24, );
text-align: center;
color: #9D1F11;
color: #34846B;
}
.headwear-item{
.headwear-item {
text-align: center;
color: #9D1F11;
font-size: px2rem(24, );
margin-top: px2rem(98, );
.pic-wrap{
.pic-wrap {
position: relative;
width: px2rem(188, );
height: px2rem(200, );
background: url('../image/headwear-bg.png') no-repeat 0 0/100% 100%;
margin-bottom: px2rem(18, );
&.active{
&.active {
background-image: url('../image/headwear-active-bg.png');
}
img{
img {
position: absolute;
left: 50%;
top: 50%;
@@ -97,56 +105,68 @@ body {
height: px2rem(154, );
}
}
.headwear-name{
.headwear-name {
margin-bottom: px2rem(8, );
color: #34846B;
font-size: px2rem(24, );
}
.headwear-price{
color: #FF5105;
font-size: px2rem(28, );
.diamond-icon{
.headwear-price {
color: #FC9362;
font-size: px2rem(20, );
.diamond-icon {
width: px2rem(38, );
height: px2rem(30, );
}
}
}
}
.day-wrap{
.day-wrap {
width: px2rem(710, );
height: px2rem(680, );
background: url('../image/day-wrap-bg.png') no-repeat 0 0/100% 100%;
overflow: hidden;
margin: 0 auto px2rem(62, );
.select-title{
.select-title {
width: px2rem(330, );
height: px2rem(70, );
line-height: px2rem(70, );
margin: px2rem(0, ) auto px2rem(36, );
margin: px2rem(40, ) auto px2rem(36, );
text-align: center;
color: #FDE6B5;
font-size: px2rem(34, );
color: #4FA989;
font-size: px2rem(36, );
font-weight: bold;
}
.advertising{
.advertising {
width: 100%;
height: px2rem(24, );
margin: auto;
overflow: hidden;
ul{
li{
ul {
li {
display: flex;
justify-content: center;
color: #AA3826;
font-size: px2rem(20, );
div{
div {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.nick, .diamond-num{
.nick,
.diamond-num {
color: #FF5105;
}
img{
img {
width: px2rem(30, );
height: px2rem(24, );
margin-right: px2rem(16, );
@@ -154,42 +174,50 @@ body {
}
}
}
.select-item{
.select-item {
width: 92%;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
margin: px2rem(30, ) auto 0;
p{
width: px2rem(174, );
height: px2rem(80, );
line-height: px2rem(80, );
background: url('../image/unselected.png') no-repeat 0 0/100% 100%;
color: white;
p {
width: px2rem(190, );
height: px2rem(64, );
line-height: px2rem(64, );
// background: url('../image/unselected.png') no-repeat 0 0/100% 100%;
background: #5CC6A4;
color: #FFFFFF;
font-size: px2rem(28, );
text-align: center;
margin-bottom: px2rem(32, );
&.active{
background: url('../image/selected.png') no-repeat 0 0/100% 100%;
border-radius: px2rem(20, );
&.active {
// background: url('../image/selected.png') no-repeat 0 0/100% 100%;
background: #FD8D5D;
color: #FFFFFF;
}
}
}
.total-price{
.total-price {
text-align: center;
color: #9D1F11;
font-size: px2rem(26, );
color: #4FA989;
font-size: px2rem(24, );
}
.buy-btn{
width: px2rem(494, );
background: url('../image/buy-btn.png') no-repeat 0 0/100% 100%;
line-height: px2rem(85, );
.buy-btn {
width: px2rem(455, );
background: url('../image/know.png') no-repeat 0 0/100% 100%;
line-height: px2rem(86, );
text-align: center;
color: #FFEB8D;
font-size: px2rem(32, );
margin: px2rem(24, ) auto 0;
height: px2rem(86, );
}
}
}
@@ -197,7 +225,7 @@ body {
.shade-mask{
.shade-mask {
display: none;
position: fixed;
top: 0;
@@ -206,7 +234,8 @@ body {
width: 100vw;
height: 100vh;
background-color: rgba($color: #000000, $alpha: .7);
.shade-content{
.shade-content {
display: flex;
flex-direction: column;
align-items: center;
@@ -219,58 +248,67 @@ body {
background: url('../image/index-panel.png') no-repeat 0 0/100% 100%;
color: #9D1F11;
font-size: px2rem(24, );
.content-title{
.content-title {
font-size: px2rem(26, );
margin-top: px2rem(50, );
margin-bottom: px2rem(24, );
color: #4FA989;
font-size: px2rem(36, );
font-weight: bold;
}
.headwear-info-wrap{
.headwear-info-wrap {
width: 100%;
display: flex;
justify-content: center;
margin-bottom: px2rem(42, );
.headwear-info{
.headwear-info {
width: 32%;
display: flex;
flex-direction: column;
align-items: center;
.hw-pic{
.hw-pic {
width: px2rem(188, );
height: px2rem(200, );
// background-color: #081C43;
background: url('../image/panel-item-bg.png') no-repeat 0 0/100% 100%;
// background: #FFF8D6;
border-radius: px2rem(10, );
display: flex;
justify-content: center;
align-items: center;
img{
img {
width: 80%;
}
}
.hw-name{
.hw-name {
margin: px2rem(10, ) 0;
color: #34846B;
font-weight: bold;
font-size: px2rem(24, );
}
.hw-days{
color: #FF5105;
font-size: px2rem(28, );
.hw-days {
color: #FC9362;
font-size: px2rem(20, );
}
}
}
.know{
.know {
width: px2rem(334, );
height: px2rem(86, );
background: url('../image/know.png') no-repeat 0 0/100% 100%;
background: url('../image/know.png') no-repeat;
background-size: 100% 100%;
line-height: px2rem(86, );
font-size: px2rem(36, );
font-size: px2rem(32, );
text-align: center;
color: #FFEB8D;
color: #FFFFFF;
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 KiB

After

Width:  |  Height:  |  Size: 286 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -23,7 +23,7 @@
<p>有效期2022年2月15日</p>
</div> -->
<div class="wrap">
<div class="time">有效期2022年6月15</div>
<div class="time">有效期2023年12月31</div>
<div class="headwear-wrap">
<div class="headwear-item">
<div class="pic-wrap"><img alt=""></div>

View File

@@ -1,30 +1,30 @@
/**
* dropload
* 西(http://ons.me/526.html)
* 西(http://ons.me/526.html)
* 0.9.0(160215)
*/
;(function($){
; (function ($) {
'use strict';
var win = window;
var doc = document;
var $win = $(win);
var $doc = $(doc);
$.fn.dropload = function(options){
$.fn.dropload = function (options) {
console.log('this', this);
return new MyDropLoad(this, options);
};
var MyDropLoad = function(element, options){
var MyDropLoad = function (element, options) {
var me = this;
me.$element = element;
// 上方是否插入DOM
me.upInsertDOM = false;
// loading状态
// loading狀態
me.loading = false;
// 是否
// 是否
me.isLockUp = false;
me.isLockDown = false;
// 是否有数据
// 是否有數據
me.isData = true;
me._scrollTop = 0;
me._threshold = 0;
@@ -34,168 +34,168 @@
};
// 初始化
MyDropLoad.prototype.init = function(options){
MyDropLoad.prototype.init = function (options) {
var me = this;
me.opts = $.extend(true, {}, {
scrollArea : me.$element, // 滑动区
domUp : { // 上方DOM
domClass : 'dropload-up',
domRefresh : '<div class="dropload-refresh">↓下拉刷新</div>',
domUpdate : '<div class="dropload-update">↑放更新</div>',
domLoad : '<div class="dropload-load"><span class="loading"></span>加載中...</div>'
scrollArea: me.$element, // 滑動區
domUp: { // 上方DOM
domClass: 'dropload-up',
domRefresh: '<div class="dropload-refresh">↓下拉刷新</div>',
domUpdate: '<div class="dropload-update">↑放更新</div>',
domLoad: '<div class="dropload-load"><span class="loading"></span>加載中...</div>'
},
domDown : { // 下方DOM
domClass : 'dropload-down',
domRefresh : '<div class="dropload-refresh">↑上拉加更多</div>',
domLoad : '<div class="dropload-load"><span class="loading"></span>加載中...</div>',
domNoData : '<div class="dropload-noData">有更多了</div>'
domDown: { // 下方DOM
domClass: 'dropload-down',
domRefresh: '<div class="dropload-refresh">↑上拉加更多</div>',
domLoad: '<div class="dropload-load"><span class="loading"></span>加載中...</div>',
domNoData: '<div class="dropload-noData">有更多了</div>'
},
autoLoad : true, // 自动加载
distance : 50, // 拉动距离
threshold : '', // 提前加载距离
loadUpFn : '', // 上方function
loadDownFn : '' // 下方function
autoLoad: true, // 自動加載
distance: 50, // 拉動距離
threshold: '', // 提前加載距離
loadUpFn: '', // 上方function
loadDownFn: '' // 下方function
}, options);
// 如果加下方事先在下方插入DOM
if(me.opts.loadDownFn != ''){
me.$element.append('<div class="'+me.opts.domDown.domClass+'">'+me.opts.domDown.domRefresh+'</div>');
me.$domDown = $('.'+me.opts.domDown.domClass);
// 如果加下方事先在下方插入DOM
if (me.opts.loadDownFn != '') {
me.$element.append('<div class="' + me.opts.domDown.domClass + '">' + me.opts.domDown.domRefresh + '</div>');
me.$domDown = $('.' + me.opts.domDown.domClass);
}
// 算提前加载距离
if(!!me.$domDown && me.opts.threshold === ''){
// 默滑到加载区2/3处时加载
me._threshold = Math.floor(me.$domDown.height()*1/3);
}else{
// 算提前加載距離
if (!!me.$domDown && me.opts.threshold === '') {
// 默滑到加載區2/3處時加載
me._threshold = Math.floor(me.$domDown.height() * 1 / 3);
} else {
me._threshold = me.opts.threshold;
}
// 判断滚动区
if(me.opts.scrollArea == win){
// 判斷滾動區
if (me.opts.scrollArea == win) {
me.$scrollArea = $win;
// 取文高度
// 取文高度
me._scrollContentHeight = $doc.height();
// 取win显示区高度 —— 这里有坑
// 取win顯示區高度 —— 這裏有坑
me._scrollWindowHeight = doc.documentElement.clientHeight;
}else{
} else {
me.$scrollArea = me.opts.scrollArea;
me._scrollContentHeight = me.$element[0].scrollHeight;
me._scrollWindowHeight = me.$element.height();
}
fnAutoLoad(me);
// 窗口
$win.on('resize',function(){
if(me.opts.scrollArea == win){
// 重新取win显示区高度
// 窗口調
$win.on('resize', function () {
if (me.opts.scrollArea == win) {
// 重新取win顯示區高度
me._scrollWindowHeight = win.innerHeight;
}else{
} else {
me._scrollWindowHeight = me.$element.height();
}
});
// 绑定触
me.$element.on('touchstart',function(e){
if(!me.loading){
// 綁定觸
me.$element.on('touchstart', function (e) {
if (!me.loading) {
fnTouches(e);
fnTouchstart(e, me);
}
});
me.$element.on('touchmove',function(e){
if(!me.loading){
me.$element.on('touchmove', function (e) {
if (!me.loading) {
fnTouches(e, me);
fnTouchmove(e, me);
}
});
me.$element.on('touchend',function(){
if(!me.loading){
me.$element.on('touchend', function () {
if (!me.loading) {
fnTouchend(me);
}
});
// 加下方
me.$scrollArea.on('scroll',function(){
// 加下方
me.$scrollArea.on('scroll', function () {
me._scrollTop = me.$scrollArea.scrollTop();
// 滚动页面触发加载数据
if(me.opts.loadDownFn != '' && !me.loading && !me.isLockDown && (me._scrollContentHeight - me._threshold) <= (me._scrollWindowHeight + me._scrollTop)){
// 滾動頁面觸發加載數據
if (me.opts.loadDownFn != '' && !me.loading && !me.isLockDown && (me._scrollContentHeight - me._threshold) <= (me._scrollWindowHeight + me._scrollTop)) {
loadDown(me);
}
});
};
// touches
function fnTouches(e){
if(!e.touches){
function fnTouches (e) {
if (!e.touches) {
e.touches = e.originalEvent.touches;
}
}
// touchstart
function fnTouchstart(e, me){
function fnTouchstart (e, me) {
me._startY = e.touches[0].pageY;
// 记住触摸时的scrolltop值
// 記住觸摸時的scrolltop值
me.touchScrollTop = me.$scrollArea.scrollTop();
}
// touchmove
function fnTouchmove(e, me){
function fnTouchmove (e, me) {
me._curY = e.touches[0].pageY;
me._moveY = me._curY - me._startY;
if(me._moveY > 0){
if (me._moveY > 0) {
me.direction = 'down';
}else if(me._moveY < 0){
} else if (me._moveY < 0) {
me.direction = 'up';
}
var _absMoveY = Math.abs(me._moveY);
// 加上方
if(me.opts.loadUpFn != '' && me.touchScrollTop <= 0 && me.direction == 'down' && !me.isLockUp){
// 加上方
if (me.opts.loadUpFn != '' && me.touchScrollTop <= 0 && me.direction == 'down' && !me.isLockUp) {
e.preventDefault();
me.$domUp = $('.'+me.opts.domUp.domClass);
// 如果加载区没有DOM
if(!me.upInsertDOM){
me.$element.prepend('<div class="'+me.opts.domUp.domClass+'"></div>');
me.$domUp = $('.' + me.opts.domUp.domClass);
// 如果加載區沒有DOM
if (!me.upInsertDOM) {
me.$element.prepend('<div class="' + me.opts.domUp.domClass + '"></div>');
me.upInsertDOM = true;
}
fnTransition(me.$domUp,0);
fnTransition(me.$domUp, 0);
// 下拉
if(_absMoveY <= me.opts.distance){
if (_absMoveY <= me.opts.distance) {
me._offsetY = _absMoveY;
// todomove时会不断清空、增加dom有可能影性能,下同
// todomove時會不斷清空、增加dom有可能影性能,下同
me.$domUp.html(me.opts.domUp.domRefresh);
// 指定距 < 下拉距 < 指定距*2
}else if(_absMoveY > me.opts.distance && _absMoveY <= me.opts.distance*2){
me._offsetY = me.opts.distance+(_absMoveY-me.opts.distance)*0.5;
// 指定距 < 下拉距 < 指定距*2
} else if (_absMoveY > me.opts.distance && _absMoveY <= me.opts.distance * 2) {
me._offsetY = me.opts.distance + (_absMoveY - me.opts.distance) * 0.5;
me.$domUp.html(me.opts.domUp.domUpdate);
// 下拉距 > 指定距*2
}else{
me._offsetY = me.opts.distance+me.opts.distance*0.5+(_absMoveY-me.opts.distance*2)*0.2;
// 下拉距 > 指定距*2
} else {
me._offsetY = me.opts.distance + me.opts.distance * 0.5 + (_absMoveY - me.opts.distance * 2) * 0.2;
}
me.$domUp.css({'height': me._offsetY});
me.$domUp.css({ 'height': me._offsetY });
}
}
// touchend
function fnTouchend(me){
function fnTouchend (me) {
var _absMoveY = Math.abs(me._moveY);
if(me.opts.loadUpFn != '' && me.touchScrollTop <= 0 && me.direction == 'down' && !me.isLockUp){
fnTransition(me.$domUp,300);
if (me.opts.loadUpFn != '' && me.touchScrollTop <= 0 && me.direction == 'down' && !me.isLockUp) {
fnTransition(me.$domUp, 300);
if(_absMoveY > me.opts.distance){
me.$domUp.css({'height':me.$domUp.children().height()});
if (_absMoveY > me.opts.distance) {
me.$domUp.css({ 'height': me.$domUp.children().height() });
me.$domUp.html(me.opts.domUp.domLoad);
me.loading = true;
me.opts.loadUpFn(me);
}else{
me.$domUp.css({'height':'0'}).on('webkitTransitionEnd mozTransitionEnd transitionend',function(){
} else {
me.$domUp.css({ 'height': '0' }).on('webkitTransitionEnd mozTransitionEnd transitionend', function () {
me.upInsertDOM = false;
$(this).remove();
});
@@ -204,108 +204,108 @@
}
}
// 如果文高度不大窗口高度,数据较少,自动加载下方数据
function fnAutoLoad(me){
if(me.opts.autoLoad){
if((me._scrollContentHeight - me._threshold) <= me._scrollWindowHeight){
// 如果文高度不大窗口高度,數據較少,自動加載下方數據
function fnAutoLoad (me) {
if (me.opts.autoLoad) {
if ((me._scrollContentHeight - me._threshold) <= me._scrollWindowHeight) {
loadDown(me);
}
}
}
// 重新取文高度
function fnRecoverContentHeight(me){
if(me.opts.scrollArea == win){
// 重新取文高度
function fnRecoverContentHeight (me) {
if (me.opts.scrollArea == win) {
me._scrollContentHeight = $doc.height();
}else{
} else {
me._scrollContentHeight = me.$element[0].scrollHeight;
}
}
// 加下方
function loadDown(me){
// 加下方
function loadDown (me) {
me.direction = 'up';
me.$domDown.html(me.opts.domDown.domLoad);
me.loading = true;
me.opts.loadDownFn(me);
}
//
MyDropLoad.prototype.lock = function(direction){
//
MyDropLoad.prototype.lock = function (direction) {
var me = this;
// 如果不指定方向
if(direction === undefined){
if (direction === undefined) {
// 如果操作方向向上
if(me.direction == 'up'){
if (me.direction == 'up') {
me.isLockDown = true;
// 如果操作方向向下
}else if(me.direction == 'down'){
// 如果操作方向向下
} else if (me.direction == 'down') {
me.isLockUp = true;
}else{
} else {
me.isLockUp = true;
me.isLockDown = true;
}
// 如果指定上方
}else if(direction == 'up'){
// 如果指定上方
} else if (direction == 'up') {
me.isLockUp = true;
// 如果指定下方
}else if(direction == 'down'){
// 如果指定下方
} else if (direction == 'down') {
me.isLockDown = true;
// 了解DEMO5中tab效果bug为滑动到下面,再滑上去tabdirection=down所以有bug
// 了解DEMO5中tab效果bug為滑動到下面,再滑上去tabdirection=down所以有bug
me.direction = 'up';
}
};
// 解
MyDropLoad.prototype.unlock = function(){
// 解
MyDropLoad.prototype.unlock = function () {
var me = this;
// 简单粗暴解
// 簡單粗暴解
me.isLockUp = false;
me.isLockDown = false;
// 了解DEMO5中tab效果bug为滑动到下面,再滑上去tabdirection=down所以有bug
// 了解DEMO5中tab效果bug為滑動到下面,再滑上去tabdirection=down所以有bug
me.direction = 'up';
};
// 无数据
MyDropLoad.prototype.noData = function(flag){
// 無數據
MyDropLoad.prototype.noData = function (flag) {
var me = this;
if(flag === undefined || flag == true){
if (flag === undefined || flag == true) {
me.isData = false;
}else if(flag == false){
} else if (flag == false) {
me.isData = true;
}
};
// 重置
MyDropLoad.prototype.resetload = function(){
MyDropLoad.prototype.resetload = function () {
var me = this;
if(me.direction == 'down' && me.upInsertDOM){
me.$domUp.css({'height':'0'}).on('webkitTransitionEnd mozTransitionEnd transitionend',function(){
if (me.direction == 'down' && me.upInsertDOM) {
me.$domUp.css({ 'height': '0' }).on('webkitTransitionEnd mozTransitionEnd transitionend', function () {
me.loading = false;
me.upInsertDOM = false;
$(this).remove();
fnRecoverContentHeight(me);
});
}else if(me.direction == 'up'){
} else if (me.direction == 'up') {
me.loading = false;
// 如果有数据
if(me.isData){
// 加载区修改
// 如果有數據
if (me.isData) {
// 加載區修改
me.$domDown.html(me.opts.domDown.domRefresh);
fnRecoverContentHeight(me);
fnAutoLoad(me);
}else{
// 如果没数据
} else {
// 如果沒數據
me.$domDown.html(me.opts.domDown.domNoData);
}
}
};
// css
function fnTransition(dom,num){
// css
function fnTransition (dom, num) {
dom.css({
'-webkit-transition':'all '+num+'ms',
'transition':'all '+num+'ms'
'-webkit-transition': 'all ' + num + 'ms',
'transition': 'all ' + num + 'ms'
});
}
})(window.Zepto || window.jQuery);

View File

@@ -6,12 +6,12 @@ let hwPrice = 0
let selectDays = 0
let prodIDArr = [];
let headwearArr = [];//获取头饰
let giftNameArr = [];//物名称数组
let headwearArr = [];//獲取頭飾
let giftNameArr = [];//物名稱數組
let limitPurchaseSwitch //后台是否开启限购
let remainDayArr = [];//用剩余购买天数数组
let userRemainDay;//用剩余购买天数
let limitPurchaseSwitch //後臺是否開啟限購
let remainDayArr = [];//用剩余購買天數數組
let userRemainDay;//用剩余購買天數
let isNeedUpgrade
@@ -22,7 +22,7 @@ const toastMsg = (content = '操作完成', time = 2) => {
time
});
}
// 获取头饰请
// 獲取頭飾請
function headwearFun() {
networkRequest({
type: 'GET',
@@ -43,7 +43,7 @@ function headwearFun() {
})
console.log('prodIDArr', prodIDArr);
headwearArr = res.data;
// 设置头饰
// 設置頭飾
headwearArr.map((item, index) => {
giftNameArr[index] = item.giftName
$('.headwear-wrap .headwear-item').eq(index).find('.pic-wrap img').attr("src", headwearArr[index].headwearPic)
@@ -51,17 +51,17 @@ function headwearFun() {
console.log('giftNameArr', giftNameArr);
} else if (res.code == 80002) {
isNeedUpgrade = true
return toastMsg('前版本低,前往升最高版本使用~')
return toastMsg('前版本低,前往升最高版本使用~')
}
},
error: function (res) {
console.log(res, '报错啦');
console.log(res, '報錯啦');
}
})
}
// 广告轮
// 廣告輪
function advertising() {
networkRequest({
type: 'GET',
@@ -77,7 +77,7 @@ function advertising() {
result += `
<li>
<img src="./image/laba.png" alt="">
<div>恭喜!<span class="nick">${res.nick.length > 4 ? res.nick.slice(0, 4)+'...' : res.nick}</span> 购买${res.prodName}找到小精灵获得<span class="diamond-num">${res.giftName}</span></div>
<div>恭喜!<span class="nick">${res.nick.length > 4 ? res.nick.slice(0, 4)+'...' : res.nick}</span> 購買${res.prodName}找到小精靈獲得<span class="diamond-num">${res.giftName}</span></div>
</li>
`
})
@@ -97,13 +97,13 @@ function advertising() {
}
},
error: function (res) {
console.log(res, '报错啦');
console.log(res, '報錯啦');
}
})
}
// 获取头饰限购信息
// 獲取頭飾限購信息
function getLimitInfo() {
networkRequest({
type: 'GET',
@@ -120,7 +120,7 @@ function getLimitInfo() {
<div class="headwear-info">
<div class="hw-pic"><img src="${item.headwearPic}" alt=""></div>
<div class="hw-name">${item.prodName} (1天)</div>
<div class="hw-days">还可购<span>${item.remainDay}</span>天</div>
<div class="hw-days">還可購<span>${item.remainDay}</span>天</div>
</div>
`
})
@@ -132,7 +132,7 @@ function getLimitInfo() {
}
},
error: function (res) {
console.log(res, '报错啦');
console.log(res, '報錯啦');
}
})
}
@@ -145,9 +145,9 @@ $(function () {
}
getInfoFromClient()
setTimeout(() => {
headwearFun()//获取头饰
advertising()//通告栏滚动调
getLimitInfo()//后台是否配置开启限购
headwearFun()//獲取頭飾
advertising()//通告欄滾動調
getLimitInfo()//後臺是否配置開啟限購
}, 50)
@@ -206,10 +206,10 @@ $(function () {
})
$('.buy-btn').on('click', () => {
if (isNeedUpgrade) return toastMsg('前版本低,前往升最高版本使用~');
if (!isSelectHw) return toastMsg('请选择头饰');
if (!isSelectDay) return toastMsg('请选择购买天数');
if (selectDays > userRemainDay) return toastMsg('购买头饰不能超过限购天数');
if (isNeedUpgrade) return toastMsg('前版本低,前往升最高版本使用~');
if (!isSelectHw) return toastMsg('請選擇頭飾');
if (!isSelectDay) return toastMsg('請選擇購買天數');
if (selectDays > userRemainDay) return toastMsg('購買頭飾不能超過限購天數');
window.location.href = './main.html'
})

View File

@@ -1,5 +1,5 @@
let browser = checkVersion()
let urlPrefix = getUrlPrefix();//判正式境或者测试环
let urlPrefix = getUrlPrefix();//判正式境或者測試環
const toastMsg = (content = '操作完成', time = 2) => {
layer.open({
@@ -7,24 +7,24 @@ const toastMsg = (content = '操作完成', time = 2) => {
skin: 'msg',
time
});
}
}
let roomId = null;
let userDiamonds = 0 //用户钻石数
const MAX_NUM = 9 //后台限购关闭时最大选择数
let userDiamonds = 0 //用戶鉆石數
const MAX_NUM = 9 //後臺限購關閉時最大選擇數
let currentNum = 0
let time = null;
let cardID = [];
let requestStatus = false;
let prizeRecord = [];//中奖记录
var page = 0;// 页数
var size = 10;// 每展示n
let prizeRecord = [];//中獎記錄
var page = 0;// 頁數
var size = 10;// 每展示n
let selectDays = window.sessionStorage.getItem('selectDays')
let userSelectInfo = JSON.parse(window.sessionStorage.getItem('userSelectInfo'))
let {diamondNum, selectSrc, prodID, limitPurchaseSwitch, giftName} = JSON.parse(window.sessionStorage.getItem('userSelectInfo'))
let { diamondNum, selectSrc, prodID, limitPurchaseSwitch, giftName } = JSON.parse(window.sessionStorage.getItem('userSelectInfo'))
// 小动物数组
// 小動物數組
let animalArr = [
{
animalPic: './image/animal/1.png',
@@ -40,7 +40,7 @@ let animalArr = [
},
{
animalPic: './image/animal/4.png',
animalName: '小'
animalName: '小'
},
{
animalPic: './image/animal/5.png',
@@ -56,7 +56,7 @@ let animalArr = [
},
{
animalPic: './image/animal/8.png',
animalName: '小'
animalName: '小'
},
{
animalPic: './image/animal/9.png',
@@ -64,7 +64,7 @@ let animalArr = [
},
{
animalPic: './image/animal/10.png',
animalName: '小'
animalName: '小'
}
]
@@ -106,7 +106,7 @@ $(function () {
if (!limitPurchaseSwitch) {
if (currentNum <= MAX_NUM) {
$(this).addClass('active')
$('.prob').html(`${giftName}的概率${currentNum * 10}%`)
$('.prob').html(`${giftName}的概率${currentNum * 10}%`)
$('.prob').show()
$('.desc').hide()
cardID.push(index)
@@ -117,7 +117,7 @@ $(function () {
if (window.sessionStorage.getItem('leftDays') != null) {
if (window.sessionStorage.getItem('leftDays') <= 0) {
console.log('leftDays', window.sessionStorage.getItem('leftDays'));
toastMsg('该头饰已达限购上限')
toastMsg('該頭飾已達限購上限')
setTimeout(() => {
sessionStorage.clear()
history.go(-1)
@@ -132,13 +132,13 @@ $(function () {
if (currentNum <= userRemainDay) {
$(this).addClass('active')
$('.prob').html(`${giftName}的概率${currentNum * 10}%`)
$('.prob').html(`${giftName}的概率${currentNum * 10}%`)
$('.prob').show()
$('.desc').hide()
cardID.push(index)
} else {
if (userRemainDay < MAX_NUM) {
toastMsg('选择数量不能超过限购天数')
toastMsg('選擇數量不能超過限購天數')
}
currentNum = userRemainDay
}
@@ -147,7 +147,7 @@ $(function () {
} else {
currentNum--
$(this).removeClass('active')
$('.prob').html(`${giftName}的概率${currentNum * 10}%`)
$('.prob').html(`${giftName}的概率${currentNum * 10}%`)
const currentIndex = cardID.indexOf(index)
cardID.splice(currentIndex, 1)
console.log(cardID);
@@ -158,12 +158,12 @@ $(function () {
}
animation()
// 打开介绍弹
// 打開介紹彈
$('.introduction-btn').on('click', function () {
$('.shade-mask').show()
$('body').css('overflow', 'hidden')
})
// 关闭弹
// 關閉彈
$('.shade-mask').on('click', () => {
$('.shade-mask').hide()
$('body').css('overflow', 'auto')
@@ -186,15 +186,15 @@ $(function () {
$('.not-enough-content').click((e) => {
e.stopPropagation()
})
// 关闭青少年 未成年提示
// 關閉青少年 未成年提示
$('.know').on('click', () => {
$('.shade-mask-teen').hide()
})
// 关闭认证弹
// 關閉認證彈
$('.button-cancel, .button-agree').on('click', function () {
$(this).parents('.identity-mask').hide();
});
// 记录
// 記錄
$('.record-btn').click(() => {
page = 0;
$('.dropload-refresh').css({ display: 'block' })
@@ -205,17 +205,17 @@ $(function () {
$('.table-shade').show()
})
// 跳充值
// 跳充值
$('.go-to-recharge, .recharge-icon').click(() => {
if(browser.app){
if(browser.android){
if (browser.app) {
if (browser.android) {
// window.androidJsObj.openChargePage()
tools.nativeUtils.jumpAppointPage('RECHARGE_PAGE')
}else if(browser.ios){
} else if (browser.ios) {
window.webkit.messageHandlers.openChargePage.postMessage(null)
}
}else{
toastMsg('在app内打开')
} else {
toastMsg('在app內打開')
}
$('.not-enough').hide()
})
@@ -224,9 +224,9 @@ $(function () {
$('.explore').on('click', function () {
if (currentNum == 0) {
toastMsg('请选择小动物~')
toastMsg('請選擇小動物~')
} else if (selectDays != currentNum && !$(this).hasClass('again')) {
let headwearName = diamondNum == 10 ? '初级头饰' : ( diamondNum == 100 ? '中级头饰' : '高级头饰')
let headwearName = diamondNum == 10 ? '初級頭飾' : (diamondNum == 100 ? '中級頭飾' : '高級頭飾')
$('.planet-num span').html(currentNum)
$('.headwear img').attr('src', selectSrc)
$('.headwear-day').html(`${headwearName}${currentNum}`)
@@ -248,7 +248,7 @@ $(function () {
window.location.reload()
}
})
// 关闭支付
// 關閉支付
$('.shade-mask-recharge').click(function () {
$(this).hide()
})
@@ -262,7 +262,7 @@ $(function () {
history.go(-1)
})
// 抽支付按钮点击事件
// 抽支付按鈕點擊事件
$('.recharge-btn').click(function () {
let leftDays;
if (window.sessionStorage.getItem('leftDays') != null) {
@@ -282,8 +282,8 @@ $(function () {
})
//中奖记录请
function prizeRecordFun() {
//中獎記錄請
function prizeRecordFun () {
var dropload = $('.table-wrap').dropload({
scrollArea: $('.table-wrap'),
loadDownFn: function (me) {
@@ -304,17 +304,17 @@ function prizeRecordFun() {
var arrLen = res.data.records.length;
if (arrLen < size) {
page = 0;
me.lock(); //
me.noData(); // 无数据
me.lock(); //
me.noData(); // 無數據
}
if (arrLen > 0) {
result = prizeRecordDom();
$('.table').append(result)// 插入数据到页面,放到最
me.resetload();// 每次数据加载完,必重置
} else {// 如果没有数据
$('.table').append(result)// 插入數據到頁面,放到最
me.resetload();// 每次數據加載完,必重置
} else {// 如果沒有數據
me.resetload();
me.lock(); //
me.noData(); // 无数据
me.lock(); //
me.noData(); // 無數據
console.log($('.rule_record .conent .table tr').length)
if (page == 0 && $('.rule_record .conent .table tr').length == 1) {
$('.dropload-noData').remove();
@@ -327,10 +327,10 @@ function prizeRecordFun() {
error: function (res) {
$('.dropload-down').hide()
requestStatus = false;
console.log(res, '报错啦');
me.lock(); //
me.noData(); // 无数据
me.resetload();// 即使加载出错,也得重置
console.log(res, '報錯啦');
me.lock(); //
me.noData(); // 無數據
me.resetload();// 即使加載出錯,也得重置
$('.table').css({ display: 'none' })
$('.noData').css({ display: 'block' })
}
@@ -341,8 +341,8 @@ function prizeRecordFun() {
console.log('dropload-----', dropload);
};
// 中奖记录渲染
function prizeRecordDom() {
// 中獎記錄渲染
function prizeRecordDom () {
let result = ''
prizeRecord.forEach((res, i) => {
// console.log(res);
@@ -358,7 +358,7 @@ function prizeRecordDom() {
return result
};
// 取用信息
// 取用信息
const getUserInfo = () => {
networkRequest({
type: 'POST',
@@ -370,12 +370,12 @@ const getUserInfo = () => {
if (res.code == 200) {
userDiamonds = res.data.diamonds
$('.mine .avatar img').attr('src', res.data.avatar)
$('.mine .nick').html(res.data.nick.length > 8 ? res.data.nick.slice(0, 8)+'...' : res.data.nick)
$('.mine .nick').html(res.data.nick.length > 8 ? res.data.nick.slice(0, 8) + '...' : res.data.nick)
$('.mine .diamond-num span').html(res.data.diamonds)
}
},
error: function (res) {
console.log(res, '报错啦');
console.log(res, '報錯啦');
}
})
}
@@ -400,18 +400,18 @@ const draw = () => {
setTimeout(() => {
$('.svga').hide()
result = res.data
console.log('果', res.data);
console.log('果', res.data);
renderResult()
}, 1000)
}
},
error: function (res) {
console.log(res, '报错啦');
console.log(res, '報錯啦');
}
})
}
// 播放过场动画
// 播放過場動畫
const playAnimate = () => {
$('.explore').addClass('again')
$('.shade-mask-recharge').hide()
@@ -437,29 +437,29 @@ const renderResult = () => {
$('.prob').hide()
$('.desc').addClass('success')
$('.desc').html(`
成功找到小精</br>
<span>小精灵将送你${result.receiveGiftPrice}石的</br>${result.receiveGiftName}</span>
成功找到小精</br>
<span>小精靈將送你${result.receiveGiftPrice}石的</br>${result.receiveGiftName}</span>
`).show()
} else {
$('.result-content').addClass('fail')
$('.prob').hide()
$('.desc').addClass('fail')
$('.desc').html('很憾未能找到小精</br>下次再接再哦!').show()
$('.desc').html('很憾未能找到小精</br>下次再接再哦!').show()
$('.select-area div').eq(index).find('.default').hide().siblings('.fail').show()
}
$('.result-shade').show()
}
//返回面 重新求接口
//返回面 重新求接口
var hiddenProperty = 'hidden' in document ? 'hidden' :
'webkitHidden' in document ? 'webkitHidden' :
'mozHidden' in document ? 'mozHidden' : null;
'webkitHidden' in document ? 'webkitHidden' :
'mozHidden' in document ? 'mozHidden' : null;
var visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange');
var onVisibilityChange = function () {
if(!document[hiddenProperty]){
if (!document[hiddenProperty]) {
getUserInfo()
}
}
}
document.addEventListener(visibilityChangeEvent, onVisibilityChange);