[add] 1305
This commit is contained in:
parent
c60f939f91
commit
4d939911b5
@ -4,122 +4,150 @@ import { Ref, ref } from "vue";
|
|||||||
import MainControl, { DownloadForm } from "./Common/MainControl/MainControl";
|
import MainControl, { DownloadForm } from "./Common/MainControl/MainControl";
|
||||||
|
|
||||||
export class BJ_Casino_BotController {
|
export class BJ_Casino_BotController {
|
||||||
//#region Lifecycle
|
//#region Lifecycle
|
||||||
|
|
||||||
public Hostport: any[] = ["不選擇環境", "內版", "肉乾", "賴宏", "40", "送審", "外版", "testing1", "testing2", "testing3"];
|
public Hostport: any[] = ["不選擇環境", "內版", "Test", "肉乾9006", "肉乾9007", "肉乾9008", "肉乾9009", "賴宏", "40", "送審", "外版", "testing1", "testing2", "testing3"];
|
||||||
|
|
||||||
public ServerIndedx: number = 6;
|
public ServerIndedx: number = 10;
|
||||||
|
|
||||||
public ServerDefault: Ref<string> = ref(this.Hostport[this.ServerIndedx]);
|
public ServerDefault: Ref<string> = ref(this.Hostport[this.ServerIndedx]);
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region get set
|
//#region get set
|
||||||
|
|
||||||
// public get Host(): string { return this.Host; }
|
// public get Host(): string { return this.Host; }
|
||||||
// public get Port(): string { return this.Port; }
|
// public get Port(): string { return this.Port; }
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Lifecycle
|
//#region Lifecycle
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
constructor() {
|
constructor() {
|
||||||
this.onLoad();
|
this.onLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async onLoad(): Promise<void> {
|
public async onLoad(): Promise<void> {
|
||||||
// await LazyLoad.Init();
|
// await LazyLoad.Init();
|
||||||
import("dayjs/locale/zh-tw");
|
import("dayjs/locale/zh-tw");
|
||||||
dayjs.locale("zh-tw");
|
dayjs.locale("zh-tw");
|
||||||
// this.BJ_Casino = client.BJ_Casino;
|
// this.BJ_Casino = client.BJ_Casino;
|
||||||
await MainControl.DownloadForm(DownloadForm.FormType.Formread);
|
await MainControl.DownloadForm(DownloadForm.FormType.Formread);
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region Custom
|
//#region Custom
|
||||||
|
|
||||||
public GetServer(): any {
|
public GetServer(): any {
|
||||||
let resp: Object = {};
|
let resp: Object = {};
|
||||||
switch (this.ServerIndedx) {
|
switch (this.ServerIndedx) {
|
||||||
// 不選擇環境
|
// 不選擇環境
|
||||||
case 0:
|
case 0:
|
||||||
// 外網連內版
|
// 外網連內版
|
||||||
case 1: {
|
case 1: {
|
||||||
resp["host"] = "http://220.134.195.1";
|
resp["host"] = "http://220.134.195.1";
|
||||||
resp["port"] = "19005";
|
resp["port"] = "19005";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 肉乾
|
// Test
|
||||||
case 2: {
|
case 2: {
|
||||||
resp["host"] = "http://192.168.5.230";
|
resp["host"] = "https://bot.online-bj.com";
|
||||||
resp["port"] = "9006";
|
resp["port"] = "9005";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 賴宏
|
// 肉乾9006
|
||||||
case 3: {
|
case 3: {
|
||||||
resp["host"] = "http://192.168.5.134";
|
resp["host"] = "http://192.168.5.230";
|
||||||
resp["port"] = "9005";
|
resp["port"] = "9006";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 40
|
// 肉乾9007
|
||||||
case 4: {
|
case 4: {
|
||||||
resp["host"] = "http://192.168.5.12";
|
resp["host"] = "http://192.168.5.230";
|
||||||
resp["port"] = "9487";
|
resp["port"] = "9007";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 送審
|
// 肉乾9008
|
||||||
case 5: {
|
case 5: {
|
||||||
resp["host"] = "https://submit.online-bj.com";
|
resp["host"] = "http://192.168.5.230";
|
||||||
resp["port"] = "9005";
|
resp["port"] = "9008";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 外版
|
// 肉乾9009
|
||||||
case 6: {
|
case 6: {
|
||||||
resp["host"] = "https://game.online-bj.com";
|
resp["host"] = "http://192.168.5.230";
|
||||||
resp["port"] = "9005";
|
resp["port"] = "9009";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// testing1
|
// 賴宏
|
||||||
case 7: {
|
case 7: {
|
||||||
resp["host"] = "http://bj-testing1.casino.catan.com.tw";
|
resp["host"] = "http://192.168.5.134";
|
||||||
resp["port"] = "9005";
|
resp["port"] = "9005";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// testing2
|
// 40
|
||||||
case 8: {
|
case 8: {
|
||||||
resp["host"] = "http://bj-testing2.casino.catan.com.tw";
|
resp["host"] = "http://192.168.5.12";
|
||||||
resp["port"] = "9005";
|
resp["port"] = "9487";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// testing3
|
// 送審
|
||||||
case 9: {
|
case 9: {
|
||||||
resp["host"] = "http://bj-testing3.casino.catan.com.tw";
|
resp["host"] = "https://submit.online-bj.com";
|
||||||
resp["port"] = "9005";
|
resp["port"] = "9005";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default: {
|
// 外版
|
||||||
break;
|
case 10: {
|
||||||
}
|
resp["host"] = "https://game.online-bj.com";
|
||||||
}
|
resp["port"] = "9005";
|
||||||
return resp;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SelectServer(data: number): void {
|
// testing1
|
||||||
this.ServerIndedx = data;
|
case 11: {
|
||||||
}
|
resp["host"] = "http://bj-testing1.casino.catan.com.tw";
|
||||||
|
resp["port"] = "9005";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
//#endregion
|
// testing2
|
||||||
|
case 12: {
|
||||||
|
resp["host"] = "http://bj-testing2.casino.catan.com.tw";
|
||||||
|
resp["port"] = "9005";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// testing3
|
||||||
|
case 13: {
|
||||||
|
resp["host"] = "http://bj-testing3.casino.catan.com.tw";
|
||||||
|
resp["port"] = "9005";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
default: {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SelectServer(data: number): void {
|
||||||
|
this.ServerIndedx = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
//#endregion
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,30 @@
|
|||||||
export module BusinessEnum {
|
export module BusinessEnum {
|
||||||
export enum BusinessType {
|
export enum BusinessType {
|
||||||
Type1 = "H5",
|
Type1 = "H5",
|
||||||
Type2 = "App"
|
Type2 = "App"
|
||||||
}
|
}
|
||||||
export enum ServerType {
|
export enum ServerType {
|
||||||
/** WEB格式 */
|
/** WEB格式 */
|
||||||
Web = 1,
|
Web = 1,
|
||||||
/** 外版 */
|
/** 外版 */
|
||||||
Out = 2,
|
Out = 2,
|
||||||
/** 送審環境 */
|
/** 送審環境 */
|
||||||
Submit = 3,
|
Submit = 3,
|
||||||
/** 內版商業DEMO測試(B2B) */
|
/** 內版商業DEMO測試(B2B) */
|
||||||
Internal_release = 4,
|
Internal_release = 4,
|
||||||
/** 內版開發(內網&4G) */
|
/** 內版開發(內網&4G) */
|
||||||
Internal_Dev = 5,
|
Internal_Dev = 5,
|
||||||
/** 外部商業DEMO(B2B) */
|
/** 外部商業DEMO(B2B) */
|
||||||
Out_B2B = 6
|
Out_B2B = 6,
|
||||||
}
|
/** QA */
|
||||||
export enum LogoType {
|
QA = 7,
|
||||||
/** 完美(目前只有WEB) */
|
/** Test */
|
||||||
WM = 1
|
Test = 8
|
||||||
}
|
}
|
||||||
|
export enum LogoType {
|
||||||
|
/** 完美(目前只有WEB) */
|
||||||
|
WM = 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -29,209 +33,215 @@ export module BusinessEnum {
|
|||||||
@explain 遊戲一定都一樣不能改動介面
|
@explain 遊戲一定都一樣不能改動介面
|
||||||
*/
|
*/
|
||||||
export default class BusinessTypeSetting {
|
export default class BusinessTypeSetting {
|
||||||
/** 產品商業類別字串(組合判斷用) */
|
/** 產品商業類別字串(組合判斷用) */
|
||||||
public static readonly TYPE_BUSINESS: string = "App";
|
public static readonly TYPE_BUSINESS: string = "App";
|
||||||
/** 編譯版本 */
|
/** 編譯版本 */
|
||||||
public static readonly COMPILE_VERSION: string = "1.4.1";
|
public static readonly COMPILE_VERSION: string = "1.7.1";
|
||||||
/** 編譯程式碼版號 */
|
/** 編譯程式碼版號 */
|
||||||
public static readonly SCRIPT_BUNLE_LIST: string[] = [
|
public static readonly SCRIPT_BUNLE_LIST: string[] = [
|
||||||
"FormTableScript", "CommonScript", "ElementUIScript", "LoginScript", "LobbyScript", "SlotScript"
|
"FormTableScript", "CommonScript", "ElementUIScript", "LoginScript", "LobbyScript", "SlotScript"
|
||||||
];
|
];
|
||||||
public static readonly ART_UI_BUNLE_LIST: string[] = [
|
public static readonly ART_UI_BUNLE_LIST: string[] = [
|
||||||
"Common", "CommonSound", "Login", "Lobby", "GameCommon",
|
"Common", "CommonSound", "Login", "Lobby", "GameCommon",
|
||||||
"Game_BottomUI_SD", "Game_BigWinJackpot", "GameMessage", "CommonLanguageTexture", "MainControl",
|
"Game_BottomUI_SD", "Game_BigWinJackpot", "GameMessage", "CommonLanguageTexture", "MainControl",
|
||||||
"BindAccount", "SettingPanel", "Shop", "Vip", "Ad",
|
"BindAconsoleount", "SettingPanel", "Shop", "Vip", "Ad",
|
||||||
"Mail", "Chat", "PlayerInfo", "Rank", "Gift",
|
"Mail", "Chat", "PlayerInfo", "Rank", "Gift",
|
||||||
"ResourceItem", "Backpack", "GettingPanel", "Activity", "Game_BottomUI_BJ"
|
"ResourceItem", "Backpack", "GettingPanel", "Activity", "Game_BottomUI_BJ"
|
||||||
];
|
];
|
||||||
public static readonly DEV_ART_UI_BUNLE_LIST: string[] = [
|
public static readonly DEV_ART_UI_BUNLE_LIST: string[] = [
|
||||||
|
|
||||||
]
|
]
|
||||||
public static readonly ART_GAME_BUNLE_LIST: string[] = [
|
public static readonly ART_GAME_BUNLE_LIST: string[] = [
|
||||||
"Game_1201", "Game_1202", "Game_1302"
|
"Game_1201", "Game_1202", "Game_1302"
|
||||||
]
|
]
|
||||||
public static readonly ART_REMOTE_GAME_BUNLE_LIST: string[] = [
|
public static readonly ART_REMOTE_GAME_BUNLE_LIST: string[] = [
|
||||||
"Game_1", "Game_2", "Game_5", "Game_8", "Game_9",
|
"Game_1", "Game_2", "Game_5", "Game_8", "Game_9",
|
||||||
"Game_10", "Game_12", "Game_15", "Game_16", "Game_18",
|
"Game_10", "Game_12", "Game_15", "Game_16", "Game_18",
|
||||||
"Game_23", "Game_24", "Game_25", "Game_26", "Game_27",
|
"Game_23", "Game_24", "Game_25", "Game_26", "Game_27",
|
||||||
"Game_28", "Game_29", "Game_30", "Game_32", "Game_33",
|
"Game_28", "Game_29", "Game_30", "Game_32", "Game_33",
|
||||||
"Game_34", "Game_35", "Game_37", "Game_36", "Game_40",
|
"Game_34", "Game_35", "Game_37", "Game_36", "Game_40",
|
||||||
"Game_44", "Game_48", "Game_50", "Game_51", "Game_58",
|
"Game_44", "Game_48", "Game_50", "Game_51", "Game_58",
|
||||||
"Game_1101", "Game_1401", "Game_1501", "Game_2001", "Game_2003",
|
"Game_1101", "Game_1401", "Game_1501", "Game_2001", "Game_2003",
|
||||||
"Game_3002", "Game_3003", "Game_3012",
|
"Game_3002", "Game_3003", "Game_3012",
|
||||||
]
|
]
|
||||||
/** 送審旗標(讀取外版自動判斷是否送審) */
|
/** 送審旗標(讀取外版自動判斷是否送審) */
|
||||||
public static IsSubmit: boolean = false;
|
public static IsSubmit: boolean = false;
|
||||||
/** 跑送審2的手動旗標(若是送審且設為true跑2號環境) */
|
/** 跑送審2的手動旗標(若是送審且設為true跑2號環境) */
|
||||||
public static IsSubmitTestFlight: boolean = false;
|
public static IsSubmitTestFlight: boolean = false;
|
||||||
/** B2B手動旗標(true寫死B2B環境) */
|
/** B2B手動旗標(true寫死B2B環境) */
|
||||||
public static IsB2B: boolean = false;
|
public static IsB2B: boolean = false;
|
||||||
|
|
||||||
/** 商業LOGO圖代碼(讀同一張表但UI有改的設定) */
|
/** 商業LOGO圖代碼(讀同一張表但UI有改的設定) */
|
||||||
public static Logo: number = null;
|
public static Logo: number = null;
|
||||||
/** 連線IP(網頁版會接網址參數所以要多開變數直接指定) */
|
/** 連線IP(網頁版會接網址參數所以要多開變數直接指定) */
|
||||||
public static UseHost: string = null;
|
public static UseHost: string = null;
|
||||||
/** 連接阜(網頁版會接網址參數所以要多開變數直接指定) */
|
/** 連接阜(網頁版會接網址參數所以要多開變數直接指定) */
|
||||||
public static UsePort: number = null;
|
public static UsePort: number = null;
|
||||||
/** 資源伺服器網址 */
|
/** 資源伺服器網址 */
|
||||||
public static UsePatch: string = null;
|
public static UsePatch: string = null;
|
||||||
/** 帳號 */
|
/** 帳號 */
|
||||||
public static Account: string = null;
|
public static Aconsoleount: string = null;
|
||||||
/** 密碼 */
|
/** 密碼 */
|
||||||
public static Password: string = null;
|
public static Password: string = null;
|
||||||
|
|
||||||
// =======================================================================================
|
// =======================================================================================
|
||||||
/** 執行環境ProductEnum.ServerType */
|
/** 執行環境ProductEnum.ServerType */
|
||||||
public static UseServerTpye: BusinessEnum.ServerType = BusinessEnum.ServerType.Web;
|
public static UseServerTpye: BusinessEnum.ServerType = BusinessEnum.ServerType.Web;
|
||||||
/** 網頁是否在伺服器上 */
|
/** 網頁是否在伺服器上 */
|
||||||
public static readonly CheckOnServer: boolean =
|
public static readonly CheckOnServer: boolean =
|
||||||
window.location.href.indexOf("localhost") == -1
|
window.location.href.indexOf("localhost") == -1
|
||||||
&& window.location.href.indexOf("/build/") == -1;
|
&& window.location.href.indexOf("/build/") == -1;
|
||||||
/** 網頁測試讀取對應資源的位置 */
|
/** 網頁測試讀取對應資源的位置 */
|
||||||
public static readonly FolderUrlImg: string = "shared/img/";
|
public static readonly FolderUrlImg: string = "shared/img/";
|
||||||
public static readonly FolderUrlBg: string = "shared/bg/";
|
public static readonly FolderUrlBg: string = "shared/bg/";
|
||||||
public static readonly FolderUrlJson: string = "shared/jsons/";
|
public static readonly FolderUrlJson: string = "shared/jsons/";
|
||||||
public static readonly FolderUrlTxt: string = "shared/txt/";
|
public static readonly FolderUrlTxt: string = "shared/txt/";
|
||||||
public static readonly FolderUrlLoading: string = "shared/loading/";
|
public static readonly FolderUrlLoading: string = "shared/loading/";
|
||||||
public static readonly FolderUrlMp3: string = "shared/";
|
public static readonly FolderUrlMp3: string = "shared/";
|
||||||
public static readonly FolderUrlBundle: string = `Bundle_${true ? "Debug" : "Release"}/`;
|
public static readonly FolderUrlBundle: string = `Bundle_${true ? "Debug" : "Release"}/`;
|
||||||
public static readonly FolderOS: string = "Android/";
|
public static readonly FolderOS: string = "Android/";
|
||||||
/**遠端Bundle路徑為: URL + BundleName.非遊戲資源到各自平台資料夾找BUNDLE */
|
/**遠端Bundle路徑為: URL + BundleName.非遊戲資源到各自平台資料夾找BUNDLE */
|
||||||
public static GetRemoteFileUrl(bundleName: string): string {
|
public static GetRemoteFileUrl(bundleName: string): string {
|
||||||
let gameNumber: string = bundleName.split("Game_")[1];
|
let gameNumber: string = bundleName.split("Game_")[1];
|
||||||
var regExp: RegExp = /^[0-9]+$/;
|
var regExp: RegExp = /^[0-9]+$/;
|
||||||
let isGame: boolean = regExp.test(gameNumber);
|
let isGame: boolean = regExp.test(gameNumber);
|
||||||
let bundleUrl: string = `${BusinessTypeSetting.UsePatch}${BusinessTypeSetting.FolderUrlBundle}`;
|
let bundleUrl: string = `${BusinessTypeSetting.UsePatch}${BusinessTypeSetting.FolderUrlBundle}`;
|
||||||
if (isGame) {
|
if (isGame) {
|
||||||
bundleUrl = `${bundleUrl}${bundleName}`;
|
bundleUrl = `${bundleUrl}${bundleName}`;
|
||||||
} else {
|
} else {
|
||||||
bundleUrl = `${bundleUrl}${BusinessTypeSetting.FolderOS}${bundleName}`;
|
bundleUrl = `${bundleUrl}${BusinessTypeSetting.FolderOS}${bundleName}`;
|
||||||
}
|
}
|
||||||
return bundleUrl;
|
return bundleUrl;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 取得PACH資原路徑
|
* 取得PACH資原路徑
|
||||||
* @param type 執行環境()
|
* @param type 執行環境()
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
public static GetPatchUrl(type: BusinessEnum.ServerType): string {
|
public static GetPatchUrl(type: BusinessEnum.ServerType): string {
|
||||||
if (this.UseServerTpye == BusinessEnum.ServerType.Web) {
|
if (this.UseServerTpye === BusinessEnum.ServerType.Web) {
|
||||||
// TYP2網頁版資源路路徑判斷
|
// TYP2網頁版資源路路徑判斷
|
||||||
if (this.CheckOnServer) {
|
if (this.CheckOnServer) {
|
||||||
return "../shared/";
|
return "../shared/";
|
||||||
} else {
|
} else {
|
||||||
return "http://patch-dev.online-bj.com//shared/";
|
return "http://patch-dev.online-bj.com//shared/";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case BusinessEnum.ServerType.Out:
|
case BusinessEnum.ServerType.Out:
|
||||||
return "https://patch.online-bj.com/game/";
|
return "https://patch.online-bj.com/game/";
|
||||||
case BusinessEnum.ServerType.Submit:
|
case BusinessEnum.ServerType.Submit:
|
||||||
if (!this.IsSubmitTestFlight) {
|
return "https://patch-submit.online-bj.com/game/";
|
||||||
return "https://patch-submit.online-bj.com/game/";
|
|
||||||
} else {
|
|
||||||
return "https://patch-submit2.online-bj.com/game/";
|
|
||||||
}
|
|
||||||
|
|
||||||
case BusinessEnum.ServerType.Out_B2B:
|
case BusinessEnum.ServerType.Out_B2B:
|
||||||
return "https://patch-demo.online-bj.com/game/";
|
return "https://patch-demo.online-bj.com/game/";
|
||||||
case BusinessEnum.ServerType.Internal_release:
|
case BusinessEnum.ServerType.Internal_release:
|
||||||
return "http://patch-release.online-bj.com/";
|
return "http://patch-release.online-bj.com/";
|
||||||
|
|
||||||
case BusinessEnum.ServerType.Internal_Dev:
|
case BusinessEnum.ServerType.Internal_Dev:
|
||||||
return "http://patch-dev.online-bj.com/";
|
return "http://patch-dev.online-bj.com/";
|
||||||
|
|
||||||
default:
|
case BusinessEnum.ServerType.QA:
|
||||||
console.warn("GetPatchUrl Uncheck ServerType.");
|
return "https://patch-qa.online-bj.com/game/";
|
||||||
return "http://patch-dev.online-bj.com/";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 取得連線伺服器IP
|
|
||||||
* @param type 執行環境
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
public static GetHostUrl(type: BusinessEnum.ServerType): string {
|
|
||||||
if (this.UseServerTpye == BusinessEnum.ServerType.Web) {
|
|
||||||
return "app.casino.catan.com.tw";
|
|
||||||
}
|
|
||||||
switch (type) {
|
|
||||||
case BusinessEnum.ServerType.Out:
|
|
||||||
return "https://game.online-bj.com";
|
|
||||||
case BusinessEnum.ServerType.Submit:
|
|
||||||
if (!this.IsSubmitTestFlight) {
|
|
||||||
return "https://submit.online-bj.com";
|
|
||||||
} else {
|
|
||||||
return "https://submit2.online-bj.com";
|
|
||||||
}
|
|
||||||
|
|
||||||
case BusinessEnum.ServerType.Out_B2B:
|
case BusinessEnum.ServerType.Test:
|
||||||
return "https://demo.online-bj.com";
|
return "https://patch-bot.online-bj.com/game/";
|
||||||
case BusinessEnum.ServerType.Internal_release:
|
|
||||||
return "https://demo.online-bj.com";
|
|
||||||
|
|
||||||
case BusinessEnum.ServerType.Internal_Dev:
|
default:
|
||||||
return "http://220.134.195.1";
|
console.warn("GetPatchUrl Uncheck ServerType.");
|
||||||
|
return "http://patch-dev.online-bj.com/";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 取得連線伺服器IP
|
||||||
|
* @param type 執行環境
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
public static GetHostUrl(type: BusinessEnum.ServerType): string {
|
||||||
|
if (this.UseServerTpye === BusinessEnum.ServerType.Web) {
|
||||||
|
return "app.casino.catan.com.tw";
|
||||||
|
}
|
||||||
|
switch (type) {
|
||||||
|
case BusinessEnum.ServerType.Out:
|
||||||
|
return "https://game.online-bj.com";
|
||||||
|
case BusinessEnum.ServerType.Submit:
|
||||||
|
return "https://submit.online-bj.com";
|
||||||
|
|
||||||
default:
|
case BusinessEnum.ServerType.Out_B2B:
|
||||||
console.warn("GetHostUrl Uncheck ServerType.");
|
return "https://demo.online-bj.com";
|
||||||
// 只有內網可憐IP
|
case BusinessEnum.ServerType.Internal_release:
|
||||||
return "app.casino.catan.com.tw";
|
return "https://demo.online-bj.com";
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 取得伺服器連接端口
|
|
||||||
* @param type 執行環境
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
public static GetPortNum(type: BusinessEnum.ServerType): number {
|
|
||||||
if (this.UseServerTpye == BusinessEnum.ServerType.Web) {
|
|
||||||
// 網頁版測試專用.正式接網頁參數
|
|
||||||
return 9005;
|
|
||||||
}
|
|
||||||
switch (type) {
|
|
||||||
case BusinessEnum.ServerType.Out:
|
|
||||||
return 9005;
|
|
||||||
case BusinessEnum.ServerType.Submit:
|
|
||||||
if (!this.IsSubmitTestFlight) {
|
|
||||||
return 9005;
|
|
||||||
} else {
|
|
||||||
return 9005;
|
|
||||||
}
|
|
||||||
|
|
||||||
case BusinessEnum.ServerType.Out_B2B:
|
case BusinessEnum.ServerType.Internal_Dev:
|
||||||
return 9005;
|
return "http://220.134.195.1";
|
||||||
case BusinessEnum.ServerType.Internal_release:
|
|
||||||
return 9005;
|
|
||||||
|
|
||||||
case BusinessEnum.ServerType.Internal_Dev:
|
case BusinessEnum.ServerType.QA:
|
||||||
return 19005;
|
return "https://qa.online-bj.com";
|
||||||
|
|
||||||
default:
|
case BusinessEnum.ServerType.Test:
|
||||||
console.warn("GePortNum Uncheck ServerType.");
|
return "https://bot.online-bj.com";
|
||||||
return 9005;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static GetDownloadUrl(type: BusinessEnum.ServerType): string {
|
|
||||||
switch (type) {
|
|
||||||
case BusinessEnum.ServerType.Internal_Dev:
|
|
||||||
return "http://static-dev.online-bj.com/";
|
|
||||||
default:
|
|
||||||
let url: string = this.GetHostUrl(type);
|
|
||||||
url = url.replace("http://", "");
|
|
||||||
url = url.replace("https://", "");
|
|
||||||
return "https://static-" + url;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static GetUploadUrl(type: BusinessEnum.ServerType): string {
|
default:
|
||||||
let port: string = ":9080";
|
console.warn("GetHostUrl Uncheck ServerType.");
|
||||||
switch (type) {
|
// 只有內網可憐IP
|
||||||
case BusinessEnum.ServerType.Internal_Dev:
|
return "app.casino.catan.com.tw";
|
||||||
return "http://static-dev.online-bj.com" + port;
|
}
|
||||||
default:
|
}
|
||||||
return this.GetHostUrl(type) + port;
|
/**
|
||||||
}
|
* 取得伺服器連接端口
|
||||||
}
|
* @param type 執行環境
|
||||||
// =======================================================================================
|
* @returns
|
||||||
|
*/
|
||||||
|
public static GetPortNum(type: BusinessEnum.ServerType): number {
|
||||||
|
if (this.UseServerTpye === BusinessEnum.ServerType.Web) {
|
||||||
|
// 網頁版測試專用.正式接網頁參數
|
||||||
|
return 9005;
|
||||||
|
}
|
||||||
|
switch (type) {
|
||||||
|
case BusinessEnum.ServerType.Out:
|
||||||
|
return 9005;
|
||||||
|
case BusinessEnum.ServerType.Submit:
|
||||||
|
return 9005;
|
||||||
|
|
||||||
|
case BusinessEnum.ServerType.Out_B2B:
|
||||||
|
return 9005;
|
||||||
|
case BusinessEnum.ServerType.Internal_release:
|
||||||
|
return 9005;
|
||||||
|
|
||||||
|
case BusinessEnum.ServerType.Internal_Dev:
|
||||||
|
return 19005;
|
||||||
|
|
||||||
|
case BusinessEnum.ServerType.QA:
|
||||||
|
return 9005;
|
||||||
|
|
||||||
|
case BusinessEnum.ServerType.Test:
|
||||||
|
return 9005;
|
||||||
|
|
||||||
|
default:
|
||||||
|
console.warn("GePortNum Uncheck ServerType.");
|
||||||
|
return 9005;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static GetDownloadUrl(type: BusinessEnum.ServerType): string {
|
||||||
|
switch (type) {
|
||||||
|
case BusinessEnum.ServerType.Internal_Dev:
|
||||||
|
return "http://static-dev.online-bj.com/";
|
||||||
|
default:
|
||||||
|
let url: string = this.GetHostUrl(type);
|
||||||
|
url = url.replace("http://", "");
|
||||||
|
url = url.replace("https://", "");
|
||||||
|
return "https://static-" + url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetUploadUrl(type: BusinessEnum.ServerType): string {
|
||||||
|
let port: string = ":9080";
|
||||||
|
switch (type) {
|
||||||
|
case BusinessEnum.ServerType.Internal_Dev:
|
||||||
|
return "http://static-dev.online-bj.com" + port;
|
||||||
|
default:
|
||||||
|
return this.GetHostUrl(type) + port;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// =======================================================================================
|
||||||
}
|
}
|
@ -1,10 +1,12 @@
|
|||||||
export * from "../Slot1";
|
export * from "../Slot1";
|
||||||
export * from "../Slot1201";
|
export * from "../Slot1201";
|
||||||
|
export * from "../Slot1305";
|
||||||
export * from "../Slot32";
|
export * from "../Slot32";
|
||||||
export * from "../Slot34";
|
export * from "../Slot34";
|
||||||
export * from "../Slot48";
|
export * from "../Slot48";
|
||||||
export * from "../Slot50";
|
export * from "../Slot50";
|
||||||
export * from "../Slot62";
|
export * from "../Slot62";
|
||||||
export * from "../Slot64";
|
export * from "../Slot64";
|
||||||
|
export * from "../Slot65";
|
||||||
export * from "../Slot66";
|
export * from "../Slot66";
|
||||||
export * from "./SlotBase";
|
export * from "./SlotBase";
|
||||||
|
@ -95,7 +95,10 @@ export class SlotBase {
|
|||||||
if (this._bj_Slot.IsCountStop.value && this._bj_Slot.CountStop.value === 0) {
|
if (this._bj_Slot.IsCountStop.value && this._bj_Slot.CountStop.value === 0) {
|
||||||
this._bj_Slot.OnclickStop();
|
this._bj_Slot.OnclickStop();
|
||||||
}
|
}
|
||||||
this._bj_Casino_Bot.AddLog(`Slot${this.ID} Spin Bet: ${this._bj_Slot.NowBet}, Money: ${money}${winMoneyLog}${freeLog}`);
|
if (ratio > 100) {
|
||||||
|
this._bj_Casino_Bot.AddLog(`Slot${this.ID} Spin Bet: ${this._bj_Slot.NowBet}, Ratio: ${ratio}, Money: ${money}${winMoneyLog}${freeLog}`);
|
||||||
|
}
|
||||||
|
// this._bj_Casino_Bot.AddLog(`Slot${this.ID} Spin Bet: ${this._bj_Slot.NowBet}, Money: ${money}${winMoneyLog}${freeLog}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async FreeSpin(freeCount: number): Promise<number[]> {
|
public async FreeSpin(freeCount: number): Promise<number[]> {
|
||||||
@ -122,7 +125,7 @@ export class SlotBase {
|
|||||||
} else {
|
} else {
|
||||||
CSMessage.NetError(resp.Method, resp.Status);
|
CSMessage.NetError(resp.Method, resp.Status);
|
||||||
}
|
}
|
||||||
this._bj_Casino_Bot.AddLog(`Slot${this.ID} FreeSpin MaxCount: ${freeCount}, Count: ${i + 1}`);
|
// this._bj_Casino_Bot.AddLog(`Slot${this.ID} FreeSpin MaxCount: ${freeCount}, Count: ${i + 1}`);
|
||||||
}
|
}
|
||||||
return [freeCount, fswinMoney, fsmoney];
|
return [freeCount, fswinMoney, fsmoney];
|
||||||
}
|
}
|
||||||
|
13
src/script/Common/Game/Slot1305.ts
Normal file
13
src/script/Common/Game/Slot1305.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import SlotBase from "./Base/SlotBase";
|
||||||
|
|
||||||
|
|
||||||
|
export class Slot1305 extends SlotBase {
|
||||||
|
//#region public
|
||||||
|
|
||||||
|
public get ID(): number { return 1305; }
|
||||||
|
public get HasRetriggerFreeSpin(): boolean { return true; }
|
||||||
|
|
||||||
|
//#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Slot1305;
|
13
src/script/Common/Game/Slot65.ts
Normal file
13
src/script/Common/Game/Slot65.ts
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
import SlotBase from "./Base/SlotBase";
|
||||||
|
|
||||||
|
|
||||||
|
export class Slot65 extends SlotBase {
|
||||||
|
//#region public
|
||||||
|
|
||||||
|
public get ID(): number { return 65; }
|
||||||
|
public get HasRetriggerFreeSpin(): boolean { return true; }
|
||||||
|
|
||||||
|
//#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Slot65;
|
Loading…
x
Reference in New Issue
Block a user