[fix] 七月爆機娛樂城公司活動
This commit is contained in:
parent
cd66ad53e4
commit
1927034da9
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@
|
|||||||
<!-- <link href="https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic&display=swap" rel="stylesheet"> -->
|
<!-- <link href="https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic&display=swap" rel="stylesheet"> -->
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>BJ_Casino_Rank</title>
|
<title>BJ_Casino_Rank</title>
|
||||||
<script type="module" crossorigin src="./assets/index.1efeab8a.js"></script>
|
<script type="module" crossorigin src="./assets/index.eabf07ba.js"></script>
|
||||||
<link rel="stylesheet" href="./assets/index.b312efde.css">
|
<link rel="stylesheet" href="./assets/index.b312efde.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ export class BJ_Casino_Data {
|
|||||||
private _rankMagnificationData: any[] = [];
|
private _rankMagnificationData: any[] = [];
|
||||||
private _rankWinMoneyData: any[] = [];
|
private _rankWinMoneyData: any[] = [];
|
||||||
|
|
||||||
private _nowSearchMagnificationID: number = 0;
|
private _nowSearchMagnificationID: number[] = [];
|
||||||
|
|
||||||
private _nowSearchWinMoneyID: number = 0;
|
private _nowSearchWinMoneyID: number = 0;
|
||||||
|
|
||||||
@ -59,6 +59,7 @@ export class BJ_Casino_Data {
|
|||||||
* 1 _rankWinMoneyData
|
* 1 _rankWinMoneyData
|
||||||
*/
|
*/
|
||||||
private _isOK: any[] = [false, true];
|
private _isOK: any[] = [false, true];
|
||||||
|
private _isMagnificationOK: any[] = [];
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
@ -162,6 +163,7 @@ export class BJ_Casino_Data {
|
|||||||
for (let i = 0; i < this.ThisUseType.length; i++) {
|
for (let i = 0; i < this.ThisUseType.length; i++) {
|
||||||
const thisUseType = this.ThisUseType[i];
|
const thisUseType = this.ThisUseType[i];
|
||||||
const rankType = this.RankType[thisUseType][0];
|
const rankType = this.RankType[thisUseType][0];
|
||||||
|
this._isMagnificationOK[rankType] = false;
|
||||||
let req: any = null;
|
let req: any = null;
|
||||||
req = new AppRankInfo(12, rankType);
|
req = new AppRankInfo(12, rankType);
|
||||||
await req.SendAsync(true);
|
await req.SendAsync(true);
|
||||||
@ -170,13 +172,13 @@ export class BJ_Casino_Data {
|
|||||||
if (resp.Status === 11) {
|
if (resp.Status === 11) {
|
||||||
CSMessage.NetError(resp.Method, resp.Status, "Rank 無資料");
|
CSMessage.NetError(resp.Method, resp.Status, "Rank 無資料");
|
||||||
this.OrganizeRankMagnificationData(this._rankMagnificationData);
|
this.OrganizeRankMagnificationData(this._rankMagnificationData);
|
||||||
this.SetRankMagnificationDataOK();
|
this.SetRankMagnificationDataOK(rankType);
|
||||||
} else {
|
} else {
|
||||||
CSMessage.NetError(resp.Method, resp.Status, "Get RankInfo Fail");
|
CSMessage.NetError(resp.Method, resp.Status, "Get RankInfo Fail");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.SetRankMagnificationSearchData(resp.Data);
|
this.SetRankMagnificationSearchData(rankType, resp.Data);
|
||||||
this.ParseRankMagnificationData(rankType, resp.Data);
|
this.ParseRankMagnificationData(rankType, resp.Data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -190,7 +192,7 @@ export class BJ_Casino_Data {
|
|||||||
if (resp.Status === 11) {
|
if (resp.Status === 11) {
|
||||||
CSMessage.NetError(resp.Method, resp.Status, "Rank 無資料");
|
CSMessage.NetError(resp.Method, resp.Status, "Rank 無資料");
|
||||||
this.OrganizeRankMagnificationData(this._rankMagnificationData);
|
this.OrganizeRankMagnificationData(this._rankMagnificationData);
|
||||||
this.SetRankMagnificationDataOK();
|
this.SetRankMagnificationDataOK(2);
|
||||||
} else {
|
} else {
|
||||||
CSMessage.NetError(resp.Method, resp.Status, "Get RankInfo Fail");
|
CSMessage.NetError(resp.Method, resp.Status, "Get RankInfo Fail");
|
||||||
}
|
}
|
||||||
@ -200,9 +202,9 @@ export class BJ_Casino_Data {
|
|||||||
this.ParseRankWinMoneyData(resp.Data);
|
this.ParseRankWinMoneyData(resp.Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SetRankMagnificationSearchData(data: any): void {
|
public SetRankMagnificationSearchData(rankType: number, data: any): void {
|
||||||
let id: number = +data["id"];
|
let id: number = +data["id"];
|
||||||
this._nowSearchMagnificationID = id;
|
this._nowSearchMagnificationID[rankType] = id;
|
||||||
this._nowContestID = id;
|
this._nowContestID = id;
|
||||||
this._nowContestDate = moment().format("MM/DD");
|
this._nowContestDate = moment().format("MM/DD");
|
||||||
for (let i: number = 0; i < this.ContestData.length; i++) {
|
for (let i: number = 0; i < this.ContestData.length; i++) {
|
||||||
@ -225,7 +227,7 @@ export class BJ_Casino_Data {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async ParseRankMagnificationData(rankType: number, data: any = null): Promise<void> {
|
public async ParseRankMagnificationData(rankType: number, data: any = null): Promise<void> {
|
||||||
let id: number = this._nowSearchMagnificationID;
|
let id: number = this._nowSearchMagnificationID[rankType];
|
||||||
if (data) {
|
if (data) {
|
||||||
this.RankDataAddDate(rankType, id, data["rank"]);
|
this.RankDataAddDate(rankType, id, data["rank"]);
|
||||||
this._rankMagnificationData = this._rankMagnificationData.concat(data["rank"]);
|
this._rankMagnificationData = this._rankMagnificationData.concat(data["rank"]);
|
||||||
@ -236,11 +238,11 @@ export class BJ_Casino_Data {
|
|||||||
}
|
}
|
||||||
if (id !== targetIndex) {
|
if (id !== targetIndex) {
|
||||||
if (this._isIDupup) {
|
if (this._isIDupup) {
|
||||||
this._nowSearchMagnificationID = id + 1;
|
this._nowSearchMagnificationID[rankType] = id + 1;
|
||||||
} else {
|
} else {
|
||||||
this._nowSearchMagnificationID = id - 1;
|
this._nowSearchMagnificationID[rankType] = id - 1;
|
||||||
}
|
}
|
||||||
let req: any = await this.GetRankData(12, rankType, this._nowSearchMagnificationID);
|
let req: any = await this.GetRankData(12, rankType, this._nowSearchMagnificationID[rankType]);
|
||||||
let resp: INetResponse<any> = req.Result;
|
let resp: INetResponse<any> = req.Result;
|
||||||
if (!resp.IsValid) {
|
if (!resp.IsValid) {
|
||||||
if (resp.Status === 11) {
|
if (resp.Status === 11) {
|
||||||
@ -255,7 +257,7 @@ export class BJ_Casino_Data {
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
this.OrganizeRankMagnificationData(this._rankMagnificationData);
|
this.OrganizeRankMagnificationData(this._rankMagnificationData);
|
||||||
this.SetRankMagnificationDataOK();
|
this.SetRankMagnificationDataOK(rankType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,7 +287,11 @@ export class BJ_Casino_Data {
|
|||||||
this._rankMagnificationData = rankdata;
|
this._rankMagnificationData = rankdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SetRankMagnificationDataOK(): void {
|
public SetRankMagnificationDataOK(rankType: number): void {
|
||||||
|
this._isMagnificationOK[rankType] = true;
|
||||||
|
if (this._isMagnificationOK.includes(false)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this._isOK[0] = true;
|
this._isOK[0] = true;
|
||||||
this._checkOK();
|
this._checkOK();
|
||||||
}
|
}
|
||||||
@ -350,8 +356,9 @@ export class BJ_Casino_Data {
|
|||||||
|
|
||||||
public RankDataAddDate(rankType: number, id: number, rankdata: any): any {
|
public RankDataAddDate(rankType: number, id: number, rankdata: any): any {
|
||||||
let date: string = this._contestDateFormID(id);
|
let date: string = this._contestDateFormID(id);
|
||||||
|
let lobby: string = this.RankType[rankType - 1][1];
|
||||||
for (let i: number = 0; i < rankdata.length; i++) {
|
for (let i: number = 0; i < rankdata.length; i++) {
|
||||||
rankdata[i].push(date, [rankType, this.RankType[rankType - 1][1]]);
|
rankdata[i].push(date, [rankType, lobby]);
|
||||||
}
|
}
|
||||||
return rankdata;
|
return rankdata;
|
||||||
}
|
}
|
||||||
@ -437,9 +444,9 @@ export class BJ_Casino_Data {
|
|||||||
this._nowContestStartIndex = this._contestIDFormDate(this._nowContestStart);
|
this._nowContestStartIndex = this._contestIDFormDate(this._nowContestStart);
|
||||||
this._nowContestEndIndex = this._contestIDFormDate(this._nowContestEnd);
|
this._nowContestEndIndex = this._contestIDFormDate(this._nowContestEnd);
|
||||||
if (this._isIDupup) {
|
if (this._isIDupup) {
|
||||||
this._nowSearchMagnificationID = this._nowSearchWinMoneyID = this._contestIDFormDate(this._nowContestStart);
|
this._nowSearchMagnificationID[2] = this._nowSearchWinMoneyID = this._contestIDFormDate(this._nowContestStart);
|
||||||
} else {
|
} else {
|
||||||
this._nowSearchMagnificationID = this._nowSearchWinMoneyID = this._contestIDFormDate(this._nowContestEnd);
|
this._nowSearchMagnificationID[2] = this._nowSearchWinMoneyID = this._contestIDFormDate(this._nowContestEnd);
|
||||||
}
|
}
|
||||||
this.Title = `${this._nowContestStart}~${this._nowContestEnd}`;
|
this.Title = `${this._nowContestStart}~${this._nowContestEnd}`;
|
||||||
|
|
||||||
@ -450,13 +457,13 @@ export class BJ_Casino_Data {
|
|||||||
|
|
||||||
public async RunRankMagnificationWeek(): Promise<void> {
|
public async RunRankMagnificationWeek(): Promise<void> {
|
||||||
this._rankMagnificationData = [];
|
this._rankMagnificationData = [];
|
||||||
let req: any = await this.GetRankData(12, 2, this._nowSearchMagnificationID);
|
let req: any = await this.GetRankData(12, 2, this._nowSearchMagnificationID[2]);
|
||||||
let resp: INetResponse<any> = req.Result;
|
let resp: INetResponse<any> = req.Result;
|
||||||
if (!resp.IsValid) {
|
if (!resp.IsValid) {
|
||||||
if (resp.Status === 11) {
|
if (resp.Status === 11) {
|
||||||
CSMessage.NetError(resp.Method, resp.Status, "Rank 無資料");
|
CSMessage.NetError(resp.Method, resp.Status, "Rank 無資料");
|
||||||
this.OrganizeRankMagnificationData(this._rankMagnificationData);
|
this.OrganizeRankMagnificationData(this._rankMagnificationData);
|
||||||
this.SetRankMagnificationDataOK();
|
this.SetRankMagnificationDataOK(2);
|
||||||
} else {
|
} else {
|
||||||
CSMessage.NetError(resp.Method, resp.Status, "Get RankInfo Fail");
|
CSMessage.NetError(resp.Method, resp.Status, "Get RankInfo Fail");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user