修改bug替换贵族icon

This commit is contained in:
Dragon
2023-07-19 16:30:18 +08:00
parent b9c7691b98
commit 673005f471
14 changed files with 70 additions and 39 deletions

View File

@@ -6,7 +6,7 @@ body {
.header {
width: 10rem;
height: 16.6933333333rem;
height: 16.16rem;
background: url(../images/header.png) no-repeat;
background-size: 100% 100%;
margin: 0 auto 0.24rem;
@@ -62,8 +62,9 @@ body {
}
.header .notice ul .noble_icon {
display: inline-block;
width: 1rem;
height: 0.8rem;
width: auto;
width: 0.8533333333rem;
height: 0.8533333333rem;
margin: 0.1066666667rem 0.1066666667rem 0;
}
.header .no1 {
@@ -95,11 +96,11 @@ body {
border-radius: 50%;
}
.header .no1 .icon {
width: 0.8666666667rem;
height: 0.7733333333rem;
width: 0.64rem;
height: 0.64rem;
position: absolute;
left: 0rem;
top: 2.7733333333rem;
left: 0.0666666667rem;
top: 2.6666666667rem;
}
.header .no1 span {
width: 2.2rem;
@@ -155,11 +156,11 @@ body {
border-radius: 50%;
}
.header .no2 .icon {
width: 0.8666666667rem;
width: 0.64rem;
height: 0.64rem;
position: absolute;
left: 0rem;
top: 2.8rem;
left: 0.04rem;
top: 2.8666666667rem;
}
.header .no2 span {
width: 2.2rem;
@@ -215,11 +216,11 @@ body {
border-radius: 50%;
}
.header .no3 .icon {
width: 0.8666666667rem;
width: 0.64rem;
height: 0.64rem;
position: absolute;
left: 0rem;
top: 2.8rem;
left: 0.04rem;
top: 2.8666666667rem;
}
.header .no3 span {
width: 2.2rem;
@@ -274,7 +275,9 @@ body {
float: left;
color: #A6A8AD;
font-size: 0.4266666667rem;
margin-right: 0.4266666667rem;
margin-right: 0.2933333333rem;
width: 0.6rem;
text-align: center;
}
.list li .tx {
display: block;
@@ -282,7 +285,7 @@ body {
width: 1.28rem;
height: 1.28rem;
margin-top: 0.32rem;
margin-right: 0.2133333333rem;
margin-right: 0.08rem;
border-radius: 50%;
}
.list li .icon {

View File

@@ -10,7 +10,7 @@ body {
.header {
width: px2rem(750, );
height: px2rem(1252, );
height: px2rem(1212, );
background: url(../images/header.png) no-repeat;
background-size: 100% 100%;
margin: 0 auto px2rem(18, );
@@ -72,8 +72,9 @@ body {
.noble_icon {
display: inline-block;
width: px2rem(75, );
height: px2rem(60, );
width: auto;
width: px2rem(64, );
height: px2rem(64, );
margin: px2rem(8, ) px2rem(8, ) 0;
}
}
@@ -110,11 +111,11 @@ body {
}
.icon {
width: px2rem(65, );
height: px2rem(58, );
width: px2rem(48, );
height: px2rem(48, );
position: absolute;
left: px2rem(0, );
top: px2rem(208, );
left: px2rem(5, );
top: px2rem(200, );
}
span {
@@ -177,11 +178,11 @@ body {
}
.icon {
width: px2rem(65, );
width: px2rem(48, );
height: px2rem(48, );
position: absolute;
left: px2rem(0, );
top: px2rem(210, );
left: px2rem(3, );
top: px2rem(215, );
}
span {
@@ -244,11 +245,11 @@ body {
}
.icon {
width: px2rem(65, );
width: px2rem(48, );
height: px2rem(48, );
position: absolute;
left: px2rem(0, );
top: px2rem(210, );
left: px2rem(3, );
top: px2rem(215, );
}
span {
@@ -309,7 +310,9 @@ body {
float: left;
color: #A6A8AD;
font-size: px2rem(32, );
margin-right: px2rem(32, );
margin-right: px2rem(22, );
width: 0.6rem;
text-align: center;
}
.tx {
@@ -318,7 +321,7 @@ body {
width: px2rem(96, );
height: px2rem(96, );
margin-top: px2rem(24, );
margin-right: px2rem(16, );
margin-right: px2rem(6, );
border-radius: 50%;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 189 KiB

View File

@@ -73,13 +73,14 @@ function getListRank () {
}
top3.forEach((res, i) => {
$(`.header .no${i + 1} .tx`).attr('src', res.avatar);
$(`.header .no${i + 1} .txBg`).attr('uid', res.uid);
if (res.nick == '虚位以待') {
$(`.header .no${i + 1} .icon`).hide();
$(`.header .no${i + 1} p`).hide();
}
$(`.header .no${i + 1} .icon`).attr('src', res.vipIcon);
$(`.header .no${i + 1} .icon`).attr('src', `./images/${res.vipLevel}.png`);
$(`.header .no${i + 1} span`).text(res.nick.length > 5 ? res.nick.slice(0, 5) + '...' : res.nick);
$(`.header .no${i + 1} b`).text(res.score > 10000 ? (Math.floor(res.score / 1000) / 10).toFixed(1) + 'w' : res.score);
$(`.header .no${i + 1} b`).text(res.score);
});
// 非前三
var str = '';
@@ -87,22 +88,33 @@ function getListRank () {
str += `
<li>
<div class="num">${i + 4}</div>
<img src="${res.avatar}" alt="" class="tx">
<img src="${res.vipIcon}" alt="" class="icon">
<img src="${res.avatar}" alt="" class="tx" uid=${res.uid}>
<img src="./images/${res.vipLevel}.png" alt="" class="icon">
<div class="name">${res.nick.length > 5 ? res.nick.slice(0, 5) + '...' : res.nick}</div>
<div class="right">
<p>${res.score > 10000 ? (Math.floor(res.score / 1000) / 10).toFixed(1) + 'w' : res.score}</p>
<p>${res.score}</p>
<span>权力值</span>
</div>
</li>
`
});
$('.list').append(str);
// 点击前三跳转资料页
$('.list li .tx').click(function () {
var uid = $(this).attr(uid);
if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
setTimeout(function () { lock = true; }, 200)
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(uid);
}
}
})
var res = res.data.myRank;
console.log(res);
//自己
$('.myInfo .div .tx').attr('src', res.avatar);
$('.myInfo .div .name').text(res.nick.length > 5 ? res.nick.slice(0, 5) + '...' : res.nick);
$('.myInfo .div .name').text(res.nick.length > 7 ? res.nick.slice(0, 7) + '...' : res.nick);
if (res.rankNo) {
@@ -112,7 +124,7 @@ function getListRank () {
}
if (res.vipLevel) {
$('.myInfo .div .tx').attr('src', res.icon);
$('.myInfo .div .right p').text(res.score > 10000 ? (Math.floor(res.score / 1000) / 10).toFixed(1) + 'w' : res.score);
$('.myInfo .div .right p').text(res.score);
} else {
$('.myInfo .div .icon').hide();
$('.myInfo .div .right').hide();
@@ -140,7 +152,7 @@ function getListUpgrade () {
var str = '';
res.data.forEach((res, i) => {
str += `
<li>恭喜贵族<img src="${res.avatar}" alt="" class="sculpture"><b>${res.nick.length > 5 ? res.nick.slice(0, 5) + '...' : res.nick}</b> 升级为<img src="${res.vipIcon}" alt="" class="noble_icon">${res.vipName}</li>
<li>恭喜贵族<img src="${res.avatar}" alt="" class="sculpture"><b>${res.nick.length > 5 ? res.nick.slice(0, 5) + '...' : res.nick}</b> 升级为<img src="./images/${res.vipLevel}.png" alt="" class="noble_icon">${res.vipName}</li>
`
});
$('.header .notice ul').append(str);
@@ -177,3 +189,15 @@ $('.myInfo .div .acitve').click(function () {
window.webkit.messageHandlers.closeWebView.postMessage(null)
}
})
// 点击前三跳转资料页
$('.header .no1 .txBg,.header .no2 .txBg,.header .no3 .txBg').click(function () {
var uid = $(this).attr(uid);
if (browser.ios) {
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
setTimeout(function () { lock = true; }, 200)
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
window.androidJsObj.openPersonPage(uid);
}
}
})

View File

@@ -18,6 +18,7 @@
<body>
<img src="./images/patrician.png" alt="" class="img">
<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>