公会信息 - 独联体修复bug
This commit is contained in:
@@ -134,7 +134,7 @@ function getData() {
|
||||
</div>
|
||||
</div>
|
||||
<div class="diamondNumBox">
|
||||
<span class="diamondNum">${item.diamondNum}</span>
|
||||
<span class="diamondNum">${formattedNumber(item.diamondNum)}</span>
|
||||
<img src="./images/diamondss.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -234,4 +234,10 @@ $('.timeBox .timeBox_in .but').click(function (event) {
|
||||
pageNo = 1;
|
||||
AgencyList = [];
|
||||
getData();
|
||||
})
|
||||
})
|
||||
// 千分位
|
||||
function formattedNumber(num) {
|
||||
if (num === null || num === undefined) return '';
|
||||
return Math.floor(num).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
|
||||
};
|
@@ -207,6 +207,7 @@ function get() {
|
||||
}
|
||||
}else{
|
||||
$('.agencylevel').hide();
|
||||
$('.guildList ul').css('height', '10rem')
|
||||
}
|
||||
res.data.authCodes.forEach((item) => {
|
||||
console.log(item);
|
||||
|
@@ -76,7 +76,7 @@ function translateFun() {
|
||||
$('.Enter_account').html(langReplace(localLang.personal.text5));
|
||||
}
|
||||
var incomeData;
|
||||
var dataType = 2; //1:个人 2:公会
|
||||
var dataType; //1:个人 2:公会
|
||||
// 配置接口
|
||||
function getAccount() {
|
||||
showLoading()
|
||||
@@ -90,9 +90,19 @@ function getAccount() {
|
||||
// 判断是否展示agency
|
||||
if (incomeData.agency) {
|
||||
funTranslateData(incomeData.agency);
|
||||
dataType = incomeData.agency.diamondDateList.dataType
|
||||
} else {
|
||||
funTranslateData(incomeData.person);
|
||||
$('.tab_box div').eq(1).hide();
|
||||
funTranslateData(incomeData.person);
|
||||
$('.tab_box div').eq(0).hide();
|
||||
$('.tab_box div').eq(1).addClass('act');
|
||||
dataType = incomeData.person.diamondDateList.dataType
|
||||
$('.content_CycleIncome_box').css('margin-top', '0.42rem')
|
||||
$('.Today_box .right img').hide();
|
||||
$('.Yesterday_box .right img').hide();
|
||||
$('.thisWeek_box .right img').hide();
|
||||
$('.lastWeek_box .right img').hide();
|
||||
$('.thisMonth_box .right img').hide();
|
||||
$('.lastMonth_box .right img').hide();
|
||||
}
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
@@ -108,33 +118,33 @@ function getAccount() {
|
||||
function funTranslateData(data) {
|
||||
// 周期收益
|
||||
// 本周期
|
||||
$('.ThisCycle_box .periodDateStr').text(data.diamondDateList.curCycle.periodDateStr)
|
||||
$('.ThisCycle_box .diamondNum').text(data.diamondDateList.curCycle.diamondNum)
|
||||
$('.content_CycleIncome_box .CycleIncome_box .top_title').attr('dataObj',JSON.stringify(data.diamondDateList.curCycle))
|
||||
$('.ThisCycle_box .periodDateStr').text(formattedNumber(data.diamondDateList.curCycle.periodDateStr))
|
||||
$('.ThisCycle_box .diamondNum').text(formattedNumber(data.diamondDateList.curCycle.diamondNum))
|
||||
$('.content_CycleIncome_box .CycleIncome_box .top_title').attr('dataObj', JSON.stringify(data.diamondDateList.curCycle))
|
||||
// 上周期
|
||||
$('.Last_Cycle_box .periodDateStr').text(data.diamondDateList.lastCycle.periodDateStr)
|
||||
$('.Last_Cycle_box .diamondNum').text(data.diamondDateList.lastCycle.diamondNum)
|
||||
|
||||
// 每日收益
|
||||
$('.Today_box .diamondNum').text(data.diamondDateList.curDay.diamondNum)
|
||||
$('.Yesterday_box .diamondNum').text(data.diamondDateList.lastDay.diamondNum)
|
||||
$('.Today_box').attr('dataObj',JSON.stringify(data.diamondDateList.curDay))
|
||||
$('.Yesterday_box').attr('dataObj',JSON.stringify(data.diamondDateList.lastDay))
|
||||
$('.Today_box .diamondNum').text(unitProcessingAr(data.diamondDateList.curDay.diamondNum, 2))
|
||||
$('.Yesterday_box .diamondNum').text(unitProcessingAr(data.diamondDateList.lastDay.diamondNum, 2))
|
||||
$('.Today_box').attr('dataObj', JSON.stringify(data.diamondDateList.curDay))
|
||||
$('.Yesterday_box').attr('dataObj', JSON.stringify(data.diamondDateList.lastDay))
|
||||
|
||||
// 每周收益
|
||||
$('.thisWeek_box .diamondNum').text(data.diamondDateList.curWeek.diamondNum)
|
||||
$('.lastWeek_box .diamondNum').text(data.diamondDateList.lastWeek.diamondNum)
|
||||
$('.thisWeek_box').attr('dataObj',JSON.stringify(data.diamondDateList.curWeek))
|
||||
$('.lastWeek_box').attr('dataObj',JSON.stringify(data.diamondDateList.lastWeek))
|
||||
$('.thisWeek_box .diamondNum').text(unitProcessingAr(data.diamondDateList.curWeek.diamondNum, 2))
|
||||
$('.lastWeek_box .diamondNum').text(unitProcessingAr(data.diamondDateList.lastWeek.diamondNum, 2))
|
||||
$('.thisWeek_box').attr('dataObj', JSON.stringify(data.diamondDateList.curWeek))
|
||||
$('.lastWeek_box').attr('dataObj', JSON.stringify(data.diamondDateList.lastWeek))
|
||||
|
||||
// 每月收益
|
||||
$('.thisMonth_box .diamondNum').text(data.diamondDateList.curMonth.diamondNum)
|
||||
$('.lastMonth_box .diamondNum').text(data.diamondDateList.lastMonth.diamondNum)
|
||||
$('.thisMonth_box').attr('dataObj',JSON.stringify(data.diamondDateList.curMonth))
|
||||
$('.lastMonth_box').attr('dataObj',JSON.stringify(data.diamondDateList.lastMonth))
|
||||
$('.thisMonth_box .diamondNum').text(unitProcessingAr(data.diamondDateList.curMonth.diamondNum, 2))
|
||||
$('.lastMonth_box .diamondNum').text(unitProcessingAr(data.diamondDateList.lastMonth.diamondNum, 2))
|
||||
$('.thisMonth_box').attr('dataObj', JSON.stringify(data.diamondDateList.curMonth))
|
||||
$('.lastMonth_box').attr('dataObj', JSON.stringify(data.diamondDateList.lastMonth))
|
||||
|
||||
if(data.me){
|
||||
$('.user_box .avatar img').attr('src',data.me.avatar)
|
||||
if (data.me) {
|
||||
$('.user_box .avatar img').attr('src', data.me.avatar)
|
||||
$('.user_box .info .nick').text(data.me.nick)
|
||||
$('.user_box .info .erbanNo').text(data.me.erbanNo)
|
||||
$('.personal_content .diamondNum').text(data.diamondNum)
|
||||
@@ -145,17 +155,35 @@ function funTranslateData(data) {
|
||||
// tab切换
|
||||
$('.tab_box div').click(function () {
|
||||
$(this).addClass('act').siblings().removeClass();
|
||||
if($(this).index() == 0){
|
||||
if ($(this).index() == 0) {
|
||||
funTranslateData(incomeData.agency);
|
||||
$('.personal_content').hide();
|
||||
dataType = 2;
|
||||
$('.content_CycleIncome_box').css('margin-top', '3.4rem')
|
||||
}else{
|
||||
$('.personal_content').hide();
|
||||
dataType = 2;
|
||||
$('.content_CycleIncome_box').css('margin-top', '3.4rem')
|
||||
$('.Today_box .right img').show();
|
||||
$('.Yesterday_box .right img').show();
|
||||
$('.thisWeek_box .right img').show();
|
||||
$('.lastWeek_box .right img').show();
|
||||
$('.thisMonth_box .right img').show();
|
||||
$('.lastMonth_box .right img').show();
|
||||
} else {
|
||||
funTranslateData(incomeData.person);
|
||||
dataType = 1;
|
||||
$('.content_CycleIncome_box').css('margin-top', '0.42rem')
|
||||
dataType = 1;
|
||||
$('.content_CycleIncome_box').css('margin-top', '0.42rem')
|
||||
$('.Today_box .right img').hide();
|
||||
$('.Yesterday_box .right img').hide();
|
||||
$('.thisWeek_box .right img').hide();
|
||||
$('.lastWeek_box .right img').hide();
|
||||
$('.thisMonth_box .right img').hide();
|
||||
$('.lastMonth_box .right img').hide();
|
||||
}
|
||||
})
|
||||
// 千分位
|
||||
function formattedNumber(num) {
|
||||
if (num === null || num === undefined) return '';
|
||||
return Math.floor(num).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
|
||||
};
|
||||
// 跳转提现
|
||||
$('.personal_content .Withdraw').click(function () {
|
||||
window.location.href = `./diamondWithdraw.html`
|
||||
@@ -170,38 +198,38 @@ $('.personal_content .Enter_account').click(function () {
|
||||
// })
|
||||
|
||||
// 跳转收入
|
||||
$('.content_CycleIncome_box .CycleIncome_box .top_title').click(function () {
|
||||
$('.content_CycleIncome_box .CycleIncome_box .top_title').click(function () {
|
||||
let dataObj = $(this).attr('dataObj');
|
||||
window.location.href = `./general_Income.html?general_data=${dataObj}&dataType=${dataType}&page_title=${langReplace(localLang.personalCIS.Cycle_Income)}&Cycle_Income=1`;
|
||||
})
|
||||
|
||||
// 今日收益跳转
|
||||
$('.Today_box').click(function () {
|
||||
$('.Today_box').click(function () {
|
||||
let dataObj = $(this).attr('dataObj');
|
||||
window.location.href = `./general_Income.html?general_data=${dataObj}&dataType=${dataType}&page_title=${langReplace(localLang.personalCIS.Today)}`;
|
||||
})
|
||||
// 昨日收益跳转
|
||||
$('.Yesterday_box').click(function () {
|
||||
$('.Yesterday_box').click(function () {
|
||||
let dataObj = $(this).attr('dataObj');
|
||||
window.location.href = `./general_Income.html?general_data=${dataObj}&dataType=${dataType}&page_title=${langReplace(localLang.personalCIS.Yesterday)}`;
|
||||
})
|
||||
// 今周收益跳转
|
||||
$('.thisWeek_box').click(function () {
|
||||
$('.thisWeek_box').click(function () {
|
||||
let dataObj = $(this).attr('dataObj');
|
||||
window.location.href = `./general_Income.html?general_data=${dataObj}&dataType=${dataType}&page_title=${langReplace(localLang.personalCIS.This_Week)}`;
|
||||
})
|
||||
// 上周收益跳转
|
||||
$('.lastWeek_box').click(function () {
|
||||
$('.lastWeek_box').click(function () {
|
||||
let dataObj = $(this).attr('dataObj');
|
||||
window.location.href = `./general_Income.html?general_data=${dataObj}&dataType=${dataType}&page_title=${langReplace(localLang.personalCIS.Last_Week)}`;
|
||||
})
|
||||
// 今月收益跳转
|
||||
$('.thisMonth_box').click(function () {
|
||||
$('.thisMonth_box').click(function () {
|
||||
let dataObj = $(this).attr('dataObj');
|
||||
window.location.href = `./general_Income.html?general_data=${dataObj}&dataType=${dataType}&page_title=${langReplace(localLang.personalCIS.This_Month)}`;
|
||||
})
|
||||
// 上月收益跳转
|
||||
$('.lastMonth_box').click(function () {
|
||||
$('.lastMonth_box').click(function () {
|
||||
let dataObj = $(this).attr('dataObj');
|
||||
window.location.href = `./general_Income.html?general_data=${dataObj}&dataType=${dataType}&page_title=${langReplace(localLang.personalCIS.Last_Month)}`;
|
||||
})
|
Reference in New Issue
Block a user