修复魅力榜单

This commit is contained in:
dragon
2024-04-30 16:28:06 +08:00
parent 2c7123bae3
commit 174e6ba807
2 changed files with 36 additions and 47 deletions

View File

@@ -34,7 +34,7 @@
<script src="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="js/index.js?v=2.3"></script>
<script src="js/index.js?v=2.4"></script>
<script src="../../common/local/langHandler.js"></script>
</body>

View File

@@ -1,4 +1,5 @@
let info = {}
let urlPrefix = getUrlPrefix()
var langReplace;
var localLang;
@@ -11,22 +12,6 @@ $(function () {
let countPage; //用来判断加载的次数跟res.data.totalPage比较countPage为0时不再加载
let isLock = true
if (EnvCheck() == 'test') { let vConsole = new VConsole };
if (browser.app) {
if (browser.ios) {
info.uid = tools.cookieUtils.get('uid');
window.webkit.messageHandlers.getTicket.postMessage(null);
window.webkit.messageHandlers.getRoomUid.postMessage(null);
} else if (browser.android) {
if (androidJsObj && typeof androidJsObj === 'object') {
info.uid = parseInt(window.androidJsObj.getUid());
info.ticket = window.androidJsObj.getTicket();
info.roomUid = window.androidJsObj.getRoomUid();
}
}
} else {
info.uid = 900143;
}
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
//渲染数据
@@ -114,31 +99,41 @@ $(function () {
//获取数据
const getData = (pageNum) => {
$.ajax({
type: "GET",
// url: 'http://120.79.211.243/room/gift/value/ranking',
async: browser.ios ? true : false,
url: api + '/room/gift/value/ranking',
networkRequest({
type: 'GET',
url: urlPrefix + '/user/detail/get',
data: {
roomUid: urlData.uid,
micUid: urlData.uid,
// roomUid: 1005060,
// micUid: 1005060,
page: pageNum,
pageSize: pageSize,
uid: urlData.uid
},
headers: {
},
success: (res) => {
// console.log(res)
if (res.data.totalPage >= pageNum) {
randerList(res.data.ranking)
countPage = res.data.totalPage - pageNum
if (pageNum != 1) {
isLock = true
success(val) {
console.log(pubInfo);
networkRequest({
type: 'GET',
url: urlPrefix + '/room/gift/value/ranking',
data: {
roomUid: browser.ios ? val.data.roomUid : pubInfo.roomUid,
micUid: urlData.uid,//
page: pageNum,
pageSize: pageSize,
},
success(res) {
if (res.data.totalPage >= pageNum) {
randerList(res.data.ranking)
countPage = res.data.totalPage - pageNum
if (pageNum != 1) {
isLock = true
}
}
},
error(err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
}
})
},
error(err) {
hideLoading(layerIndex)
toastMsg('網絡錯誤,請退出重進')
}
})
}
@@ -149,8 +144,8 @@ $(function () {
translateFun();
getData(pageNum);
setTimeout(function () {
$('#body').show();
}, 300)
$('#body').show();
}, 300)
}, 100)
function translateFun() {
var langReplace = window.lang.replace;
@@ -187,9 +182,3 @@ $(function () {
}
})
})
// function getMessage(key, value) {
// info[key] = value;
// }