From b926f36e74ec2f0331662a469b9a34baad713114 Mon Sep 17 00:00:00 2001 From: JianMiau Date: Fri, 30 Sep 2022 10:48:45 +0800 Subject: [PATCH] =?UTF-8?q?[add]=20=E9=81=B8=E6=93=87Servertype=E6=9C=83?= =?UTF-8?q?=E9=80=A3=E5=8B=95=E4=B8=8B=E9=9D=A22=E9=81=B8=E9=A0=85?= =?UTF-8?q?=E4=B8=80=E8=B5=B7=E6=94=B9=E8=AE=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/script/BJ_Casino_Deeplink.ts | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/src/script/BJ_Casino_Deeplink.ts b/src/script/BJ_Casino_Deeplink.ts index 1835700..a14b0ee 100644 --- a/src/script/BJ_Casino_Deeplink.ts +++ b/src/script/BJ_Casino_Deeplink.ts @@ -69,6 +69,60 @@ export class BJ_Casino_Deeplink { public SelectServertype(data: any) { // data为el-option上:value绑定的对象 this._client.servertype.value = data; + + let select: string = ""; + + switch (this.Servertype[1][data]) { + case "Internal_Dev": { + select = "內版"; + break; + } + + case "Out": { + select = "外版"; + break; + } + + case "Submit": { + select = "送審"; + break; + } + + case "Test": { + select = "Test"; + break; + } + + case "QA": { + select = "QA"; + break; + } + + default: + break; + } + + if (select) { + let hostport: number; + for (let i = 0; i < this.Hostport[1].length; i++) { + const hostportName = this.Hostport[1][i]; + if (hostportName === select) { + hostport = i; + } + } + this._client.hostport.value = hostport; + this._client.hostportDefault.value = this.Hostport[1][this._client.hostport.value]; + + let patch: number; + for (let i = 0; i < this.Patch[1].length; i++) { + const patchName = this.Patch[1][i]; + if (patchName === select) { + patch = i; + } + } + this._client.patch.value = patch; + this._client.patchDefault.value = this.Patch[1][this._client.patch.value]; + } } public SelectHostport(data: any) {