diff --git a/view/yinmeng/activity/2024-cityLove/css/index.css b/view/yinmeng/activity/2024-cityLove/css/index.css new file mode 100644 index 0000000..f22480c --- /dev/null +++ b/view/yinmeng/activity/2024-cityLove/css/index.css @@ -0,0 +1,730 @@ +html, +body { + width: 100%; + background: #F9E4D6; +} + +.rabbit { + z-index: 999; + width: 0.8rem; + height: 0.8rem; +} + +.back { + position: fixed; + top: 0.93333rem; + left: 0.45333rem; + z-index: 99; + width: 0.82667rem; + height: 0.82667rem; +} + +.back img { + width: 100%; + height: 100%; +} + +.back p { + color: #fff; + font-size: 0.42667rem; + position: absolute; + width: 9rem; + left: 0; + top: 0; + height: 100%; + text-align: center; + line-height: 0.82667rem; +} + +.header { + width: 10rem; + height: 11.6rem; + background: url(../images/header.png) no-repeat; + background-size: 100% 100%; + position: relative; + margin: 0 auto 0rem; +} + +.header .rule_icon { + position: absolute; + width: 1.76rem; + height: 0.97333rem; + right: 0; + top: 4.6rem; +} + +.header .tab { + width: 7.89333rem; + height: 1.36rem; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 7.64rem; + display: flex; + justify-content: space-between; +} + +.header .tab div { + width: 3.46667rem; + height: 100%; +} + +.header .tab .tab1 { + background: url(../images/tab1.png) no-repeat; + background-size: 100% 100%; +} + +.header .tab .tab2 { + background: url(../images/tab2.png) no-repeat; + background-size: 100% 100%; +} + +.header .tab .act1 { + background: url(../images/tabAct1.png) no-repeat; + background-size: 100% 100%; +} + +.header .tab .act2 { + background: url(../images/tabAct2.png) no-repeat; + background-size: 100% 100%; +} + +.page1 .page1Box1 { + width: 10rem; + height: 9.74667rem; + display: block; + margin: -2.6rem auto 0rem; + position: relative; +} + +.page1 .page1Box2 { + width: 10rem; + height: 12.44rem; + display: block; + margin: -1.1rem auto 0rem; + position: relative; +} + +.page1 .page1Box3 { + width: 10rem; + height: 12.28rem; + display: block; + margin: -1.1rem auto 0rem; + position: relative; +} + +.page1 .page1Box4 { + width: 10rem; + height: 15rem; + margin: -1.1rem auto 0rem; + position: relative; + background: url(../images/page1Box4.png) no-repeat 100% 100%; + background-size: 100% 100%; +} + +.page1 .page1Box4 .left { + width: 3.48rem; + height: 0.84rem; + line-height: 0.81333rem; + background: url(../images/page1Box4_left.png) no-repeat; + background-size: 100% 100%; + color: #FF5B8D; + font-size: 0.28rem; + position: absolute; + left: 0; + top: 2.69333rem; + text-indent: 2.55rem; + font-weight: bold; +} + +.page1 .page1Box4 .right { + width: 3.48rem; + height: 0.84rem; + position: absolute; + right: 0; + top: 2.69333rem; +} + +.page1 .page1Box4 .dayLimit { + width: 0.76rem; + height: 0.36rem; + line-height: 0.36rem; + text-align: center; + color: #fff; + font-size: 0.16rem; + font-weight: 500; + position: absolute; + top: 4.10667rem; + background: url(../images/dayLimit.png) no-repeat; + background-size: 100% 100%; + text-indent: 0.05rem; +} + +.page1 .page1Box4 .dayLimit1 { + left: 2.81333rem; +} + +.page1 .page1Box4 .dayLimit2 { + left: 5.49333rem; +} + +.page1 .page1Box4 .dayLimit3 { + left: 8.22667rem; +} + +.page1 .page1Box4 .convert { + width: 1.73333rem; + height: 0.61333rem; + position: absolute; +} + +.page1 .page1Box4 .convert1 { + left: 1.37333rem; + top: 6.33333rem; +} + +.page1 .page1Box4 .convert2 { + left: 4.04rem; + top: 6.33333rem; +} + +.page1 .page1Box4 .convert3 { + left: 6.8rem; + top: 6.33333rem; +} + +.page1 .page1Box4 .convert4 { + left: 1.37333rem; + top: 9.45333rem; +} + +.page1 .page1Box4 .convert5 { + left: 4.04rem; + top: 9.45333rem; +} + +.page1 .page1Box4 .convert6 { + left: 6.8rem; + top: 9.45333rem; +} + +.page1 .page1Box4 .convert7 { + left: 2.8rem; + top: 12.65333rem; +} + +.page1 .page1Box4 .convert8 { + left: 5.45333rem; + top: 12.65333rem; +} + +.page2 { + display: none; + width: 10rem; + height: 20.56rem; + background: url(../images/page2.png) no-repeat; + background-size: 100% 100%; + position: relative; + margin: -2.6rem auto 1.33333rem; +} + +.page2 .first .left_ts { + width: 2.16rem; + height: 2.13333rem; + position: absolute; + left: 2.16rem; + top: 2.68rem; + z-index: 2; +} + +.page2 .first .right_ts { + width: 2.16rem; + height: 2.13333rem; + position: absolute; + right: 2.16rem; + top: 2.68rem; + z-index: 2; +} + +.page2 .first .left_tx { + width: 1.76rem; + height: 1.76rem; + border-radius: 50%; + position: absolute; + left: 2.33333rem; + top: 2.89333rem; +} + +.page2 .first .right_tx { + width: 1.76rem; + height: 1.76rem; + border-radius: 50%; + position: absolute; + right: 2.33333rem; + top: 2.89333rem; +} + +.page2 .first .score { + width: 1.5rem; + text-align: center; + -webkit-text-stroke: 0.01333rem #FE5A9F; + /* Safari */ + font-size: 0.28rem; + color: #fff; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 3.82667rem; + font-weight: bold; +} + +.page2 .first .leftNick { + width: 2.16rem; + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: absolute; + left: 2.24rem; + top: 5rem; + color: #B8004E; + font-weight: bold; + font-size: 0.28rem; +} + +.page2 .first .rightNick { + width: 2.16rem; + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: absolute; + right: 2.24rem; + top: 5rem; + color: #B8004E; + font-weight: bold; + font-size: 0.28rem; +} + +.page2 .notFirst { + width: 8.88rem; + height: 12rem; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 7.13333rem; + overflow-y: scroll; +} + +.page2 .notFirst::-webkit-scrollbar { + display: none; +} + +.page2 .notFirst li { + width: 8.88rem; + height: 1.82667rem; + background: url(../images/listBg.png) no-repeat; + background-size: 100% 100%; + position: relative; + overflow: hidden; +} + +.page2 .notFirst li .num { + width: 0.66667rem; + height: 100%; + line-height: 1.82667rem; + text-align: center; + color: #B16B74; + font-size: 0.30667rem; + font-weight: 500; + float: left; + margin-left: 0.52rem; + margin-right: 0.2rem; +} + +.page2 .notFirst li .left_tx { + width: 1.09333rem; + height: 1.09333rem; + border-radius: 1.09333rem; + float: left; + margin-top: 0.38667rem; + border: 0.02667rem solid #FFABC7; + margin-right: 0.18667rem; +} + +.page2 .notFirst li .right_tx { + width: 1.09333rem; + height: 1.09333rem; + border-radius: 1.09333rem; + float: left; + margin-top: 0.38667rem; + border: 0.02667rem solid #FFABC7; +} + +.page2 .notFirst li .love { + width: 1.02667rem; + height: 0.90667rem; + position: absolute; + left: 2.10667rem; + top: 0.50667rem; +} + +.page2 .notFirst li .nickLeft { + width: 2.2rem; + color: #FF658E; + font-size: 0.28rem; + font-weight: 500; + position: absolute; + left: 4rem; + top: 0.58667rem; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.page2 .notFirst li .nickRight { + width: 2.2rem; + color: #FF658E; + font-size: 0.28rem; + font-weight: 500; + position: absolute; + left: 4rem; + top: 0.98667rem; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.page2 .notFirst li .score { + float: right; + height: 100%; + line-height: 1.82667rem; + color: #FE5F93; + font-size: 0.32rem; + margin-right: 1rem; + font-weight: 500; +} + +.page2 .my { + width: 10rem; + height: 3.16rem; + position: fixed; + left: 0; + bottom: 0; + background: url(../images/my.png) no-repeat; + background-size: 100% 100%; + background: url(../images/my2.png) no-repeat; + background-size: 100% 100%; + transition: all .3s; + z-index: 3; +} + +.page2 .my .more { + width: 1.24rem; + height: 1.24rem; + position: absolute; + right: 0.09333rem; + top: -0.41333rem; +} + +.page2 .my ul { + width: 8.88rem; + height: 1.82667rem; + margin: 1.10667rem auto 0; + overflow-y: hidden; +} + +.page2 .my ul::-webkit-scrollbar { + display: none; +} + +.page2 .my ul li { + width: 100%; + height: 1.82667rem; + background: url(../images/myList.png) no-repeat; + background-size: 100% 100%; + position: relative; + margin-bottom: 0.10667rem; + overflow: hidden; +} + +.page2 .my ul li .num { + width: 0.66667rem; + height: 100%; + line-height: 1.82667rem; + text-align: center; + color: #B16B74; + font-size: 0.30667rem; + font-weight: 500; + float: left; + margin-left: 0.52rem; + margin-right: 0.2rem; +} + +.page2 .my ul li .left_tx { + width: 1.09333rem; + height: 1.09333rem; + border-radius: 1.09333rem; + float: left; + margin-top: 0.38667rem; + border: 0.02667rem solid #FFABC7; + margin-right: 0.18667rem; +} + +.page2 .my ul li .right_tx { + width: 1.09333rem; + height: 1.09333rem; + border-radius: 1.09333rem; + float: left; + margin-top: 0.38667rem; + border: 0.02667rem solid #FFABC7; +} + +.page2 .my ul li .love { + width: 1.02667rem; + height: 0.90667rem; + position: absolute; + left: 2.10667rem; + top: 0.50667rem; +} + +.page2 .my ul li .nickLeft { + width: 2.2rem; + color: #FF658E; + font-size: 0.28rem; + font-weight: 500; + position: absolute; + left: 4rem; + top: 0.58667rem; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.page2 .my ul li .nickRight { + width: 2.2rem; + color: #FF658E; + font-size: 0.28rem; + font-weight: 500; + position: absolute; + left: 4rem; + top: 0.98667rem; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; +} + +.page2 .my ul li .score { + float: right; + height: 100%; + line-height: 1.82667rem; + color: #FE5F93; + font-size: 0.32rem; + margin-right: 1rem; + font-weight: 500; +} + +.page2 .my ul .null { + background: none; + text-align: center; + line-height: 1.82667rem; + color: #FF658E; + font-size: 0.4rem; + font-weight: 500; +} + +.rule { + position: fixed; + z-index: 99; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); + display: none; +} + +.rule .rule_in { + width: 9.10667rem; + height: 13.18667rem; + background: url(../images/ruleBg.png) no-repeat; + background-size: 100% 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + overflow: hidden; +} + +.rule .rule_in .tab { + width: 6.64rem; + height: 1.22667rem; + display: flex; + justify-content: space-between; + margin: 2.4rem auto 0.25333rem; +} + +.rule .rule_in .tab div { + width: 3.13333rem; + height: 1.22667rem; +} + +.rule .rule_in .tab .tab1 { + background: url(../images/ruleTab1.png) no-repeat; + background-size: 100% 100%; +} + +.rule .rule_in .tab .tab2 { + background: url(../images/ruleTab2.png) no-repeat; + background-size: 100% 100%; +} + +.rule .rule_in .tab .act1 { + background: url(../images/ruleTabAct1.png) no-repeat; + background-size: 100% 100%; +} + +.rule .rule_in .tab .act2 { + background: url(../images/ruleTabAct2.png) no-repeat; + background-size: 100% 100%; +} + +.rule .rule_in .box { + width: 7.81333rem; + height: 8.5rem; + margin: 0 auto 0; + overflow-y: scroll; +} + +.rule .rule_in .box::-webkit-scrollbar { + display: none; +} + +.rule .rule_in .box img { + display: block; + width: 100%; +} + +.rule .rule_in .box .img2 { + display: none; +} + +.rule .rule_in .box2 { + width: 8.29333rem; +} + +.end { + position: fixed; + z-index: 99; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); + display: none; +} + +.end .end_in { + width: 7rem; + height: 5.48rem; + background: url(../images/endBg.png) no-repeat; + background-size: 100% 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + overflow: hidden; +} + +.end .but { + width: 3.14667rem; + height: 1.22667rem; + position: absolute; + left: 50%; + transform: translateX(-50%); + bottom: 0.81333rem; +} + +.records { + position: fixed; + z-index: 99; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); + display: none; +} + +.records .records_in { + width: 9.61333rem; + height: 8.48rem; + background: url(../images/recordsBg.png) no-repeat; + background-size: 100% 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + overflow: hidden; +} + +.records .records_in .title { + width: 5.4rem; + display: flex; + justify-content: space-between; + color: #8956AA; + font-weight: 500; + font-size: 0.36rem; + margin: 2.49333rem auto 0.48rem; + text-align: center; +} + +.records .records_in .title div { + width: 2.7rem; +} + +.records .records_in ul { + width: 5.4rem; + height: 3.4rem; + margin: 0 auto; + overflow-y: scroll; +} + +.records .records_in ul::-webkit-scrollbar { + display: none; +} + +.records .records_in ul li { + width: 100%; + display: flex; + justify-content: space-between; + text-align: right; + margin-bottom: 0.28rem; +} + +.records .records_in ul li div { + width: 2.7rem; + box-sizing: border-box; + padding-right: 0.64rem; + color: #8956AA; + font-size: 0.26667rem; + font-weight: 400; +} + +.records .records_in ul li div p { + margin-bottom: 0.06667rem; +} + +.records .records_in ul li div b { + font-size: 0.21333rem; +} + +.records .records_in ul li .div2 { + text-align: center; + padding: 0; +} + +.records .records_in ul .null .nulls { + text-align: center; + text-indent: 0.6rem; +} diff --git a/view/yinmeng/activity/2024-cityLove/css/index.scss b/view/yinmeng/activity/2024-cityLove/css/index.scss new file mode 100644 index 0000000..84e4ef5 --- /dev/null +++ b/view/yinmeng/activity/2024-cityLove/css/index.scss @@ -0,0 +1,743 @@ +@function px2rem($px) { + @return $px / 75+rem; +} + +html, +body { + width: 100%; + background: #F9E4D6; +} + +.rabbit { + z-index: 999; + width: px2rem(60); + height: px2rem(60); +} + +// 返回按钮 +.back { + position: fixed; + top: px2rem(70); + left: px2rem(34); + z-index: 99; + width: px2rem(62); + height: px2rem(62); + + img { + width: 100%; + height: 100%; + } + + p { + color: #fff; + font-size: px2rem(32); + position: absolute; + width: 9rem; + left: 0; + top: 0; + height: 100%; + text-align: center; + line-height: px2rem(62); + } +} + +.header { + width: px2rem(750); + height: px2rem(870); + background: url(../images/header.png) no-repeat; + background-size: 100% 100%; + position: relative; + margin: 0 auto px2rem(0); + + .rule_icon { + position: absolute; + width: px2rem(132); + height: px2rem(73); + right: 0; + top: 4.6rem; + } + + .tab { + width: px2rem(592); + height: px2rem(102); + position: absolute; + left: 50%; + transform: translateX(-50%); + top: px2rem(573); + display: flex; + justify-content: space-between; + + div { + width: px2rem(260); + height: 100%; + } + + .tab1 { + background: url(../images/tab1.png) no-repeat; + background-size: 100% 100%; + } + + .tab2 { + background: url(../images/tab2.png) no-repeat; + background-size: 100% 100%; + } + + .act1 { + background: url(../images/tabAct1.png) no-repeat; + background-size: 100% 100%; + } + + .act2 { + background: url(../images/tabAct2.png) no-repeat; + background-size: 100% 100%; + } + } +} + +.page1 { + // display: none; + + .page1Box1 { + width: px2rem(750); + height: px2rem(731); + display: block; + margin: -2.6rem auto 0rem; + position: relative; + } + + .page1Box2 { + width: px2rem(750); + height: px2rem(933); + display: block; + margin: -1.1rem auto 0rem; + position: relative; + } + + .page1Box3 { + width: px2rem(750); + height: px2rem(921); + display: block; + margin: -1.1rem auto 0rem; + position: relative; + } + + .page1Box4 { + width: px2rem(750); + height: px2rem(1125); + margin: -1.1rem auto 0rem; + position: relative; + background: url(../images/page1Box4.png) no-repeat 100% 100%; + background-size: 100% 100%; + + .left { + width: px2rem(261); + height: px2rem(63); + line-height: px2rem(61); + background: url(../images/page1Box4_left.png) no-repeat; + background-size: 100% 100%; + color: #FF5B8D; + font-size: px2rem(21); + position: absolute; + left: 0; + top: px2rem(202); + text-indent: 2.55rem; + font-weight: bold; + } + + .right { + width: px2rem(261); + height: px2rem(63); + position: absolute; + right: 0; + top: px2rem(202); + } + + .dayLimit { + width: px2rem(57); + height: px2rem(27); + line-height: px2rem(27); + text-align: center; + color: #fff; + font-size: px2rem(12); + font-weight: 500; + position: absolute; + top: px2rem(308); + background: url(../images/dayLimit.png) no-repeat; + background-size: 100% 100%; + text-indent: 0.05rem; + } + + .dayLimit1 { + left: px2rem(211); + } + + .dayLimit2 { + left: px2rem(412); + } + + .dayLimit3 { + left: px2rem(617); + } + + .convert { + width: px2rem(130); + height: px2rem(46); + position: absolute; + } + + .convert1 { + left: px2rem(103); + top: px2rem(475); + } + + .convert2 { + left: px2rem(303); + top: px2rem(475); + } + + .convert3 { + left: px2rem(510); + top: px2rem(475); + } + + .convert4 { + left: px2rem(103); + top: px2rem(709); + } + + .convert5 { + left: px2rem(303); + top: px2rem(709); + } + + .convert6 { + left: px2rem(510); + top: px2rem(709); + } + + .convert7 { + left: px2rem(210); + top: px2rem(949); + } + + .convert8 { + left: px2rem(409); + top: px2rem(949); + } + } +} + +.page2 { + display: none; + width: px2rem(750); + height: px2rem(1542); + background: url(../images/page2.png) no-repeat; + background-size: 100% 100%; + position: relative; + margin: -2.6rem auto px2rem(100); + + .first { + .left_ts { + width: px2rem(162); + height: px2rem(160); + position: absolute; + left: px2rem(162); + top: px2rem(201); + z-index: 2; + } + + .right_ts { + width: px2rem(162); + height: px2rem(160); + position: absolute; + right: px2rem(162); + top: px2rem(201); + z-index: 2; + } + + .left_tx { + width: px2rem(132); + height: px2rem(132); + border-radius: 50%; + position: absolute; + left: px2rem(175); + top: px2rem(217); + } + + .right_tx { + width: px2rem(132); + height: px2rem(132); + border-radius: 50%; + position: absolute; + right: px2rem(175); + top: px2rem(217); + } + + .score { + width: 1.5rem; + text-align: center; + -webkit-text-stroke: px2rem(1) #FE5A9F; + /* Safari */ + font-size: px2rem(21); + color: #fff; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: 3.82667rem; + font-weight: bold; + } + + .leftNick { + width: px2rem(162); + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: absolute; + left: px2rem(168); + top: px2rem(375); + color: #B8004E; + font-weight: bold; + font-size: px2rem(21); + } + + .rightNick { + width: px2rem(162); + text-align: center; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + position: absolute; + right: px2rem(168); + top: px2rem(375); + color: #B8004E; + font-weight: bold; + font-size: px2rem(21); + } + } + + .notFirst { + width: px2rem(666); + height: 12rem; + position: absolute; + left: 50%; + transform: translateX(-50%); + top: px2rem(535); + overflow-y: scroll; + + &::-webkit-scrollbar { + display: none; + } + + li { + width: px2rem(666); + height: px2rem(137); + background: url(../images/listBg.png) no-repeat; + background-size: 100% 100%; + position: relative; + overflow: hidden; + + .num { + width: px2rem(50); + height: 100%; + line-height: px2rem(137); + text-align: center; + color: #B16B74; + font-size: px2rem(23); + font-weight: 500; + float: left; + margin-left: 0.52rem; + margin-right: px2rem(15); + } + + .left_tx { + width: px2rem(82); + height: px2rem(82); + border-radius: px2rem(82); + float: left; + margin-top: px2rem(29); + border: px2rem(2) solid #FFABC7; + margin-right: px2rem(14); + } + + .right_tx { + width: px2rem(82); + height: px2rem(82); + border-radius: px2rem(82); + float: left; + margin-top: px2rem(29); + border: px2rem(2) solid #FFABC7; + } + + .love { + width: px2rem(77); + height: px2rem(68); + position: absolute; + left: px2rem(158); + top: px2rem(38); + } + + .nickLeft { + width: 2.2rem; + color: #FF658E; + font-size: px2rem(21); + font-weight: 500; + position: absolute; + left: px2rem(300); + top: px2rem(44); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .nickRight { + width: 2.2rem; + color: #FF658E; + font-size: px2rem(21); + font-weight: 500; + position: absolute; + left: px2rem(300); + top: px2rem(74); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .score { + float: right; + height: 100%; + line-height: px2rem(137); + color: #FE5F93; + font-size: px2rem(24); + margin-right: px2rem(75); + font-weight: 500; + } + } + } + + .my { + width: px2rem(750); + height: 3.16rem; + position: fixed; + left: 0; + bottom: 0; + background: url(../images/my.png) no-repeat; + background-size: 100% 100%; + background: url(../images/my2.png) no-repeat; + background-size: 100% 100%; + transition: all .3s; + z-index: 3; + + .more { + width: px2rem(93); + height: px2rem(93); + position: absolute; + right: px2rem(7); + top: px2rem(-31); + } + + ul { + width: 8.88rem; + height: 1.82667rem; + margin: 1.10667rem auto 0; + overflow-y: hidden; + + &::-webkit-scrollbar { + display: none; + } + + li { + width: 100%; + height: px2rem(137); + background: url(../images/myList.png) no-repeat; + background-size: 100% 100%; + position: relative; + margin-bottom: px2rem(8); + overflow: hidden; + + .num { + width: px2rem(50); + height: 100%; + line-height: px2rem(137); + text-align: center; + color: #B16B74; + font-size: px2rem(23); + font-weight: 500; + float: left; + margin-left: 0.52rem; + margin-right: px2rem(15); + } + + .left_tx { + width: px2rem(82); + height: px2rem(82); + border-radius: px2rem(82); + float: left; + margin-top: px2rem(29); + border: px2rem(2) solid #FFABC7; + margin-right: px2rem(14); + } + + .right_tx { + width: px2rem(82); + height: px2rem(82); + border-radius: px2rem(82); + float: left; + margin-top: px2rem(29); + border: px2rem(2) solid #FFABC7; + } + + .love { + width: px2rem(77); + height: px2rem(68); + position: absolute; + left: px2rem(158); + top: px2rem(38); + } + + .nickLeft { + width: 2.2rem; + color: #FF658E; + font-size: px2rem(21); + font-weight: 500; + position: absolute; + left: px2rem(300); + top: px2rem(44); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .nickRight { + width: 2.2rem; + color: #FF658E; + font-size: px2rem(21); + font-weight: 500; + position: absolute; + left: px2rem(300); + top: px2rem(74); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + .score { + float: right; + height: 100%; + line-height: px2rem(137); + color: #FE5F93; + font-size: px2rem(24); + margin-right: px2rem(75); + font-weight: 500; + } + + } + + .null { + background: none; + text-align: center; + line-height: px2rem(137); + color: #FF658E; + font-size: px2rem(30); + font-weight: 500; + } + } + } +} + +.rule { + position: fixed; + z-index: 99; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, .6); + display: none; + + .rule_in { + width: px2rem(683); + height: px2rem(989); + background: url(../images/ruleBg.png) no-repeat; + background-size: 100% 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + overflow: hidden; + + .tab { + width: px2rem(498); + height: px2rem(92); + display: flex; + justify-content: space-between; + margin: px2rem(180) auto px2rem(19); + + div { + width: px2rem(235); + height: px2rem(92); + } + + .tab1 { + background: url(../images/ruleTab1.png) no-repeat; + background-size: 100% 100%; + } + + .tab2 { + background: url(../images/ruleTab2.png) no-repeat; + background-size: 100% 100%; + } + + .act1 { + background: url(../images/ruleTabAct1.png) no-repeat; + background-size: 100% 100%; + } + + .act2 { + background: url(../images/ruleTabAct2.png) no-repeat; + background-size: 100% 100%; + } + } + + .box { + width: px2rem(586); + height: 8.5rem; + margin: 0 auto 0; + overflow-y: scroll; + + &::-webkit-scrollbar { + display: none; + } + + img { + display: block; + width: 100%; + } + .img2{ + display: none; + } + } + + .box2 { + width: px2rem(622); + } + } +} + +.end { + position: fixed; + z-index: 99; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, .6); + display: none; + + .end_in { + width: px2rem(525); + height: px2rem(411); + background: url(../images/endBg.png) no-repeat; + background-size: 100% 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + overflow: hidden; + } + + .but { + width: px2rem(236); + height: px2rem(92); + position: absolute; + left: 50%; + transform: translateX(-50%); + bottom: px2rem(61); + } +} + +.records { + position: fixed; + z-index: 99; + left: 0; + top: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, .6); + display: none; + + .records_in { + width: px2rem(721); + height: px2rem(636); + background: url(../images/recordsBg.png) no-repeat; + background-size: 100% 100%; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + overflow: hidden; + + .title { + width: 5.4rem; + display: flex; + justify-content: space-between; + color: #8956AA; + font-weight: 500; + font-size: px2rem(27); + margin: px2rem(187) auto px2rem(36); + text-align: center; + + div { + width: 2.7rem; + } + } + + ul { + width: 5.4rem; + height: 3.4rem; + margin: 0 auto; + overflow-y: scroll; + + &::-webkit-scrollbar { + display: none; + } + + li { + width: 100%; + display: flex; + justify-content: space-between; + text-align: right; + margin-bottom: px2rem(21); + + div { + width: 2.7rem; + box-sizing: border-box; + padding-right: 0.64rem; + color: #8956AA; + font-size: px2rem(20); + font-weight: 400; + + p { + margin-bottom: px2rem(5); + } + + b { + font-size: px2rem(16); + } + } + + .div2 { + text-align: center; + padding: 0; + } + } + + .null { + .nulls { + text-align: center; + text-indent: 0.6rem; + } + } + } + } +} \ No newline at end of file diff --git a/view/yinmeng/activity/2024-cityLove/images/convert.png b/view/yinmeng/activity/2024-cityLove/images/convert.png new file mode 100644 index 0000000..9a128dd Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/convert.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/convertOut.png b/view/yinmeng/activity/2024-cityLove/images/convertOut.png new file mode 100644 index 0000000..db6410e Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/convertOut.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/dayLimit.png b/view/yinmeng/activity/2024-cityLove/images/dayLimit.png new file mode 100644 index 0000000..0bc2785 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/dayLimit.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/endBg.png b/view/yinmeng/activity/2024-cityLove/images/endBg.png new file mode 100644 index 0000000..60bd9c6 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/endBg.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/endBut.png b/view/yinmeng/activity/2024-cityLove/images/endBut.png new file mode 100644 index 0000000..fa8d477 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/endBut.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/header.png b/view/yinmeng/activity/2024-cityLove/images/header.png new file mode 100644 index 0000000..ad92055 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/header.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/left_ts.png b/view/yinmeng/activity/2024-cityLove/images/left_ts.png new file mode 100644 index 0000000..7460568 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/left_ts.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/listBg.png b/view/yinmeng/activity/2024-cityLove/images/listBg.png new file mode 100644 index 0000000..e75ea85 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/listBg.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/logo.png b/view/yinmeng/activity/2024-cityLove/images/logo.png new file mode 100644 index 0000000..c2e895f Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/logo.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/love.png b/view/yinmeng/activity/2024-cityLove/images/love.png new file mode 100644 index 0000000..63b1904 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/love.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/more.png b/view/yinmeng/activity/2024-cityLove/images/more.png new file mode 100644 index 0000000..1760b12 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/more.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/my.png b/view/yinmeng/activity/2024-cityLove/images/my.png new file mode 100644 index 0000000..d5e2b56 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/my.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/my2.png b/view/yinmeng/activity/2024-cityLove/images/my2.png new file mode 100644 index 0000000..7101dcd Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/my2.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/myList.png b/view/yinmeng/activity/2024-cityLove/images/myList.png new file mode 100644 index 0000000..7eb4f59 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/myList.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/notConvert.png b/view/yinmeng/activity/2024-cityLove/images/notConvert.png new file mode 100644 index 0000000..440d611 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/notConvert.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/page1Box1.png b/view/yinmeng/activity/2024-cityLove/images/page1Box1.png new file mode 100644 index 0000000..cbc6ec0 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/page1Box1.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/page1Box2.png b/view/yinmeng/activity/2024-cityLove/images/page1Box2.png new file mode 100644 index 0000000..6b76dde Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/page1Box2.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/page1Box3.png b/view/yinmeng/activity/2024-cityLove/images/page1Box3.png new file mode 100644 index 0000000..35ed38c Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/page1Box3.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/page1Box4.png b/view/yinmeng/activity/2024-cityLove/images/page1Box4.png new file mode 100644 index 0000000..05cc67b Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/page1Box4.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/page1Box4_left.png b/view/yinmeng/activity/2024-cityLove/images/page1Box4_left.png new file mode 100644 index 0000000..6989e40 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/page1Box4_left.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/page1Box4_right.png b/view/yinmeng/activity/2024-cityLove/images/page1Box4_right.png new file mode 100644 index 0000000..2d8fec0 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/page1Box4_right.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/page2.png b/view/yinmeng/activity/2024-cityLove/images/page2.png new file mode 100644 index 0000000..418217e Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/page2.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/recordsBg.png b/view/yinmeng/activity/2024-cityLove/images/recordsBg.png new file mode 100644 index 0000000..aa8b4c8 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/recordsBg.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/right_ts.png b/view/yinmeng/activity/2024-cityLove/images/right_ts.png new file mode 100644 index 0000000..4cbb168 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/right_ts.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/rule1.png b/view/yinmeng/activity/2024-cityLove/images/rule1.png new file mode 100644 index 0000000..eadc69c Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/rule1.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/rule2.png b/view/yinmeng/activity/2024-cityLove/images/rule2.png new file mode 100644 index 0000000..2589e18 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/rule2.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/ruleBg.png b/view/yinmeng/activity/2024-cityLove/images/ruleBg.png new file mode 100644 index 0000000..54e61e4 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/ruleBg.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/ruleTab1.png b/view/yinmeng/activity/2024-cityLove/images/ruleTab1.png new file mode 100644 index 0000000..4c65572 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/ruleTab1.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/ruleTab2.png b/view/yinmeng/activity/2024-cityLove/images/ruleTab2.png new file mode 100644 index 0000000..2466a4f Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/ruleTab2.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/ruleTabAct1.png b/view/yinmeng/activity/2024-cityLove/images/ruleTabAct1.png new file mode 100644 index 0000000..24bae77 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/ruleTabAct1.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/ruleTabAct2.png b/view/yinmeng/activity/2024-cityLove/images/ruleTabAct2.png new file mode 100644 index 0000000..0441de5 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/ruleTabAct2.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/rule_icon.png b/view/yinmeng/activity/2024-cityLove/images/rule_icon.png new file mode 100644 index 0000000..51d0761 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/rule_icon.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/tab1.png b/view/yinmeng/activity/2024-cityLove/images/tab1.png new file mode 100644 index 0000000..cac2659 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/tab1.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/tab2.png b/view/yinmeng/activity/2024-cityLove/images/tab2.png new file mode 100644 index 0000000..8547975 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/tab2.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/tabAct1.png b/view/yinmeng/activity/2024-cityLove/images/tabAct1.png new file mode 100644 index 0000000..6b4ff02 Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/tabAct1.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/tabAct2.png b/view/yinmeng/activity/2024-cityLove/images/tabAct2.png new file mode 100644 index 0000000..76e9c2d Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/tabAct2.png differ diff --git a/view/yinmeng/activity/2024-cityLove/images/travel/back.png b/view/yinmeng/activity/2024-cityLove/images/travel/back.png new file mode 100644 index 0000000..7b81adb Binary files /dev/null and b/view/yinmeng/activity/2024-cityLove/images/travel/back.png differ diff --git a/view/yinmeng/activity/2024-cityLove/index.html b/view/yinmeng/activity/2024-cityLove/index.html new file mode 100644 index 0000000..04e2924 --- /dev/null +++ b/view/yinmeng/activity/2024-cityLove/index.html @@ -0,0 +1,163 @@ + + + + + + + 全城热恋 + + + + + + +
+ +
+ +
+ + + +
+
+
+
+
+ +
+ + + +
+
0
+ +
日限:0
+
日限:0
+
日限:0
+ + + + + + + + +
+
+ +
+ +
+ + + + +
+
+
+
+ + +
+ + +
+
+ +
+
+
+
+
+
+
+ + +
+
+
+ +
+
+ +
+
+ +
+
+
+
兑换时间
+
商品
+
+ +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/view/yinmeng/activity/2024-cityLove/js/index.js b/view/yinmeng/activity/2024-cityLove/js/index.js new file mode 100644 index 0000000..4973593 --- /dev/null +++ b/view/yinmeng/activity/2024-cityLove/js/index.js @@ -0,0 +1,377 @@ +let urlPrefix = getUrlPrefix() +let browser = checkVersion() +let env = EnvCheck(); +if (env == 'test') { + new VConsole(); +} +var langReplace; +var localLang; +// 封装layer消息提醒框 +let layerIndex +const showLoading = (content = '加载中') => { + layer.open({ + type: 2, + shadeClose: false, + content, + success(e) { + layerIndex = $(e).attr('index') + } + }) +} +const hideLoading = (index) => { + layer.close(index) +} +const toastMsg = (content = '操作完成', time = 2) => { + layer.open({ + content, + time, + skin: 'msg' + }) +} +var listMoreBool = true; +var taskValue = null; +var isLock = true; +var page = 1; +// 初始化函数 +$(function () { + getInfoFromClient(); + setTimeout(function () { + // 页面全屏 + if (browser.app) { + if (browser.android) { + window.androidJsObj.initShowNav(false) + } else { + window.webkit.messageHandlers.initShowNav.postMessage(0) + } + }; + // 顶部返回事件 + $('.back').click(() => { + if (browser.android) { + window.androidJsObj.closeWebView() + } else { + window.webkit.messageHandlers.closeWebView.postMessage(null) + } + }) + getCurrency(); + activityCodeInfo(); + }, 100) +}) + +// 获取时间接口 +function activityCodeInfo() { + showLoading() + networkRequest({ + type: 'get', + url: urlPrefix + '/activity/info', + data: { activityCode: "ACT_2024_HOT_LOVE" }, + success(res) { + if (res.code === 200) { + // 判断活动结束时间 + if (res.timestamp > res.data.endTime) { + $('.end').show(); + } + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error(err) { + hideLoading(layerIndex) + toastMsg('網絡錯誤') + } + }) +} +// 配置接口 +function getCurrency() { + showLoading() + networkRequest({ + type: 'get', + url: urlPrefix + '/act/hotLove/currency', + data: { redisKey: 'act_user_task_extra_data' }, + success(res) { + if (res.code === 200) { + taskValue = res.data; + $('.page1 .page1Box4 .left').text(res.data); + showLoading() + networkRequest({ + type: 'get', + url: urlPrefix + '/act/hotLove/rewardList', + data: { activityCode: 'ACT_2024_HOT_LOVE', componentCode: "RE_LIAN_SHANG_DIAN" }, + success(res) { + if (res.code === 200) { + res.data.forEach((res, i) => { + if (res.stockValue <= 0) { + $(`.page1 .page1Box4 .convert${i + 1}`).attr("src", './images/convertOut.png'); + $(`.page1 .page1Box4 .convert${i + 1}`).attr("click", 0); + } else if (taskValue >= res.taskValue) { + $(`.page1 .page1Box4 .convert${i + 1}`).attr("src", './images/convert.png'); + $(`.page1 .page1Box4 .convert${i + 1}`).attr("click", 1); + } else { + $(`.page1 .page1Box4 .convert${i + 1}`).attr("src", './images/notConvert.png'); + $(`.page1 .page1Box4 .convert${i + 1}`).attr("click", 0); + } + $(`.page1 .page1Box4 .convert${i + 1}`).attr('taskCode', res.taskCode); + $(`.page1 .page1Box4 .convert${i + 1}`).attr('conditionCode', res.conditionCode); + $(`.page1 .page1Box4 .dayLimit${i + 1}`).text(`日限:${res.stockValue}`) + }) + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error(err) { + hideLoading(layerIndex) + toastMsg('网络错误') + } + }) + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error(err) { + hideLoading(layerIndex) + toastMsg('网络错误') + } + }) +} +// tab切换 +$('.header .tab div').click(function () { + var i = $(this).index() + 1; + $('.header .tab div').removeClass('act1').removeClass('act2'); + $(this).addClass(`act${i}`); + $(`.page${i}`).show(); + i == 1 ? $('.page2').hide() : $('.page1').hide(); + if (i == 2) { + getRank(); + } +}) + +// 榜单接口 +function getRank() { + $('.page2 .my ul li').remove(); + $('.page2 .notFirst li').remove(); + showLoading() + networkRequest({ + type: 'get', + url: urlPrefix + '/act/2024Valentines/cpRank/getRank', + data: { pageSize: 30 }, + success(res) { + if (res.code === 200) { + var first = res.data.rankList.slice(0, 1); + var notFirst = res.data.rankList.slice(1); + // 处理第一名 + if (first.length < 1) { + let arr = new Array(3 - first.length).fill({ + leftAvatar: './images/logo.png', + rightAvatar: './images/logo.png', + leftNick: '虚位以待', + rightNick: '虚位以待', + score: "0" + }) + first.push(...arr) + } + first.forEach(res => { + $('.page2 .first .left_tx').attr('src', res.leftAvatar); + $('.page2 .first .right_tx').attr('src', res.rightAvatar); + $('.page2 .first .leftNick').text(res.leftNick) + $('.page2 .first .rightNick').text(res.rightNick) + $('.page2 .first .score').text(unitProcessing(res.score, 10000, 1, 'w')) + }) + // 处理非第一名 + var str = ''; + notFirst.forEach((res, i) => { + str += ` +
  • +
    ${res.ranking}
    + + + +
    ${res.leftNick}
    +
    ${res.rightNick}
    +
    ${unitProcessing(res.score, 10000, 1, 'w')}
    +
  • ` + }) + $('.page2 .notFirst').append(str); + // 处理自己 + var strMy = ''; + if (res.data.meRankList.length <= 0) { + $('.page2 .my .more').hide(); + strMy += `
  • 暂无组合~
  • ` + } else { + $('.page2 .my .more').show(); + res.data.meRankList.forEach((res, i) => { + strMy += ` +
  • +
    ${res.ranking == 0 ? '30+' : res.ranking}
    + + + +
    ${res.leftNick}
    +
    ${res.rightNick}
    +
    ${unitProcessing(res.score, 10000, 1, 'w')}
    +
  • + ` + }) + } + $('.page2 .my ul').append(strMy) + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error(err) { + hideLoading(layerIndex) + toastMsg('网络错误') + + } + }) +} +// 榜单查看更多按钮 +$('.page2 .my .more').click(function () { + if (listMoreBool) { + $('.page2 .my').css({ "height": '7.76rem', "background": "url(./images/my2.png) no-repeat", "background-size": "100% 100%" }); + $('.page2 .my .more').css({ "transform": "rotate(180deg)" }); + $('.page2 .my ul').css({ "height": "6.4rem", "overflow-y": "scroll" }); + bodyScroolFun(true); + } else { + $('.page2 .my').css({ "height": '3.16rem', "background": "url(./images/my.png) no-repeat", "background-size": "100% 100%" }); + $('.page2 .my .more').css({ "transform": "rotate(0deg)" }); + $('.page2 .my ul').css({ "height": "1.82667rem", "overflow-y": "hidden" }); + bodyScroolFun(false); + } + $('.page2 .my ul').scrollTop(0); + listMoreBool = !listMoreBool; +}) +// 活动规则切换 +$('.rule .rule_in .tab div').click(function () { + var i = $(this).index() + 1; + $('.rule .rule_in .tab div').removeClass('act1').removeClass('act2'); + $(this).addClass(`act${i}`); + // $(`.rule .rule_in .box img`).attr('src', `./images/rule${i}.png`); + $(`.rule .rule_in .box .img1,.rule .rule_in .box .img2`).hide(); + $(`.rule .rule_in .box .img${i}`).show(); + i == 1 ? $('.rule .rule_in .box').removeClass('box2') : $('.rule .rule_in .box').addClass('box2'); + return false; +}) +// 打开活动规则 +$('.header .rule_icon').click(function () { + $('.rule').show(); + bodyScroolFun(true); +}) +// 关闭活动规则 +$('.rule').click(function () { + $('.rule').hide(); + bodyScroolFun(false); +}) +// 关闭活动结束 +$('.end .but').click(function () { + $('.end').hide(); + bodyScroolFun(false); + $('.header .tab div').removeClass('act1').removeClass('act2'); + $('.header .tab .tab2').addClass(`act${2}`); + $(`.page${2}`).show(); + $('.page1').hide(); + getRank(); +}) +// 打开记录弹窗 +$('.page1 .page1Box4 .right').click(function () { + $('.records .records_in ul li').remove(); + isLock = true; + page = 1; + record(page); + bodyScroolFun(true); +}) +// 关闭记录弹窗 +$('.records').click(function () { + $('.records').hide(); + bodyScroolFun(false); +}) +// 兑换按钮 +$('.page1 .page1Box4 .convert').click(function () { + var taskcode = $(this).attr('taskcode'); + var conditionCode = $(this).attr('conditionCode'); + var bool = $(this).attr('click'); + if (bool == 1) { + exchange(taskcode, conditionCode); + } +}) +// 兑换接口 +function exchange(taskCode, conditionCode) { + showLoading() + networkRequest({ + type: 'post', + url: urlPrefix + '/act/hotLove/exchange', + data: { taskCode, activityCode: 'ACT_2024_HOT_LOVE', conditionCode, }, + success(res) { + if (res.code === 200) { + getCurrency(); + toastMsg('兑换成功') + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error(err) { + hideLoading(layerIndex) + toastMsg('网络错误') + } + }) +} +// 兑换记录滚动 +$('.records .records_in ul').scroll(function () { + let scrollTop = $(this).scrollTop() + let scrollHeight = $('.records .records_in ul')[0].scrollHeight + let ulHeight = $(this).innerHeight() + if (scrollTop + ulHeight + 100 >= scrollHeight) { + if (isLock) { + // 请求下一页 + page++; + record(page) + isLock = false; + } + } +}) + +// 记录接口 +function record(pageNum) { + showLoading() + networkRequest({ + type: 'get', + url: urlPrefix + '/activity/task/user/record/page', + data: { activityCode: 'ACT_2024_HOT_LOVE', componentCode: 'RE_LIAN_SHANG_DIAN', pageNum, pageSize: 10 }, + success(res) { + if (res.code === 200) { + var str = ''; + if (res.data.records.length <= 0 && pageNum == 1) { + str += `
  • 暂无
    暂无
  • ` + isLock = false; + } else { + res.data.records.forEach(res => { + str += ` +
  • +
    +

    ${dateFormat(res.createTime, "yyyy/MM/dd")}

    + ${dateFormat(res.createTime, "hh/mm/ss")} +
    +
    +

    ${res.rewardName}

    + ${res.rewardNum}${rewardTypeFun(res.rewardType).unit} +
    +
  • + `}) + } + $('.records .records_in ul').append(str); + $('.records').show(); + } else { + toastMsg(res.message) + } + hideLoading(layerIndex) + }, + error(err) { + hideLoading(layerIndex) + toastMsg('网络错误') + + } + }) +} \ No newline at end of file