历史记录服务器数据获取逻辑修改
This commit is contained in:
parent
dce8428efd
commit
940414a9ab
@ -133,6 +133,8 @@ export class History extends Component {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
async getHistoryList(startTime, endTime, lastID) {
|
||||
|
||||
let res = await getHistory({
|
||||
@ -402,7 +404,7 @@ export class History extends Component {
|
||||
this.node_detail.addChild(history_detail)
|
||||
|
||||
const comp = history_detail.getComponent("HistoryDetail") as any
|
||||
comp.setDetailData(this.DataArr[roundId], getLanguage())
|
||||
comp.setDetailData(this.DataArr[roundId], getLanguage(),)
|
||||
|
||||
const self = this
|
||||
history_detail.position = new Vec3(1080, 0)
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { _decorator, assetManager, AssetManager, Button, Color, Component, Font, instantiate, JsonAsset, Label, Layout, Node, resources, ScrollView, sp, Sprite, SpriteAtlas, SpriteFrame, tween, UITransform, Vec3 } from 'cc';
|
||||
import { ScrollControl } from './ScrollControl';
|
||||
import { fixNum, getTimezoneOffsetString, getTranslate, hideAllChildren, isBrahmic, updateLang, waitNextFrame } from './Tools';
|
||||
import { getHistoryDetails } from 'db://assets/Loading/scripts/comm';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('HistoryDetail')
|
||||
@ -49,6 +50,7 @@ export class HistoryDetail extends Component {
|
||||
|
||||
dict = null
|
||||
data: any = null
|
||||
roundId: any = null
|
||||
|
||||
protected onLoad(): void {
|
||||
this.node.on("show_history_formula_detail", this.showFormulaDetail, this)
|
||||
@ -78,8 +80,8 @@ export class HistoryDetail extends Component {
|
||||
setDetailData(data, lang: string) {
|
||||
|
||||
this.data = null
|
||||
|
||||
this.data = JSON.parse(JSON.stringify(data));
|
||||
this.roundId = data.roundId
|
||||
|
||||
this.dict = this.langJson.json[lang] ?? this.langJson.json["en"];
|
||||
updateLang(this.node, this.dict, lang)
|
||||
@ -526,8 +528,11 @@ export class HistoryDetail extends Component {
|
||||
|
||||
const currencySymbol = this.data.currencySymbol
|
||||
const currency = this.data.currency
|
||||
|
||||
const scoreInfos = this.data.panDetails[0].ScoreInfos
|
||||
let historyDetails = await getHistoryDetails({
|
||||
GameId: "rp_11001",
|
||||
Id: this.roundId
|
||||
})
|
||||
const scoreInfos = historyDetails.panDetails[0].ScoreInfos
|
||||
const btn_winning_list = this.pnl_title.getChildByName("txt_spin").getChildByName("btn_winning_list").getComponent(Button)
|
||||
const sp = this.pnl_title.getChildByName("txt_spin").getChildByName("sp")
|
||||
if (scoreInfos) {
|
||||
@ -540,12 +545,12 @@ export class HistoryDetail extends Component {
|
||||
}
|
||||
|
||||
|
||||
this.data.panDetails.forEach(async (pan, idx) => {
|
||||
historyDetails.panDetails.forEach(async (pan, idx) => {
|
||||
const item = instantiate(this.item_detail);
|
||||
item.active = true
|
||||
this.loadOne(item, pan, idx)
|
||||
|
||||
if (idx == this.data.panDetails.length - 1) {
|
||||
if (idx == historyDetails.panDetails.length - 1) {
|
||||
// console.log("已全部生成完")
|
||||
this.hideLoading()
|
||||
this.scrollControl.jumpToPage(0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user