换皮:新增peko
This commit is contained in:
@@ -38,13 +38,16 @@ const getShowInfo = () => {
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
showReceiveRankTotal = res.data.showReceiveRankTotal
|
||||
showMonthList = res.data.showMonthList
|
||||
if (res.data.showMonthList) {
|
||||
showMonthList = 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");
|
||||
getList('month')
|
||||
$('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 {
|
||||
$('.wrap').show()
|
||||
@@ -74,6 +77,8 @@ let isLock = true
|
||||
|
||||
// 获取财富榜数据
|
||||
const getList = (type, page = 1) => {
|
||||
console.log('贡献榜');
|
||||
console.log(type);
|
||||
networkRequest({
|
||||
type: 'GET',
|
||||
url: urlPrefix + '/room/rankings',
|
||||
@@ -106,6 +111,8 @@ const getList = (type, page = 1) => {
|
||||
|
||||
// 获取魅力榜数据
|
||||
const getCharmList = (type, page = 1) => {
|
||||
console.log('魅力榜');
|
||||
console.log(type);
|
||||
networkRequest({
|
||||
type: 'GET',
|
||||
url: urlPrefix + '/room/recive/rankings',
|
||||
@@ -227,27 +234,51 @@ $(function () {
|
||||
$('.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 (currentCharmRankType == 0) {
|
||||
getCharmList('day')
|
||||
} else if (currentCharmRankType == 1) {
|
||||
getCharmList('week')
|
||||
} else if (currentCharmRankType == 2) {
|
||||
getCharmList('total')
|
||||
if (showMonthList) {
|
||||
$('.wrap .tab_wrap .rank_type p:last-child').show();
|
||||
if (currentCharmRankType == 0) {
|
||||
getCharmList('day')
|
||||
} else if (currentCharmRankType == 1) {
|
||||
getCharmList('week')
|
||||
} else if (currentCharmRankType == 2) {
|
||||
getCharmList('month')
|
||||
}
|
||||
} else {
|
||||
if (currentCharmRankType == 0) {
|
||||
getCharmList('day')
|
||||
} else if (currentCharmRankType == 1) {
|
||||
getCharmList('week')
|
||||
} else if (currentCharmRankType == 2) {
|
||||
getCharmList('total')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 贡献榜&爱意榜
|
||||
if (showReceiveRankTotal) {
|
||||
$('.rank_type p').eq(2).show()
|
||||
}
|
||||
|
||||
$('.rank_type p').eq(currentRankType).addClass('active').siblings('p').removeClass('active')
|
||||
if (currentRankType == 0) {
|
||||
getList('day')
|
||||
} else if (currentRankType == 1) {
|
||||
getList('week')
|
||||
} else if (currentRankType == 2) {
|
||||
getList('total')
|
||||
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) {
|
||||
getList('day')
|
||||
} else if (currentRankType == 1) {
|
||||
getList('week')
|
||||
} else if (currentRankType == 2) {
|
||||
getList('month')
|
||||
}
|
||||
} else {
|
||||
$('.rank_type p').eq(currentRankType).addClass('active').siblings('p').removeClass('active')
|
||||
if (currentRankType == 0) {
|
||||
getList('day')
|
||||
} else if (currentRankType == 1) {
|
||||
getList('week')
|
||||
} else if (currentRankType == 2) {
|
||||
getList('total')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -265,12 +296,23 @@ $(function () {
|
||||
currentCharmRankType = index
|
||||
$(this).addClass('active').siblings('p').removeClass('active')
|
||||
rankList = []
|
||||
if (index == 0) {
|
||||
getCharmList('day')
|
||||
} else if (index == 1) {
|
||||
getCharmList('week')
|
||||
} else if (index == 2) {
|
||||
getCharmList('total')
|
||||
|
||||
if (showMonthList) {
|
||||
if (index == 0) {
|
||||
getCharmList('day')
|
||||
} else if (index == 1) {
|
||||
getCharmList('week')
|
||||
} else if (index == 2) {
|
||||
getCharmList('month')
|
||||
}
|
||||
} else {
|
||||
if (index == 0) {
|
||||
getCharmList('day')
|
||||
} else if (index == 1) {
|
||||
getCharmList('week')
|
||||
} else if (index == 2) {
|
||||
getCharmList('total')
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 财富榜
|
||||
@@ -279,12 +321,22 @@ $(function () {
|
||||
currentRankType = index
|
||||
$(this).addClass('active').siblings('p').removeClass('active')
|
||||
rankList = []
|
||||
if (index == 0) {
|
||||
getList('day')
|
||||
} else if (index == 1) {
|
||||
getList('week')
|
||||
} else if (index == 2) {
|
||||
getList('total')
|
||||
if (showMonthList) {
|
||||
if (index == 0) {
|
||||
getList('day')
|
||||
} else if (index == 1) {
|
||||
getList('week')
|
||||
} else if (index == 2) {
|
||||
getList('month')
|
||||
}
|
||||
} else {
|
||||
if (index == 0) {
|
||||
getList('day')
|
||||
} else if (index == 1) {
|
||||
getList('week')
|
||||
} else if (index == 2) {
|
||||
getList('total')
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -298,9 +350,25 @@ $(function () {
|
||||
if (isLock) {
|
||||
// 请求下一页
|
||||
if (canNext) {
|
||||
if(showMonthList) {
|
||||
getList('month', ++page)
|
||||
}else {
|
||||
if (showMonthList) {
|
||||
if (currentTabIndex) {
|
||||
if (currentCharmRankType == 0) {
|
||||
getCharmList('day', ++page)
|
||||
} else if (currentCharmRankType == 1) {
|
||||
getCharmList('week', ++page)
|
||||
} else if (currentCharmRankType == 2) {
|
||||
getCharmList('month', ++page)
|
||||
}
|
||||
} else {
|
||||
if (currentRankType == 0) {
|
||||
getList('day', ++page)
|
||||
} else if (currentRankType == 1) {
|
||||
getList('week', ++page)
|
||||
} else if (currentRankType == 2) {
|
||||
getList('month', ++page)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentTabIndex) {
|
||||
if (currentCharmRankType == 0) {
|
||||
getCharmList('day', ++page)
|
||||
|
Reference in New Issue
Block a user