优化名字
This commit is contained in:
@@ -173,6 +173,7 @@ body {
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: -0.56rem;
|
bottom: -0.56rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.largestBox .top3 .no1 .box p span {
|
.largestBox .top3 .no1 .box p span {
|
||||||
@@ -272,6 +273,7 @@ body {
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: -0.56rem;
|
bottom: -0.56rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.largestBox .top3 .no2 .box p span {
|
.largestBox .top3 .no2 .box p span {
|
||||||
@@ -371,6 +373,7 @@ body {
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: -0.56rem;
|
bottom: -0.56rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.largestBox .top3 .no3 .box p span {
|
.largestBox .top3 .no3 .box p span {
|
||||||
|
@@ -176,6 +176,7 @@ body {
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: px2rem(-42);
|
bottom: px2rem(-42);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -276,6 +277,7 @@ body {
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: px2rem(-42);
|
bottom: px2rem(-42);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -376,6 +378,7 @@ body {
|
|||||||
left: 0;
|
left: 0;
|
||||||
bottom: px2rem(-42);
|
bottom: px2rem(-42);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
@@ -4,21 +4,21 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<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">
|
<link rel="stylesheet" href="./css/index.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- 最外层容器 -->
|
<!-- 最外層容器 -->
|
||||||
<div class="largestBox">
|
<div class="largestBox">
|
||||||
<!-- 标题 -->
|
<!-- 標題 -->
|
||||||
<img src="./images/title.png" alt="" class="title">
|
<img src="./images/title.png" alt="" class="title">
|
||||||
<!-- 财富榜&魅力榜 -->
|
<!-- 財富榜&魅力榜 -->
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
<div class="tabColor1">
|
<div class="tabColor1">
|
||||||
爱意榜
|
愛意榜
|
||||||
<span></span>
|
<span></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
@@ -39,14 +39,14 @@
|
|||||||
<img src="./images/no1.png" alt="" class="ts">
|
<img src="./images/no1.png" alt="" class="ts">
|
||||||
<img src="./images/logo.png" alt="" class="tx">
|
<img src="./images/logo.png" alt="" class="tx">
|
||||||
<p>
|
<p>
|
||||||
<span class="sp1">我是很长的...</span>
|
<span class="sp1"></span>
|
||||||
<span class="sp boy"><img src="./images/boy.png" alt=""></span>
|
<span class="sp boy"><img src="./images/boy.png" alt=""></span>
|
||||||
</p>
|
</p>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<img src="./images/icon1.png" alt="" class="icon1">
|
<img src="" alt="" class="icon1">
|
||||||
<img src="./images/icon2.png" alt="" class="icon2">
|
<img src="" alt="" class="icon2">
|
||||||
</div>
|
</div>
|
||||||
<div class="score">10000</div>
|
<div class="score">0</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="no no2">
|
<div class="no no2">
|
||||||
@@ -86,12 +86,12 @@
|
|||||||
<div class="num">4</div>
|
<div class="num">4</div>
|
||||||
<img src="./images/logo.png" alt="" class="tx">
|
<img src="./images/logo.png" alt="" class="tx">
|
||||||
<div class="userInfo">
|
<div class="userInfo">
|
||||||
<p>我是名字名字名字名字名字</p>
|
<p></p>
|
||||||
<img src="./images/icon1.png" alt="" class="icon1">
|
<img src="./images/icon1.png" alt="" class="icon1">
|
||||||
<img src="./images/icon2.png" alt="" class="icon2">
|
<img src="./images/icon2.png" alt="" class="icon2">
|
||||||
</div>
|
</div>
|
||||||
<div class="score">
|
<div class="score">
|
||||||
<p>1000</p>
|
<p>0</p>
|
||||||
<span>魅力值</span>
|
<span>魅力值</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@@ -5,9 +5,9 @@ var urlData = getQueryString();
|
|||||||
if (env == 'test') {
|
if (env == 'test') {
|
||||||
new VConsole();
|
new VConsole();
|
||||||
}
|
}
|
||||||
// 封装layer消息提醒框
|
// 封裝layer消息提醒框
|
||||||
let layerIndex
|
let layerIndex
|
||||||
const showLoading = (content = '加载中...') => {
|
const showLoading = (content = '加載中...') => {
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 2,
|
type: 2,
|
||||||
shadeClose: false,
|
shadeClose: false,
|
||||||
@@ -30,12 +30,12 @@ const toastMsg = (content = '操作完成', time = 2) => {
|
|||||||
var listType = 1;
|
var listType = 1;
|
||||||
var experImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_exper_';
|
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 charmImgUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/new_charm_';
|
||||||
var typeWealth = 'day';//财富榜类型day 日 week 周 month 月 total 总
|
var typeWealth = 'day';//財富榜類型day 日 week 周 month 月 total 總
|
||||||
// 初始化函数
|
// 初始化函數
|
||||||
$(function () {
|
$(function () {
|
||||||
getInfoFromClient()
|
getInfoFromClient()
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
// 页面全屏
|
// 頁面全屏
|
||||||
if (browser.app) {
|
if (browser.app) {
|
||||||
if (browser.android) {
|
if (browser.android) {
|
||||||
window.androidJsObj.initShowNav(false)
|
window.androidJsObj.initShowNav(false)
|
||||||
@@ -43,7 +43,7 @@ $(function () {
|
|||||||
window.webkit.messageHandlers.initShowNav.postMessage(0)
|
window.webkit.messageHandlers.initShowNav.postMessage(0)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 顶部返回事件
|
// 頂部返回事件
|
||||||
$('.back').click(() => {
|
$('.back').click(() => {
|
||||||
if (browser.android) {
|
if (browser.android) {
|
||||||
window.androidJsObj.closeWebView()
|
window.androidJsObj.closeWebView()
|
||||||
@@ -54,7 +54,7 @@ $(function () {
|
|||||||
getRankingsWealth();
|
getRankingsWealth();
|
||||||
}, 100)
|
}, 100)
|
||||||
})
|
})
|
||||||
// 榜单切换
|
// 榜單切換
|
||||||
$('.largestBox .tab div').click(function () {
|
$('.largestBox .tab div').click(function () {
|
||||||
var i = $(this).index() + 1;
|
var i = $(this).index() + 1;
|
||||||
listType = i;
|
listType = i;
|
||||||
@@ -69,12 +69,12 @@ $('.largestBox .tab div').click(function () {
|
|||||||
getReciveRankingsWealth();
|
getReciveRankingsWealth();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 日榜切换
|
// 日榜切換
|
||||||
$('.largestBox .dayTab div').click(function () {
|
$('.largestBox .dayTab div').click(function () {
|
||||||
var i = $(this).index() + 1;
|
var i = $(this).index() + 1;
|
||||||
$(this).addClass(`dayTabColor${listType}`).siblings().removeClass('dayTabColor1').removeClass('dayTabColor2');
|
$(this).addClass(`dayTabColor${listType}`).siblings().removeClass('dayTabColor1').removeClass('dayTabColor2');
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
typeWealth = 'day';//财富榜类型day 日 week 周 month 月 total 总
|
typeWealth = 'day';//財富榜類型day 日 week 周 month 月 total 總
|
||||||
} else if (i == 2) {
|
} else if (i == 2) {
|
||||||
typeWealth = 'week';
|
typeWealth = 'week';
|
||||||
} else if (i == 3) {
|
} else if (i == 3) {
|
||||||
@@ -86,7 +86,7 @@ $('.largestBox .dayTab div').click(function () {
|
|||||||
getReciveRankingsWealth();
|
getReciveRankingsWealth();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 爱意榜接口
|
// 愛意榜接口
|
||||||
function getRankingsWealth () {
|
function getRankingsWealth () {
|
||||||
showLoading()
|
showLoading()
|
||||||
networkRequest({
|
networkRequest({
|
||||||
@@ -108,7 +108,7 @@ function getRankingsWealth () {
|
|||||||
},
|
},
|
||||||
error (err) {
|
error (err) {
|
||||||
hideLoading(layerIndex)
|
hideLoading(layerIndex)
|
||||||
toastMsg('网络错误,请退出重进')
|
toastMsg('網絡錯誤,請退出重進')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -134,19 +134,19 @@ function getReciveRankingsWealth () {
|
|||||||
},
|
},
|
||||||
error (err) {
|
error (err) {
|
||||||
hideLoading(layerIndex)
|
hideLoading(layerIndex)
|
||||||
toastMsg('网络错误,请退出重进')
|
toastMsg('網絡錯誤,請退出重進')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 渲染样式
|
// 渲染樣式
|
||||||
function listDomFun (res, num) {
|
function listDomFun (res, num) {
|
||||||
$('.largestBox ul li').remove();
|
$('.largestBox ul li').remove();
|
||||||
// 处理前三
|
// 處理前三
|
||||||
var top3 = res.data.rankings.slice(0, 3);
|
var top3 = res.data.rankings.slice(0, 3);
|
||||||
if (top3.length < 3) {
|
if (top3.length < 3) {
|
||||||
let arr = new Array(3 - top3.length).fill({
|
let arr = new Array(3 - top3.length).fill({
|
||||||
avatar: './images/logo.png',
|
avatar: './images/logo.png',
|
||||||
nick: '虚位以待',
|
nick: '虛位以待',
|
||||||
goldAmount: '',
|
goldAmount: '',
|
||||||
})
|
})
|
||||||
top3.push(...arr);
|
top3.push(...arr);
|
||||||
@@ -165,35 +165,40 @@ function listDomFun (res, num) {
|
|||||||
$(`.largestBox .top3 .no${i + 1} .box p .sp`).removeClass('boy').removeClass('woman')
|
$(`.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`).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 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 .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 .icon .icon2`).attr('src', charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`)
|
||||||
|
$(`.largestBox .top3 .no${i + 1} .box .icon .icon1`).attr('src', res.experUrl)
|
||||||
|
$(`.largestBox .top3 .no${i + 1} .box .icon .icon2`).attr('src', res.charmUrl)
|
||||||
$(`.largestBox .top3 .no${i + 1} .box .score`).text(unitProcessing(res.goldAmount, 10000, 1, 'W'));
|
$(`.largestBox .top3 .no${i + 1} .box .score`).text(unitProcessing(res.goldAmount, 10000, 1, 'W'));
|
||||||
})
|
})
|
||||||
// 处理非前三
|
// 處理非前三
|
||||||
var notTop3 = res.data.rankings.slice(3);
|
var notTop3 = res.data.rankings.slice(3);
|
||||||
var str = '';
|
var str = '';
|
||||||
notTop3.forEach((res, i) => {
|
notTop3.forEach((res, i) => {
|
||||||
|
// experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`
|
||||||
|
// charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`
|
||||||
str += `
|
str += `
|
||||||
<li>
|
<li>
|
||||||
<div class="num">${i + 4}</div>
|
<div class="num">${i + 4}</div>
|
||||||
<img src="${res.avatar}" uid=${res.uid} alt="" class="tx">
|
<img src="${res.avatar}" uid=${res.uid} alt="" class="tx">
|
||||||
<div class="userInfo">
|
<div class="userInfo">
|
||||||
<p>${res.nick}</p>
|
<p>${res.nick}</p>
|
||||||
<img src="${experImgUrl + `${res.experSeq <= 9 ? '0' + res.experSeq : res.experSeq}.png`}" alt="" class="icon1">
|
<img src="${res.experUrl}" alt="" class="icon1">
|
||||||
<img src="${charmImgUrl + `${res.charmSeq <= 9 ? '0' + res.charmSeq : res.charmSeq}.png`}" alt="" class="icon2">
|
<img src="${res.charmUrl}" alt="" class="icon2">
|
||||||
</div>
|
</div>
|
||||||
<div class="score">
|
<div class="score">
|
||||||
<p>${unitProcessing(res.goldAmount, 10000, 1, 'W')}</p>
|
<p>${unitProcessing(res.goldAmount, 10000, 1, 'W')}</p>
|
||||||
<span>${num == 1 ? '爱意值' : '魅力值'}</span>
|
<span>${num == 1 ? '愛意值' : '魅力值'}</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
$('.largestBox ul').append(str);
|
$('.largestBox ul').append(str);
|
||||||
}
|
}
|
||||||
// 点击前三跳转房间
|
// 點擊前三跳轉房間
|
||||||
$('.largestBox').on('click', '.top3 .no .box .ts', function () {
|
$('.largestBox').on('click', '.top3 .no .box .ts', function () {
|
||||||
var uid = $(this).attr('uid');
|
var uid = $(this).attr('uid');
|
||||||
|
return;
|
||||||
if (browser.ios) {
|
if (browser.ios) {
|
||||||
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
|
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
|
||||||
} else if (browser.android) {
|
} else if (browser.android) {
|
||||||
@@ -202,9 +207,10 @@ $('.largestBox').on('click', '.top3 .no .box .ts', function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 点击非前三跳转房间
|
// 點擊非前三跳轉房間
|
||||||
$('.largestBox').on('click', 'ul li .tx', function () {
|
$('.largestBox').on('click', 'ul li .tx', function () {
|
||||||
var uid = $(this).attr('uid');
|
var uid = $(this).attr('uid');
|
||||||
|
return;
|
||||||
if (browser.ios) {
|
if (browser.ios) {
|
||||||
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
|
window.webkit.messageHandlers.openPersonPage.postMessage(uid);
|
||||||
} else if (browser.android) {
|
} else if (browser.android) {
|
||||||
|
Reference in New Issue
Block a user