From e856a0a6c5abee4a6a0a5106633e537942fc8a53 Mon Sep 17 00:00:00 2001
From: Dragon <13925835632@139.com>
Date: Mon, 13 Nov 2023 15:20:01 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
view/yinmeng/modules/ranks/css/index.css | 1 +
view/yinmeng/modules/ranks/css/index.scss | 1 +
view/yinmeng/modules/ranks/index.html | 40 +++++-----
view/yinmeng/modules/ranks/js/index.js | 91 +++++++++++++++++++----
4 files changed, 100 insertions(+), 33 deletions(-)
diff --git a/view/yinmeng/modules/ranks/css/index.css b/view/yinmeng/modules/ranks/css/index.css
index 14ab13c..fdb9aa6 100644
--- a/view/yinmeng/modules/ranks/css/index.css
+++ b/view/yinmeng/modules/ranks/css/index.css
@@ -75,6 +75,7 @@ body {
color: rgba(43, 45, 51, 0.5);
font-size: 0.42667rem;
font-weight: 600;
+ white-space: nowrap;
}
.header .tab div span {
diff --git a/view/yinmeng/modules/ranks/css/index.scss b/view/yinmeng/modules/ranks/css/index.scss
index 41cdeaf..c371b3f 100644
--- a/view/yinmeng/modules/ranks/css/index.scss
+++ b/view/yinmeng/modules/ranks/css/index.scss
@@ -77,6 +77,7 @@ body {
color: rgba(43, 45, 51, 0.5);
font-size: px2rem(32);
font-weight: 600;
+ white-space: nowrap;
span {
width: px2rem(26);
diff --git a/view/yinmeng/modules/ranks/index.html b/view/yinmeng/modules/ranks/index.html
index 323b000..14821e3 100644
--- a/view/yinmeng/modules/ranks/index.html
+++ b/view/yinmeng/modules/ranks/index.html
@@ -46,28 +46,13 @@
-
-
+
+
diff --git a/view/yinmeng/modules/ranks/js/index.js b/view/yinmeng/modules/ranks/js/index.js
index efb183f..a3e7695 100644
--- a/view/yinmeng/modules/ranks/js/index.js
+++ b/view/yinmeng/modules/ranks/js/index.js
@@ -29,6 +29,8 @@ const toastMsg = (content = '操作完成', time = 2) => {
var listType = 1;//榜单类型
var datetype = 1;//时间类型 1 日 2 周 3 总 4 半小时 5 月 6 小时
var type = 2;//榜单类型 1 收礼榜 2 送礼榜 3 房间榜
+var charmImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_charm_';
+var experImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_exper_';
// 初始化函数
$(function () {
getInfoFromClient()
@@ -72,6 +74,9 @@ function getRank (type, datetype) {
nick: '虚位以待',
totalNum: "",
gender: '',
+ uid: '',
+ inMic: '',
+ inRoomUid: '',
})
top3.push(...arr)
}
@@ -87,13 +92,19 @@ function getRank (type, datetype) {
$(`.header .topBox .no${i + 1} i`).show();
$(`.header .topBox .no${i + 1} .zl`).show();
}
+ if (type == 2) {
+ $(`.header .topBox .no${i + 1} .zl`).hide();
+ } else {
+ $(`.header .topBox .no${i + 1} .zl`).show();
+ }
$(`.header .topBox .no${i + 1} .ts`).attr('uid', res.uid);
$(`.header .topBox .no${i + 1} .ts`).attr('inRoomUid', res.inRoomUid);
$(`.header .topBox .no${i + 1} .ts`).attr('inMic', res.inMic);
$(`.header .topBox .no${i + 1} .tx`).attr('src', res.avatar);
+ $(`.header .topBox .no${i + 1} .zl`).attr('src', res.assist ? res.assist.avatar : './images/logo.png');
$(`.header .topBox .no${i + 1} p`).html(`${res.nick.length > 6 ? `${res.nick.slice(0, 6)}...` : res.nick}`);
- $(`.header .topBox .no${i + 1} .icon .icon1`).attr('src', res.experUrl);
- $(`.header .topBox .no${i + 1} .icon .icon2`).attr('src', res.charmUrl);
+ $(`.header .topBox .no${i + 1} .icon .icon1`).attr('src', experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`);
+ $(`.header .topBox .no${i + 1} .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`);
if (i >= 1) {
$(`.header .topBox .no${i + 1} i`).text(`距上一名${unitProcessing((top3[i - 1].totalNum - res.totalNum), 10000, 1, 'W')}`);
}
@@ -116,10 +127,15 @@ function getRank (type, datetype) {
最佳助力
+