From 64486f137a4fbb1e4ad176c80a6cc953853d776b Mon Sep 17 00:00:00 2001
From: dragon <3013557874@qq.com>
Date: Wed, 22 Jan 2025 18:47:43 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=AE=A1=E7=AE=97=E5=88=86?=
=?UTF-8?q?=E5=80=BC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
view/molistar/modules/superLucky/index.html | 2 +-
view/molistar/modules/superLucky/js/index.js | 37 +++++++++++---------
2 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/view/molistar/modules/superLucky/index.html b/view/molistar/modules/superLucky/index.html
index 56bd09dd..76e3602a 100644
--- a/view/molistar/modules/superLucky/index.html
+++ b/view/molistar/modules/superLucky/index.html
@@ -181,5 +181,5 @@
-
+
\ No newline at end of file
diff --git a/view/molistar/modules/superLucky/js/index.js b/view/molistar/modules/superLucky/js/index.js
index fe0221f6..27fed043 100644
--- a/view/molistar/modules/superLucky/js/index.js
+++ b/view/molistar/modules/superLucky/js/index.js
@@ -101,6 +101,7 @@ var page = 0;
var maxPage = 0;
var arr = [];
var lists = [];
+var list = [];
// 初始化函數
$(function () {
getInfoFromClient();
@@ -167,7 +168,7 @@ function listRank() {
// 处理倒计时
countup(res.data.remainMillis);
// 处理榜单
- var list = res.data.rankList;
+ list = res.data.rankList;
var lists = res.data.rankList;
var listTo3 = res.data.rankList.slice(0, 1);
var notListTo3 = res.data.rankList.slice(1);
@@ -211,7 +212,7 @@ function listRank() {
ID:${res.erbanNo}
- ${langReplace(localLang.demoModule.text14)}${scoreFun(list, i, res.score)}
+ ${langReplace(localLang.demoModule.text14)}${scoreFun(list, res.rank, res.score)}
`
})
@@ -253,7 +254,7 @@ function listLastWeekRank() {
if (res.code === 200) {
var listTo3 = res.data.rankList.slice(0, 1);
var notListTo3 = res.data.rankList.slice(1);
- var list = res.data.rankList;
+ list = res.data.rankList;
// 前三
if (listTo3.length < 1) {
let arr = new Array(1 - listTo3.length).fill({
@@ -311,7 +312,6 @@ $('.page1 .content .more').click(function () {
console.log(page);
page = page + 1;
console.log(page, maxPage);
- console.log(arr);
var str = '';
arr[page].forEach((res, i) => {
str += `
@@ -325,7 +325,7 @@ $('.page1 .content .more').click(function () {
ID:${res.erbanNo}
- ${langReplace(localLang.demoModule.text14)}${scoreFun(arr[page], i, res.score)}
+ ${langReplace(localLang.demoModule.text14)}${scoreFun(arr[page], res.rank, res.score)}
`})
$('.page1 .content ul').append(str);
@@ -343,18 +343,23 @@ function paginateArray(arr, itemsPerPage) {
return result;
}
// 处理
-function scoreFun(list, i, myScore) {
+function scoreFun(listNew, i, myScore) {
var num;
- if (i <= 0) {
- num = unitProcessingAr(list[0].score - list[1].score, 1);
- } else {
- console.log(list[i].score);
- console.log(myScore);
- console.log('==========');
-
-
- num = unitProcessingAr(list[i].score - myScore, 1);
- }
+ // if (i <= 0) {
+ // num = unitProcessingAr(list[0].score - list[1].score, 1);
+ // } else {
+ // console.log(list[i].score);
+ // console.log(myScore);
+ // console.log('==========');
+
+
+ // num = unitProcessingAr(list[i].score - myScore, 1);
+ // }
+ console.log(list, 'sssssssssssss');
+
+ // console.log(list[i - 2]);
+
+ num = unitProcessingAr(list[i - 2].score - myScore, 1);
return num;
}
// tab切换