Compare commits

..

11 Commits

Author SHA1 Message Date
dragon
1faa0d238e 清楚缓存 2024-04-10 16:59:15 +08:00
dragon
7f5996c18d 修改判断正式测试方式 2024-04-10 16:47:29 +08:00
dragon
2720ddcb96 修改提示 2024-04-09 12:06:44 +08:00
wanglong
6e6b3ce88e 修改贵族规则,新增规则账单 2024-04-01 18:10:33 +08:00
Dragon
93b7698a95 修改疯狂动物园音效声音大小 2024-03-29 16:52:05 +08:00
Dragon
7659a5db68 清除缓存 2024-03-29 16:30:02 +08:00
Dragon
3790ddf2b8 完善厨房音效特性 2024-03-29 16:27:27 +08:00
Dragon
78be3be98e 新增标头信息 2024-03-29 14:53:11 +08:00
Dragon
597d717c9d 厨房音效暂存 2024-03-29 14:42:50 +08:00
Dragon
00f179e786 优化名字 2024-03-28 10:58:09 +08:00
Dragon
ddc6d7e6c4 优化房间帮ui 2024-03-28 10:17:29 +08:00
47 changed files with 2831 additions and 1041 deletions

View File

@@ -40,6 +40,14 @@ html {
top: 1.18667rem; top: 1.18667rem;
} }
.header .muciek {
width: 0.8rem;
height: 0.8rem;
position: absolute;
right: 0.55rem;
top: 1.8rem;
}
.header .record_icon { .header .record_icon {
width: 1.57333rem; width: 1.57333rem;
height: 0.61333rem; height: 0.61333rem;

View File

@@ -43,6 +43,15 @@ html {
top: px2rem(89); top: px2rem(89);
} }
.muciek {
width: px2rem(60);
height: px2rem(60);
position: absolute;
right: 0.55rem;
// top: 2.0rem;
top: 1.8rem;
}
.record_icon { .record_icon {
width: px2rem(118); width: px2rem(118);
height: px2rem(46); height: px2rem(46);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

View File

@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>瘋狂動物園</title> <title>瘋狂動物園</title>
<link rel="stylesheet" href="../../common/css/reset.css"> <link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/index.css?v=1.0"> <link rel="stylesheet" href="./css/index.css?v=1.1">
</head> </head>
<body> <body>
@@ -17,6 +17,7 @@
<img src="./images/rule_icon.png" alt="" class="rule_icon"> <img src="./images/rule_icon.png" alt="" class="rule_icon">
<img src="./images/record_icon.png" alt="" class="record_icon"> <img src="./images/record_icon.png" alt="" class="record_icon">
<img src="./images/rank_icon.png" alt="" class="rank_icon"> <img src="./images/rank_icon.png" alt="" class="rank_icon">
<img src="./images/bo.png" alt="" class="muciek" id="muciek">
<!-- <div class="headerH3">選擇鉆石 > 選擇圖標</div> --> <!-- <div class="headerH3">選擇鉆石 > 選擇圖標</div> -->
</div> </div>
<!-- 食材大盒子 --> <!-- 食材大盒子 -->
@@ -311,6 +312,19 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 投入音效 -->
<audio style="display: none;" id="draw">
<source src="./images/draw.mp3" type="audio/mp3">
</audio>
<!-- 开奖中音效 -->
<audio style="display: none;" id="lotteryMusic">
<source src="./images/lotteryMusic.mp3" type="audio/mp3">
</audio>
<!-- 背景音效 -->
<audio style="display: none;" id="backgroundMusic" autoplay loop>
<source src="./images/backgroundMusic.mp3" type="audio/mp3">
</audio>
</body> </body>
</html> </html>
@@ -321,4 +335,4 @@
<script src="../../common/js/vconsole.min.js"></script> <script src="../../common/js/vconsole.min.js"></script>
<script src="../../common/js/svga.min.js"></script> <script src="../../common/js/svga.min.js"></script>
<script src="./js/wow.js"></script> <script src="./js/wow.js"></script>
<script src="./js/index.js?v=1.1"></script> <script src="./js/index.js?v=1.3"></script>

View File

@@ -39,11 +39,30 @@ let type = 1
let pageSize = 20 let pageSize = 20
let page = 1 let page = 1
let pageSizeLack = true; let pageSizeLack = true;
var audioIf = true;
var backgroundMusic = document.getElementById('backgroundMusic');
var lotteryMusic = document.getElementById('lotteryMusic');
var drawBut = document.getElementById("draw");
backgroundMusic.volume = 0.2;
drawBut.volume = 1;
$(function () { $(function () {
getInfoFromClient() getInfoFromClient()
setTimeout(function () { setTimeout(function () {
getNewestAct(); getNewestAct();
}, 100) }, 100)
let startPlayPromise = backgroundMusic.play();
if (startPlayPromise !== undefined) {
startPlayPromise.catch(error => {
if (error.name === "NotAllowedError") {
// 弹窗引导用户与页面做交互,只需要一个简单的按钮即可
// 记得在按钮上绑定一个带有play()方法的回调函数以element-plus的组件为例
audioIf = false;
$('.muciek').attr('src', './images/jin.png');
toastMsg('检测到您的设备因权限问题,无法播放音乐,请在右上角打开音乐')
}
}).then(() => {
});
}
}) })
// 獲取用戶相關信息 // 獲取用戶相關信息
function getUserInfo () { function getUserInfo () {
@@ -96,6 +115,9 @@ function getNewestAct () {
listItem(roundId); listItem(roundId);
if (startTime <= userComeinTime && userComeinTime < drawStageStartTime) { if (startTime <= userComeinTime && userComeinTime < drawStageStartTime) {
// 第一階段 // 第一階段
if (audioIf) {
backgroundMusic.play();
}
console.log("第一階段"); console.log("第一階段");
countupTimes = Math.floor(((drawStageStartTime - startTime) - (userComeinTime - startTime)) / 1000 + 1); countupTimes = Math.floor(((drawStageStartTime - startTime) - (userComeinTime - startTime)) / 1000 + 1);
countup(1); countup(1);
@@ -103,6 +125,13 @@ function getNewestAct () {
$('.result_popup').hide(); $('.result_popup').hide();
} else if (drawStageStartTime <= userComeinTime && userComeinTime < showResultStageStartTime) { } else if (drawStageStartTime <= userComeinTime && userComeinTime < showResultStageStartTime) {
// 第二階段 // 第二階段
backgroundMusic.pause();
lotteryMusic.currentTime = 0;
lotteryMusic.volume = 1;
if (audioIf) {
lotteryMusic.play();
}
console.log("第二階段"); console.log("第二階段");
countupTimes = Math.floor(((showResultStageStartTime - drawStageStartTime) - (userComeinTime - drawStageStartTime)) / 1000 + 1); countupTimes = Math.floor(((showResultStageStartTime - drawStageStartTime) - (userComeinTime - drawStageStartTime)) / 1000 + 1);
countup(2); countup(2);
@@ -116,6 +145,10 @@ function getNewestAct () {
}, 100); }, 100);
} else if (showResultStageStartTime <= userComeinTime && userComeinTime < endTime) { } else if (showResultStageStartTime <= userComeinTime && userComeinTime < endTime) {
// 第三階段 // 第三階段
lotteryMusic.pause();
if (audioIf) {
backgroundMusic.play();
}
console.log("第三階段"); console.log("第三階段");
countupTimes = Math.floor(((endTime - showResultStageStartTime) - (userComeinTime - showResultStageStartTime)) / 1000 + 1); countupTimes = Math.floor(((endTime - showResultStageStartTime) - (userComeinTime - showResultStageStartTime)) / 1000 + 1);
countup(3); countup(3);
@@ -300,6 +333,12 @@ function draw (itemId, tais) {
$('.box .box_in .sBox').click(function () { $('.box .box_in .sBox').click(function () {
var id = $(this).attr('id'); var id = $(this).attr('id');
// $(this).children('.qp').show(); // $(this).children('.qp').show();
drawBut.pause();
drawBut.currentTime = 0; // 将当前时间设置为0可选
if (audioIf) {
drawBut.play();
}
draw(id, $(this)); draw(id, $(this));
}) })
// 去充值按鈕 // 去充值按鈕
@@ -491,7 +530,19 @@ $('.shade-mask-fragmentNum .shade-content-fragmentNum .fragmentNum-btn-wrap .con
} }
$('.shade-mask-fragmentNum').hide() $('.shade-mask-fragmentNum').hide()
}) })
$('.muciek').click(function () {
audioIf = !audioIf;
if (audioIf) {
$(this).attr('src', './images/bo.png')
backgroundMusic.play();
lotteryMusic.volume = 0;
lotteryMusic.play();
} else {
$(this).attr('src', './images/jin.png')
backgroundMusic.pause();
lotteryMusic.pause();
}
})
//返回页面 重新请求接口 //返回页面 重新请求接口
// var hiddenProperty = 'hidden' in document ? 'hidden' : // var hiddenProperty = 'hidden' in document ? 'hidden' :
// 'webkitHidden' in document ? 'webkitHidden' : // 'webkitHidden' in document ? 'webkitHidden' :

View File

@@ -66,8 +66,8 @@ function convert (_url) {
// 根据域名适配环境 // 根据域名适配环境
function EnvCheck () { function EnvCheck () {
if (window.location.href) { if (window.location.host) {
var _url = window.location.href; var _url = window.location.host;
var res = _url.match(/uat/); var res = _url.match(/uat/);
var res1 = _url.match(/120.79.211.243/); var res1 = _url.match(/120.79.211.243/);
var res2 = _url.match(/192.168./) var res2 = _url.match(/192.168./)

View File

@@ -7,6 +7,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>piko</title> <title>piko</title>
<link rel="shortcut icon" href="./images/logo.png" type="image/x-icon"> <link rel="shortcut icon" href="./images/logo.png" type="image/x-icon">
<meta property="og:type" content="website" />
<meta property="og:title" content="Piko與心動聲音不期而遇" />
<meta property="og:description" content="聊天玩遊戲交朋友隨時隨地在Piko" />
<meta class="content_image" property="og:image" content="https://image.pekolive.com/piko_logo.png" />
<meta property="og:image:width" content="256">
<meta property="og:image:height" content="256">
<meta property="og:image:type" content="image/png">
<link rel="stylesheet" href="../common/css/reset.css"> <link rel="stylesheet" href="../common/css/reset.css">
<link rel="stylesheet" href="./css/animate.css"> <link rel="stylesheet" href="./css/animate.css">
<link rel="stylesheet" href="./css/index.css?v=1.1"> <link rel="stylesheet" href="./css/index.css?v=1.1">

View File

@@ -21,11 +21,11 @@
<div class="box1"> <div class="box1">
<div> <div>
<span>開戶姓氏</span> <span>開戶姓氏</span>
<input class="name" type="text" placeholder="例:ZHANG"> <input class="name" type="text" placeholder="例:">
</div> </div>
<div> <div>
<span>開戶名稱</span> <span>開戶名稱</span>
<input class="accountName" type="text" placeholder="例:LEE HONG"> <input class="accountName" type="text" placeholder="例:">
</div> </div>
<div> <div>
<span>身份證號备份</span> <span>身份證號备份</span>

View File

@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=UTF-8><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>piko</title><link href=./static/css/app.f2934688930b9900e8d33da24fc10e60.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.cc2c082479de04d6b9d8.js></script><script type=text/javascript src=./static/js/vendor.549947ec2550614f506c.js></script><script type=text/javascript src=./static/js/app.f56d535f53d3c277e0fd.js></script></body></html> <!DOCTYPE html><html><head><meta charset=UTF-8><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>piko</title><link href=./static/css/app.8fde499311653463cf20b629040b9f05.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.1653609013b7d6707594.js></script><script type=text/javascript src=./static/js/vendor.549947ec2550614f506c.js></script><script type=text/javascript src=./static/js/app.f56d535f53d3c277e0fd.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,f){for(var a,i,u,d=0,s=[];d<r.length;d++)i=r[d],t[i]&&s.push(t[i][0]),t[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,f);s.length;)s.shift()();if(f)for(d=0;d<f.length;d++)u=o(o.s=f[d]);return u};var r={},t={15:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,o.nc&&f.setAttribute("nonce",o.nc),f.src=o.p+"static/js/"+e+"."+{0:"ec4de892f04f94b4c2f6",1:"c2ef46c6dcac24931ba4",2:"17debe0f6011a97521e8",3:"fe32c1237c8826c80886",4:"95d3c8221db60b228eb2",5:"658019f2d8814df62ca2",6:"0e7ac399b5d59483b7f2",7:"c60dff0fd854d6fc291f",8:"43a07f21010bbe7fcd6c",9:"d02156509389fc441584",10:"68b3b250aa24f55d8a82",11:"5d316356ba01de644f13",12:"34fff916cd789ce22038"}[e]+".js";var a=setTimeout(i,12e4);function i(){f.onerror=f.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return f.onerror=f.onload=i,c.appendChild(f),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]); !function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,f){for(var a,i,u,d=0,s=[];d<r.length;d++)i=r[d],t[i]&&s.push(t[i][0]),t[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(n&&n(r,c,f);s.length;)s.shift()();if(f)for(d=0;d<f.length;d++)u=o(o.s=f[d]);return u};var r={},t={15:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,o.nc&&f.setAttribute("nonce",o.nc),f.src=o.p+"static/js/"+e+"."+{0:"ec4de892f04f94b4c2f6",1:"c2ef46c6dcac24931ba4",2:"17debe0f6011a97521e8",3:"fe32c1237c8826c80886",4:"95d3c8221db60b228eb2",5:"e4dd71932132fbf9bd07",6:"0e7ac399b5d59483b7f2",7:"c60dff0fd854d6fc291f",8:"43a07f21010bbe7fcd6c",9:"d02156509389fc441584",10:"68b3b250aa24f55d8a82",11:"5d316356ba01de644f13",12:"34fff916cd789ce22038"}[e]+".js";var a=setTimeout(i,12e4);function i(){f.onerror=f.onload=null,clearTimeout(a);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return f.onerror=f.onload=i,c.appendChild(f),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.cc2c082479de04d6b9d8.js.map //# sourceMappingURL=manifest.1653609013b7d6707594.js.map

View File

@@ -0,0 +1,544 @@
html,
body {
width: 100%;
background: linear-gradient(0deg, #020B27 0%, #1D181B 99%);
backdrop-filter: blur(0px);
overflow: hidden;
}
.back {
position: fixed;
top: 0.26667rem;
left: 0.32rem;
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;
}
.largestBox {
width: 10rem;
min-height: 15.38667rem;
background: url(../images/bg.png) no-repeat;
background-size: 10rem 15.38667rem;
margin: 0 auto;
position: relative;
box-sizing: border-box;
padding: 1.2rem 0 0 0;
}
.largestBox .title {
width: 7.06667rem;
height: 1.14667rem;
position: absolute;
top: -0.14667rem;
left: 50%;
transform: translateX(-50%);
}
.largestBox .tab {
width: 3.65333rem;
height: 0.53333rem;
line-height: 0.53333rem;
display: flex;
justify-content: space-between;
margin: 0 auto 0;
}
.largestBox .tab div {
position: relative;
color: rgba(255, 255, 255, 0.7);
font-size: 0.37333rem;
font-weight: 600;
}
.largestBox .tab div span {
background: none;
width: 0.32rem;
height: 0.08rem;
border-radius: 0.08rem;
position: absolute;
bottom: -0.10667rem;
left: 50%;
transform: translateX(-50%);
}
.largestBox .tab .tabColor1 {
color: #fff;
font-size: 0.37333rem;
}
.largestBox .tab .tabColor1 span {
background: #FA7814;
}
.largestBox .tab .tabColor2 {
color: #fff;
}
.largestBox .tab .tabColor2 span {
background: #A34DFF;
}
.largestBox .dayTab {
width: 3.33333rem;
height: 0.61333rem;
margin: 0.34667rem auto 0;
display: flex;
justify-content: space-between;
}
.largestBox .dayTab div {
width: 1.33333rem;
height: 0.61333rem;
line-height: 0.61333rem;
border-radius: 0.61333rem;
text-align: center;
color: rgba(255, 255, 255, 0.7);
background: rgba(210, 172, 252, 0.4);
font-size: 0.32rem;
font-weight: 500;
}
.largestBox .dayTab .dayTabColor1 {
background: #fff;
color: #FA7814;
}
.largestBox .dayTab .dayTabColor2 {
background: #fff;
color: #A34DFF;
}
.largestBox .top3 {
width: 8.8rem;
height: 0.01333rem;
margin: 3.04rem auto 0;
position: relative;
}
.largestBox .top3 .no1 {
width: 3.17333rem;
height: 2.88rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: -2.88rem;
}
.largestBox .top3 .no1 .box {
width: 100%;
height: 100%;
position: absolute;
}
.largestBox .top3 .no1 .box .ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.largestBox .top3 .no1 .box .tx {
width: 2.08rem;
height: 2.08rem;
position: absolute;
left: 50%;
top: 0.58667rem;
transform: translateX(-50%);
border-radius: 50%;
}
.largestBox .top3 .no1 .box p {
width: 100%;
position: absolute;
left: 0;
bottom: -0.56rem;
text-align: center;
}
.largestBox .top3 .no1 .box p span {
vertical-align: middle;
color: #E6ECF5;
font-size: 0.37333rem;
}
.largestBox .top3 .no1 .box p .sp {
width: 0.37333rem;
height: 0.37333rem;
border-radius: 50%;
display: inline-block;
}
.largestBox .top3 .no1 .box p .sp img {
display: inline-block;
width: 0.21333rem;
height: 0.21333rem;
border-radius: 50%;
margin: 0.06667rem auto 0;
}
.largestBox .top3 .no1 .box p .boy {
background: #6BB3FF;
}
.largestBox .top3 .no1 .box p .woman {
background: #FF80CC;
}
.largestBox .top3 .no1 .box .icon {
width: 100%;
height: 0.48rem;
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: -1.12rem;
padding: 0 0.6rem;
}
.largestBox .top3 .no1 .box .icon img {
display: block;
width: 0.96rem;
height: 0.48rem;
}
.largestBox .top3 .no1 .box .score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: 0.32rem;
font-weight: 500;
position: absolute;
left: 0;
bottom: -1.53333rem;
}
.largestBox .top3 .no2 {
width: 2.66667rem;
height: 2.37333rem;
position: absolute;
left: 0;
top: -2.4rem;
}
.largestBox .top3 .no2 .box {
width: 100%;
height: 100%;
position: absolute;
}
.largestBox .top3 .no2 .box .ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.largestBox .top3 .no2 .box .tx {
width: 1.70667rem;
height: 1.70667rem;
position: absolute;
left: 50%;
top: 0.45333rem;
transform: translateX(-50%);
border-radius: 50%;
}
.largestBox .top3 .no2 .box p {
width: 100%;
position: absolute;
left: 0;
bottom: -0.56rem;
text-align: center;
}
.largestBox .top3 .no2 .box p span {
vertical-align: middle;
color: #E6ECF5;
font-size: 0.37333rem;
}
.largestBox .top3 .no2 .box p .sp {
width: 0.37333rem;
height: 0.37333rem;
border-radius: 50%;
display: inline-block;
}
.largestBox .top3 .no2 .box p .sp img {
display: inline-block;
width: 0.21333rem;
height: 0.21333rem;
border-radius: 50%;
margin: 0.06667rem auto 0;
}
.largestBox .top3 .no2 .box p .boy {
background: #6BB3FF;
}
.largestBox .top3 .no2 .box p .woman {
background: #FF80CC;
}
.largestBox .top3 .no2 .box .icon {
width: 100%;
height: 0.48rem;
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: -1.12rem;
padding: 0 0.33333rem;
}
.largestBox .top3 .no2 .box .icon img {
display: block;
width: 0.96rem;
height: 0.48rem;
}
.largestBox .top3 .no2 .box .score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: 0.32rem;
font-weight: 500;
position: absolute;
left: 0;
bottom: -1.53333rem;
}
.largestBox .top3 .no3 {
width: 2.66667rem;
height: 2.37333rem;
position: absolute;
right: 0;
top: -2.4rem;
}
.largestBox .top3 .no3 .box {
width: 100%;
height: 100%;
position: absolute;
}
.largestBox .top3 .no3 .box .ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.largestBox .top3 .no3 .box .tx {
width: 1.70667rem;
height: 1.70667rem;
position: absolute;
left: 50%;
top: 0.45333rem;
transform: translateX(-50%);
border-radius: 50%;
}
.largestBox .top3 .no3 .box p {
width: 100%;
position: absolute;
left: 0;
bottom: -0.56rem;
text-align: center;
}
.largestBox .top3 .no3 .box p span {
vertical-align: middle;
color: #E6ECF5;
font-size: 0.37333rem;
}
.largestBox .top3 .no3 .box p .sp {
width: 0.37333rem;
height: 0.37333rem;
border-radius: 50%;
display: inline-block;
}
.largestBox .top3 .no3 .box p .sp img {
display: inline-block;
width: 0.21333rem;
height: 0.21333rem;
border-radius: 50%;
margin: 0.06667rem auto 0;
}
.largestBox .top3 .no3 .box p .boy {
background: #6BB3FF;
}
.largestBox .top3 .no3 .box p .woman {
background: #FF80CC;
}
.largestBox .top3 .no3 .box .icon {
width: 100%;
height: 0.48rem;
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: -1.12rem;
padding: 0 0.33333rem;
}
.largestBox .top3 .no3 .box .icon img {
display: block;
width: 0.96rem;
height: 0.48rem;
}
.largestBox .top3 .no3 .box .score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: 0.32rem;
font-weight: 500;
position: absolute;
left: 0;
bottom: -1.53333rem;
}
.largestBox ul {
width: 9.57333rem;
height: 7.70667rem;
margin: 1.81333rem auto 0;
background: rgba(255, 167, 141, 0.16);
border-radius: 0.42667rem 0.42667rem 0px 0px;
border: 0.02667rem solid rgba(255, 217, 115, 0.5);
backdrop-filter: blur(7px);
border-bottom: none;
box-sizing: border-box;
padding: 0.21333rem 0 1.86667rem;
overflow-y: scroll;
}
.largestBox ul::-webkit-scrollbar {
display: none;
}
.largestBox ul li {
width: 100%;
height: 1.92rem;
box-sizing: border-box;
padding: 0 0.33333rem;
overflow: hidden;
}
.largestBox ul li .num {
width: 0.53333rem;
height: 100%;
line-height: 1.92rem;
text-align: center;
color: #E6ECF5;
font-size: 0.42667rem;
font-weight: 500;
float: left;
margin-right: 0.16rem;
}
.largestBox ul li .tx {
display: block;
float: left;
width: 1.28rem;
height: 1.28rem;
border-radius: 1.28rem;
margin-top: 0.32rem;
margin-right: 0.21333rem;
}
.largestBox ul li .userInfo {
width: 2.8rem;
float: left;
}
.largestBox ul li .userInfo p {
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-top: 0.4rem;
margin-bottom: 0.10667rem;
color: #E6ECF5;
font-size: 0.37333rem;
font-weight: 500;
}
.largestBox ul li .userInfo img {
display: inline-block;
width: 0.96rem;
height: 0.48rem;
margin-right: 0.10667rem;
}
.largestBox ul li .score {
float: right;
text-align: right;
}
.largestBox ul li .score p {
color: #E6ECF5;
font-size: 0.37333rem;
font-weight: 600;
margin-top: 0.48rem;
margin-bottom: 0.06667rem;
}
.largestBox ul li .score span {
color: #B1B5BD;
font-size: 0.29333rem;
font-weight: 400;
display: block;
}
.layui-m-layershade {
background-color: transparent !important;
}
.layui-m-layer2 .layui-m-layerchild {
width: 3rem !important;
height: 3rem !important;
border: none !important;
box-shadow: none !important;
color: #fff !important;
background: rgba(0, 0, 0, 0.6) !important;
}
.layui-m-layer2 .layui-m-layercont {
text-align: center !important;
padding: 0 !important;
line-height: 0 !important;
margin-top: 0.8rem !important;
}

View File

@@ -0,0 +1,553 @@
@function px2rem($px) {
@return $px / 75+rem;
}
html,
body {
width: 100%;
background: linear-gradient(0deg, #020B27 0%, #1D181B 99%);
backdrop-filter: blur(0px);
// background: #0B1836;
overflow: hidden;
}
.back {
position: fixed;
top: px2rem(20);
left: px2rem(24);
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);
}
}
.largestBox {
width: px2rem(750);
min-height: px2rem(1154);
background: url(../images/bg.png) no-repeat;
background-size: px2rem(750) px2rem(1154);
margin: 0 auto;
position: relative;
box-sizing: border-box;
padding: px2rem(90) 0 0 0;
.title {
width: px2rem(530);
height: px2rem(86);
position: absolute;
top: px2rem(-11);
left: 50%;
transform: translateX(-50%);
}
.tab {
width: px2rem(274);
height: px2rem(40);
line-height: px2rem(40);
display: flex;
justify-content: space-between;
margin: 0 auto 0;
div {
position: relative;
color: rgba(255, 255, 255, .7);
font-size: px2rem(28);
font-weight: 600;
span {
background: none;
width: px2rem(24);
height: px2rem(6);
border-radius: px2rem(6);
position: absolute;
bottom: px2rem(-8);
left: 50%;
transform: translateX(-50%);
}
}
.tabColor1 {
color: #fff;
font-size: px2rem(28);
span {
background: #FA7814;
}
}
.tabColor2 {
color: #fff;
span {
background: #A34DFF;
}
}
}
.dayTab {
// width: px2rem(400);
width: px2rem(250);
height: px2rem(46);
margin: px2rem(26) auto 0;
display: flex;
justify-content: space-between;
div {
width: px2rem(100);
height: px2rem(46);
line-height: px2rem(46);
border-radius: px2rem(46);
text-align: center;
color: rgba(255, 255, 255, .7);
background: rgba(210, 172, 252, .4);
font-size: px2rem(24);
font-weight: 500;
}
.dayTabColor1 {
background: #fff;
color: #FA7814;
}
.dayTabColor2 {
background: #fff;
color: #A34DFF;
}
}
.top3 {
width: px2rem(660);
height: px2rem(1);
margin: px2rem(228) auto 0;
position: relative;
.no1 {
width: px2rem(238);
height: px2rem(216);
position: absolute;
left: 50%;
transform: translateX(-50%);
top: px2rem(-216);
.box {
width: 100%;
height: 100%;
position: absolute;
.ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.tx {
width: px2rem(156);
height: px2rem(156);
position: absolute;
left: 50%;
top: px2rem(44);
// top: px2rem(34);
transform: translateX(-50%);
border-radius: 50%;
}
p {
width: 100%;
position: absolute;
left: 0;
bottom: px2rem(-42);
text-align: center;
span {
vertical-align: middle;
color: #E6ECF5;
font-size: px2rem(28);
}
.sp {
width: px2rem(28);
height: px2rem(28);
border-radius: 50%;
display: inline-block;
img {
display: inline-block;
width: px2rem(16);
height: px2rem(16);
border-radius: 50%;
margin: px2rem(5) auto 0;
}
}
.boy {
background: #6BB3FF;
}
.woman {
background: #FF80CC;
}
}
.icon {
width: 100%;
height: px2rem(36);
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: px2rem(-84);
padding: 0 px2rem(45);
img {
display: block;
width: px2rem(72);
height: px2rem(36);
}
}
.score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: px2rem(24);
font-weight: 500;
position: absolute;
left: 0;
bottom: px2rem(-115);
}
}
}
.no2 {
width: px2rem(200);
height: px2rem(178);
position: absolute;
left: 0;
top: px2rem(-180);
.box {
width: 100%;
height: 100%;
position: absolute;
.ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.tx {
width: px2rem(128);
height: px2rem(128);
position: absolute;
left: 50%;
top: px2rem(34);
transform: translateX(-50%);
border-radius: 50%;
}
p {
width: 100%;
position: absolute;
left: 0;
bottom: px2rem(-42);
text-align: center;
span {
vertical-align: middle;
color: #E6ECF5;
font-size: px2rem(28);
}
.sp {
width: px2rem(28);
height: px2rem(28);
border-radius: 50%;
display: inline-block;
img {
display: inline-block;
width: px2rem(16);
height: px2rem(16);
border-radius: 50%;
margin: px2rem(5) auto 0;
}
}
.boy {
background: #6BB3FF;
}
.woman {
background: #FF80CC;
}
}
.icon {
width: 100%;
height: px2rem(36);
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: px2rem(-84);
padding: 0 px2rem(25);
img {
display: block;
width: px2rem(72);
height: px2rem(36);
}
}
.score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: px2rem(24);
font-weight: 500;
position: absolute;
left: 0;
bottom: px2rem(-115);
}
}
}
.no3 {
width: px2rem(200);
height: px2rem(178);
position: absolute;
right: 0;
top: px2rem(-180);
.box {
width: 100%;
height: 100%;
position: absolute;
.ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.tx {
width: px2rem(128);
height: px2rem(128);
position: absolute;
left: 50%;
top: px2rem(34);
transform: translateX(-50%);
border-radius: 50%;
}
p {
width: 100%;
position: absolute;
left: 0;
bottom: px2rem(-42);
text-align: center;
span {
vertical-align: middle;
color: #E6ECF5;
font-size: px2rem(28);
}
.sp {
width: px2rem(28);
height: px2rem(28);
border-radius: 50%;
display: inline-block;
img {
display: inline-block;
width: px2rem(16);
height: px2rem(16);
border-radius: 50%;
margin: px2rem(5) auto 0;
}
}
.boy {
background: #6BB3FF;
}
.woman {
background: #FF80CC;
}
}
.icon {
width: 100%;
height: px2rem(36);
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: px2rem(-84);
padding: 0 px2rem(25);
img {
display: block;
width: px2rem(72);
height: px2rem(36);
}
}
.score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: px2rem(24);
font-weight: 500;
position: absolute;
left: 0;
bottom: px2rem(-115);
}
}
}
}
ul {
width: px2rem(718);
height: px2rem(578);
margin: px2rem(136) auto 0;
background: rgba(255, 167, 141, 0.16);
border-radius: px2rem(32) px2rem(32) 0px 0px;
border: px2rem(2) solid rgba(255, 217, 115, 0.5);
backdrop-filter: blur(7px);
border-bottom: none;
box-sizing: border-box;
padding: px2rem(16) 0 px2rem(140);
overflow-y: scroll;
&::-webkit-scrollbar{
display: none;
}
li {
width: 100%;
height: px2rem(144);
box-sizing: border-box;
padding: 0 px2rem(25);
overflow: hidden;
.num {
width: px2rem(40);
height: 100%;
line-height: px2rem(144);
text-align: center;
color: #E6ECF5;
font-size: px2rem(32);
font-weight: 500;
float: left;
margin-right: px2rem(12);
}
.tx {
display: block;
float: left;
width: px2rem(96);
height: px2rem(96);
border-radius: px2rem(96);
margin-top: px2rem(24);
margin-right: px2rem(16);
}
.userInfo {
width: px2rem(210);
float: left;
p {
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-top: px2rem(30);
margin-bottom: px2rem(8);
color: #E6ECF5;
font-size: px2rem(28);
font-weight: 500;
}
img {
display: inline-block;
width: px2rem(72);
height: px2rem(36);
margin-right: px2rem(8);
}
}
.score {
float: right;
text-align: right;
p {
color: #E6ECF5;
font-size: px2rem(28);
font-weight: 600;
margin-top: px2rem(36);
margin-bottom: px2rem(5);
}
span {
color: #B1B5BD;
font-size: px2rem(22);
font-weight: 400;
display: block;
}
}
}
}
}
.layui-m-layershade {
background-color: rgba(0, 0, 0, .0) !important;
}
.layui-m-layer2 .layui-m-layerchild {
width: 3rem !important;
height: 3rem !important;
border: none !important;
box-shadow: none !important;
color: #fff !important;
background: rgba(0, 0, 0, .6) !important;
}
.layui-m-layer2 .layui-m-layercont {
text-align: center !important;
padding: 0 !important;
line-height: 0 !important;
margin-top: 0.8rem !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

View File

@@ -0,0 +1,110 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>房间榜</title>
<link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/index.css">
</head>
<body>
<!-- 最外层容器 -->
<div class="largestBox">
<!-- 标题 -->
<img src="./images/title.png" alt="" class="title">
<!-- 财富榜&魅力榜 -->
<div class="tab">
<div class="tabColor1">
爱意榜
<span></span>
</div>
<div class="">
魅力榜
<span></span>
</div>
</div>
<!-- 日榜&周榜&月榜 -->
<div class="dayTab">
<div class="dayTabColor1">日榜</div>
<div>周榜</div>
<div style="display: none;">月榜</div>
</div>
<!-- 前三 -->
<div class="top3">
<div class="no no1">
<div class="box">
<img src="./images/no1.png" alt="" class="ts">
<img src="./images/logo.png" alt="" class="tx">
<p>
<span class="sp1">我是很长的...</span>
<span class="sp boy"><img src="./images/boy.png" alt=""></span>
</p>
<div class="icon">
<img src="./images/icon1.png" alt="" class="icon1">
<img src="./images/icon2.png" alt="" class="icon2">
</div>
<div class="score">10000</div>
</div>
</div>
<div class="no no2">
<div class="box">
<img src="./images/no2.png" alt="" class="ts">
<img src="" alt="" class="tx">
<p>
<span class="sp1"></span>
<span class="sp"><img src="" alt=""></span>
</p>
<div class="icon">
<img src="" alt="" class="icon1">
<img src="" alt="" class="icon2">
</div>
<div class="score"></div>
</div>
</div>
<div class="no no3">
<div class="box">
<img src="./images/no3.png" alt="" class="ts">
<img src="" alt="" class="tx">
<p>
<span class="sp1"></span>
<span class="sp boy"><img src="" alt=""></span>
</p>
<div class="icon">
<img src="" alt="" class="icon1">
<img src="" alt="" class="icon2">
</div>
<div class="score"></div>
</div>
</div>
</div>
<!-- 非前三 -->
<ul>
<li>
<div class="num">4</div>
<img src="./images/logo.png" alt="" class="tx">
<div class="userInfo">
<p>我是名字名字名字名字名字</p>
<img src="./images/icon1.png" alt="" class="icon1">
<img src="./images/icon2.png" alt="" class="icon2">
</div>
<div class="score">
<p>1000</p>
<span>魅力值</span>
</div>
</li>
</ul>
</div>
</body>
</html>
<script src="../../common/js/flexible.js"></script>
<script src="../../common/js/jquery-3.2.1.min.js"></script>
<script src="../../common/js/common2.js"></script>
<script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script>
<script src="../../common/js/route-constant.js"></script>
<script src="../../common/js/svga.js"></script>
<script src="./js/index.js"></script>

View File

@@ -0,0 +1,215 @@
let urlPrefix = getUrlPrefix()
let browser = checkVersion()
let env = EnvCheck();
var urlData = getQueryString();
if (env == 'test') {
new VConsole();
}
// 封装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 listType = 1;
var experImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_exper_';
var charmImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_charm_';
var typeWealth = 'day';//财富榜类型day 日 week 周 month 月 total 总
// 初始化函数
$(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)
}
})
getRankingsWealth();
}, 100)
})
// 榜单切换
$('.largestBox .tab div').click(function () {
var i = $(this).index() + 1;
listType = i;
$('.largestBox .tab div').removeClass('tabColor1').removeClass('tabColor2')
$(this).addClass(`tabColor${listType}`);
$('.largestBox .dayTab div').removeClass('dayTabColor1').removeClass('dayTabColor2');
$('.largestBox .dayTab div').eq(0).addClass(`dayTabColor${listType}`);
typeWealth = 'day';
if (listType == 1) {
getRankingsWealth();
} else {
getReciveRankingsWealth();
}
})
// 日榜切换
$('.largestBox .dayTab div').click(function () {
var i = $(this).index() + 1;
$(this).addClass(`dayTabColor${listType}`).siblings().removeClass('dayTabColor1').removeClass('dayTabColor2');
if (i == 1) {
typeWealth = 'day';//财富榜类型day 日 week 周 month 月 total 总
} else if (i == 2) {
typeWealth = 'week';
} else if (i == 3) {
typeWealth = 'month';
}
if (listType == 1) {
getRankingsWealth();
} else {
getReciveRankingsWealth();
}
})
// 爱意榜接口
function getRankingsWealth () {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/room/rankings',
data: {
roomUid: urlData.roomUid,
type: typeWealth,
page: 1,
pageSize: 30,
},
success (res) {
if (res.code === 200) {
listDomFun(res, 1);
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
}
})
}
// 魅力榜接口
function getReciveRankingsWealth () {
showLoading()
networkRequest({
type: 'GEt',
url: urlPrefix + '/room/recive/rankings',
data: {
roomUid: urlData.roomUid,
type: typeWealth,
page: 1,
pageSize: 30,
},
success (res) {
if (res.code === 200) {
listDomFun(res, 2);
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error (err) {
hideLoading(layerIndex)
toastMsg('网络错误,请退出重进')
}
})
}
// 渲染样式
function listDomFun (res, num) {
$('.largestBox ul li').remove();
// 处理前三
var top3 = res.data.rankings.slice(0, 3);
if (top3.length < 3) {
let arr = new Array(3 - top3.length).fill({
avatar: './images/logo.png',
nick: '虚位以待',
goldAmount: '',
})
top3.push(...arr);
}
top3.forEach((res, i) => {
if (res.avatar == './images/logo.png') {
$(`.largestBox .top3 .no${i + 1} .box p .sp`).hide();
$(`.largestBox .top3 .no${i + 1} .box .icon`).hide();
} else {
$(`.largestBox .top3 .no${i + 1} .box p .sp`).show();
$(`.largestBox .top3 .no${i + 1} .box .icon`).show();
}
$(`.largestBox .top3 .no${i + 1} .box .tx`).attr('src', res.avatar);
$(`.largestBox .top3 .no${i + 1} .box .ts`).attr('uid', res.uid);
$(`.largestBox .top3 .no${i + 1} .box p .sp1`).text(res.nick.length > 6 ? res.nick.slice(0, 6) + '...' : res.nick);
$(`.largestBox .top3 .no${i + 1} .box p .sp`).removeClass('boy').removeClass('woman')
$(`.largestBox .top3 .no${i + 1} .box p .sp`).addClass(`${res.gender == 1 ? 'boy' : 'woman'}`);
$(`.largestBox .top3 .no${i + 1} .box p .sp img`).attr('src', res.gender == 1 ? './images/boy.png' : './images/woman.png');
$(`.largestBox .top3 .no${i + 1} .box .icon .icon1`).attr('src', experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`)
$(`.largestBox .top3 .no${i + 1} .box .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`)
$(`.largestBox .top3 .no${i + 1} .box .score`).text(unitProcessing(res.goldAmount, 10000, 1, 'W'));
})
// 处理非前三
var notTop3 = res.data.rankings.slice(3);
var str = '';
notTop3.forEach((res, i) => {
str += `
<li>
<div class="num">${i + 4}</div>
<img src="${res.avatar}" uid=${res.uid} alt="" class="tx">
<div class="userInfo">
<p>${res.nick}</p>
<img src="${experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`}" alt="" class="icon1">
<img src="${charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`}" alt="" class="icon2">
</div>
<div class="score">
<p>${unitProcessing(res.goldAmount, 10000, 1, 'W')}</p>
<span>${num == 1 ? '爱意值' : '魅力值'}</span>
</div>
</li>
`
})
$('.largestBox ul').append(str);
}
// 点击前三跳转房间
$('.largestBox').on('click', '.top3 .no .box .ts', function () {
var uid = $(this).attr('uid');
if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(uid);
}
}
})
// 点击非前三跳转房间
$('.largestBox').on('click', 'ul li .tx', function () {
var uid = $(this).attr('uid');
if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(uid);
}
}
})

View File

@@ -1,229 +1,547 @@
@font-face { html,
font-family: "pingfang-bold";
src: url("../../../common/fonts/PingFang Bold.ttf");
src: url("../../../common/fonts/PingFang Bold.ttf") format("woff"), url("../../../common/fonts/PingFang Bold.ttf") format("truetype"), url("../../../common/fonts/PingFang Bold.ttf") format("svg");
}
@font-face {
font-family: "pingfang-medium";
src: url("../../../common/fonts/PingFang Medium.ttf");
src: url("../../../common/fonts/PingFang Medium.ttf") format("woff"), url("../../../common/fonts/PingFang Medium.ttf") format("truetype"), url("../../../common/fonts/PingFang Medium.ttf") format("svg");
}
body { body {
width: 100%; width: 100%;
font-family: "pingfang-bold"; background: linear-gradient(0deg, #020B27 0%, #1D181B 99%);
background-color: #7A83F5; backdrop-filter: blur(0px);
}
.wrap {
display: none;
}
.wrap .tab_wrap {
position: fixed;
top: 0;
left: 0;
z-index: 99;
width: 100%;
height: 2.6666666667rem;
background: url("../images/top.png") no-repeat 0 0/100% 100%;
overflow: hidden; overflow: hidden;
} }
.wrap .tab_wrap .tab_contain {
.back {
position: fixed;
top: 0.26667rem;
left: 0.32rem;
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;
}
.largestBox {
width: 10rem;
min-height: 15.38667rem;
background: url(../images/bg.png) no-repeat;
background-size: 10rem 15.38667rem;
margin: 0 auto;
position: relative;
box-sizing: border-box;
padding: 1.2rem 0 0 0;
}
.largestBox .title {
width: 7.06667rem;
height: 1.14667rem;
position: absolute;
top: -0.14667rem;
left: 50%;
transform: translateX(-50%);
}
.largestBox .tab {
width: 3.65333rem;
height: 0.53333rem;
line-height: 0.53333rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; margin: 0 auto 0;
width: 8.5333333333rem;
height: 0.96rem;
margin: 0.6666666667rem auto 0.3466666667rem;
background-color: #9785FA;
border-radius: 0.5333333333rem;
color: rgba(255, 255, 255, 0.6);
font-size: 0.4rem;
} }
.wrap .tab_wrap .tab_contain p {
width: 4.16rem; .largestBox .tab div {
height: 0.8533333333rem;
line-height: 0.8533333333rem;
margin: 0 0.0533333333rem;
text-align: center;
font-weight: bold;
}
.wrap .tab_wrap .tab_contain p.active {
background-color: #fff;
color: #7898F3;
border-radius: 0.5333333333rem;
}
.wrap .tab_wrap .rank_type {
display: flex;
margin-left: 0.8rem;
}
.wrap .tab_wrap .rank_type p {
position: relative; position: relative;
margin-right: 0.4266666667rem; color: rgba(255, 255, 255, 0.7);
color: rgba(255, 255, 255, 0.6); font-size: 0.37333rem;
font-size: 0.32rem; font-weight: 600;
} }
.wrap .tab_wrap .rank_type p.active {
color: white; .largestBox .tab div span {
} background: none;
.wrap .tab_wrap .rank_type p.active::after { width: 0.32rem;
content: ""; height: 0.08rem;
border-radius: 0.08rem;
position: absolute; position: absolute;
bottom: -0.2133333333rem; bottom: -0.10667rem;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
width: 0.2666666667rem;
height: 0.1066666667rem;
border-radius: 0.0533333333rem;
background-color: #fff;
} }
.wrap .tab_wrap .rank_type p:last-child {
display: none; .largestBox .tab .tabColor1 {
color: #fff;
font-size: 0.37333rem;
} }
.wrap .rank_wrap {
overflow: auto; .largestBox .tab .tabColor1 span {
background: #FA7814;
} }
.wrap .rank_wrap .top_three_wrap {
position: relative; .largestBox .tab .tabColor2 {
width: 100%;
height: 5.3333333333rem;
background: url("../images/topthree-bg.png") no-repeat 0 0/100% 100%;
margin-top: 2.6666666667rem;
}
.wrap .rank_wrap .top_three_wrap .top_three_item {
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 2.32rem;
text-align: center;
color: #fff; color: #fff;
} }
.wrap .rank_wrap .top_three_wrap .top_three_item:nth-child(2), .wrap .rank_wrap .top_three_wrap .top_three_item:nth-child(3) {
left: 0.8rem; .largestBox .tab .tabColor2 span {
transform: translateX(0); background: #A34DFF;
} }
.wrap .rank_wrap .top_three_wrap .top_three_item:nth-child(2) .avatar, .wrap .rank_wrap .top_three_wrap .top_three_item:nth-child(3) .avatar {
width: 1.8933333333rem; .largestBox .dayTab {
height: 2.1866666667rem; width: 3.33333rem;
margin-top: 1.4933333333rem; height: 0.61333rem;
margin: 0.34667rem auto 0;
display: flex;
justify-content: space-between;
} }
.wrap .rank_wrap .top_three_wrap .top_three_item:nth-child(2) .avatar p, .wrap .rank_wrap .top_three_wrap .top_three_item:nth-child(3) .avatar p {
background-image: url("../images/second.png"); .largestBox .dayTab div {
width: 1.33333rem;
height: 0.61333rem;
line-height: 0.61333rem;
border-radius: 0.61333rem;
text-align: center;
color: rgba(255, 255, 255, 0.7);
background: rgba(210, 172, 252, 0.4);
font-size: 0.32rem;
font-weight: 500;
} }
.wrap .rank_wrap .top_three_wrap .top_three_item:nth-child(2) .avatar img, .wrap .rank_wrap .top_three_wrap .top_three_item:nth-child(3) .avatar img {
top: -1.76rem; .largestBox .dayTab .dayTabColor1 {
width: 1.5466666667rem; background: #fff;
height: 1.5466666667rem; color: #FA7814;
} }
.wrap .rank_wrap .top_three_wrap .top_three_item:nth-child(3) {
left: 6.88rem; .largestBox .dayTab .dayTabColor2 {
background: #fff;
color: #A34DFF;
} }
.wrap .rank_wrap .top_three_wrap .top_three_item:nth-child(3) .avatar p {
background-image: url("../images/third.png"); .largestBox .top3 {
} width: 8.8rem;
.wrap .rank_wrap .top_three_wrap .top_three_item .avatar { height: 0.01333rem;
width: 2.32rem; margin: 3.04rem auto 0;
height: 2.6666666667rem;
margin: 0.4533333333rem auto 0.2rem;
}
.wrap .rank_wrap .top_three_wrap .top_three_item .avatar p {
position: relative; position: relative;
z-index: 99; }
.largestBox .top3 .no1 {
width: 3.17333rem;
height: 2.88rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: -2.88rem;
}
.largestBox .top3 .no1 .box {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url("../images/first.png") no-repeat 0 0/100% 100%; position: absolute;
} }
.wrap .rank_wrap .top_three_wrap .top_three_item .avatar img {
position: relative; .largestBox .top3 .no1 .box .ts {
top: -2.1333333333rem; width: 100%;
width: 1.92rem; height: 100%;
height: 1.92rem; position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.largestBox .top3 .no1 .box .tx {
width: 2.08rem;
height: 2.08rem;
position: absolute;
left: 50%;
top: 0.58667rem;
transform: translateX(-50%);
border-radius: 50%; border-radius: 50%;
} }
.wrap .rank_wrap .top_three_wrap .top_three_item .nick {
display: flex; .largestBox .top3 .no1 .box p {
justify-content: center; width: 100%;
align-items: center; position: absolute;
font-size: 0.3733333333rem; left: 0;
bottom: -0.56rem;
text-align: center;
white-space: nowrap; white-space: nowrap;
} }
.wrap .rank_wrap .top_three_wrap .top_three_item .nick img {
width: 0.4rem; .largestBox .top3 .no1 .box p span {
width: 0.4rem; vertical-align: middle;
margin-left: 0.0533333333rem; color: #E6ECF5;
} font-size: 0.37333rem;
.wrap .rank_wrap .top_three_wrap .top_three_item .erbanNo {
font-size: 0.2666666667rem;
color: rgba(255, 255, 255, 0.6);
margin: 0.1066666667rem 0 0.1066666667rem;
}
.wrap .rank_wrap .top_three_wrap .top_three_item .num {
font-size: 0.3733333333rem;
color: #F8FF7B;
padding-top: 0.05rem;
}
.wrap .rank_wrap ul {
height: 3.7333333333rem;
padding-top: 0.4533333333rem;
background: linear-gradient(180deg, #8C6FFA 0%, #7A83F5 100%);
}
.wrap .rank_wrap ul li {
display: flex;
align-items: center;
padding-bottom: 0.4266666667rem;
background: #7A83F5;
}
.wrap .rank_wrap ul li:nth-child(1) {
background: transparent;
}
.wrap .rank_wrap ul li:nth-child(2) {
background: transparent;
}
.wrap .rank_wrap ul li .index {
width: 0.4rem;
text-align: center;
font-size: 0.48rem;
font-weight: bold;
color: #fff;
margin: 0 0.5333333333rem;
}
.wrap .rank_wrap ul li .others_avatar {
width: 1.3333333333rem;
height: 1.3333333333rem;
margin-right: 0.4266666667rem;
}
.wrap .rank_wrap ul li .others_avatar img {
width: 100%;
height: 100%;
border-radius: 50%;
}
.wrap .rank_wrap ul li .info_wrap {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-around;
height: 0.9333333333rem;
}
.wrap .rank_wrap ul li .info_wrap .others_nick {
color: #fff;
font-size: 0.3733333333rem;
}
.wrap .rank_wrap ul li .info_wrap .others_nick img {
width: 0.4rem;
height: 0.4rem;
vertical-align: bottom;
}
.wrap .rank_wrap ul li .info_wrap .others_erbanNo {
color: rgba(255, 255, 255, 0.6);
}
.wrap .rank_wrap ul li .others_num {
color: #F8FF7B;
font-size: 0.3733333333rem;
font-weight: bold;
margin-right: 0.6666666667rem;
} }
::-webkit-scrollbar { .largestBox .top3 .no1 .box p .sp {
width: 0.37333rem;
height: 0.37333rem;
border-radius: 50%;
display: inline-block;
}
.largestBox .top3 .no1 .box p .sp img {
display: inline-block;
width: 0.21333rem;
height: 0.21333rem;
border-radius: 50%;
margin: 0.06667rem auto 0;
}
.largestBox .top3 .no1 .box p .boy {
background: #6BB3FF;
}
.largestBox .top3 .no1 .box p .woman {
background: #FF80CC;
}
.largestBox .top3 .no1 .box .icon {
width: 100%;
height: 0.48rem;
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: -1.12rem;
padding: 0 0.6rem;
}
.largestBox .top3 .no1 .box .icon img {
display: block;
width: 0.96rem;
height: 0.48rem;
}
.largestBox .top3 .no1 .box .score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: 0.32rem;
font-weight: 500;
position: absolute;
left: 0;
bottom: -1.53333rem;
}
.largestBox .top3 .no2 {
width: 2.66667rem;
height: 2.37333rem;
position: absolute;
left: 0;
top: -2.4rem;
}
.largestBox .top3 .no2 .box {
width: 100%;
height: 100%;
position: absolute;
}
.largestBox .top3 .no2 .box .ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.largestBox .top3 .no2 .box .tx {
width: 1.70667rem;
height: 1.70667rem;
position: absolute;
left: 50%;
top: 0.45333rem;
transform: translateX(-50%);
border-radius: 50%;
}
.largestBox .top3 .no2 .box p {
width: 100%;
position: absolute;
left: 0;
bottom: -0.56rem;
text-align: center;
white-space: nowrap;
}
.largestBox .top3 .no2 .box p span {
vertical-align: middle;
color: #E6ECF5;
font-size: 0.37333rem;
}
.largestBox .top3 .no2 .box p .sp {
width: 0.37333rem;
height: 0.37333rem;
border-radius: 50%;
display: inline-block;
}
.largestBox .top3 .no2 .box p .sp img {
display: inline-block;
width: 0.21333rem;
height: 0.21333rem;
border-radius: 50%;
margin: 0.06667rem auto 0;
}
.largestBox .top3 .no2 .box p .boy {
background: #6BB3FF;
}
.largestBox .top3 .no2 .box p .woman {
background: #FF80CC;
}
.largestBox .top3 .no2 .box .icon {
width: 100%;
height: 0.48rem;
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: -1.12rem;
padding: 0 0.33333rem;
}
.largestBox .top3 .no2 .box .icon img {
display: block;
width: 0.96rem;
height: 0.48rem;
}
.largestBox .top3 .no2 .box .score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: 0.32rem;
font-weight: 500;
position: absolute;
left: 0;
bottom: -1.53333rem;
}
.largestBox .top3 .no3 {
width: 2.66667rem;
height: 2.37333rem;
position: absolute;
right: 0;
top: -2.4rem;
}
.largestBox .top3 .no3 .box {
width: 100%;
height: 100%;
position: absolute;
}
.largestBox .top3 .no3 .box .ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.largestBox .top3 .no3 .box .tx {
width: 1.70667rem;
height: 1.70667rem;
position: absolute;
left: 50%;
top: 0.45333rem;
transform: translateX(-50%);
border-radius: 50%;
}
.largestBox .top3 .no3 .box p {
width: 100%;
position: absolute;
left: 0;
bottom: -0.56rem;
text-align: center;
white-space: nowrap;
}
.largestBox .top3 .no3 .box p span {
vertical-align: middle;
color: #E6ECF5;
font-size: 0.37333rem;
}
.largestBox .top3 .no3 .box p .sp {
width: 0.37333rem;
height: 0.37333rem;
border-radius: 50%;
display: inline-block;
}
.largestBox .top3 .no3 .box p .sp img {
display: inline-block;
width: 0.21333rem;
height: 0.21333rem;
border-radius: 50%;
margin: 0.06667rem auto 0;
}
.largestBox .top3 .no3 .box p .boy {
background: #6BB3FF;
}
.largestBox .top3 .no3 .box p .woman {
background: #FF80CC;
}
.largestBox .top3 .no3 .box .icon {
width: 100%;
height: 0.48rem;
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: -1.12rem;
padding: 0 0.33333rem;
}
.largestBox .top3 .no3 .box .icon img {
display: block;
width: 0.96rem;
height: 0.48rem;
}
.largestBox .top3 .no3 .box .score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: 0.32rem;
font-weight: 500;
position: absolute;
left: 0;
bottom: -1.53333rem;
}
.largestBox ul {
width: 9.57333rem;
height: 7.70667rem;
margin: 1.81333rem auto 0;
background: rgba(255, 167, 141, 0.16);
border-radius: 0.42667rem 0.42667rem 0px 0px;
border: 0.02667rem solid rgba(255, 217, 115, 0.5);
backdrop-filter: blur(7px);
border-bottom: none;
box-sizing: border-box;
padding: 0.21333rem 0 1.86667rem;
overflow-y: scroll;
}
.largestBox ul::-webkit-scrollbar {
display: none; display: none;
} }
/*# sourceMappingURL=index.css.map */ .largestBox ul li {
width: 100%;
height: 1.92rem;
box-sizing: border-box;
padding: 0 0.33333rem;
overflow: hidden;
}
.largestBox ul li .num {
width: 0.53333rem;
height: 100%;
line-height: 1.92rem;
text-align: center;
color: #E6ECF5;
font-size: 0.42667rem;
font-weight: 500;
float: left;
margin-right: 0.16rem;
}
.largestBox ul li .tx {
display: block;
float: left;
width: 1.28rem;
height: 1.28rem;
border-radius: 1.28rem;
margin-top: 0.32rem;
margin-right: 0.21333rem;
}
.largestBox ul li .userInfo {
width: 2.8rem;
float: left;
}
.largestBox ul li .userInfo p {
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-top: 0.4rem;
margin-bottom: 0.10667rem;
color: #E6ECF5;
font-size: 0.37333rem;
font-weight: 500;
}
.largestBox ul li .userInfo img {
display: inline-block;
width: 0.96rem;
height: 0.48rem;
margin-right: 0.10667rem;
}
.largestBox ul li .score {
float: right;
text-align: right;
}
.largestBox ul li .score p {
color: #E6ECF5;
font-size: 0.37333rem;
font-weight: 600;
margin-top: 0.48rem;
margin-bottom: 0.06667rem;
}
.largestBox ul li .score span {
color: #B1B5BD;
font-size: 0.29333rem;
font-weight: 400;
display: block;
}
.layui-m-layershade {
background-color: transparent !important;
}
.layui-m-layer2 .layui-m-layerchild {
width: 3rem !important;
height: 3rem !important;
border: none !important;
box-shadow: none !important;
color: #fff !important;
background: rgba(0, 0, 0, 0.6) !important;
}
.layui-m-layer2 .layui-m-layercont {
text-align: center !important;
padding: 0 !important;
line-height: 0 !important;
margin-top: 0.8rem !important;
}

View File

@@ -1,277 +1,556 @@
@function px2rem($px, $rem: 75) { @function px2rem($px) {
@return $px / $rem+rem; @return $px / 75+rem;
}
@font-face {
font-family: 'pingfang-bold';
src: url('../../../common/fonts/PingFang\ Bold.ttf');
src: url('../../../common/fonts/PingFang\ Bold.ttf') format('woff'),
url('../../../common/fonts/PingFang\ Bold.ttf') format('truetype'),
url('../../../common/fonts/PingFang\ Bold.ttf') format('svg');
}
@font-face {
font-family: 'pingfang-medium';
src: url('../../../common/fonts/PingFang\ Medium.ttf');
src: url('../../../common/fonts/PingFang\ Medium.ttf') format('woff'),
url('../../../common/fonts/PingFang\ Medium.ttf') format('truetype'),
url('../../../common/fonts/PingFang\ Medium.ttf') format('svg');
} }
html,
body { body {
width: 100%; width: 100%;
font-family: 'pingfang-bold'; background: linear-gradient(0deg, #020B27 0%, #1D181B 99%);
background-color: #7A83F5; backdrop-filter: blur(0px);
} // background: #0B1836;
.wrap {
display: none;
.tab_wrap {
position: fixed;
top: 0;
left: 0;
z-index: 99;
width: 100%;
height: px2rem(200, );
background: url('../images/top.png') no-repeat 0 0/100% 100%;
overflow: hidden; overflow: hidden;
.tab_contain {
display: flex;
justify-content: space-between;
align-items: center;
width: px2rem(640, );
height: px2rem(72, );
margin: px2rem(50, ) auto px2rem(26, );
background-color: #9785FA;
border-radius: px2rem(40, );
color: rgba($color: #fff, $alpha: .6);
font-size: px2rem(30, );
p {
width: px2rem(312, );
height: px2rem(64, );
line-height: px2rem(64, );
margin: 0 px2rem(4, );
text-align: center;
font-weight: bold;
&.active {
background-color: #fff;
color: #7898F3;
border-radius: px2rem(40, );
}
}
} }
.rank_type { .back {
display: flex; position: fixed;
margin-left: px2rem(60, ); top: px2rem(20);
left: px2rem(24);
p { z-index: 99;
position: relative; width: px2rem(62);
margin-right: px2rem(32, ); height: px2rem(62);
color: rgba($color: #fff, $alpha: .6);
font-size: px2rem(24, );
&.active {
color: rgba($color: #fff, $alpha: 1);
&::after {
content: '';
position: absolute;
bottom: px2rem(-16, );
left: 50%;
transform: translateX(-50%);
width: px2rem(20, );
height: px2rem(8, );
border-radius: px2rem(4, );
background-color: #fff;
}
}
&:last-child {
display: none;
}
}
}
}
.rank_wrap {
overflow: auto;
.top_three_wrap {
position: relative;
width: 100%;
height: px2rem(400, );
background: url('../images/topthree-bg.png') no-repeat 0 0/100% 100%;
margin-top: px2rem(200, );
.top_three_item {
position: absolute;
left: 50%;
transform: translateX(-50%);
width: px2rem(174, );
text-align: center;
color: #fff;
&:nth-child(2),
&:nth-child(3) {
left: px2rem(60, );
transform: translateX(0);
.avatar {
width: px2rem(142, );
height: px2rem(164, );
margin-top: px2rem(112, );
p {
background-image: url('../images/second.png');
}
img { img {
top: px2rem(-132, );
width: px2rem(116, );
height: px2rem(116, );
}
}
}
&:nth-child(3) {
left: px2rem(516, );
.avatar {
p {
background-image: url('../images/third.png');
}
}
}
.avatar {
width: px2rem(174, );
height: px2rem(200, );
margin: px2rem(34, ) auto 0.2rem;
p {
position: relative;
z-index: 99;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url('../images/first.png') no-repeat 0 0/100% 100%;
} }
img { p {
color: #fff;
font-size: px2rem(32);
position: absolute;
width: 9rem;
left: 0;
top: 0;
height: 100%;
text-align: center;
line-height: px2rem(62);
}
}
.largestBox {
width: px2rem(750);
min-height: px2rem(1154);
background: url(../images/bg.png) no-repeat;
background-size: px2rem(750) px2rem(1154);
margin: 0 auto;
position: relative; position: relative;
top: px2rem(-160, ); box-sizing: border-box;
width: px2rem(144, ); padding: px2rem(90) 0 0 0;
height: px2rem(144, );
.title {
width: px2rem(530);
height: px2rem(86);
position: absolute;
top: px2rem(-11);
left: 50%;
transform: translateX(-50%);
}
.tab {
width: px2rem(274);
height: px2rem(40);
line-height: px2rem(40);
display: flex;
justify-content: space-between;
margin: 0 auto 0;
div {
position: relative;
color: rgba(255, 255, 255, .7);
font-size: px2rem(28);
font-weight: 600;
span {
background: none;
width: px2rem(24);
height: px2rem(6);
border-radius: px2rem(6);
position: absolute;
bottom: px2rem(-8);
left: 50%;
transform: translateX(-50%);
}
}
.tabColor1 {
color: #fff;
font-size: px2rem(28);
span {
background: #FA7814;
}
}
.tabColor2 {
color: #fff;
span {
background: #A34DFF;
}
}
}
.dayTab {
// width: px2rem(400);
width: px2rem(250);
height: px2rem(46);
margin: px2rem(26) auto 0;
display: flex;
justify-content: space-between;
div {
width: px2rem(100);
height: px2rem(46);
line-height: px2rem(46);
border-radius: px2rem(46);
text-align: center;
color: rgba(255, 255, 255, .7);
background: rgba(210, 172, 252, .4);
font-size: px2rem(24);
font-weight: 500;
}
.dayTabColor1 {
background: #fff;
color: #FA7814;
}
.dayTabColor2 {
background: #fff;
color: #A34DFF;
}
}
.top3 {
width: px2rem(660);
height: px2rem(1);
margin: px2rem(228) auto 0;
position: relative;
.no1 {
width: px2rem(238);
height: px2rem(216);
position: absolute;
left: 50%;
transform: translateX(-50%);
top: px2rem(-216);
.box {
width: 100%;
height: 100%;
position: absolute;
.ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.tx {
width: px2rem(156);
height: px2rem(156);
position: absolute;
left: 50%;
top: px2rem(44);
// top: px2rem(34);
transform: translateX(-50%);
border-radius: 50%; border-radius: 50%;
} }
}
.nick { p {
display: flex; width: 100%;
justify-content: center; position: absolute;
align-items: center; left: 0;
font-size: px2rem(28, ); bottom: px2rem(-42);
text-align: center;
white-space: nowrap; white-space: nowrap;
span {
vertical-align: middle;
color: #E6ECF5;
font-size: px2rem(28);
}
.sp {
width: px2rem(28);
height: px2rem(28);
border-radius: 50%;
display: inline-block;
img { img {
width: px2rem(30, ); display: inline-block;
width: px2rem(30, ); width: px2rem(16);
margin-left: px2rem(4, ); height: px2rem(16);
border-radius: 50%;
margin: px2rem(5) auto 0;
} }
} }
.erbanNo { .boy {
font-size: px2rem(20, ); background: #6BB3FF;
color: rgba($color: #fff, $alpha: .6);
margin: px2rem(8, ) 0 px2rem(8, );
} }
.num { .woman {
font-size: px2rem(28, ); background: #FF80CC;
color: #F8FF7B; }
padding-top: 0.05rem;
}
.icon {
width: 100%;
height: px2rem(36);
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: px2rem(-84);
padding: 0 px2rem(45);
img {
display: block;
width: px2rem(72);
height: px2rem(36);
}
}
.score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: px2rem(24);
font-weight: 500;
position: absolute;
left: 0;
bottom: px2rem(-115);
}
}
}
.no2 {
width: px2rem(200);
height: px2rem(178);
position: absolute;
left: 0;
top: px2rem(-180);
.box {
width: 100%;
height: 100%;
position: absolute;
.ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.tx {
width: px2rem(128);
height: px2rem(128);
position: absolute;
left: 50%;
top: px2rem(34);
transform: translateX(-50%);
border-radius: 50%;
}
p {
width: 100%;
position: absolute;
left: 0;
bottom: px2rem(-42);
text-align: center;
white-space: nowrap;
span {
vertical-align: middle;
color: #E6ECF5;
font-size: px2rem(28);
}
.sp {
width: px2rem(28);
height: px2rem(28);
border-radius: 50%;
display: inline-block;
img {
display: inline-block;
width: px2rem(16);
height: px2rem(16);
border-radius: 50%;
margin: px2rem(5) auto 0;
}
}
.boy {
background: #6BB3FF;
}
.woman {
background: #FF80CC;
}
}
.icon {
width: 100%;
height: px2rem(36);
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: px2rem(-84);
padding: 0 px2rem(25);
img {
display: block;
width: px2rem(72);
height: px2rem(36);
}
}
.score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: px2rem(24);
font-weight: 500;
position: absolute;
left: 0;
bottom: px2rem(-115);
}
}
}
.no3 {
width: px2rem(200);
height: px2rem(178);
position: absolute;
right: 0;
top: px2rem(-180);
.box {
width: 100%;
height: 100%;
position: absolute;
.ts {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
}
.tx {
width: px2rem(128);
height: px2rem(128);
position: absolute;
left: 50%;
top: px2rem(34);
transform: translateX(-50%);
border-radius: 50%;
}
p {
width: 100%;
position: absolute;
left: 0;
bottom: px2rem(-42);
text-align: center;
white-space: nowrap;
span {
vertical-align: middle;
color: #E6ECF5;
font-size: px2rem(28);
}
.sp {
width: px2rem(28);
height: px2rem(28);
border-radius: 50%;
display: inline-block;
img {
display: inline-block;
width: px2rem(16);
height: px2rem(16);
border-radius: 50%;
margin: px2rem(5) auto 0;
}
}
.boy {
background: #6BB3FF;
}
.woman {
background: #FF80CC;
}
}
.icon {
width: 100%;
height: px2rem(36);
position: absolute;
left: 0;
display: flex;
justify-content: space-between;
box-sizing: border-box;
bottom: px2rem(-84);
padding: 0 px2rem(25);
img {
display: block;
width: px2rem(72);
height: px2rem(36);
}
}
.score {
width: 100%;
text-align: center;
color: #FFDA24;
font-size: px2rem(24);
font-weight: 500;
position: absolute;
left: 0;
bottom: px2rem(-115);
}
} }
} }
} }
ul { ul {
height: px2rem(280, ); width: px2rem(718);
// overflow: auto; height: px2rem(578);
padding-top: px2rem(34, ); margin: px2rem(136) auto 0;
background: linear-gradient(180deg, #8C6FFA 0%, #7A83F5 100%); background: rgba(255, 167, 141, 0.16);
border-radius: px2rem(32) px2rem(32) 0px 0px;
li { border: px2rem(2) solid rgba(255, 217, 115, 0.5);
display: flex; backdrop-filter: blur(7px);
align-items: center; border-bottom: none;
padding-bottom: px2rem(32, ); box-sizing: border-box;
background: #7A83F5; padding: px2rem(16) 0 px2rem(140);
overflow-y: scroll;
&:nth-child(1){ &::-webkit-scrollbar{
background: transparent;
}
&:nth-child(2){
background: transparent;
}
.index {
width: px2rem(30, );
text-align: center;
font-size: px2rem(36, );
font-weight: bold;
color: #fff;
margin: 0 px2rem(40, );
}
.others_avatar {
width: px2rem(100, );
height: px2rem(100, );
margin-right: px2rem(32, );
img {
width: 100%;
height: 100%;
border-radius: 50%;
}
}
.info_wrap {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-around;
height: px2rem(70, );
.others_nick {
color: #fff;
font-size: px2rem(28, );
img {
width: px2rem(30, );
height: px2rem(30, );
vertical-align: bottom;
}
}
.others_erbanNo {
color: rgba($color: #fff, $alpha: .6);
}
}
.others_num {
color: #F8FF7B;
font-size: px2rem(28, );
font-weight: bold;
margin-right: px2rem(50, );
}
}
}
}
}
::-webkit-scrollbar {
display: none; display: none;
} }
li {
width: 100%;
height: px2rem(144);
box-sizing: border-box;
padding: 0 px2rem(25);
overflow: hidden;
.num {
width: px2rem(40);
height: 100%;
line-height: px2rem(144);
text-align: center;
color: #E6ECF5;
font-size: px2rem(32);
font-weight: 500;
float: left;
margin-right: px2rem(12);
}
.tx {
display: block;
float: left;
width: px2rem(96);
height: px2rem(96);
border-radius: px2rem(96);
margin-top: px2rem(24);
margin-right: px2rem(16);
}
.userInfo {
width: px2rem(210);
float: left;
p {
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-top: px2rem(30);
margin-bottom: px2rem(8);
color: #E6ECF5;
font-size: px2rem(28);
font-weight: 500;
}
img {
display: inline-block;
width: px2rem(72);
height: px2rem(36);
margin-right: px2rem(8);
}
}
.score {
float: right;
text-align: right;
p {
color: #E6ECF5;
font-size: px2rem(28);
font-weight: 600;
margin-top: px2rem(36);
margin-bottom: px2rem(5);
}
span {
color: #B1B5BD;
font-size: px2rem(22);
font-weight: 400;
display: block;
}
}
}
}
}
.layui-m-layershade {
background-color: rgba(0, 0, 0, .0) !important;
}
.layui-m-layer2 .layui-m-layerchild {
width: 3rem !important;
height: 3rem !important;
border: none !important;
box-shadow: none !important;
color: #fff !important;
background: rgba(0, 0, 0, .6) !important;
}
.layui-m-layer2 .layui-m-layercont {
text-align: center !important;
padding: 0 !important;
line-height: 0 !important;
margin-top: 0.8rem !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

View File

@@ -1,39 +1,110 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" <meta name="viewport" content="width=device-width, initial-scale=1.0">
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <title>房間榜</title>
<title>房间榜单</title>
<link rel="stylesheet" href="../../common/css/reset.css"> <link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/index.css?v=1.8"> <link rel="stylesheet" href="./css/index.css">
</head> </head>
<body> <body>
<div class="wrap">
<div class="tab_wrap">
<div class="tab_contain">
<p class="active">爱意榜</p>
<p>魅力榜</p>
</div>
<div class="rank_type">
<p class="active">日榜</p>
<p>周榜</p>
<p>总榜</p>
</div>
</div>
<div class="rank_wrap"> <!-- 最外層容器 -->
<div class="top_three_wrap"></div> <div class="largestBox">
<ul></ul> <!-- 標題 -->
<img src="./images/title.png" alt="" class="title">
<!-- 財富榜&魅力榜 -->
<div class="tab">
<div class="tabColor1">
愛意榜
<span></span>
</div>
<div class="">
魅力榜
<span></span>
</div> </div>
</div> </div>
<!-- 日榜&周榜&月榜 -->
<div class="dayTab">
<div class="dayTabColor1">日榜</div>
<div>周榜</div>
<div style="display: none;">月榜</div>
</div>
<!-- 前三 -->
<div class="top3">
<div class="no no1">
<div class="box">
<img src="./images/no1.png" alt="" class="ts">
<img src="./images/logo.png" alt="" class="tx">
<p>
<span class="sp1"></span>
<span class="sp boy"><img src="./images/boy.png" alt=""></span>
</p>
<div class="icon">
<img src="" alt="" class="icon1">
<img src="" alt="" class="icon2">
</div>
<div class="score">0</div>
</div>
</div>
<div class="no no2">
<div class="box">
<img src="./images/no2.png" alt="" class="ts">
<img src="" alt="" class="tx">
<p>
<span class="sp1"></span>
<span class="sp"><img src="" alt=""></span>
</p>
<div class="icon">
<img src="" alt="" class="icon1">
<img src="" alt="" class="icon2">
</div>
<div class="score"></div>
</div>
</div>
<div class="no no3">
<div class="box">
<img src="./images/no3.png" alt="" class="ts">
<img src="" alt="" class="tx">
<p>
<span class="sp1"></span>
<span class="sp boy"><img src="" alt=""></span>
</p>
<div class="icon">
<img src="" alt="" class="icon1">
<img src="" alt="" class="icon2">
</div>
<div class="score"></div>
</div>
</div>
</div>
<!-- 非前三 -->
<ul>
<li>
<div class="num">4</div>
<img src="./images/logo.png" alt="" class="tx">
<div class="userInfo">
<p></p>
<img src="./images/icon1.png" alt="" class="icon1">
<img src="./images/icon2.png" alt="" class="icon2">
</div>
<div class="score">
<p>0</p>
<span>魅力值</span>
</div>
</li>
</ul>
</div>
</body>
</html>
<script src="../../common/js/flexible.js"></script> <script src="../../common/js/flexible.js"></script>
<script src="../../common/js/jquery-3.2.1.min.js"></script> <script src="../../common/js/jquery-3.2.1.min.js"></script>
<script src="../../common/js/common2.js"></script> <script src="../../common/js/common2.js?v=1.0"></script>
<script src="../../common/js/layer.js"></script> <script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script> <script src="../../common/js/vconsole.min.js"></script>
<script src="./js/index.js?v=2.0"></script> <script src="../../common/js/route-constant.js"></script>
</body> <script src="../../common/js/svga.js"></script>
</html> <script src="./js/index.js"></script>

View File

@@ -1,14 +1,17 @@
let urlPrefix = getUrlPrefix() let urlPrefix = getUrlPrefix()
let browser = checkVersion() let browser = checkVersion()
let queryObj = getQueryString() let env = EnvCheck();
if (EnvCheck() === 'test') new VConsole var urlData = getQueryString();
// 封装layer消息提醒框 if (env == 'test') {
new VConsole();
}
// 封裝layer消息提醒框
let layerIndex let layerIndex
const showLoading = () => { const showLoading = (content = '加載中...') => {
layer.open({ layer.open({
type: 2, type: 2,
shadeClose: false, shadeClose: false,
content: '加載中...', content,
success (e) { success (e) {
layerIndex = $(e).attr('index') layerIndex = $(e).attr('index')
} }
@@ -24,588 +27,195 @@ const toastMsg = (content = '操作完成', time = 2) => {
skin: 'msg' skin: 'msg'
}) })
} }
var listType = 1;
let showReceiveRankTotal //是否展示总榜 var experImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_exper_';
let showMonthList var charmImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_charm_';
// 获取后台配置信息 var typeWealth = 'day';//財富榜類型day 日 week 周 month 月 total 總
const getShowInfo = () => { // 初始化函數
networkRequest({ $(function () {
type: 'GET', getInfoFromClient()
url: urlPrefix + '/room/rankings/showInfo', setTimeout(function () {
data: { // 頁面全屏
roomUid: queryObj.roomUid if (browser.app) {
}, if (browser.android) {
success(res) { window.androidJsObj.initShowNav(false)
if (res.code === 200) {
showReceiveRankTotal = res.data.showReceiveRankTotal
showMonthList = res.data.showMonthList
if (res.data.showMonthList) {
$('title').text('主播榜');
// $('.wrap .tab_wrap').hide();
// $('.wrap .rank_wrap .top_three_wrap').css("margin-top", "0");
// $('.wrap .rank_wrap ul').css("height", "6.4rem");
$('.wrap .tab_wrap .rank_type p:last-child').text('月榜');
$('.wrap .tab_wrap .tab_contain p').eq(0).text('贡献榜')
$('.wrap .tab_wrap .rank_type p:last-child').show();
getList('day')
$('.wrap').show()
} else { } else {
$('.wrap').show() window.webkit.messageHandlers.initShowNav.postMessage(0)
if (showReceiveRankTotal) { }
$('.rank_type p').eq(2).show() };
// 頂部返回事件
$('.back').click(() => {
if (browser.android) {
window.androidJsObj.closeWebView()
} else { } else {
$('.rank_type p').eq(2).hide() window.webkit.messageHandlers.closeWebView.postMessage(null)
}
getList('day')
}
} else {
toastMsg(res.message)
}
},
error(err) {
toastMsg('網絡錯誤')
} }
}) })
getRankingsWealth();
}, 100)
})
// 榜單切換
$('.largestBox .tab div').click(function () {
var i = $(this).index() + 1;
listType = i;
$('.largestBox .tab div').removeClass('tabColor1').removeClass('tabColor2')
$(this).addClass(`tabColor${listType}`);
$('.largestBox .dayTab div').removeClass('dayTabColor1').removeClass('dayTabColor2');
$('.largestBox .dayTab div').eq(0).addClass(`dayTabColor${listType}`);
typeWealth = 'day';
if (listType == 1) {
getRankingsWealth();
} else {
getReciveRankingsWealth();
} }
})
let page = 1 // 日榜切換
let pageSize = 10 $('.largestBox .dayTab div').click(function () {
let rankList = [] var i = $(this).index() + 1;
let isLock = true $(this).addClass(`dayTabColor${listType}`).siblings().removeClass('dayTabColor1').removeClass('dayTabColor2');
let dayListNext = true if (i == 1) {
let weekListNext = true typeWealth = 'day';//財富榜類型day 日 week 周 month 月 total 總
let monthListNext = true } else if (i == 2) {
let totalListNext = true typeWealth = 'week';
let dayCharmListNext = true } else if (i == 3) {
let weekCharmListNext = true typeWealth = 'month';
let monthCharmListNext = true }
let totalCharmListNext = true if (listType == 1) {
getRankingsWealth();
// 获取财富榜数据 } else {
const getList = (type, page = 1) => { getReciveRankingsWealth();
console.log('贡献榜'); }
console.log(type); })
// 愛意榜接口
function getRankingsWealth () {
showLoading()
networkRequest({ networkRequest({
type: 'GET', type: 'GEt',
url: urlPrefix + '/room/rankings', url: urlPrefix + '/room/rankings',
data: { data: {
type, roomUid: urlData.roomUid,
page, type: typeWealth,
pageSize, page: 1,
roomUid: queryObj.roomUid pageSize: 30,
}, },
success (res) { success (res) {
if (res.code === 200) { if (res.code === 200) {
if (res.data.rankings.length === pageSize) { listDomFun(res, 1);
// 能够继续请求下一页
if (type == 'day') {
dayListNext = true
} else if (type == 'week') {
weekListNext = true
} else if (type == 'month') {
monthListNext = true
} else {
totalListNext = true
}
} else {
if (type == 'day') {
dayListNext = false
} else if (type == 'week') {
weekListNext = false
} else if (type == 'month') {
monthListNext = false
} else {
totalListNext = false
}
}
rankList.push(...res.data.rankings)
if (showMonthList) {
if (type == 'day') {
sessionStorage.setItem('dayList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('dayList'))
} else if (type == 'week') {
sessionStorage.setItem('weekList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('weekList'))
} else if (type == 'month') {
sessionStorage.setItem('monthList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('monthList'))
}
} else {
if (type == 'day') {
sessionStorage.setItem('dayList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('dayList'))
} else if (type == 'week') {
sessionStorage.setItem('weekList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('weekList'))
} else if (type == 'total') {
sessionStorage.setItem('totalList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('totalList'))
}
}
isLock = true
} else { } else {
toastMsg(res.message) toastMsg(res.message)
} }
hideLoading(layerIndex)
}, },
error (err) { error (err) {
toastMsg('網絡錯誤') hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
} }
}) })
} }
// 魅力榜接口
// 获取魅力榜数据 function getReciveRankingsWealth () {
const getCharmList = (type, page = 1) => { showLoading()
console.log('魅力榜');
console.log(type);
networkRequest({ networkRequest({
type: 'GET', type: 'GEt',
url: urlPrefix + '/room/recive/rankings', url: urlPrefix + '/room/recive/rankings',
data: { data: {
type, roomUid: urlData.roomUid,
page, type: typeWealth,
pageSize, page: 1,
roomUid: queryObj.roomUid pageSize: 30,
}, },
success (res) { success (res) {
if (res.code === 200) { if (res.code === 200) {
if (res.data.rankings.length === pageSize) { listDomFun(res, 2);
// 能够继续请求下一页
if (type == 'day') {
dayCharmListNext = true
} else if (type == 'week') {
weekCharmListNext = true
} else if (type == 'month') {
monthCharmListNext = true
} else {
totalCharmListNext = true
}
} else {
if (type == 'day') {
dayCharmListNext = false
} else if (type == 'week') {
weekCharmListNext = false
} else if (type == 'month') {
monthCharmListNext = false
} else {
totalCharmListNext = false
}
}
rankList.push(...res.data.rankings)
if (showMonthList) {
if (type == 'day') {
sessionStorage.setItem('dayCharmList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('dayCharmList'))
} else if (type == 'week') {
sessionStorage.setItem('weekCharmList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('weekCharmList'))
} else if (type == 'month') {
sessionStorage.setItem('monthCharmList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('monthCharmList'))
}
} else {
if (type == 'day') {
sessionStorage.setItem('dayCharmList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('dayCharmList'))
} else if (type == 'week') {
sessionStorage.setItem('weekCharmList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('weekCharmList'))
} else if (type == 'total') {
sessionStorage.setItem('totalCharmList', JSON.stringify(rankList))
renderList(sessionStorage.getItem('totalCharmList'))
}
}
// renderList()
isLock = true
} else { } else {
toastMsg(res.message) toastMsg(res.message)
} }
hideLoading(layerIndex)
}, },
error (err) { error (err) {
toastMsg('網絡錯誤') hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
} }
}) })
} }
// 渲染樣式
const renderList = (List) => { function listDomFun (res, num) {
let list = JSON.parse(List) $('.largestBox ul li').remove();
rankList = list // 處理前三
let topThreeArr = list.slice(0, 3) var top3 = res.data.rankings.slice(0, 3);
if (list.length < 3) { if (top3.length < 3) {
let len = 3 - list.length let arr = new Array(3 - top3.length).fill({
let arr = new Array(len).fill({ avatar: './images/logo.png',
nick: '', nick: '虛位以待',
erbanNo: '',
goldAmount: '', goldAmount: '',
gender: ''
}) })
topThreeArr.push(...arr) top3.push(...arr);
} }
let topThreeStr = '' top3.forEach((res, i) => {
topThreeArr.map((item, index) => { if (res.avatar == './images/logo.png') {
let tostr, goldAmount $(`.largestBox .top3 .no${i + 1} .box p .sp`).hide();
if (item.goldAmount) { $(`.largestBox .top3 .no${i + 1} .box .icon`).hide();
tostr = item.goldAmount.toString()
}
if (tostr) {
if (tostr.length >= 5) {
goldAmount = (item.goldAmount / 10000).toFixed(2) + 'w'
} else { } else {
goldAmount = item.goldAmount $(`.largestBox .top3 .no${i + 1} .box p .sp`).show();
$(`.largestBox .top3 .no${i + 1} .box .icon`).show();
} }
} $(`.largestBox .top3 .no${i + 1} .box .tx`).attr('src', res.avatar);
$(`.largestBox .top3 .no${i + 1} .box .ts`).attr('uid', res.uid);
topThreeStr += ` $(`.largestBox .top3 .no${i + 1} .box p .sp1`).text(res.nick.length > 6 ? res.nick.slice(0, 6) + '...' : res.nick);
<div class="top_three_item"> $(`.largestBox .top3 .no${i + 1} .box p .sp`).removeClass('boy').removeClass('woman')
<div class="avatar" data-uid=${item.uid}> $(`.largestBox .top3 .no${i + 1} .box p .sp`).addClass(`${res.gender == 1 ? 'boy' : 'woman'}`);
<p></p> $(`.largestBox .top3 .no${i + 1} .box p .sp img`).attr('src', res.gender == 1 ? './images/boy.png' : './images/woman.png');
<img src="${item.avatar ? item.avatar : `./images/${index + 1}.png`}" alt=""> // $(`.largestBox .top3 .no${i + 1} .box .icon .icon1`).attr('src', experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`)
</div> // $(`.largestBox .top3 .no${i + 1} .box .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`)
<div class="nick"> $(`.largestBox .top3 .no${i + 1} .box .icon .icon1`).attr('src', res.experUrl)
${item.nick.length > 5 ? item.nick.slice(0, 5) + '...' : item.nick} $(`.largestBox .top3 .no${i + 1} .box .icon .icon2`).attr('src', res.charmUrl)
<img src="${item.gender == 1 ? './images/male.png' : './images/female.png'}" alt="" class='gender' style='display:${item.gender ? 'inline-block' : 'none'}'> $(`.largestBox .top3 .no${i + 1} .box .score`).text(unitProcessing(res.goldAmount, 10000, 1, 'W'));
</div>
<div class="erbanNo"><span>${item.erbanNo ? 'ID:' + item.erbanNo : ''}</span></div>
<div class="num">${goldAmount ? goldAmount : ''}</div>
</div>
`
}) })
$('.top_three_wrap').html(topThreeStr) // 處理非前三
var notTop3 = res.data.rankings.slice(3);
var str = '';
// 渲染非前3 notTop3.forEach((res, i) => {
let othersArr = list.slice(3) // experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`
let others = '' // charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`
othersArr.map((item, index) => { str += `
let tostr = item.goldAmount.toString()
let goldAmount
if (tostr.length >= 5) {
goldAmount = (item.goldAmount / 10000).toFixed(2) + 'w'
} else {
goldAmount = item.goldAmount
}
others += `
<li> <li>
<div class="index">${index + 4}</div> <div class="num">${i + 4}</div>
<div class="others_avatar" data-uid=${item.uid}><img src="${item.avatar}" alt=""></div> <img src="${res.avatar}" uid=${res.uid} alt="" class="tx">
<div class="info_wrap"> <div class="userInfo">
<div class="others_nick"> <p>${res.nick}</p>
${item.nick.length > 5 ? item.nick.slice(0, 5) + '...' : item.nick} <img src="${res.experUrl}" alt="" class="icon1">
<img src="${item.gender == 1 ? './images/male.png' : './images/female.png'}" alt=""> <img src="${res.charmUrl}" alt="" class="icon2">
</div> </div>
<div class="others_erbanNo">ID:<span>${item.erbanNo}</span></div> <div class="score">
<p>${unitProcessing(res.goldAmount, 10000, 1, 'W')}</p>
<span>${num == 1 ? '愛意值' : '魅力值'}</span>
</div> </div>
<div class="others_num">${goldAmount}</div>
</li> </li>
` `
}) })
$('ul').html(others) $('.largestBox ul').append(str);
} }
// 點擊前三跳轉房間
$(function () { $('.largestBox').on('click', '.top3 .no .box .ts', function () {
getInfoFromClient() var uid = $(this).attr('uid');
setTimeout(() => { return;
getShowInfo()
// getList( 'day' )
}, 50)
// tab切换
let currentTabIndex = 0
$('.tab_contain').on('click', 'p', function () {
let index = $(this).index()
if (currentTabIndex == index) return;
currentTabIndex = index
$(this).addClass('active').siblings('p').removeClass('active')
rankList = []
$('.rank_wrap').scrollTop(0)
page = 1
if (index) {
// 魅力榜单
$('.rank_type p').eq(2).hide()
$('.rank_type p').eq(currentCharmRankType).addClass('active').siblings('p').removeClass('active')
if (showMonthList) {
$('.wrap .tab_wrap .rank_type p:last-child').show();
if (currentCharmRankType == 0) {
if (sessionStorage.getItem('dayCharmList')) {
renderList(sessionStorage.getItem('dayCharmList'))
} else {
getCharmList('day')
}
} else if (currentCharmRankType == 1) {
if (sessionStorage.getItem('weekCharmList')) {
renderList(sessionStorage.getItem('weekCharmList'))
} else {
getCharmList('week')
}
} else if (currentCharmRankType == 2) {
if (sessionStorage.getItem('monthCharmList')) {
renderList(sessionStorage.getItem('monthCharmList'))
} else {
getCharmList('month')
}
}
} else {
if (currentCharmRankType == 0) {
if (sessionStorage.getItem('dayCharmList')) {
renderList(sessionStorage.getItem('dayCharmList'))
} else {
getCharmList('day')
}
} else if (currentCharmRankType == 1) {
if (sessionStorage.getItem('weekCharmList')) {
renderList(sessionStorage.getItem('weekCharmList'))
} else {
getCharmList('week')
}
} else if (currentCharmRankType == 2) {
if (sessionStorage.getItem('totalCharmList')) {
renderList(sessionStorage.getItem('totalCharmList'))
} else {
getCharmList('total')
}
}
}
} else {
// 贡献榜&爱意榜
if (showReceiveRankTotal) {
$('.rank_type p').eq(2).show()
}
if (showMonthList) {
$('.wrap .tab_wrap .rank_type p:last-child').show();
$('.rank_type p').eq(currentRankType).addClass('active').siblings('p').removeClass('active')
if (currentRankType == 0) {
if (sessionStorage.getItem('dayList')) {
renderList(sessionStorage.getItem('dayList'))
} else {
getList('day')
}
} else if (currentRankType == 1) {
if (sessionStorage.getItem('weekList')) {
renderList(sessionStorage.getItem('weekList'))
} else {
getList('week')
}
} else if (currentRankType == 2) {
if (sessionStorage.getItem('monthList')) {
renderList(sessionStorage.getItem('monthList'))
} else {
getList('month')
}
}
} else {
$('.rank_type p').eq(currentRankType).addClass('active').siblings('p').removeClass('active')
if (currentRankType == 0) {
if (sessionStorage.getItem('dayList')) {
renderList(sessionStorage.getItem('dayList'))
} else {
getList('day')
}
} else if (currentRankType == 1) {
if (sessionStorage.getItem('weekList')) {
renderList(sessionStorage.getItem('weekList'))
} else {
getList('week')
}
} else if (currentRankType == 2) {
if (sessionStorage.getItem('totalList')) {
renderList(sessionStorage.getItem('totalList'))
} else {
getList('total')
}
}
}
}
})
// 日榜周榜总榜切换
let currentRankType = 0
let currentCharmRankType = 0
$('.rank_type').on('click', 'p', function () {
$('.rank_wrap').scrollTop(0)
page = 1
if (currentTabIndex) {
// 魅力榜
let index = $(this).index()
if (currentCharmRankType == index) return;
currentCharmRankType = index
$(this).addClass('active').siblings('p').removeClass('active')
rankList = []
if (showMonthList) {
if (index == 0) {
if (sessionStorage.getItem('dayCharmList')) {
renderList(sessionStorage.getItem('dayCharmList'))
} else {
getCharmList('day')
}
} else if (index == 1) {
if (sessionStorage.getItem('weekCharmList')) {
renderList(sessionStorage.getItem('weekCharmList'))
} else {
getCharmList('week')
}
} else if (index == 2) {
if (sessionStorage.getItem('monthCharmList')) {
renderList(sessionStorage.getItem('monthCharmList'))
} else {
getCharmList('month')
}
}
} else {
if (index == 0) {
if (sessionStorage.getItem('dayCharmList')) {
renderList(sessionStorage.getItem('dayCharmList'))
} else {
getCharmList('day')
}
} else if (index == 1) {
if (sessionStorage.getItem('weekCharmList')) {
renderList(sessionStorage.getItem('weekCharmList'))
} else {
getCharmList('week')
}
} else if (index == 2) {
if (sessionStorage.getItem('totalCharmList')) {
renderList(sessionStorage.getItem('totalCharmList'))
} else {
getCharmList('total')
}
}
}
} else {
// 财富榜
let index = $(this).index()
if (currentRankType == index) return;
currentRankType = index
$(this).addClass('active').siblings('p').removeClass('active')
rankList = []
if (showMonthList) {
if (index == 0) {
if (sessionStorage.getItem('dayList')) {
renderList(sessionStorage.getItem('dayList'))
} else {
getList('day')
}
} else if (index == 1) {
if (sessionStorage.getItem('weekList')) {
renderList(sessionStorage.getItem('weekList'))
} else {
getList('week')
}
} else if (index == 2) {
if (sessionStorage.getItem('monthList')) {
renderList(sessionStorage.getItem('monthList'))
} else {
getList('month')
}
}
} else {
if (index == 0) {
if (sessionStorage.getItem('dayList')) {
renderList(sessionStorage.getItem('dayList'))
} else {
getList('day')
}
} else if (index == 1) {
if (sessionStorage.getItem('weekList')) {
renderList(sessionStorage.getItem('weekList'))
} else {
getList('week')
}
} else if (index == 2) {
if (sessionStorage.getItem('totalList')) {
renderList(sessionStorage.getItem('totalList'))
} else {
getList('total')
}
}
}
}
})
// 监听滚动
$('.rank_wrap').scroll(function () {
let scrollTop = $(this).scrollTop()
let scrollHeight = $('.rank_wrap')[0].scrollHeight
let ulHeight = $(this).innerHeight()
if (scrollTop + ulHeight + 100 >= scrollHeight) {
if (isLock) {
// 请求下一页
// if (canNext) {
if (showMonthList) {
if (currentTabIndex) {
if (currentCharmRankType == 0) {
if (!dayCharmListNext) return
getCharmList('day', ++page)
} else if (currentCharmRankType == 1) {
if (!weekCharmListNext) return
getCharmList('week', ++page)
} else if (currentCharmRankType == 2) {
if (!monthCharmListNext) return
getCharmList('month', ++page)
}
} else {
if (currentRankType == 0) {
if (!dayListNext) return
getList('day', ++page)
} else if (currentRankType == 1) {
if (!weekListNext) return
getList('week', ++page)
} else if (currentRankType == 2) {
if (!monthListNext) return
getList('month', ++page)
}
}
} else {
if (currentTabIndex) {
if (currentCharmRankType == 0) {
if (!dayCharmListNext) return
getCharmList('day', ++page)
} else if (currentCharmRankType == 1) {
if (!weekCharmListNext) return
getCharmList('week', ++page)
} else if (currentCharmRankType == 2) {
if (!totalCharmListNext) return
getCharmList('total', ++page)
}
} else {
if (currentRankType == 0) {
if (!dayListNext) return
getList('day', ++page)
} else if (currentRankType == 1) {
if (!weekListNext) return
getList('week', ++page)
} else if (currentRankType == 2) {
if (!totalListNext) return
getList('total', ++page)
}
}
}
isLock = false
// }
}
}
})
//跳转个人主页
function openPerson(document, dom) {
$(document).on('click', dom, function () {
let erbanUid = $(this).data('uid')
if (!browser.app) return
if (browser.ios) { if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(erbanUid); window.webkit.messageHandlers.openPersonPage.postMessage(uid);
} else if (browser.android) { } else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') { if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(erbanUid); window.androidJsObj.openPersonPage(uid);
} }
} }
}) })
// 點擊非前三跳轉房間
$('.largestBox').on('click', 'ul li .tx', function () {
var uid = $(this).attr('uid');
return;
if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(uid);
}
} }
openPerson('.top_three_wrap', '.avatar')
openPerson('ul', '.others_avatar')
}) })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 KiB

