新增斋月瓜分账单,完成榜单接口联调

This commit is contained in:
dragon
2025-02-22 16:11:54 +08:00
parent da84cf9eb6
commit 15a78b4876
20 changed files with 136 additions and 100 deletions

View File

@@ -1845,18 +1845,10 @@ body {
left: 50%;
transform: translateX(-50%);
z-index: 3;
}
.page2 .list .c .page3_in1 .no1 .name b {
display: inline-block;
width: 1.88rem;
text-align: center;
color: #FFED26;
font-size: 0.4rem;
font-weight: 500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: right;
}
.page2 .list .c .page3_in1 .no1 .name img {
@@ -1944,18 +1936,10 @@ body {
left: 50%;
transform: translateX(-50%);
z-index: 3;
}
.page2 .list .c .page3_in1 .no23 .no2 .name b {
display: inline-block;
width: 1.88rem;
text-align: center;
color: #FFED26;
font-size: 0.4rem;
font-weight: 500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: right;
}
.page2 .list .c .page3_in1 .no23 .no2 .name img {
@@ -2033,18 +2017,10 @@ body {
left: 50%;
transform: translateX(-50%);
z-index: 3;
}
.page2 .list .c .page3_in1 .no23 .no3 .name b {
display: inline-block;
width: 1.88rem;
text-align: center;
color: #FFED26;
font-size: 0.4rem;
font-weight: 500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: right;
}
.page2 .list .c .page3_in1 .no23 .no3 .name img {
@@ -2100,6 +2076,7 @@ body {
background-size: 100% 100%;
box-sizing: border-box;
padding: 0 0.53333rem;
margin-bottom: 0.32rem;
}
.page2 .list .c .page3_in1 ul li .num {
@@ -2236,15 +2213,6 @@ body {
margin-bottom: 0.10667rem;
}
.page2 .my .user p b {
display: inline-block;
max-width: 1.88rem;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-right: 0.08rem;
}
.page2 .my .user p img {
width: 1.02667rem;
height: 0.48rem;

View File

@@ -1876,19 +1876,10 @@ body {
left: 50%;
transform: translateX(-50%);
z-index: 3;
b {
display: inline-block;
width: px2rem(141);
color: #FFED26;
font-size: px2rem(30);
font-weight: 500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: right;
}
text-align: center;
color: #FFED26;
font-size: px2rem(30);
font-weight: 500;
img {
width: px2rem(77);
@@ -1975,19 +1966,10 @@ body {
left: 50%;
transform: translateX(-50%);
z-index: 3;
b {
display: inline-block;
width: px2rem(141);
color: #FFED26;
font-size: px2rem(30);
font-weight: 500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: right;
}
text-align: center;
color: #FFED26;
font-size: px2rem(30);
font-weight: 500;
img {
width: px2rem(77);
@@ -2065,19 +2047,10 @@ body {
left: 50%;
transform: translateX(-50%);
z-index: 3;
b {
display: inline-block;
width: px2rem(141);
color: #FFED26;
font-size: px2rem(30);
font-weight: 500;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: right;
}
text-align: center;
color: #FFED26;
font-size: px2rem(30);
font-weight: 500;
img {
width: px2rem(77);
@@ -2134,6 +2107,7 @@ body {
background-size: 100% 100%;
box-sizing: border-box;
padding: 0 px2rem(40);
margin-bottom: px2rem(24);
.num {
width: px2rem(40);
@@ -2272,15 +2246,6 @@ body {
font-weight: 500;
margin-bottom: px2rem(8);
b {
display: inline-block;
max-width: px2rem(141);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-right: px2rem(6);
}
img {
width: px2rem(77);
height: px2rem(36);

View File

@@ -377,9 +377,9 @@
<div class="c">
<div class="page3_in1">
<div class="page3TabBox">
<div class="act text22"></div>
<div class="text23"></div>
<div class="text24"></div>
<div type="1" class="act text22"></div>
<div type="0" class="text23"></div>
<div type="2" class="text24"></div>
</div>
<div class="timeOutBox">
<div class="days">
@@ -471,18 +471,17 @@
</div>
<!-- 处理自己 -->
<div class="my">
<div class="num">04</div>
<div class="num"></div>
<img src="./images/logo.png" alt="" class="tx">
<div class="user">
<p>
<b>名字</b>
<b></b>
<img src="" alt="">
</p>
<span>ID:0</span>
</div>
<div class="score">
<span class="text30">Behind: </span>
0k
</div>
</div>
<!-- 奖励弹窗 -->

View File

@@ -80,6 +80,7 @@ var maxPage = 0;
var arr = [];
var lists = [];
var list = [];
var listType = 1;
// 初始化函數
$(function () {
getInfoFromClient();
@@ -196,6 +197,9 @@ $('.header .tab div').click(function () {
$('.page1,.page2,.page3').hide();
$(this).addClass('act').siblings().removeClass('act');
$(`.page${i}`).show();
if (i == 2) {
ramadanRank();
}
})
// ===============================================页面一===============================================
// 问题列表接口
@@ -488,6 +492,7 @@ var countupTime;//倒计时容器
$('.page2 .list .c .page3_in1 .page3TabBox div').click(function () {
var i = $(this).index() + 1;
$(this).addClass('act').siblings().removeClass();
listType = $(this).attr('type');
$('.page2 .list .c .page3_in1 .timeOutBox').css('display', 'none');
$('.page2 .list .c .page3_in1 .yesterdayCoinsPool').hide();
@@ -500,8 +505,94 @@ $('.page2 .list .c .page3_in1 .page3TabBox div').click(function () {
$('.page2 .list .c .page3_in1 .timeOutBox').css('display', 'flex');
$('.page2 .list .c .page3_in1 .no1 .rewards').show();
}
ramadanRank();
})
// 榜单接口
function ramadanRank() {
showLoading()
networkRequest({
type: 'get',
url: urlPrefix + '/activity/h5/ramadan/rank',
data: { type: listType },
success(res) {
if (res.code === 200) {
$('.page2 .todayCoinsPool .num b').text(res.data.poolGoldNum);
var val = res.data.activityH5RankVo
if (listType == 1) {
$('.page2 .list .c .page3_in1 .yesterdayCoinsPool .num b').text(unitProcessingAr(val.totalGoldNum, 2));
} else {
var endtime = new Date(res.data.activityH5RankVo.endTimeStr).getTime();
countup(endtime - res.timestamp);
}
var listTo3 = val.rankList.slice(0, 3);
var notListTo3 = val.rankList.slice(3);
// 处理前三
if (listTo3.length < 3) {
let arr = new Array(3 - listTo3.length).fill({
avatar: './images/logo.png',
name: langReplace(localLang.demoModule.text68),
erbanNo: "",
diffExp: '',
userLevelVo: {
experUrl: ''
}
})
listTo3.push(...arr)
}
$('.page2 .list .c .page3_in1 .no1 .score').hide();
listTo3.forEach((res, i) => {
$(`.page2 .list .c .page3_in1 .no${i + 1} .tx`).attr('src', res.avatar);
$(`.page2 .list .c .page3_in1 .no${i + 1} .name `).html(`<b>${res.name.length > 4 ? res.name.slice(0, 4) + '...' : res.name}</b> <img src="${res.userLevelVo.experUrl}" alt="">`);
$(`.page2 .list .c .page3_in1 .no${i + 1} .id`).text("ID: " + res.erbanNo);
$(`.page2 .list .c .page3_in1 .no${i + 1} .score b`).text(unitProcessingAr(res.diffExp, 1));
})
// 处理非前三
var str = '';
$('.page2 .list .c .page3_in1 ul li').remove();
notListTo3.forEach((res, i) => {
str += `
<li>
<div class="num">${res.rank}</div>
<img src="${res.avatar}" alt="" class="tx">
<div class="user">
<p>
<b>${res.name.length > 4 ? res.name.slice(0, 4) + '...' : res.name}</b>
<img src="${res.userLevelVo.experUrl}" alt="">
</p>
<span>ID: ${res.erbanNo}</span>
</div>
<div class="score">
<span class="text30">${langReplace(localLang.demoModule.text30)}${unitProcessingAr(res.diffExp, 1)}</span>
</div>
</li>
`;
});
$('.page2 .list .c .page3_in1 ul').append(str);
// 处理自己
var my = res.data.activityH5RankVo.myRank;
if (my.rank == 1) {
$('.page2 .my .score').hide();
}
if (my.rank == 0) {
$('.page2 .my .num').css({ "font-size": "0.3rem", "width": '1rem', "text-indent": "-0.2rem" });
}
$('.page2 .my .num').text(my.rank == 0 ? langReplace(localLang.demoModule.text69) : my.rank);
$('.page2 .my .tx').attr('src', my.avatar);
$('.page2 .my .user').html(`<p><b>${my.name.length > 6 ? my.name.slice(0, 4) + '...' : my.name}</b> <img src="${my.userLevelVo.experUrl}" alt=""><span>ID:${my.erbanNo}</span></p>`);
$('.page2 .my .score').html(`<span class="text30">${langReplace(localLang.demoModule.text30)}</span>${unitProcessingAr(my.diffExp, 1)}`)
} else {
toastMsg(res.message)
}
hideLoading(layerIndex)
},
error(err) {
hideLoading(layerIndex)
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
// 打开弹窗奖励
$('.page2 .list .c .page3_in1 .no1 .rewards').click(function () {
$('.page2 .rewardsPub').show();
@@ -536,7 +627,7 @@ function countup(leftTime) {
$('.page2 .list .c .page3_in1 .timeOutBox .mins b').text(m);
$('.page2 .list .c .page3_in1 .timeOutBox .secs b').text(s);
} else {
getConfig();
ramadanRank();
}
if (leftTime > 0) {
leftTime = leftTime - 1000;

View File

@@ -58,6 +58,8 @@ langAr = {
text65: `رمضان مبارك`,
text66: `إرسال`,
text67: `في كل مرة ترسل فيها تهنئة، سيتم خصم 77 عملة`,
text68: `شاغر`,
text69: `غير`,
}
}

View File

@@ -63,5 +63,7 @@ langEn = {
text65: `Happy Ramadan`,
text66: `Send`,
text67: `Each time you send a blessing, it will consume 77 coins`,
text68: `Vacant`,
text69: `Unranked`,
}
}

View File

@@ -58,6 +58,8 @@ langTr = {
text65: `Mutlu Ramazanlar`,
text66: `Gönder`,
text67: `Her kutlama gönderdiğinizde 77 jeton harcanacaktır`,
text68: `Boş`,
text69: `Sırasız`,
}
}

View File

@@ -58,6 +58,8 @@ langZh = {
text65: `齋月快樂`,
text66: `發送`,
text67: `每次發送祝福都會消耗77枚硬幣`,
text68: `空缺`,
text69: `未上榜`,
}

View File

@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=UTF-8><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>molistar</title><link href=./static/css/app.84b69ae332f76a4a56c7ad786b33cc4f.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.febbcdd5e035a5ce3726.js></script><script type=text/javascript src=./static/js/vendor.ef63a6e67767f10f7bb6.js></script><script type=text/javascript src=./static/js/app.c9a38e88c1df6b26469d.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=UTF-8><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>molistar</title><link href=./static/css/app.464dbdef54dc7b1bf07d3af239b86f44.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.6be55ba116faddecb541.js></script><script type=text/javascript src=./static/js/vendor.ef63a6e67767f10f7bb6.js></script><script type=text/javascript src=./static/js/app.21831d2c7b883c51bb7d.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var f,i,u,d=0,b=[];d<r.length;d++)i=r[d],t[i]&&b.push(t[i][0]),t[i]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(n&&n(r,a,c);b.length;)b.shift()();if(c)for(d=0;d<c.length;d++)u=o(o.s=c[d]);return u};var r={},t={15:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+e+"."+{0:"870a31b2b5a5125962ab",1:"b05ea5b19a2f0b648502",2:"f6fe6d33464339648e5f",3:"00bcf5022e7d98b672a2",4:"c9d5b75efaa28b779e79",5:"93d874959b80a4ee1da1",6:"de3228ef1e13c7d6649c",7:"a1746a1c89c587b75f6f",8:"67319477a4c5ac59b510",9:"cf187b6df4a386b203eb",10:"f6e85397f46b6b94d58d",11:"a5e798e367bdaa3003e9",12:"b8ac2b08a54dd44dc799"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,a.appendChild(c),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.febbcdd5e035a5ce3726.js.map
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,a,c){for(var f,i,u,d=0,b=[];d<r.length;d++)i=r[d],t[i]&&b.push(t[i][0]),t[i]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(n&&n(r,a,c);b.length;)b.shift()();if(c)for(d=0;d<c.length;d++)u=o(o.s=c[d]);return u};var r={},t={15:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,o.nc&&c.setAttribute("nonce",o.nc),c.src=o.p+"static/js/"+e+"."+{0:"870a31b2b5a5125962ab",1:"bc65458fb9360e905a41",2:"f6fe6d33464339648e5f",3:"00bcf5022e7d98b672a2",4:"c9d5b75efaa28b779e79",5:"93d874959b80a4ee1da1",6:"de3228ef1e13c7d6649c",7:"a1746a1c89c587b75f6f",8:"67319477a4c5ac59b510",9:"cf187b6df4a386b203eb",10:"f6e85397f46b6b94d58d",11:"a5e798e367bdaa3003e9",12:"b8ac2b08a54dd44dc799"}[e]+".js";var f=setTimeout(i,12e4);function i(){c.onerror=c.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.onerror=c.onload=i,a.appendChild(c),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="./",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.6be55ba116faddecb541.js.map

View File

@@ -1,5 +1,6 @@
const ar = {
diamondLog: {
斋月金币瓜分: "تقسيم عملات رمضان الذهبية",
公会usd兑换给会长支出: "نفقات تحويل USD للنقابة إلى القائد",
私聊礼物支出: "نفقات الهدايا الخاصة",
公款充值金币: "إيداع عملات نقدية من الأموال العامة",

View File

@@ -1,5 +1,6 @@
const en = {
diamondLog: {
斋月金币瓜分: "Ramadan Gold Coin Sharing",
公会usd兑换给会长支出: "Guild USD exchange expenditure for the leader",
私聊礼物支出: "Private Chat Gift Expenses",
公款充值金币: "Public Fund Recharge Coins",

View File

@@ -1,5 +1,6 @@
const tr = {
diamondLog: {
斋月金币瓜分: "Ramazan Altın Paylaşımı",
公会usd兑换给会长支出: "Lonca USD değişim harcaması için lider",
私聊礼物支出: "Özel Sohbet Hediye Giderleri",
公款充值金币: "Kamusal Fon Yükleme Paraları",

View File

@@ -1,5 +1,6 @@
const zh = {
diamondLog: {
斋月金币瓜分: "斋月金币瓜分",
公会usd兑换给会长支出: "公会usd兑换给会长支出",
私聊礼物支出: "私聊禮物支出",
公款充值金币: "公款充值金幣",

View File

@@ -241,6 +241,7 @@ export default {
145: this.$t("diamondLog.福袋支出"),
146: this.$t("diamondLog.福袋收入"),
147: this.$t("diamondLog.福袋退回"),
148: this.$t("diamondLog.斋月金币瓜分"),
};
this.getLastSevenDaysTimestamps(2);
this.getDate(2);