diff --git a/view/peko/modules/act-wishingStar/css/index.css b/view/peko/modules/act-wishingStar/css/index.css index 9ed9e40..8b49ead 100644 --- a/view/peko/modules/act-wishingStar/css/index.css +++ b/view/peko/modules/act-wishingStar/css/index.css @@ -270,7 +270,7 @@ body { .page1 ul li .line .line_in img { display: block; height: 100%; - width: 10%; + width: 0%; } .page1 ul li .line p { @@ -303,3 +303,793 @@ body { bottom: 0.44rem; right: 0.48rem; } + +.page2 { + display: none; + width: 9.36rem; + height: 11.94667rem; + background: #804030; + border-radius: 0.42667rem; + border: 0.02667rem solid #FFE478; + box-sizing: border-box; + margin: 0.66667rem auto 2.06667rem; + position: relative; +} + +.page2 .listTab { + width: 5.94667rem; + height: 1.12rem; + position: absolute; + top: -0.56rem; + left: 50%; + transform: translateX(-50%); + display: flex; + justify-content: space-between; +} + +.page2 .listTab div { + width: 50%; + height: 100%; +} + +.page2 .tab1 { + background: url(../images/listTab1.png) no-repeat; + background-size: 100% 100%; +} + +.page2 .tab2 { + background: url(../images/listTab2.png) no-repeat; + background-size: 100% 100%; +} + +.page2 .listBox { + width: 9.33333rem; + height: 10.7rem; + margin: 1.09333rem auto 0; + overflow-y: scroll; +} + +.page2 .listBox::-webkit-scrollbar { + display: none; +} + +.page2 .listBox li { + width: 100%; + height: 2.13333rem; + background: #804030; + overflow: hidden; +} + +.page2 .listBox li .num { + width: 0.97333rem; + height: 100%; + line-height: 2.13333rem; + text-align: center; + color: #FFFBE3; + font-size: 0.42667rem; + font-weight: 500; + margin-right: 0.18667rem; + float: left; +} + +.page2 .listBox li .num1 { + width: 0.64rem; + height: 0.64rem; + background: url(../images/no1.png) no-repeat; + background-size: 100% 100%; + margin-right: 0.32rem; +} + +.page2 .listBox li .num2 { + width: 0.64rem; + height: 0.64rem; + background: url(../images/no2.png) no-repeat; + background-size: 100% 100%; + margin-right: 0.32rem; +} + +.page2 .listBox li .num3 { + width: 0.64rem; + height: 0.64rem; + background: url(../images/no3.png) no-repeat; + background-size: 100% 100%; + margin-right: 0.32rem; +} + +.page2 .listBox li .tx { + display: block; + width: 1.28rem; + height: 1.28rem; + border-radius: 50%; + margin-top: 0.42667rem; + margin-right: 0.32rem; + float: left; +} + +.page2 .listBox li .name { + width: 2.98667rem; + height: 100%; + line-height: 2.13333rem; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + color: #FFFFFF; + font-size: 0.37333rem; + font-weight: 500; + float: left; +} + +.page2 .listBox li .right { + width: 1.8rem; + text-align: center; + float: right; + margin-right: 0.64rem; +} + +.page2 .listBox li .right p { + height: 0.58667rem; + line-height: 0.58667rem; + color: #FFFFFF; + font-size: 0.42667rem; + font-weight: 600; + margin-top: 0.50667rem; + margin-bottom: 0.10667rem; +} + +.page2 .listBox li .right b { + color: #E6E2DC; + font-size: 0.29333rem; + font-weight: 400; +} + +.page2 .listBox .li1 { + background: linear-gradient(270deg, rgba(255, 204, 0, 0) 0%, #FFD82C 100%); +} + +.page2 .listBox .li2 { + background: linear-gradient(270deg, rgba(109, 139, 209, 0) 0%, #83CCFF 100%); +} + +.page2 .listBox .li3 { + background: linear-gradient(270deg, rgba(163, 102, 46, 0) 0%, #DF893F 100%); +} + +.page2 .my { + position: fixed; + bottom: 0; + left: 50%; + transform: translateX(-50%); + background: url(../images/myBg.png) no-repeat; + background-size: 100% 100%; + width: 10rem; + height: 2.02667rem; +} + +.page2 .my .num { + width: 0.97333rem; + height: 100%; + line-height: 2.13333rem; + text-align: center; + color: #FFFBE3; + font-size: 0.42667rem; + font-weight: 500; + margin-right: 0.18667rem; + float: left; +} + +.page2 .my .tx { + display: block; + width: 1.28rem; + height: 1.28rem; + border-radius: 50%; + margin-top: 0.42667rem; + margin-right: 0.32rem; + float: left; +} + +.page2 .my .name { + width: 2.98667rem; + height: 100%; + line-height: 2.13333rem; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + color: #FFFFFF; + font-size: 0.37333rem; + font-weight: 500; + float: left; +} + +.page2 .my .right { + width: 1.8rem; + text-align: center; + float: right; + margin-right: 0.64rem; +} + +.page2 .my .right p { + height: 0.58667rem; + line-height: 0.58667rem; + color: #FFFFFF; + font-size: 0.42667rem; + font-weight: 600; + margin-top: 0.50667rem; + margin-bottom: 0.10667rem; +} + +.page2 .my .right b { + color: #E6E2DC; + font-size: 0.29333rem; + font-weight: 400; +} + +.wishingPop { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 999; +} + +.wishingPop .wishingPop_in { + width: 7.92rem; + height: 7.73333rem; + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: #804030; + border-radius: 0.53333rem; + border: 0.02667rem solid #FFE478; +} + +.wishingPop .wishingPop_in .wishIngtitle { + width: 4rem; + height: 1.12rem; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: -1.12rem; +} + +.wishingPop .wishingPop_in h3 { + width: 100%; + text-align: center; + color: #E6E2DC; + font-size: 0.29333rem; + position: absolute; + top: 0.64rem; + left: 0; +} + +.wishingPop .wishingPop_in .decrease { + width: 0.85333rem; + height: 0.85333rem; + position: absolute; + top: 1.38667rem; + left: 0.56rem; +} + +.wishingPop .wishingPop_in input { + background: url(../images/wishingIput.png) no-repeat; + background-size: 100% 100%; + outline: none; + border: none; + position: absolute; + width: 4.88rem; + height: 0.85333rem; + left: 50%; + transform: translateX(-50%); + top: 1.38667rem; + text-align: center; + color: #8F392E; + font-size: 0.42667rem; + font-weight: 500; +} + +.wishingPop .wishingPop_in .add { + width: 0.85333rem; + height: 0.85333rem; + position: absolute; + top: 1.38667rem; + right: 0.56rem; +} + +.wishingPop .wishingPop_in .quickAddition { + width: 6.82667rem; + height: 0.8rem; + line-height: 0.8rem; + display: flex; + justify-content: space-between; + position: absolute; + top: 2.88rem; + left: 50%; + transform: translateX(-50%); +} + +.wishingPop .wishingPop_in .quickAddition div { + width: 1.62667rem; + border-radius: 0.8rem; + text-align: center; + color: #8F392E; + font-size: 0.32rem; + background: #FFF3DB; + font-weight: 500; +} + +.wishingPop .wishingPop_in .magicSticks { + width: 100%; + position: absolute; + top: 4.48rem; + left: 50%; + transform: translateX(-50%); + height: 0.58667rem; + line-height: 0.58667rem; + text-align: center; + color: #E6E2DC; + font-size: 0.29333rem; + font-weight: 400; + vertical-align: middle; +} + +.wishingPop .wishingPop_in .magicSticks img { + display: inline-block; + width: 0.48rem; + height: 0.48rem; + vertical-align: middle; +} + +.wishingPop .wishingPop_in .magicSticks b { + color: #fff; + font-size: 0.42667rem; + font-weight: 600; + vertical-align: middle; +} + +.wishingPop .wishingPop_in .but { + width: 5.46667rem; + height: 1.28rem; + position: absolute; + left: 50%; + transform: translateX(-50%); + bottom: 0.85333rem; +} + +.magicStick { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 999; +} + +.magicStick .magicStick_in { + width: 7.92rem; + height: 7.73333rem; + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: #804030; + border-radius: 0.53333rem; + border: 0.02667rem solid #FFE478; +} + +.magicStick .magicStick_in .magicSticktitle { + width: 4rem; + height: 1.12rem; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: -1.12rem; +} + +.magicStick .magicStick_in h3 { + width: 100%; + text-align: center; + color: #FFD4A6; + font-size: 0.42667rem; + position: absolute; + top: 0.64rem; + left: 0; +} + +.magicStick .magicStick_in .decrease { + width: 0.85333rem; + height: 0.85333rem; + position: absolute; + top: 1.76rem; + left: 0.56rem; +} + +.magicStick .magicStick_in input { + background: url(../images/wishingIput.png) no-repeat; + background-size: 100% 100%; + outline: none; + border: none; + position: absolute; + width: 4.88rem; + height: 0.85333rem; + left: 50%; + transform: translateX(-50%); + top: 1.76rem; + text-align: center; + color: #8F392E; + font-size: 0.42667rem; + font-weight: 500; +} + +.magicStick .magicStick_in .add { + width: 0.85333rem; + height: 0.85333rem; + position: absolute; + top: 1.76rem; + right: 0.56rem; +} + +.magicStick .magicStick_in .quickAddition { + width: 5.33333rem; + height: 0.8rem; + line-height: 0.8rem; + display: flex; + justify-content: space-between; + position: absolute; + top: 3.25333rem; + left: 50%; + transform: translateX(-50%); +} + +.magicStick .magicStick_in .quickAddition div { + width: 1.62667rem; + border-radius: 0.8rem; + text-align: center; + color: #8F392E; + font-size: 0.32rem; + background: #FFF3DB; + font-weight: 500; +} + +.magicStick .magicStick_in .magicSticks { + width: 100%; + position: absolute; + top: 4.6rem; + left: 50%; + transform: translateX(-50%); + height: 0.58667rem; + line-height: 0.58667rem; + text-align: center; + color: #E6E2DC; + font-size: 0.29333rem; + font-weight: 400; + vertical-align: middle; +} + +.magicStick .magicStick_in .magicSticks img { + display: inline-block; + width: 0.48rem; + height: 0.48rem; + vertical-align: middle; +} + +.magicStick .magicStick_in .magicSticks b { + color: #fff; + font-size: 0.42667rem; + font-weight: 600; + vertical-align: middle; +} + +.magicStick .magicStick_in .but { + width: 5.46667rem; + height: 1.28rem; + position: absolute; + left: 50%; + transform: translateX(-50%); + bottom: 1.06667rem; +} + +.magicStick .magicStick_in i { + font-style: normal; + width: 100%; + text-align: center; + color: #E6E2DC; + font-size: 0.29333rem; + font-weight: 400; + position: absolute; + left: 0; + bottom: 0.53333rem; +} + +.rule { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 999; +} + +.rule .rule_in { + width: 8.4rem; + height: 9.33333rem; + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: #804030; + border-radius: 0.53333rem; + border: 0.02667rem solid #FFE478; +} + +.rule .rule_in .ruleTitle { + width: 4rem; + height: 1.12rem; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: -1.12rem; +} + +.rule .rule_in .ruleText { + width: 7.06667rem; + height: 8.3rem; + margin: 0.74667rem auto 0; + overflow-y: scroll; + color: #fff; + font-size: 0.32rem; + font-weight: 400; +} + +.rule .rule_in .ruleText::-webkit-scrollbar { + display: none; +} + +.record { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 999; +} + +.record .record_in { + width: 8.4rem; + height: 9.33333rem; + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: #804030; + border-radius: 0.53333rem; + border: 0.02667rem solid #FFE478; +} + +.record .record_in .recordTitl { + width: 4rem; + height: 1.12rem; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: -1.12rem; +} + +.record .record_in .recordtab { + width: 6.42667rem; + height: 0.90667rem; + display: flex; + justify-content: space-between; + margin: 0.50667rem auto 0.34667rem; +} + +.record .record_in .recordtab div { + width: 2.8rem; + height: 100%; +} + +.record .record_in .recordtab .tab1 { + background: url(../images/record2.png) no-repeat; + background-size: 100% 100%; +} + +.record .record_in .recordtab .tab2 { + background: url(../images/record1.png) no-repeat; + background-size: 100% 100%; +} + +.record .record_in .recordtab .act1 { + background: url(../images/recordAct1.png) no-repeat; + background-size: 100% 100%; +} + +.record .record_in .recordtab .act2 { + background: url(../images/recordAct2.png) no-repeat; + background-size: 100% 100%; +} + +.record .record_in .ul1 { + width: 8.4rem; + height: 7rem; + margin: 0 auto; + overflow-y: scroll; +} + +.record .record_in .ul1::-webkit-scrollbar { + display: none; +} + +.record .record_in .ul1 li { + width: 100%; + height: 1.2rem; + margin-bottom: 0.05333rem; + background: #8D4937; + display: flex; + justify-content: space-between; + overflow: hidden; +} + +.record .record_in .ul1 li div { + width: 50%; + text-align: center; + color: #FFFFFF; + font-weight: 400; + text-align: center; +} + +.record .record_in .ul1 li div p { + font-size: 0.32rem; + margin-top: 0.2rem; + margin-bottom: 0.06667rem; +} + +.record .record_in .ul1 li div i { + font-style: normal; + font-size: 0.26667rem; +} + +.record .record_in .ul1 .liAct { + background: #A65C46; +} + +.record .record_in .ul2 { + display: none; + width: 8.4rem; + height: 7rem; + margin: 0 auto; + overflow-y: scroll; +} + +.record .record_in .ul2::-webkit-scrollbar { + display: none; +} + +.record .record_in .ul2 li { + width: 100%; + height: 1.2rem; + margin-bottom: 0.05333rem; + background: #8D4937; + display: flex; + justify-content: space-between; + overflow: hidden; +} + +.record .record_in .ul2 li div { + width: 33.33333333%; + text-align: center; + color: #FFFFFF; + font-weight: 400; + text-align: center; +} + +.record .record_in .ul2 li div p { + width: 100%; + font-size: 0.32rem; + margin-top: 0.24rem; + margin-bottom: 0.06667rem; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.record .record_in .ul2 li div i { + font-style: normal; + font-size: 0.26667rem; +} + +.record .record_in .ul2 .liAct { + background: #A65C46; +} + +.goToPay { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 999; +} + +.goToPay .goToPay_in { + width: 7.86667rem; + height: 4.96rem; + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: url(../images/goToPay.png) no-repeat; + background-size: 100% 100%; +} + +.goToPay .goToPay_in .but { + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 3.2rem; + width: 5.5rem; + height: 1.1rem; +} + +.buySuccess { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 999; +} + +.buySuccess .buySuccess_in { + width: 7.86667rem; + height: 4.96rem; + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: #FFE3C7; + border-radius: 0.53333rem; + border: 0.02667rem solid #FFE478; +} + +.buySuccess .buySuccess_in h3 { + position: absolute; + left: 0; + top: 0.53333rem; + color: #B52E1C; + font-size: 0.42667rem; + font-weight: 600; + text-align: center; + width: 100%; +} + +.buySuccess .buySuccess_in p { + position: absolute; + left: 0; + top: 1.86667rem; + color: #FF5426; + font-size: 0.37333rem; + font-weight: 500; + text-align: center; + width: 100%; +} + +.buySuccess .buySuccess_in .buySuccessBut { + position: absolute; + left: 50%; + transform: translateX(-50%); + width: 5.46667rem; + height: 1.28rem; + top: 3.14667rem; +} diff --git a/view/peko/modules/act-wishingStar/css/index.scss b/view/peko/modules/act-wishingStar/css/index.scss index ee5577e..f43cbc6 100644 --- a/view/peko/modules/act-wishingStar/css/index.scss +++ b/view/peko/modules/act-wishingStar/css/index.scss @@ -97,7 +97,9 @@ body { } } +// 页面一 .page1 { + // display: none; width: px2rem(750); height: px2rem(1007); background: url(../images/page1Bg.png) no-repeat; @@ -272,7 +274,7 @@ body { img { display: block; height: 100%; - width: 10%; + width: 0%; } } @@ -309,4 +311,807 @@ body { } } } +} + +// 页面二 +.page2 { + display: none; + width: px2rem(702); + height: px2rem(896); + background: #804030; + border-radius: px2rem(32); + border: px2rem(2) solid #FFE478; + box-sizing: border-box; + margin: px2rem(50) auto px2rem(155); + position: relative; + // overflow: hidden; + + .listTab { + width: px2rem(446); + height: px2rem(84); + position: absolute; + top: px2rem(-42); + left: 50%; + transform: translateX(-50%); + display: flex; + justify-content: space-between; + + div { + width: 50%; + height: 100%; + } + } + + .tab1 { + background: url(../images/listTab1.png) no-repeat; + background-size: 100% 100%; + } + + .tab2 { + background: url(../images/listTab2.png) no-repeat; + background-size: 100% 100%; + } + + .listBox { + width: px2rem(700); + height: 10.7rem; + margin: px2rem(82) auto 0; + overflow-y: scroll; + + &::-webkit-scrollbar { + display: none; + } + + li { + width: 100%; + height: px2rem(160); + background: #804030; + overflow: hidden; + + .num { + width: px2rem(73); + height: 100%; + line-height: px2rem(160); + text-align: center; + color: #FFFBE3; + font-size: px2rem(32); + font-weight: 500; + margin-right: px2rem(14); + float: left; + } + + .num1 { + width: px2rem(48); + height: px2rem(48); + background: url(../images/no1.png) no-repeat; + background-size: 100% 100%; + margin-right: px2rem(24); + } + + .num2 { + width: px2rem(48); + height: px2rem(48); + background: url(../images/no2.png) no-repeat; + background-size: 100% 100%; + margin-right: px2rem(24); + } + + .num3 { + width: px2rem(48); + height: px2rem(48); + background: url(../images/no3.png) no-repeat; + background-size: 100% 100%; + margin-right: px2rem(24); + } + + .tx { + display: block; + width: px2rem(96); + height: px2rem(96); + border-radius: 50%; + margin-top: px2rem(32); + margin-right: px2rem(24); + float: left; + } + + .name { + width: px2rem(224); + height: 100%; + line-height: px2rem(160); + //超出省略号 + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + color: #FFFFFF; + font-size: px2rem(28); + font-weight: 500; + float: left; + } + + .right { + width: px2rem(135); + text-align: center; + float: right; + margin-right: px2rem(48); + + p { + height: px2rem(44); + line-height: px2rem(44); + color: #FFFFFF; + font-size: px2rem(32); + font-weight: 600; + margin-top: px2rem(38); + margin-bottom: px2rem(8); + } + + b { + color: #E6E2DC; + font-size: px2rem(22); + font-weight: 400; + } + } + } + + .li1 { + background: linear-gradient(270deg, rgba(255, 204, 0, 0) 0%, #FFD82C 100%); + } + + .li2 { + background: linear-gradient(270deg, rgba(109, 139, 209, 0) 0%, #83CCFF 100%); + } + + .li3 { + background: linear-gradient(270deg, rgba(163, 102, 46, 0) 0%, #DF893F 100%); + } + } + + .my { + position: fixed; + bottom: 0; + left: 50%; + transform: translateX(-50%); + background: url(../images/myBg.png) no-repeat; + background-size: 100% 100%; + width: px2rem(750); + height: px2rem(152); + + .num { + width: px2rem(73); + height: 100%; + line-height: px2rem(160); + text-align: center; + color: #FFFBE3; + font-size: px2rem(32); + font-weight: 500; + margin-right: px2rem(14); + float: left; + } + + .tx { + display: block; + width: px2rem(96); + height: px2rem(96); + border-radius: 50%; + margin-top: px2rem(32); + margin-right: px2rem(24); + float: left; + } + + .name { + width: px2rem(224); + height: 100%; + line-height: px2rem(160); + //超出省略号 + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + color: #FFFFFF; + font-size: px2rem(28); + font-weight: 500; + float: left; + } + + .right { + width: px2rem(135); + text-align: center; + float: right; + margin-right: px2rem(48); + + p { + height: px2rem(44); + line-height: px2rem(44); + color: #FFFFFF; + font-size: px2rem(32); + font-weight: 600; + margin-top: px2rem(38); + margin-bottom: px2rem(8); + } + + b { + color: #E6E2DC; + font-size: px2rem(22); + font-weight: 400; + } + } + } +} + +// 许愿弹窗 +.wishingPop { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, .6); + z-index: 999; + + .wishingPop_in { + width: px2rem(594); + height: px2rem(580); + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: #804030; + border-radius: px2rem(40); + border: px2rem(2) solid #FFE478; + + .wishIngtitle { + width: px2rem(300); + height: px2rem(84); + position: absolute; + left: 50%; + transform: translateX(-50%); + top: px2rem(-84); + } + + h3 { + width: 100%; + text-align: center; + color: #E6E2DC; + font-size: px2rem(22); + position: absolute; + top: px2rem(48); + left: 0; + } + + .decrease { + width: px2rem(64); + height: px2rem(64); + position: absolute; + top: px2rem(104); + left: px2rem(42); + } + + input { + background: url(../images/wishingIput.png) no-repeat; + background-size: 100% 100%; + outline: none; + border: none; + position: absolute; + width: px2rem(366); + height: px2rem(64); + left: 50%; + transform: translateX(-50%); + top: px2rem(104); + text-align: center; + color: #8F392E; + font-size: px2rem(32); + font-weight: 500; + } + + .add { + width: px2rem(64); + height: px2rem(64); + position: absolute; + top: px2rem(104); + right: px2rem(42); + } + + .quickAddition { + width: px2rem(512); + height: px2rem(60); + line-height: px2rem(60); + display: flex; + justify-content: space-between; + position: absolute; + top: px2rem(216); + left: 50%; + transform: translateX(-50%); + + div { + width: px2rem(122); + border-radius: px2rem(60); + text-align: center; + color: #8F392E; + font-size: px2rem(24); + background: #FFF3DB; + font-weight: 500; + } + } + + .magicSticks { + width: 100%; + position: absolute; + top: px2rem(336); + left: 50%; + transform: translateX(-50%); + height: px2rem(44); + line-height: px2rem(44); + text-align: center; + color: #E6E2DC; + font-size: px2rem(22); + font-weight: 400; + vertical-align: middle; + + img { + display: inline-block; + width: px2rem(36); + height: px2rem(36); + vertical-align: middle; + } + + b { + color: #fff; + font-size: px2rem(32); + font-weight: 600; + vertical-align: middle; + } + } + + .but { + width: px2rem(410); + height: px2rem(96); + position: absolute; + left: 50%; + transform: translateX(-50%); + bottom: px2rem(64); + } + } +} + +// 购买弹窗 +.magicStick { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, .6); + z-index: 999; + + .magicStick_in { + width: px2rem(594); + height: px2rem(580); + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: #804030; + border-radius: px2rem(40); + border: px2rem(2) solid #FFE478; + + .magicSticktitle { + width: px2rem(300); + height: px2rem(84); + position: absolute; + left: 50%; + transform: translateX(-50%); + top: px2rem(-84); + } + + h3 { + width: 100%; + text-align: center; + color: #FFD4A6; + font-size: px2rem(32); + position: absolute; + top: px2rem(48); + left: 0; + } + + .decrease { + width: px2rem(64); + height: px2rem(64); + position: absolute; + top: px2rem(132); + left: px2rem(42); + } + + input { + background: url(../images/wishingIput.png) no-repeat; + background-size: 100% 100%; + outline: none; + border: none; + position: absolute; + width: px2rem(366); + height: px2rem(64); + left: 50%; + transform: translateX(-50%); + top: px2rem(132); + text-align: center; + color: #8F392E; + font-size: px2rem(32); + font-weight: 500; + } + + .add { + width: px2rem(64); + height: px2rem(64); + position: absolute; + top: px2rem(132); + right: px2rem(42); + } + + .quickAddition { + width: px2rem(400); + height: px2rem(60); + line-height: px2rem(60); + display: flex; + justify-content: space-between; + position: absolute; + top: px2rem(244); + left: 50%; + transform: translateX(-50%); + + div { + width: px2rem(122); + border-radius: px2rem(60); + text-align: center; + color: #8F392E; + font-size: px2rem(24); + background: #FFF3DB; + font-weight: 500; + } + } + + .magicSticks { + width: 100%; + position: absolute; + top: px2rem(345); + left: 50%; + transform: translateX(-50%); + height: px2rem(44); + line-height: px2rem(44); + text-align: center; + color: #E6E2DC; + font-size: px2rem(22); + font-weight: 400; + vertical-align: middle; + + img { + display: inline-block; + width: px2rem(36); + height: px2rem(36); + vertical-align: middle; + } + + b { + color: #fff; + font-size: px2rem(32); + font-weight: 600; + vertical-align: middle; + } + } + + .but { + width: px2rem(410); + height: px2rem(96); + position: absolute; + left: 50%; + transform: translateX(-50%); + bottom: px2rem(80); + } + + i { + font-style: normal; + width: 100%; + text-align: center; + color: #E6E2DC; + font-size: px2rem(22); + font-weight: 400; + position: absolute; + left: 0; + bottom: px2rem(40); + } + } +} + +// 规则 +.rule { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, .6); + z-index: 999; + + .rule_in { + width: px2rem(630); + height: px2rem(700); + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: #804030; + border-radius: px2rem(40); + border: px2rem(2) solid #FFE478; + + .ruleTitle { + width: px2rem(300); + height: px2rem(84); + position: absolute; + left: 50%; + transform: translateX(-50%); + top: px2rem(-84); + } + + .ruleText { + width: px2rem(530); + height: 8.3rem; + margin: px2rem(56) auto 0; + overflow-y: scroll; + color: #fff; + font-size: px2rem(24); + font-weight: 400; + + &::-webkit-scrollbar { + display: none; + } + } + } + +} + +// 参与记录 +.record { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, .6); + z-index: 999; + + .record_in { + width: px2rem(630); + height: px2rem(700); + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: #804030; + border-radius: px2rem(40); + border: px2rem(2) solid #FFE478; + + .recordTitl { + width: px2rem(300); + height: px2rem(84); + position: absolute; + left: 50%; + transform: translateX(-50%); + top: px2rem(-84); + } + + .recordtab { + width: px2rem(482); + height: px2rem(68); + display: flex; + justify-content: space-between; + margin: px2rem(38) auto px2rem(26); + + div { + width: px2rem(210); + height: 100%; + } + + .tab1 { + background: url(../images/record2.png) no-repeat; + background-size: 100% 100%; + } + + .tab2 { + background: url(../images/record1.png) no-repeat; + background-size: 100% 100%; + } + + .act1 { + background: url(../images/recordAct1.png) no-repeat; + background-size: 100% 100%; + } + + .act2 { + background: url(../images/recordAct2.png) no-repeat; + background-size: 100% 100%; + } + } + + .ul1 { + // display: none; + width: px2rem(630); + height: 7rem; + margin: 0 auto; + overflow-y: scroll; + + &::-webkit-scrollbar { + display: none; + } + + li { + width: 100%; + height: px2rem(90); + margin-bottom: px2rem(4); + background: #8D4937; + display: flex; + justify-content: space-between; + overflow: hidden; + + div { + width: 50%; + text-align: center; + color: #FFFFFF; + font-weight: 400; + text-align: center; + + p { + font-size: px2rem(24); + margin-top: px2rem(15); + margin-bottom: px2rem(5); + } + + i { + font-style: normal; + font-size: px2rem(20); + } + } + } + + .liAct { + background: #A65C46; + } + } + + .ul2 { + display: none; + width: px2rem(630); + height: 7rem; + margin: 0 auto; + overflow-y: scroll; + + &::-webkit-scrollbar { + display: none; + } + + li { + width: 100%; + height: px2rem(90); + margin-bottom: px2rem(4); + background: #8D4937; + display: flex; + justify-content: space-between; + overflow: hidden; + + div { + width: 33.33333333%; + text-align: center; + color: #FFFFFF; + font-weight: 400; + text-align: center; + + p { + width: 100%; + font-size: px2rem(24); + margin-top: px2rem(18); + margin-bottom: px2rem(5); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + i { + font-style: normal; + font-size: px2rem(20); + } + } + } + + .liAct { + background: #A65C46; + } + } + } + +} + +// 充值 +.goToPay { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, .6); + z-index: 999; + + .goToPay_in { + width: px2rem(590); + height: px2rem(372); + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: url(../images/goToPay.png) no-repeat; + background-size: 100% 100%; + + .but { + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 3.2rem; + width: 5.5rem; + height: 1.1rem; + } + } +} + +// 购买成功 +.buySuccess { + display: none; + position: fixed; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, .6); + z-index: 999; + + .buySuccess_in { + width: px2rem(590); + height: px2rem(372); + position: relative; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + background: #FFE3C7; + border-radius: px2rem(40); + border: px2rem(2) solid #FFE478; + + h3 { + position: absolute; + left: 0; + top: px2rem(40); + color: #B52E1C; + font-size: px2rem(32); + font-weight: 600; + text-align: center; + width: 100%; + } + + p { + position: absolute; + left: 0; + top: px2rem(140); + color: #FF5426; + font-size: px2rem(28); + font-weight: 500; + text-align: center; + width: 100%; + } + + .buySuccessBut { + position: absolute; + left: 50%; + transform: translateX(-50%); + width: px2rem(410); + height: px2rem(96); + top: px2rem(236); + } + } } \ No newline at end of file diff --git a/view/peko/modules/act-wishingStar/images/add.png b/view/peko/modules/act-wishingStar/images/add.png new file mode 100644 index 0000000..8836e3c Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/add.png differ diff --git a/view/peko/modules/act-wishingStar/images/buyBut.png b/view/peko/modules/act-wishingStar/images/buyBut.png index 59524c7..914c36d 100644 Binary files a/view/peko/modules/act-wishingStar/images/buyBut.png and b/view/peko/modules/act-wishingStar/images/buyBut.png differ diff --git a/view/peko/modules/act-wishingStar/images/buySuccessBut.png b/view/peko/modules/act-wishingStar/images/buySuccessBut.png new file mode 100644 index 0000000..4003f3c Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/buySuccessBut.png differ diff --git a/view/peko/modules/act-wishingStar/images/decrease.png b/view/peko/modules/act-wishingStar/images/decrease.png new file mode 100644 index 0000000..ae8e8ee Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/decrease.png differ diff --git a/view/peko/modules/act-wishingStar/images/diamond.png b/view/peko/modules/act-wishingStar/images/diamond.png index a5a7e73..d141911 100644 Binary files a/view/peko/modules/act-wishingStar/images/diamond.png and b/view/peko/modules/act-wishingStar/images/diamond.png differ diff --git a/view/peko/modules/act-wishingStar/images/giftBg.png b/view/peko/modules/act-wishingStar/images/giftBg.png index a2060eb..1b67c1c 100644 Binary files a/view/peko/modules/act-wishingStar/images/giftBg.png and b/view/peko/modules/act-wishingStar/images/giftBg.png differ diff --git a/view/peko/modules/act-wishingStar/images/giftBox.png b/view/peko/modules/act-wishingStar/images/giftBox.png index d54fb7f..8a0b4c6 100644 Binary files a/view/peko/modules/act-wishingStar/images/giftBox.png and b/view/peko/modules/act-wishingStar/images/giftBox.png differ diff --git a/view/peko/modules/act-wishingStar/images/goToPay.png b/view/peko/modules/act-wishingStar/images/goToPay.png new file mode 100644 index 0000000..a033c2a Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/goToPay.png differ diff --git a/view/peko/modules/act-wishingStar/images/header.png b/view/peko/modules/act-wishingStar/images/header.png index ce1c305..05391ac 100644 Binary files a/view/peko/modules/act-wishingStar/images/header.png and b/view/peko/modules/act-wishingStar/images/header.png differ diff --git a/view/peko/modules/act-wishingStar/images/line.png b/view/peko/modules/act-wishingStar/images/line.png index 7deadf1..6bb46d5 100644 Binary files a/view/peko/modules/act-wishingStar/images/line.png and b/view/peko/modules/act-wishingStar/images/line.png differ diff --git a/view/peko/modules/act-wishingStar/images/lineBox.png b/view/peko/modules/act-wishingStar/images/lineBox.png index f0109b0..e5f0e61 100644 Binary files a/view/peko/modules/act-wishingStar/images/lineBox.png and b/view/peko/modules/act-wishingStar/images/lineBox.png differ diff --git a/view/peko/modules/act-wishingStar/images/listTab1.png b/view/peko/modules/act-wishingStar/images/listTab1.png new file mode 100644 index 0000000..4919561 Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/listTab1.png differ diff --git a/view/peko/modules/act-wishingStar/images/listTab2.png b/view/peko/modules/act-wishingStar/images/listTab2.png new file mode 100644 index 0000000..a74b1dd Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/listTab2.png differ diff --git a/view/peko/modules/act-wishingStar/images/magicStickOk.png b/view/peko/modules/act-wishingStar/images/magicStickOk.png new file mode 100644 index 0000000..f8788d1 Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/magicStickOk.png differ diff --git a/view/peko/modules/act-wishingStar/images/magicSticktitle.png b/view/peko/modules/act-wishingStar/images/magicSticktitle.png new file mode 100644 index 0000000..85dafcc Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/magicSticktitle.png differ diff --git a/view/peko/modules/act-wishingStar/images/myBg.png b/view/peko/modules/act-wishingStar/images/myBg.png new file mode 100644 index 0000000..bf143ce Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/myBg.png differ diff --git a/view/peko/modules/act-wishingStar/images/no1.png b/view/peko/modules/act-wishingStar/images/no1.png new file mode 100644 index 0000000..aa80fe7 Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/no1.png differ diff --git a/view/peko/modules/act-wishingStar/images/no2.png b/view/peko/modules/act-wishingStar/images/no2.png new file mode 100644 index 0000000..bd0ede7 Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/no2.png differ diff --git a/view/peko/modules/act-wishingStar/images/no3.png b/view/peko/modules/act-wishingStar/images/no3.png new file mode 100644 index 0000000..df91ed1 Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/no3.png differ diff --git a/view/peko/modules/act-wishingStar/images/page1Bg.png b/view/peko/modules/act-wishingStar/images/page1Bg.png index f8c985b..562b60c 100644 Binary files a/view/peko/modules/act-wishingStar/images/page1Bg.png and b/view/peko/modules/act-wishingStar/images/page1Bg.png differ diff --git a/view/peko/modules/act-wishingStar/images/page1Title.png b/view/peko/modules/act-wishingStar/images/page1Title.png index c72c57d..52839d4 100644 Binary files a/view/peko/modules/act-wishingStar/images/page1Title.png and b/view/peko/modules/act-wishingStar/images/page1Title.png differ diff --git a/view/peko/modules/act-wishingStar/images/record1.png b/view/peko/modules/act-wishingStar/images/record1.png new file mode 100644 index 0000000..b98836c Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/record1.png differ diff --git a/view/peko/modules/act-wishingStar/images/record2.png b/view/peko/modules/act-wishingStar/images/record2.png new file mode 100644 index 0000000..6bdf16f Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/record2.png differ diff --git a/view/peko/modules/act-wishingStar/images/recordAct1.png b/view/peko/modules/act-wishingStar/images/recordAct1.png new file mode 100644 index 0000000..1516702 Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/recordAct1.png differ diff --git a/view/peko/modules/act-wishingStar/images/recordAct2.png b/view/peko/modules/act-wishingStar/images/recordAct2.png new file mode 100644 index 0000000..482746d Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/recordAct2.png differ diff --git a/view/peko/modules/act-wishingStar/images/recordTitl.png b/view/peko/modules/act-wishingStar/images/recordTitl.png new file mode 100644 index 0000000..9198af6 Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/recordTitl.png differ diff --git a/view/peko/modules/act-wishingStar/images/record_icon.png b/view/peko/modules/act-wishingStar/images/record_icon.png index 95952fc..8078932 100644 Binary files a/view/peko/modules/act-wishingStar/images/record_icon.png and b/view/peko/modules/act-wishingStar/images/record_icon.png differ diff --git a/view/peko/modules/act-wishingStar/images/ruleTitle.png b/view/peko/modules/act-wishingStar/images/ruleTitle.png new file mode 100644 index 0000000..eeaac9b Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/ruleTitle.png differ diff --git a/view/peko/modules/act-wishingStar/images/rule_icon.png b/view/peko/modules/act-wishingStar/images/rule_icon.png index 4ed6f96..d621d8f 100644 Binary files a/view/peko/modules/act-wishingStar/images/rule_icon.png and b/view/peko/modules/act-wishingStar/images/rule_icon.png differ diff --git a/view/peko/modules/act-wishingStar/images/star.png b/view/peko/modules/act-wishingStar/images/star.png index 5e5db65..c2e2b81 100644 Binary files a/view/peko/modules/act-wishingStar/images/star.png and b/view/peko/modules/act-wishingStar/images/star.png differ diff --git a/view/peko/modules/act-wishingStar/images/tab1.png b/view/peko/modules/act-wishingStar/images/tab1.png index f9c1462..05299d5 100644 Binary files a/view/peko/modules/act-wishingStar/images/tab1.png and b/view/peko/modules/act-wishingStar/images/tab1.png differ diff --git a/view/peko/modules/act-wishingStar/images/tab2.png b/view/peko/modules/act-wishingStar/images/tab2.png index d30519a..0585efa 100644 Binary files a/view/peko/modules/act-wishingStar/images/tab2.png and b/view/peko/modules/act-wishingStar/images/tab2.png differ diff --git a/view/peko/modules/act-wishingStar/images/tabAct1.png b/view/peko/modules/act-wishingStar/images/tabAct1.png index bfaba90..d5c5153 100644 Binary files a/view/peko/modules/act-wishingStar/images/tabAct1.png and b/view/peko/modules/act-wishingStar/images/tabAct1.png differ diff --git a/view/peko/modules/act-wishingStar/images/tabAct2.png b/view/peko/modules/act-wishingStar/images/tabAct2.png index 7a4297c..c1c20e8 100644 Binary files a/view/peko/modules/act-wishingStar/images/tabAct2.png and b/view/peko/modules/act-wishingStar/images/tabAct2.png differ diff --git a/view/peko/modules/act-wishingStar/images/wishIngBut.png b/view/peko/modules/act-wishingStar/images/wishIngBut.png index 575d5ad..a7928f1 100644 Binary files a/view/peko/modules/act-wishingStar/images/wishIngBut.png and b/view/peko/modules/act-wishingStar/images/wishIngBut.png differ diff --git a/view/peko/modules/act-wishingStar/images/wishIngOk.png b/view/peko/modules/act-wishingStar/images/wishIngOk.png new file mode 100644 index 0000000..4003f3c Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/wishIngOk.png differ diff --git a/view/peko/modules/act-wishingStar/images/wishIngtitle.png b/view/peko/modules/act-wishingStar/images/wishIngtitle.png new file mode 100644 index 0000000..b0f3355 Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/wishIngtitle.png differ diff --git a/view/peko/modules/act-wishingStar/images/wishingIput.png b/view/peko/modules/act-wishingStar/images/wishingIput.png new file mode 100644 index 0000000..4e4223f Binary files /dev/null and b/view/peko/modules/act-wishingStar/images/wishingIput.png differ diff --git a/view/peko/modules/act-wishingStar/index.html b/view/peko/modules/act-wishingStar/index.html index e4ed93d..ef7479e 100644 --- a/view/peko/modules/act-wishingStar/index.html +++ b/view/peko/modules/act-wishingStar/index.html @@ -26,7 +26,7 @@
- +
@@ -54,13 +54,182 @@
-

1234/8888

+

0/0

-
已許願12次
+
已許願0次
+ +
+
+
+
+
+ +
+
未上榜
+ +
用户昵称
+
+

0次

+ 许愿获奖次数 +
+
+
+ + +
+
+ + + +

参与许愿次数

+ + + + + + + +
+
+1次
+
+10次
+
+100次
+
+200次
+
+ +
+ 我的魔法棒: + + 0 +
+ +
+
+ + +
+
+ + + +

可用魔法棒不足,请购买/购买数量

+ + + + + + + +
+
+1次
+
+10次
+
+100次
+
+ +
+ 消耗: + + 100 +
+ + 1魔法棒=100鉆 +
+
+ + +
+
+ +
+ 规则 +
+
+
+ + +
+
+ +
+
+
+
+ + +
+
+ + +
+
+
+
+
+ + +
+
+

購買成功

+

魔法棒+1

+ +
+
+ + diff --git a/view/peko/modules/act-wishingStar/js/index.js b/view/peko/modules/act-wishingStar/js/index.js index 2ecc2e2..dfecc7f 100644 --- a/view/peko/modules/act-wishingStar/js/index.js +++ b/view/peko/modules/act-wishingStar/js/index.js @@ -26,7 +26,8 @@ const toastMsg = (content = '操作完成', time = 2) => { skin: 'msg' }) } - +var mymagicStickNum = 0;//魔法棒数量 +var getRankType = 1;//1=今日奖励榜,2=次数总榜 // 初始化函數 $(function () { getInfoFromClient() @@ -47,18 +48,81 @@ $(function () { window.webkit.messageHandlers.closeWebView.postMessage(null) } }) - + // getConfig(); }, 100) }) -// 接口 -function get () { +// 配置接口 +function getConfig () { + $('.page1 ul li').remove() + // showLoading() + networkRequest({ + type: 'get', + url: urlPrefix + '/promiseStar/getConfig', + success (res) { + if (res.code === 200) { + mymagicStickNum = res.data.userStickNum; + var str = ''; + res.data.roundList.forEach(res => { + str += ` +
  • +
    + +
    +
    + ${res.giftName} + + ${res.giftPrice} +
    +
    庫存${res.stockNum}
    +
    許願進度
    +
    +
    + +
    +

    ${res.process}/${res.max}

    +
    +
    已許願${res.userInputNum}次
    + +
  • + ` + }); + $('.page1 ul').append(src); + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error (err) { + hideLoading(layerIndex) + toastMsg('網路錯誤,請退出重進') + } + }) +} +// 购买魔法棒接口 +function getRank (type) { + $('.page2 .listBox li').remove() showLoading() networkRequest({ type: 'get', - url: urlPrefix + '', + url: urlPrefix + '/promiseStar/getRank', + data: { type }, success (res) { if (res.code === 200) { - + var str = ''; + res.data.rankList.forEach((res, i) => { + str += ` +
  • +
    ${i + 1 > 3 ? res.ranking : ''}
    + +
    ${res.nick}
    +
    +

    ${res.score}次

    + 許願獲獎次數 +
    +
  • + ` + }) + $('.page2 .listBox').append(str); } else { toastMsg(res.message) } @@ -75,4 +139,386 @@ $('.header .tabBox').on('click', ' div', function () { var i = $(this).index() + 1; $('.header .tabBox div').removeClass('act1').removeClass('act2'); $(this).addClass(`act${i}`); -}) \ No newline at end of file + $('.page1,.page2').hide(); + $(`.page${i}`).show(); + if (i == 2) { + getRank(getRankType); + } +}) +// 榜单切换 +$('.page2 .listTab div').click(function () { + var i = $(this).index() + 1; + $(this).parent('.listTab').removeClass('tab1').removeClass('tab2'); + $(this).parent('.listTab').addClass(`tab${i}`) + getRankType = i; + getRank(getRankType); +}) +// 打开活动规则弹窗 +$('.header .rule_icon').click(function () { + $('.rule').show(); + bodyScroolFun(true); +}) +// 关闭活动规则弹窗 +$('.rule').click(function () { + $('.rule').hide(); + bodyScroolFun(false); +}) +// 切换参与记录按钮 +$('.record .record_in .recordtab div').click(function () { + var i = $(this).index() + 1; + $('.record .record_in .recordtab div').removeClass('act1').removeClass('act2'); + $(this).addClass(`act${i}`); + $('.record .record_in .ul2,.record .record_in .ul1').hide(); + $(`.record .record_in .ul${i}`).show(); + return false; +}) +var page = 1; +var isLock = true; +// 中奖记录接口 +function listLuckyRecord (page) { + $('.record .record_in .ul1 li').remove(); + networkRequest({ + type: 'get', + url: urlPrefix + '/promiseStar/listLuckyRecord', + data: { page, pageSize: 10 }, + success (res) { + if (res.code === 200) { + if (res.data.length == 0) { + isLock = false; + } + var str = ''; + res.data.forEach((res, i) => { + str += ` +
  • +
    +

    ${dateFormat(res.createTime, 'hh:mm:ss')}

    + ${dateFormat(res.createTime, 'yyyy-MM-dd')} +
    +
    +

    獲得:${res.gift.giftName}

    + (${res.gift.goldPrice}鉆石) +
    +
  • + ` + }) + $('.record .record_in .ul1').append(str); + isLock = true; + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error (err) { + isLock = true; + hideLoading(layerIndex) + toastMsg('網路錯誤,請退出重進') + } + }) +} +// 参与记录 +function listRoundRecord (page) { + $('.record .record_in .ul2 li').remove(); + networkRequest({ + type: 'get', + url: urlPrefix + '/promiseStar/listRoundRecord', + data: { page, pageSize: 10 }, + success (res) { + if (res.code === 200) { + if (res.data.length == 0) { + isLock = false; + } + var str = ''; + res.data.forEach((res, i) => { + str += ` +
  • +
    +

    ${dateFormat(res.createTime, 'hh:mm:ss')}

    + ${dateFormat(res.createTime, 'yyyy-MM-dd')} +
    +
    +

    許願:${res.gift.giftName}

    + ${res.luckyUser ? '已结束' : '進行中'} +
    +
    +

    ${res.luckyUser ? res.luckyUser.nick : ''}

    + ${res.luckyUser ? '獲得' : ''} +
    +
  • + ` + }) + $('.record .record_in .ul2').append(str); + isLock = true; + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error (err) { + isLock = true; + hideLoading(layerIndex) + toastMsg('網路錯誤,請退出重進') + } + }) +} +// 打开参与记录按钮 +$('.header .record_icon').click(function () { + page = 1; + isLock = true; + showLoading(); + listLuckyRecord(page); + $('.record').show(); + bodyScroolFun(true); +}) +// 监听滚动1 +$('.record .record_in .ul1').scroll(function () { + let scrollTop = $(this).scrollTop() + let scrollHeight = $('.record .record_in .ul1')[0].scrollHeight + let ulHeight = $(this).innerHeight() + if (scrollTop + ulHeight + 100 >= scrollHeight) { + if (isLock) { + // 请求下一页 + if (canNext) { + listLuckyRecord(page++) + isLock = false; + } + } + } +}) +// 监听滚动2 +$('.record .record_in .ul2').scroll(function () { + let scrollTop = $(this).scrollTop() + let scrollHeight = $('.record .record_in .ul2')[0].scrollHeight + let ulHeight = $(this).innerHeight() + if (scrollTop + ulHeight + 100 >= scrollHeight) { + if (isLock) { + // 请求下一页 + if (canNext) { + listRoundRecord(page++) + isLock = false; + } + } + } +}) +// 关闭参与记录按钮 +$('.record').click(function () { + $('.record').hide(); + bodyScroolFun(false); +}) +// 关闭去充值弹窗 +$('.goToPay').click(function () { + $('.goToPay').hide(); + bodyScroolFun(false); +}) +// 关闭购买成功按钮 +$('.buySuccess .buySuccess_in .buySuccessBut').click(function () { + $('.buySuccess').hide(); + bodyScroolFun(false); +}) +// 去充值按钮 +$('.goToPay .goToPay_in .but').click(function () { + if (browser.app) { + if (browser.android) { + let channel = pubInfo.deviceInfo.channel; + console.log(pubInfo.deviceInfo); + if (channel == "google") { + window.androidJsObj.openChargePage(6); + } else { + window.androidJsObj.openChargePage(6); + window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; + } + } else if (browser.ios) { + let channel = pubInfo.deviceInfo.channel; + if (channel == "appstore") { + window.webkit.messageHandlers.openChargePage.postMessage(null); + } else { + window.webkit.messageHandlers.chargePayClickPage.postMessage(6); + window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; + } + } + } else { + toastMsg('請在app內打開') + } + $('.goToPay').hide(); + bodyScroolFun(false); + return false; +}) +var magicStickNum = 1; +function magicStick (type, num) { + magicStickNum = Number($('.magicStick .magicStick_in input').val()); + if (type == 1) { + // 加 + magicStickNum++; + } else if (type == 2) { + // 减 + magicStickNum--; + } else if (type == 3) { + // 快捷购买 + magicStickNum += num; + } else { + } + magicStickNum <= 1 ? magicStickNum = 1 : magicStickNum = magicStickNum; + magicStickNum >= 99999999 ? magicStickNum = 99999999 : magicStickNum = magicStickNum; + $('.magicStick .magicStick_in .magicSticks b').text(magicStickNum * 100); + $('.magicStick .magicStick_in input').val(magicStickNum); +} +// 打开购买魔法棒弹窗 +$('.page1 .top .but').click(function () { + $('.magicStick .magicStick_in h3').text('購買數量'); + $('.magicStick').show(); + bodyScroolFun(true); +}) +// 魔法棒加弹窗 +$('.magicStick .magicStick_in .add').click(function () { + magicStick(1) + return false; +}) +// 魔法棒减弹窗 +$('.magicStick .magicStick_in .decrease').click(function () { + magicStick(2) + return false; +}) +// 魔法棒快捷购买弹窗 +$('.magicStick .magicStick_in .quickAddition div').click(function () { + var num = Number($(this).attr('num')); + magicStick(3, num) + return false; +}) +// 监听输入框的变化 +$('.magicStick .magicStick_in input').on('input', function () { + magicStick(); +}) +// 魔法棒输入框弹窗 +$('.magicStick .magicStick_in input').click(function () { + return false; +}) +// 关闭购买魔法棒弹窗 +$('.magicStick').click(function () { + $('.magicStick').hide(); + bodyScroolFun(false); +}) +// 确认购买魔法棒按钮 +$('.magicStick .magicStick_in .but').click(function () { + buyStick(magicStickNum) + bodyScroolFun(false); +}) +// 购买魔法棒 +function buyStick (num) { + showLoading() + networkRequest({ + type: 'get', + url: urlPrefix + '/promiseStar/buyStick', + data: { num }, + success (res) { + if (res.code === 200) { + getConfig(); + $('.buySuccess p').tetx(`魔法棒${num}`); + $('.buySuccess').show(); + bodyScroolFun(true); + magicStickNum = 1; + $('.magicStick .magicStick_in .magicSticks b').text(0); + } else if (res.code === 31005) { + $('.goToPay').show(); + bodyScroolFun(true); + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error (err) { + hideLoading(layerIndex) + toastMsg('網路錯誤,請退出重進') + } + }) +} +var wishingNum = 1; +function wishing (type, num) { + wishingNum = Number($('.wishingPop .wishingPop_in input').val()); + if (type == 1) { + // 加 + wishingNum++; + } else if (type == 2) { + // 减 + wishingNum--; + } else if (type == 3) { + // 快捷购买 + wishingNum += num; + } else { + } + wishingNum <= 1 ? wishingNum = 1 : wishingNum = wishingNum; + wishingNum >= 99999999 ? wishingNum = 99999999 : wishingNum = wishingNum; + $('.wishingPop .wishingPop_in input').val(wishingNum); +} +// 许愿加弹窗 +$('.wishingPop .wishingPop_in .add').click(function () { + wishing(1) + return false; +}) +// 许愿减弹窗 +$('.wishingPop .wishingPop_in .decrease').click(function () { + wishing(2) + return false; +}) +// 许愿快捷购买弹窗 +$('.wishingPop .wishingPop_in .quickAddition div').click(function () { + var num = Number($(this).attr('num')); + wishing(3, num) + return false; +}) +// 监听输入框的变化 +$('.wishingPop .wishingPop_in input').on('input', function () { + wishing(); +}) +// 许愿输入框弹窗 +$('.wishingPop .wishingPop_in input').click(function () { + return false; +}) +// 关闭许愿弹窗 +$('.wishingPop').click(function () { + $('.wishingPop').hide(); + bodyScroolFun(false); +}) +// 许愿按钮 +var roundId; +$('.page1 ul li').on('click', '.wishIngBut', function () { + var stockNum = $(this).attr('stockNum'); + roundId = $(this).attr('roundId'); + if (stockNum == 0) { + toastMsg('该礼物库存不足,无法进行许愿'); + return; + } + $('.wishingPop').show(); +}) +// 确认许愿按钮 +$('.wishingPop .wishingPop_in .but').click(function () { + console.log(wishingNum < mymagicStickNum); + if (wishingNum > mymagicStickNum) { + $('.magicStick .magicStick_in h3').text('可用魔法棒不足,请购买'); + $('.magicStick').show(); + bodyScroolFun(true); + } else { + promise(wishingNum, roundId); + bodyScroolFun(false); + } + +}) +// 许愿接口 +function promise (num, roundId) { + showLoading() + networkRequest({ + type: 'post', + url: urlPrefix + '/promiseStar/promise', + data: { num, roundId }, + success (res) { + if (res.code === 200) { + toastMsg('参与许愿成功') + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error (err) { + hideLoading(layerIndex) + toastMsg('網路錯誤,請退出重進') + } + }) +} \ No newline at end of file