After

Width:  |  Height:  |  Size: 189 KiB

View File

@@ -67,6 +67,7 @@
<p v-else-if="tab === 11 && item1.objType === 106">间接邀请储值返点</p> <p v-else-if="tab === 11 && item1.objType === 106">间接邀请储值返点</p>
<p v-else-if="tab === 11 && item1.objType === 107">超级幸运礼物价值分成</p> <p v-else-if="tab === 11 && item1.objType === 107">超级幸运礼物价值分成</p>
<p v-else-if="tab === 11 && item1.objType === 108">超级幸运礼物钻石返点</p> <p v-else-if="tab === 11 && item1.objType === 108">超级幸运礼物钻石返点</p>
<p v-else-if="tab === 11 && item1.objType === 109">贵族等级奖励</p>
<!-- <p v-else-if="tab === 11 || !item1.targetNick">{{ item1.srcNick }}</p> --> <!-- <p v-else-if="tab === 11 || !item1.targetNick">{{ item1.srcNick }}</p> -->
<p v-if="tab === 12 && item1.objType === 40">全服红包-发生在{{ item1.roomTitle }}</p> <p v-if="tab === 12 && item1.objType === 40">全服红包-发生在{{ item1.roomTitle }}</p>
<p v-else-if="tab === 12 && item1.objType === 39">房间红包-发生在{{ item1.roomTitle }}</p> <p v-else-if="tab === 12 && item1.objType === 39">房间红包-发生在{{ item1.roomTitle }}</p>