房间日流水 - 修改领取记录打开请求接口
This commit is contained in:
@@ -838,4 +838,8 @@ body {
|
||||
.arabic .ranking_list .kuang_center .progress_box .next_level .right {
|
||||
margin-left: 0;
|
||||
margin-right: auto;
|
||||
}
|
||||
.arabic .my_box .my_info .Receive_Record {
|
||||
margin-left: 0;
|
||||
margin-right: auto;
|
||||
}
|
@@ -966,4 +966,8 @@ body {
|
||||
margin-left: 0;
|
||||
margin-right: auto;
|
||||
}
|
||||
.my_box .my_info .Receive_Record{
|
||||
margin-left: 0;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
@@ -55,7 +55,6 @@ $(function () {
|
||||
localLang = window.lang;
|
||||
translateFun();
|
||||
getRoomData(true);
|
||||
getRecordList();
|
||||
}, 100)
|
||||
})
|
||||
function translateFun() {
|
||||
@@ -98,10 +97,10 @@ function getRoomData(isToday) {
|
||||
success(res) {
|
||||
if (res.code === 200) {
|
||||
// 规则的展开与收起
|
||||
if(res.data.isFirstTimeVisit){
|
||||
if (res.data.isFirstTimeVisit) {
|
||||
$('.shouqi_box').show();
|
||||
$('.zhankai_box').hide();
|
||||
}else{
|
||||
} else {
|
||||
$('.shouqi_box').hide();
|
||||
$('.zhankai_box').show();
|
||||
}
|
||||
@@ -118,7 +117,7 @@ function getRoomData(isToday) {
|
||||
// 计算进度条
|
||||
let progressWidth = Math.min(100, Math.round(res.data.rewardInfo.serialValue / res.data.rewardInfo.nextLevelLimit * 100));
|
||||
$('.progress-bar').css('width', progressWidth + '%');
|
||||
if(progressWidth >= 100){
|
||||
if (progressWidth >= 100) {
|
||||
$('.next_level .left').hide();
|
||||
}
|
||||
$('.room_tip .topTenReward').text(res.data.rewardInfo.topTenReward)
|
||||
@@ -126,80 +125,80 @@ function getRoomData(isToday) {
|
||||
// 我的信息
|
||||
$('.my_box .my_info .avatar img').attr('src', res.data.myRank.avatar)
|
||||
$('.my_box .my_info .nick').text(res.data.myRank.nick)
|
||||
$('.my_box .my_info .erban').text('ID:'+res.data.myRank.erbanNo)
|
||||
$('.my_box .my_info .my_rank').text(res.data.myRank.ranking == 0?'TOP10+':`TOP${res.data.myRank.ranking}`)
|
||||
if(res.data.myRank.ranking == 0){
|
||||
$('.my_box .Contribution_Value').text(langReplace(localLang.demoModule.Contribution_Value)+':'+res.data.myRank.score + '(' + langReplace(localLang.demoModule.Behind_Top10) + (res.data.myRank.theTenScore - res.data.myRank.score) + ')')
|
||||
}else{
|
||||
$('.my_box .Contribution_Value').text(langReplace(localLang.demoModule.Contribution_Value)+':'+res.data.myRank.score)
|
||||
$('.my_box .my_info .erban').text('ID:' + res.data.myRank.erbanNo)
|
||||
$('.my_box .my_info .my_rank').text(res.data.myRank.ranking == 0 ? 'TOP10+' : `TOP${res.data.myRank.ranking}`)
|
||||
if (res.data.myRank.ranking == 0) {
|
||||
$('.my_box .Contribution_Value').text(langReplace(localLang.demoModule.Contribution_Value) + ':' + res.data.myRank.score + '(' + langReplace(localLang.demoModule.Behind_Top10) + (res.data.myRank.theTenScore - res.data.myRank.score) + ')')
|
||||
} else {
|
||||
$('.my_box .Contribution_Value').text(langReplace(localLang.demoModule.Contribution_Value) + ':' + res.data.myRank.score)
|
||||
}
|
||||
|
||||
|
||||
if(res.data.myRank.ownerReward){
|
||||
$('.my_box .Room_Reward').text(langReplace(localLang.demoModule.Room_Reward)+':'+res.data.myRank.ownerReward )
|
||||
|
||||
if (res.data.myRank.ownerReward) {
|
||||
$('.my_box .Room_Reward').text(langReplace(localLang.demoModule.Room_Reward) + ':' + res.data.myRank.ownerReward)
|
||||
$('.Room_Reward_box').show();
|
||||
// 房主奖励按钮状态
|
||||
if(res.data.myRank.ownerRewardStatus == -1){
|
||||
if (res.data.myRank.ownerRewardStatus == -1) {
|
||||
// 未达标
|
||||
$('.Room_Reward_box .right').addClass('Receive_Tomorrow');
|
||||
$('.Room_Reward_box .right').removeClass('Receive').removeClass('Receiveed');
|
||||
$('.Room_Reward_box .right').text(langReplace(localLang.demoModule.suo_img));
|
||||
}else if(res.data.myRank.ownerRewardStatus == 0){
|
||||
} else if (res.data.myRank.ownerRewardStatus == 0) {
|
||||
// 明天可领
|
||||
$('.Room_Reward_box .right').addClass('Receive_Tomorrow');
|
||||
$('.Room_Reward_box .right').addClass('Receive_Tomorrow');
|
||||
$('.Room_Reward_box .right').removeClass('Receive').removeClass('Receiveed');
|
||||
$('.Room_Reward_box .right').text(langReplace(localLang.demoModule.Receive_Tomorrow));
|
||||
}else if(res.data.myRank.ownerRewardStatus == 1){
|
||||
} else if (res.data.myRank.ownerRewardStatus == 1) {
|
||||
// 可领取
|
||||
$('.Room_Reward_box .right').addClass('Receive');
|
||||
$('.Room_Reward_box .right').removeClass('Receiveed').removeClass('Receive_Tomorrow');
|
||||
$('.Room_Reward_box .right').text(langReplace(localLang.demoModule.Receive))
|
||||
}else if(res.data.myRank.ownerRewardStatus == 2){
|
||||
} else if (res.data.myRank.ownerRewardStatus == 2) {
|
||||
// 已领取
|
||||
$('.Room_Reward_box .right').addClass('Receiveed');
|
||||
$('.Room_Reward_box .right').removeClass('Receive').removeClass('Receive_Tomorrow');
|
||||
$('.Room_Reward_box .right').text(langReplace(localLang.demoModule.Receiveed))
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$('.Room_Reward_box').hide();
|
||||
}
|
||||
|
||||
if(res.data.myRank.myReward){
|
||||
$('.my_box .Contribution_Reward').text(langReplace(localLang.demoModule.Contribution_Reward)+':'+res.data.myRank.myReward)
|
||||
$('.Contribution_Reward_box').show();
|
||||
if (res.data.myRank.myReward) {
|
||||
$('.my_box .Contribution_Reward').text(langReplace(localLang.demoModule.Contribution_Reward) + ':' + res.data.myRank.myReward)
|
||||
$('.Contribution_Reward_box').show();
|
||||
// 贡献奖励按钮状态
|
||||
if(res.data.myRank.myRewardStatus == -1){
|
||||
if (res.data.myRank.myRewardStatus == -1) {
|
||||
// 未达标
|
||||
$('.Contribution_Reward_box .right').addClass('Receive_Tomorrow');
|
||||
$('.Contribution_Reward_box .right').removeClass('Receive').removeClass('Receiveed');
|
||||
$('.Contribution_Reward_box .right').html(langReplace(localLang.demoModule.suo_img));
|
||||
}else if(res.data.myRank.myRewardStatus == 0){
|
||||
} else if (res.data.myRank.myRewardStatus == 0) {
|
||||
// 明天可领
|
||||
$('.Contribution_Reward_box .right').addClass('Receive_Tomorrow');
|
||||
$('.Contribution_Reward_box .right').addClass('Receive_Tomorrow');
|
||||
$('.Contribution_Reward_box .right').removeClass('Receive').removeClass('Receiveed');
|
||||
$('.Contribution_Reward_box .right').text(langReplace(localLang.demoModule.Receive_Tomorrow));
|
||||
}else if(res.data.myRank.myRewardStatus == 1){
|
||||
} else if (res.data.myRank.myRewardStatus == 1) {
|
||||
// 可领取
|
||||
$('.Contribution_Reward_box .right').addClass('Receive');
|
||||
$('.Contribution_Reward_box .right').removeClass('Receiveed').removeClass('Receive_Tomorrow');
|
||||
$('.Contribution_Reward_box .right').text(langReplace(localLang.demoModule.Receive))
|
||||
}else if(res.data.myRank.myRewardStatus == 2){
|
||||
} else if (res.data.myRank.myRewardStatus == 2) {
|
||||
// 已领取
|
||||
$('.Contribution_Reward_box .right').addClass('Receiveed');
|
||||
$('.Contribution_Reward_box .right').removeClass('Receive').removeClass('Receive_Tomorrow');
|
||||
$('.Contribution_Reward_box .right').text(langReplace(localLang.demoModule.Receiveed))
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$('.Contribution_Reward_box').hide();
|
||||
}
|
||||
|
||||
|
||||
// 排行榜
|
||||
$('.rank_list .rank_box').remove();
|
||||
$('.no_data').hide();
|
||||
if(res.data.top10RankList.length>0){
|
||||
let str = ''
|
||||
res.data.top10RankList.forEach(item => {
|
||||
str += `
|
||||
$('.no_data').hide();
|
||||
if (res.data.top10RankList.length > 0) {
|
||||
let str = ''
|
||||
res.data.top10RankList.forEach(item => {
|
||||
str += `
|
||||
<div class="rank_box">
|
||||
<div class="top_ranking">TOP${item.ranking}</div>
|
||||
<div class="left">
|
||||
@@ -208,17 +207,17 @@ function getRoomData(isToday) {
|
||||
<div class="right">
|
||||
<div class="nick">${item.nick}</div>
|
||||
<div class="erban">ID:${item.erbanNo}</div>
|
||||
<div class="Contribution_Value">${langReplace(localLang.demoModule.Contribution_Value)+':'+item.score}</div>
|
||||
<div class="Contribution_Value">${langReplace(localLang.demoModule.Contribution_Value) + ':' + item.score}</div>
|
||||
<div class="Target_Coins_box">
|
||||
<span class="Target_Coins">${langReplace(localLang.demoModule.Target_Coins)+':'+item.myReward}</span>
|
||||
<span class="Target_Coins">${langReplace(localLang.demoModule.Target_Coins) + ':' + item.myReward}</span>
|
||||
<img src="./images/e_conis.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
$('.rank_list').append(str)
|
||||
}else{
|
||||
})
|
||||
$('.rank_list').append(str)
|
||||
} else {
|
||||
$('.no_data').show();
|
||||
}
|
||||
} else {
|
||||
@@ -237,23 +236,23 @@ var canNext = false;
|
||||
var AgencyList = [];
|
||||
// 获取领取记录
|
||||
function getRecordList() {
|
||||
if(canNext) return;
|
||||
if (canNext) return;
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'GEt',
|
||||
url: urlPrefix + '/roomSendRank/dayReward/pageRecord',
|
||||
data: {
|
||||
page,
|
||||
pageSize:10,
|
||||
pageSize: 10,
|
||||
roomUid: urlData.roomUid,
|
||||
},
|
||||
},
|
||||
success(res) {
|
||||
if (res.code === 200) {
|
||||
$('.wrap_list .wrap_box').remove();
|
||||
let str = ''
|
||||
AgencyList = [...AgencyList,...res.data.rows]
|
||||
AgencyList = [...AgencyList, ...res.data.rows]
|
||||
AgencyList.forEach((item, i) => {
|
||||
str += `
|
||||
str += `
|
||||
<div class="wrap_box">
|
||||
<div class="time">${item.createTime}</div>
|
||||
<div class="num">${item.reward}</div>
|
||||
@@ -261,9 +260,9 @@ function getRecordList() {
|
||||
`
|
||||
})
|
||||
$('.wrap_list').append(str)
|
||||
if(res.data.rows.length < 10){
|
||||
if (res.data.rows.length < 10) {
|
||||
canNext = true;
|
||||
}else{
|
||||
} else {
|
||||
page++;
|
||||
getRecordList();
|
||||
}
|
||||
@@ -278,10 +277,10 @@ function getRecordList() {
|
||||
}
|
||||
})
|
||||
}
|
||||
$('.Room_Reward_box').on('click',' .Receive',function(){
|
||||
$('.Room_Reward_box').on('click', ' .Receive', function () {
|
||||
receiveReward(true)
|
||||
})
|
||||
$('.Contribution_Reward_box').on('click',' .Receive',function(){
|
||||
$('.Contribution_Reward_box').on('click', ' .Receive', function () {
|
||||
receiveReward(false)
|
||||
})
|
||||
// 领取接口
|
||||
@@ -292,8 +291,8 @@ function receiveReward(isRoomOwnerReward) {
|
||||
url: urlPrefix + '/roomSendRank/dayReward/receiveReward',
|
||||
data: {
|
||||
roomUid: urlData.roomUid,
|
||||
isRoomOwnerReward
|
||||
},
|
||||
isRoomOwnerReward
|
||||
},
|
||||
success(res) {
|
||||
if (res.code === 200) {
|
||||
bodyScroolFun(true);
|
||||
@@ -315,9 +314,9 @@ function receiveReward(isRoomOwnerReward) {
|
||||
$('.kuang_top div').click(function () {
|
||||
$(this).addClass('active_day').siblings().removeClass('active_day');
|
||||
getRoomData($(this).index() == 0 ? true : false)
|
||||
if($(this).index() == 1 ){
|
||||
if ($(this).index() == 1) {
|
||||
$('.next_level .left').hide();
|
||||
}else{
|
||||
} else {
|
||||
$('.next_level .left').show();
|
||||
}
|
||||
})
|
||||
@@ -339,6 +338,10 @@ $('.popup_record .popup_content .close_btn img').click(function () {
|
||||
})
|
||||
// 打开领取记录
|
||||
$('.Receive_Record').click(function () {
|
||||
page = 1;
|
||||
canNext = false;
|
||||
AgencyList = [];
|
||||
getRecordList();
|
||||
bodyScroolFun(true);
|
||||
$('.popup_record').show()
|
||||
})
|
||||
|
Reference in New Issue
Block a user