[add] 裝置碼

This commit is contained in:
建喵 2022-08-03 14:32:20 +08:00
parent 61bffe4315
commit 8edd4b29b7
6 changed files with 629 additions and 513 deletions

View File

@ -1,27 +1,27 @@
{ {
"name": "bj-casino-deeplink", "name": "bj-casino-deeplink",
"private": true, "private": true,
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite --host",
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vite build", "build": "vite build",
"build1": "vue-tsc --noEmit && vite build", "build1": "vue-tsc --noEmit && vite build",
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@vue/cli": "^5.0.4", "@vue/cli": "^5.0.4",
"@vue/compiler-sfc": "^3.2.32", "@vue/compiler-sfc": "^3.2.32",
"bootstrap": "^5.1.3", "bootstrap": "^5.1.3",
"element-plus": "^2.1.9", "element-plus": "^2.1.9",
"moment": "^2.29.2", "moment": "^2.29.2",
"vue": "^3.2.25" "vue": "^3.2.25"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^2.3.1", "@vitejs/plugin-vue": "^2.3.1",
"typescript": "^4.5.4", "typescript": "^4.5.4",
"vite": "^2.9.2", "vite": "^2.9.2",
"vue-tsc": "^0.29.8" "vue-tsc": "^0.29.8"
}, },
"@vue/compiler-sfc": "file: node_modules/@vue/compiler-sfc" "@vue/compiler-sfc": "file: node_modules/@vue/compiler-sfc"
} }

View File

@ -1,6 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { ElDialog } from 'element-plus';
import { ref } from "vue"; import { ref } from "vue";
import { BJ_Casino_Deeplink } from "../script/BJ_Casino_Deeplink"; import { BJ_Casino_Deeplink } from "../script/BJ_Casino_Deeplink";
import Popup from './Popup.vue';
const servertypeDefault = ref('') const servertypeDefault = ref('')
const hostportDefault = ref('') const hostportDefault = ref('')
@ -9,103 +11,120 @@ const servertype = ref(0)
const hostport = ref(0) const hostport = ref(0)
const patch = ref(0) const patch = ref(0)
const iscustom = ref(false) const iscustom = ref(false)
const isBtn_WanOpen = ref(false)
const PopupVisible = ref(false)
const input3 = ref('') const input3 = ref('')
const self = { const self = {
servertypeDefault: servertypeDefault, servertypeDefault: servertypeDefault,
hostportDefault: hostportDefault, hostportDefault: hostportDefault,
patchDefault: patchDefault, patchDefault: patchDefault,
servertype: servertype, servertype: servertype,
hostport: hostport, hostport: hostport,
patch: patch, patch: patch,
iscustom: iscustom, iscustom: iscustom,
isBtn_WanOpen: isBtn_WanOpen,
PopupVisible: PopupVisible,
Script: null
} }
const Script = new BJ_Casino_Deeplink(self); const Script = new BJ_Casino_Deeplink(self);
self.Script = Script;
const ServertypeData = Script.GetServerType(); const ServertypeData = Script.GetServerType();
const HostportData = Script.GetHostport(); const HostportData = Script.GetHostport();
const Patch = Script.GetPatch(); const Patch = Script.GetPatch();
</script> </script>
<template> <template>
<div> <el-dialog v-model="PopupVisible" :show-close="false">
<h1> <Popup :APP="self" />
<div> </el-dialog>
servertype: <div>
<el-select v-model="servertypeDefault" filterable <h1>
@change="(data: any) => { Script.SelectServertype(data) }"> <div>
<el-option v-for="(item, index) in ServertypeData" :key="item.value" :label="item.label" servertype:
:value="item.value" /> <el-select v-model="servertypeDefault" filterable
</el-select> @change="(data: any) => { Script.SelectServertype(data) }">
</div> <el-option v-for="(item, index) in ServertypeData" :key="item.value" :label="item.label"
<div> :value="item.value" />
hostport: </el-select>
<el-select v-model="hostportDefault" filterable </div>
@change="(data: any) => { Script.SelectHostport(data) }"> <div>
<el-option v-for="(item, index) in HostportData" :key="item.value" :label="item.label" hostport:
:value="item.value" /> <el-select v-model="hostportDefault" filterable
</el-select> @change="(data: any) => { Script.SelectHostport(data) }">
</div> <el-option v-for="(item, index) in HostportData" :key="item.value" :label="item.label"
<div> :value="item.value" />
patch: </el-select>
<el-select v-model="patchDefault" filterable @change="(data: any) => { Script.SelectPatch(data) }"> </div>
<el-option v-for="(item, index) in Patch" :key="item.value" :label="item.label" <div>
:value="item.value" /> patch:
</el-select> <el-select v-model="patchDefault" filterable @change="(data: any) => { Script.SelectPatch(data) }">
</div> <el-option v-for="(item, index) in Patch" :key="item.value" :label="item.label"
<div> :value="item.value" />
使用自己帶進來的URL參數 </el-select>
<label class="switch"> </div>
<input type="checkbox" id="iscustom"> <div>
<span class="slider"></span> 使用自己帶進來的URL參數
</label> <label class="switch">
</div> <input type="checkbox" id="iscustom">
<el-button type="success" @click.native="() => { Script.OnclickOpen() }" size="large" round>開啟遊戲&gt;&gt; <span class="slider"></span>
</el-button> </label>
<br> </div>
<el-button type="primary" @click.native="() => { Script.Install_Debug() }" size="large" round> <el-button type="success" @click.native="() => { Script.OnclickOpen() }" size="large" round>開啟遊戲&gt;&gt;
安裝Debug&gt;&gt; </el-button>
</el-button> <span v-show="isBtn_WanOpen">
<br> <el-button type="success" @click.native="() => { Script.OnclickWanOpen() }" size="large" round>
<el-button type="primary" @click.native="() => { Script.Install_Release() }" size="large" round> 外網開啟遊戲&gt;&gt;
安裝Release&gt;&gt;</el-button> </el-button>
<br> </span>
<el-button type="primary" @click.native="() => { Script.Install_Release_Debug() }" size="large" round> <br>
安裝Release(可看log)&gt;&gt;</el-button> <el-button type="primary" @click.native="() => { Script.Install_Debug() }" size="large" round>
<br> 安裝Debug&gt;&gt;
<el-button type="primary" @click.native="() => { Script.Install_B2B() }" size="large" round>安裝B2B&gt;&gt; </el-button>
</el-button> <br>
<br> <el-button type="primary" @click.native="() => { Script.Install_Release() }" size="large" round>
<el-button type="primary" @click.native="() => { Script.Install_JM() }" size="large" round>安裝建喵版&gt;&gt; 安裝Release&gt;&gt;</el-button>
</el-button> <br>
<br> <el-button type="primary" @click.native="() => { Script.Install_Release_Debug() }" size="large" round>
<el-button type="primary" @click.native="() => { Script.Install_Store() }" size="large" round>APP商店&gt;&gt; 安裝Release(可看log)&gt;&gt;</el-button>
</el-button> <br>
<br> <el-button type="primary" @click.native="() => { Script.Install_B2B() }" size="large" round>
<el-button type="primary" @click.native="() => { Script.Install_Bowei() }" size="large" round>安裝柏威版&gt;&gt; 安裝B2B&gt;&gt;
</el-button> </el-button>
<div> <br>
<el-button type="warning" @click.native="() => { Script.Install_InternalTest(input3) }" size="large" <el-button type="primary" @click.native="() => { Script.Install_JM() }" size="large" round>安裝建喵版&gt;&gt;
round> </el-button>
前往 <br>
</el-button> <el-button type="primary" @click.native="() => { Script.Install_Store() }" size="large" round>
<el-input v-model="input3" placeholder="Google Play商店(內部測試) 版本號" class="input-with-select" APP商店&gt;&gt;
style="width:25%; font-size:25px; text-align"> </el-button>
</el-input> <br>
Google Play商店(內部測試) 版本號 <el-button type="primary" @click.native="() => { Script.Install_Bowei() }" size="large" round>
</div> 安裝柏威版&gt;&gt;
<br> </el-button>
<a href="bjcasino://get/message?ClearAllCache">清空資料&gt;&gt;</a> <div>
<br><br> <el-button type="warning" @click.native="() => { Script.Install_InternalTest(+input3) }" size="large"
<a href="bjcasino://get/message?GetOtherUserProfile=100000185">跟建喵做朋友&gt;&gt;</a> round>
<br><br> 前往
<a href="bjcasino://get/message?GetOtherUserProfile=100000157">跟豆豆做朋友&gt;&gt;</a> </el-button>
<br><br> <el-input v-model="input3" placeholder="Google Play商店(內部測試) 版本號" class="input-with-select"
<a href="bjcasino://get/message?GetOtherUserProfile=100000148">跟柏威做朋友&gt;&gt;</a> style="width:25%; font-size:25px; text-align">
<br><br> </el-input>
<a href="bjcasino://get/message?OnClickChatAndChat=100000157">跟豆豆聊聊天&gt;&gt;</a> Google Play商店(內部測試) 版本號
<br><br> </div>
<a href="http://org.vicking.bj">Test&gt;&gt;</a> <br>
<!-- http://220.134.195.1/public/bonus_casino/html5/jianmiau/SD_Casino_Deeplink/apple-app-site-association --> <a href="bjcasino://get/message?ClearAllCache">清空資料&gt;&gt;</a>
<br><br> <br><br>
</h1> <a href="bjcasino://get/message?GetOtherUserProfile=100000185">跟建喵做朋友&gt;&gt;</a>
</div> <br><br>
<a href="bjcasino://get/message?GetOtherUserProfile=100000157">跟豆豆做朋友&gt;&gt;</a>
<br><br>
<a href="bjcasino://get/message?GetOtherUserProfile=100000148">跟柏威做朋友&gt;&gt;</a>
<br><br>
<a href="bjcasino://get/message?OnClickChatAndChat=100000157">跟豆豆聊聊天&gt;&gt;</a>
<br><br>
<a href="http://org.vicking.bj">Test&gt;&gt;</a>
<!-- http://220.134.195.1/public/bonus_casino/html5/jianmiau/SD_Casino_Deeplink/apple-app-site-association -->
<br><br>
</h1>
</div>
</template> </template>

18
src/components/Popup.vue Normal file
View File

@ -0,0 +1,18 @@
<script setup lang="ts">
import { ref } from 'vue';
const props = defineProps<{ APP: any }>()
const input = ref('')
const APP = props.APP
function Send(content: string) {
APP.Script.OnclickOpen(true, { deviceid: content });
APP.PopupVisible.value = false;
}
</script>
<template>
<el-input v-model="input" placeholder="請輸入裝置碼" />
<el-button type="primary" @click.native="() => { Send(input) }" size="large" round>確定
</el-button>
</template>

View File

@ -1,437 +1,505 @@
export class BJ_Casino_Deeplink { export class BJ_Casino_Deeplink {
//#region public //#region public
public Servertype: any[] = [5, ["不選擇版本", "Web", "Out", "Submit", "Internal_release", "Internal_Dev"]]; public Servertype: any[] = [5, ["不選擇版本", "Web", "Out", "Submit", "Internal_release", "Internal_Dev"]];
public Hostport: any[] = [1, ["不選擇環境", "內版", "肉乾", "賴宏", "40", "送審", "外版", "testing1", "testing2", "testing3"]]; public Hostport: any[] = [1, ["不選擇環境", "內版", "肉乾9006", "肉乾9007", "肉乾9008", "肉乾9009", "賴宏", "40", "送審", "外版", "testing1", "testing2", "testing3"]];
public Patch: any[] = [1, [ public Patch: any[] = [1, [
"不選擇資源路徑", "不選擇資源路徑",
"內版", "內版",
"B2B", "B2B",
"送審", "送審",
"外版", "外版",
"alex", "alex",
"bowei", "bowei",
"建喵-內版", "建喵-內版",
"建喵-B2B", "建喵-B2B",
"建喵-送審", "建喵-送審",
"建喵-外版", "建喵-外版",
"打包機-內版", "打包機-內版",
"打包機-B2B", "打包機-B2B",
"打包機-送審", "打包機-送審",
"打包機-外版", "打包機-外版",
]]; ]];
//#endregion //#endregion
//#region private //#region private
private _client: any; private _client: any;
private _u = navigator.userAgent; private _u = navigator.userAgent;
private _isAndroid = this._u.indexOf("Android") > -1 || this._u.indexOf("Adr") > -1; private _isAndroid = this._u.indexOf("Android") > -1 || this._u.indexOf("Adr") > -1;
private _isiOS = !!this._u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); private _isiOS = !!this._u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
//#endregion //#endregion
//#region Lifecycle //#region Lifecycle
/** /**
* *
*/ */
constructor(client: any) { constructor(client: any) {
this._client = client; this._client = client;
this.onLoad(); this.onLoad();
} }
public onLoad() { public onLoad() {
this._client.servertype.value = this.Servertype[0]; this._client.servertype.value = this.Servertype[0];
this._client.hostport.value = this.Hostport[0]; this._client.hostport.value = this.Hostport[0];
this._client.patch.value = this.Patch[0]; this._client.patch.value = this.Patch[0];
this._client.servertypeDefault.value = this.Servertype[1][this._client.servertype.value]; this._client.servertypeDefault.value = this.Servertype[1][this._client.servertype.value];
this._client.hostportDefault.value = this.Hostport[1][this._client.hostport.value]; this._client.hostportDefault.value = this.Hostport[1][this._client.hostport.value];
this._client.patchDefault.value = this.Patch[1][this._client.patch.value]; this._client.patchDefault.value = this.Patch[1][this._client.patch.value];
} // this.GetLanIP();
//#endregion if (!this._isAndroid && !this._isiOS) {
this._client.isBtn_WanOpen.value = true;
}
}
//#region Get Data //#endregion
public SelectServertype(data: any) { //#region Get Data
// data为el-option上:value绑定的对象
this._client.servertype.value = data;
}
public SelectHostport(data: any) { public SelectServertype(data: any) {
// data为el-option上:value绑定的对象 // data为el-option上:value绑定的对象
this._client.hostport.value = data; this._client.servertype.value = data;
} }
public SelectPatch(data: any) { public SelectHostport(data: any) {
// data为el-option上:value绑定的对象 // data为el-option上:value绑定的对象
this._client.patch.value = data; this._client.hostport.value = data;
} }
//#endregion public SelectPatch(data: any) {
// data为el-option上:value绑定的对象
this._client.patch.value = data;
}
//#region Get Data //#endregion
public GetServerType(): { key: string; value: string; label: string; }[] { //#region Get Data
const servertypes: any[] = this.Servertype[1];
let options: any[] = [];
for (let i: number = 0; i < servertypes.length; i++) {
const servertype = servertypes[i];
options.push({
value: i,
label: servertype,
});
}
return options;
}
public GetHostport(): { key: string; value: string; label: string; }[] { public GetServerType(): { key: string; value: string; label: string; }[] {
const hostports: any[] = this.Hostport[1]; const servertypes: any[] = this.Servertype[1];
let options: any[] = []; let options: any[] = [];
for (let i: number = 0; i < hostports.length; i++) { for (let i: number = 0; i < servertypes.length; i++) {
const hostport = hostports[i]; const servertype = servertypes[i];
options.push({ options.push({
value: i, value: i,
label: hostport, label: servertype,
}); });
} }
return options; return options;
} }
public GetPatch(): { key: string; value: string; label: string; }[] { public GetHostport(): { key: string; value: string; label: string; }[] {
const patchs: any[] = this.Patch[1]; const hostports: any[] = this.Hostport[1];
let options: any[] = []; let options: any[] = [];
for (let i: number = 0; i < patchs.length; i++) { for (let i: number = 0; i < hostports.length; i++) {
const patch = patchs[i]; const hostport = hostports[i];
options.push({ options.push({
value: i, value: i,
label: patch, label: hostport,
}); });
} }
return options; return options;
} }
//#endregion public GetPatch(): { key: string; value: string; label: string; }[] {
const patchs: any[] = this.Patch[1];
let options: any[] = [];
for (let i: number = 0; i < patchs.length; i++) {
const patch = patchs[i];
options.push({
value: i,
label: patch,
});
}
return options;
}
//#region Custom // public async GetLanIP(): Promise<string> {
// let run: boolean = true;
// let ip: string = "";
// // var url: string = "http://192.168.5.36/page/Net/";
// var url: string = "http://220.134.195.1/public/bonus_casino/html5/jianmiau/Net/";
// var xhr: XMLHttpRequest = new XMLHttpRequest();
// xhr.onreadystatechange = function (): void {
// if (xhr.readyState === 4 && (xhr.status >= 200 && xhr.status < 400)) {
// ip = xhr.responseText;
// run = false;
// }
// };
// xhr.open("GET", url);
// xhr.timeout = 500; // 超时时间,单位是毫秒
// xhr.ontimeout = function (e) {
// // XMLHttpRequest 超时。在此做某事。
// run = false;
// };
// xhr.send();
// while (run) {
// await Tools.Sleep(1000);
// }
// if (ip !== "") {
// this._isWan = false;
// }
// return ip;
// }
public Install_Debug() { //#endregion
if (this._isAndroid) {
window.open("https://dl.dropboxusercontent.com/s/aoh4p9vs1lrofy2/BJ_Casino-debug.apk?v=" + Date.now(), "_self");
} else if (this._isiOS) {
window.open("itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/z390yysswqiiii4/BJ_Casino-debug.plist", "_self");
} else {
window.open("https://dl.dropboxusercontent.com/s/aoh4p9vs1lrofy2/BJ_Casino-debug.apk?v=" + Date.now(), "_blank");
window.open("https://dl.dropboxusercontent.com/s/4ki0rglk4w01ian/BJ_Casino-debug.ipa", "_blank");
}
}
public Install_Release() { //#region Custom
if (this._isAndroid) {
window.open("https://dl.dropboxusercontent.com/s/6mjrw913u6ma5w8/BJ_Casino-release.apk?v=" + Date.now(), "_self");
} else if (this._isiOS) {
window.open("itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/9qckj6t66jgb6rw/BJ_Casino-release.plist", "_self");
} else {
window.open("https://dl.dropboxusercontent.com/s/6mjrw913u6ma5w8/BJ_Casino-release.apk?v=" + Date.now(), "_blank");
window.open("https://dl.dropboxusercontent.com/s/hyyswyun3m42qbk/BJ_Casino-release.ipa?v=" + Date.now(), "_blank");
}
}
public Install_Release_Debug() { public Install_Debug() {
if (this._isAndroid) { if (this._isAndroid) {
window.open("https://dl.dropboxusercontent.com/s/16m2b5sncymj6f9/BJ_Casino-release-debug.apk?v=" + Date.now(), "_self"); window.open("https://dl.dropboxusercontent.com/s/aoh4p9vs1lrofy2/BJ_Casino-debug.apk?v=" + Date.now(), "_self");
} else if (this._isiOS) { } else if (this._isiOS) {
window.open("itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/wixnsxbc7ctk87f/BJ_Casino-release-debug.plist", "_self"); window.open("itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/z390yysswqiiii4/BJ_Casino-debug.plist", "_self");
} else { } else {
window.open("https://dl.dropboxusercontent.com/s/16m2b5sncymj6f9/BJ_Casino-release-debug.apk?v=" + Date.now(), "_blank"); window.open("https://dl.dropboxusercontent.com/s/aoh4p9vs1lrofy2/BJ_Casino-debug.apk?v=" + Date.now(), "_blank");
window.open("https://dl.dropboxusercontent.com/s/f6qjm1gk8jjvmhx/BJ_Casino-release-debug.ipa?v=" + Date.now(), "_blank"); window.open("https://dl.dropboxusercontent.com/s/4ki0rglk4w01ian/BJ_Casino-debug.ipa", "_blank");
} }
} }
public Install_B2B() { public Install_Release() {
if (this._isAndroid) { if (this._isAndroid) {
window.open("https://dl.dropboxusercontent.com/s/g66xrcdfj9e093i/BJ_Casino-B2B.apk?v=" + Date.now(), "_self"); window.open("https://dl.dropboxusercontent.com/s/6mjrw913u6ma5w8/BJ_Casino-release.apk?v=" + Date.now(), "_self");
} else if (this._isiOS) { } else if (this._isiOS) {
window.open("itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/rrs1ev3llogrm0a/BJ_Casino-B2B.plist", "_self"); window.open("itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/9qckj6t66jgb6rw/BJ_Casino-release.plist", "_self");
} else { } else {
window.open("https://dl.dropboxusercontent.com/s/g66xrcdfj9e093i/BJ_Casino-B2B.apk?v=" + Date.now(), "_blank"); window.open("https://dl.dropboxusercontent.com/s/6mjrw913u6ma5w8/BJ_Casino-release.apk?v=" + Date.now(), "_blank");
window.open("https://dl.dropboxusercontent.com/s/fm79uc9ygrnzone/BJ_Casino-B2B.ipa?v=" + Date.now(), "_blank"); window.open("https://dl.dropboxusercontent.com/s/hyyswyun3m42qbk/BJ_Casino-release.ipa?v=" + Date.now(), "_blank");
} }
} }
public Install_JM() { public Install_Release_Debug() {
if (this._isAndroid) { if (this._isAndroid) {
window.open("https://dl.dropboxusercontent.com/s/9zlj6og4octmim8/BJ_Casino-JM.apk?v=" + Date.now(), "_self"); window.open("https://dl.dropboxusercontent.com/s/16m2b5sncymj6f9/BJ_Casino-release-debug.apk?v=" + Date.now(), "_self");
} else if (this._isiOS) { } else if (this._isiOS) {
window.open("itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/23mx7l7cchbvjcv/BJ_Casino-JM.plist", "_self"); window.open("itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/wixnsxbc7ctk87f/BJ_Casino-release-debug.plist", "_self");
} else { } else {
window.open("https://dl.dropboxusercontent.com/s/9zlj6og4octmim8/BJ_Casino-JM.apk?v=" + Date.now(), "_blank"); window.open("https://dl.dropboxusercontent.com/s/16m2b5sncymj6f9/BJ_Casino-release-debug.apk?v=" + Date.now(), "_blank");
window.open("https://dl.dropboxusercontent.com/s/dwlil2rbfe1wi13/BJ_Casino-JM.ipa?v=" + Date.now(), "_blank"); window.open("https://dl.dropboxusercontent.com/s/f6qjm1gk8jjvmhx/BJ_Casino-release-debug.ipa?v=" + Date.now(), "_blank");
} }
} }
public Install_Store() { public Install_B2B() {
if (this._isAndroid) { if (this._isAndroid) {
window.open("https://play.google.com/store/apps/details?id=org.vicking.bj_casino", "_self"); window.open("https://dl.dropboxusercontent.com/s/g66xrcdfj9e093i/BJ_Casino-B2B.apk?v=" + Date.now(), "_self");
} else if (this._isiOS) { } else if (this._isiOS) {
window.open("https://apps.apple.com/tw/app/爆機娛樂城/id1593328573", "_self"); window.open("itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/rrs1ev3llogrm0a/BJ_Casino-B2B.plist", "_self");
} else { } else {
window.open("https://play.google.com/store/apps/details?id=org.vicking.bj_casino", "_blank"); window.open("https://dl.dropboxusercontent.com/s/g66xrcdfj9e093i/BJ_Casino-B2B.apk?v=" + Date.now(), "_blank");
window.open("https://apps.apple.com/tw/app/爆機娛樂城/id1593328573", "_blank"); window.open("https://dl.dropboxusercontent.com/s/fm79uc9ygrnzone/BJ_Casino-B2B.ipa?v=" + Date.now(), "_blank");
} }
} }
public Install_Bowei() { public Install_JM() {
if (this._isAndroid) { if (this._isAndroid) {
window.open("http://220.134.195.1/public/bonus_casino/html5/bowei/BJ_Casino-debug.apk?v=" + Date.now(), "_self"); window.open("https://dl.dropboxusercontent.com/s/9zlj6og4octmim8/BJ_Casino-JM.apk?v=" + Date.now(), "_self");
} else if (this._isiOS) { } else if (this._isiOS) {
alert("iOS不提供"); window.open("itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/23mx7l7cchbvjcv/BJ_Casino-JM.plist", "_self");
} else { } else {
window.open("http://220.134.195.1/public/bonus_casino/html5/bowei/BJ_Casino-debug.apk?v=" + Date.now(), "_blank"); window.open("https://dl.dropboxusercontent.com/s/9zlj6og4octmim8/BJ_Casino-JM.apk?v=" + Date.now(), "_blank");
} window.open("https://dl.dropboxusercontent.com/s/dwlil2rbfe1wi13/BJ_Casino-JM.ipa?v=" + Date.now(), "_blank");
} }
}
public Install_InternalTest(InternalTest: number): void { public Install_Store() {
// let InternalTest = document.getElementById("InternalTest").value; if (this._isAndroid) {
// let InternalTest = ""; window.open("https://play.google.com/store/apps/details?id=org.vicking.bj_casino", "_self");
if (this._isAndroid && InternalTest) { } else if (this._isiOS) {
window.open(`https://play.google.com/apps/test/org.vicking.bj_casino/${InternalTest}`, "_self"); window.open("https://apps.apple.com/tw/app/爆機娛樂城/id1593328573", "_self");
} else if (this._isiOS) { } else {
alert("iOS不提供"); window.open("https://play.google.com/store/apps/details?id=org.vicking.bj_casino", "_blank");
} else { window.open("https://apps.apple.com/tw/app/爆機娛樂城/id1593328573", "_blank");
window.open(`https://play.google.com/apps/test/org.vicking.bj_casino/${InternalTest}`, "_blank"); }
} }
}
public OnclickOpen() { public Install_Bowei() {
let hostport = this._client.hostport.value; if (this._isAndroid) {
let servertype = +this._client.servertype.value; window.open("http://220.134.195.1/public/bonus_casino/html5/bowei/BJ_Casino-debug.apk?v=" + Date.now(), "_self");
let patch = +this._client.patch.value; } else if (this._isiOS) {
let E_iscustom: any = document.getElementById("iscustom"); alert("iOS不提供");
let iscustom = E_iscustom.checked; } else {
let URLscheme: any = {}; window.open("http://220.134.195.1/public/bonus_casino/html5/bowei/BJ_Casino-debug.apk?v=" + Date.now(), "_blank");
}
}
switch (servertype) { public Install_InternalTest(InternalTest: number): void {
case 0: { // let InternalTest = document.getElementById("InternalTest").value;
break; // let InternalTest = "";
} if (this._isAndroid && InternalTest) {
default: { window.open(`https://play.google.com/apps/test/org.vicking.bj_casino/${InternalTest}`, "_self");
URLscheme["servertype"] = servertype; } else if (this._isiOS) {
break; alert("iOS不提供");
} } else {
} window.open(`https://play.google.com/apps/test/org.vicking.bj_casino/${InternalTest}`, "_blank");
}
}
switch (hostport) { public OnclickWanOpen() {
this._client.PopupVisible.value = true;
// this.OnclickOpen(true);
}
// 不選擇環境 public OnclickOpen(isWan: boolean = false, obj: Object = {}) {
case 0: { let hostport = this._client.hostport.value;
break; let servertype = +this._client.servertype.value;
} let patch = +this._client.patch.value;
let E_iscustom: any = document.getElementById("iscustom");
let iscustom = E_iscustom.checked;
let URLscheme: any = {};
// 外網連內版 if (obj["deviceid"]) {
case 1: { URLscheme["deviceid"] = obj["deviceid"];
URLscheme["host"] = "http://220.134.195.1"; }
URLscheme["port"] = "19005";
break;
}
// 肉乾 switch (servertype) {
case 2: { case 0: {
URLscheme["host"] = "http://192.168.5.230"; break;
URLscheme["port"] = "9006"; }
break; default: {
} URLscheme["servertype"] = servertype;
break;
}
}
// 賴宏 switch (hostport) {
case 3: {
URLscheme["host"] = "http://192.168.5.134";
URLscheme["port"] = "9005";
break;
}
// 40 // 不選擇環境
case 4: { case 0: {
URLscheme["host"] = "http://192.168.5.12"; break;
URLscheme["port"] = "9487"; }
break;
}
// 送審 // 外網連內版
case 5: { case 1: {
URLscheme["host"] = "https://submit.online-bj.com"; URLscheme["host"] = "http://220.134.195.1";
URLscheme["port"] = "9005"; URLscheme["port"] = "19005";
break; break;
} }
// 外版 // 肉乾9006
case 6: { case 2: {
URLscheme["host"] = "https://game.online-bj.com"; URLscheme["host"] = "http://192.168.5.230";
URLscheme["port"] = "9005"; URLscheme["port"] = "9006";
break; break;
} }
// testing1 // 肉乾9007
case 7: { case 3: {
URLscheme["host"] = "http://bj-testing1.casino.catan.com.tw"; URLscheme["host"] = "http://192.168.5.230";
URLscheme["port"] = "9005"; URLscheme["port"] = "9007";
break; break;
} }
// testing2 // 肉乾9008
case 8: { case 4: {
URLscheme["host"] = "http://bj-testing2.casino.catan.com.tw"; URLscheme["host"] = "http://192.168.5.230";
URLscheme["port"] = "9005"; URLscheme["port"] = "9008";
break; break;
} }
// testing3 // 肉乾9009
case 9: { case 5: {
URLscheme["host"] = "http://bj-testing3.casino.catan.com.tw"; URLscheme["host"] = "http://192.168.5.230";
URLscheme["port"] = "9005"; URLscheme["port"] = "9009";
break; break;
} }
default: { // 賴宏
break; case 6: {
} URLscheme["host"] = "http://192.168.5.134";
} URLscheme["port"] = "9005";
break;
}
switch (patch) { // 40
// "https://patch.online-bj.com/game/", case 7: {
// "https://patch-submit.online-bj.com/game/", URLscheme["host"] = "http://192.168.5.12";
// "http://220.134.195.1/public/bonus_casino/html5/alex/APPBundleTest/", URLscheme["port"] = "9487";
// "http://220.134.195.1/public/bonus_casino/html5/jianmiau/Bundle/", break;
// "http://patch-release.online-bj.com/", }
// "http://patch-dev.online-bj.com/",
case 0: { // 送審
break; case 8: {
} URLscheme["host"] = "https://submit.online-bj.com";
URLscheme["port"] = "9005";
break;
}
// Dev // 外版
case 1: { case 9: {
URLscheme["patch"] = "http://patch-dev.online-bj.com/"; URLscheme["host"] = "https://game.online-bj.com";
break; URLscheme["port"] = "9005";
} break;
}
// B2B // testing1
case 2: { case 10: {
URLscheme["patch"] = "http://patch-release.online-bj.com/"; URLscheme["host"] = "http://bj-testing1.casino.catan.com.tw";
break; URLscheme["port"] = "9005";
} break;
}
// 送審 // testing2
case 3: { case 11: {
URLscheme["patch"] = "https://patch-submit.online-bj.com/game/"; URLscheme["host"] = "http://bj-testing2.casino.catan.com.tw";
break; URLscheme["port"] = "9005";
} break;
}
// 外版 // testing3
case 4: { case 12: {
URLscheme["patch"] = "https://patch.online-bj.com/game/"; URLscheme["host"] = "http://bj-testing3.casino.catan.com.tw";
break; URLscheme["port"] = "9005";
} break;
}
// alex default: {
case 5: { break;
URLscheme["patch"] = "http://220.134.195.1/public/bonus_casino/html5/alex/Bundle/"; }
break; }
}
// bowei switch (patch) {
case 6: { // "https://patch.online-bj.com/game/",
URLscheme["patch"] = "http://220.134.195.1/public/bonus_casino/html5/bowei/Bundle/"; // "https://patch-submit.online-bj.com/game/",
break; // "http://220.134.195.1/public/bonus_casino/html5/alex/APPBundleTest/",
} // "http://220.134.195.1/public/bonus_casino/html5/jianmiau/Bundle/",
// "http://patch-release.online-bj.com/",
// "http://patch-dev.online-bj.com/",
// jianmiau-Dev case 0: {
case 7: { break;
// URLscheme["patch"] = "http://220.134.195.1/public/bonus_casino/html5/jianmiau/Bundle/"; }
URLscheme["patch"] = "http://192.168.5.36/Source/_BJ_Source/BJ-Internal-Dev/";
break;
}
// jianmiau-Release // Dev
case 8: { case 1: {
URLscheme["patch"] = "http://192.168.5.36/Source/_BJ_Source/BJ-Internal-Release/"; URLscheme["patch"] = "http://patch-dev.online-bj.com/";
break; break;
} }
// jianmiau-Submit // B2B
case 9: { case 2: {
URLscheme["patch"] = "http://192.168.5.36/Source/_BJ_Source/BJ-Submit/"; URLscheme["patch"] = "http://patch-release.online-bj.com/";
break; break;
} }
// jianmiau-Out // 送審
case 10: { case 3: {
URLscheme["patch"] = "http://192.168.5.36/Source/_BJ_Source/BJ-Out/"; URLscheme["patch"] = "https://patch-submit.online-bj.com/game/";
break; break;
} }
// 108-Dev // 外版
case 11: { case 4: {
URLscheme["patch"] = "http://192.168.5.108/BJ-Internal-Dev/"; URLscheme["patch"] = "https://patch.online-bj.com/game/";
break; break;
} }
// 108-Release // alex
case 12: { case 5: {
URLscheme["patch"] = "http://192.168.5.108/BJ-Internal-Release/"; URLscheme["patch"] = "http://220.134.195.1/public/bonus_casino/html5/alex/Bundle/";
break; break;
} }
// 108-Submit // bowei
case 13: { case 6: {
URLscheme["patch"] = "http://192.168.5.108/BJ-Submit/"; URLscheme["patch"] = "http://220.134.195.1/public/bonus_casino/html5/bowei/Bundle/";
break; break;
} }
// 108-Out // jianmiau-Dev
case 14: { case 7: {
URLscheme["patch"] = "http://192.168.5.108/BJ-Out/"; // URLscheme["patch"] = "http://220.134.195.1/public/bonus_casino/html5/jianmiau/Bundle/";
break; URLscheme["patch"] = "http://192.168.5.36/Source/_BJ_Source/BJ-Internal-Dev/";
} break;
}
default: { // jianmiau-Release
break; case 8: {
} URLscheme["patch"] = "http://192.168.5.36/Source/_BJ_Source/BJ-Internal-Release/";
// case 0: { break;
// break; }
// }
// default: {
// URLscheme["patch"] = document.getElementById("patch").options[patch].label;
// break;
// }
}
let url = ""; // jianmiau-Submit
if (iscustom) { case 9: {
let URLscheme = new URL(location.href); URLscheme["patch"] = "http://192.168.5.36/Source/_BJ_Source/BJ-Submit/";
if (this._isiOS || this._isAndroid) { break;
url = `bjcasino://get/message${URLscheme.search}`; }
} else {
url = `http://220.134.195.1:17456/phone.html${URLscheme.search}`;
}
} else {
let _URLSearchParams = new URLSearchParams(URLscheme).toString();
let _decodeURI = decodeURIComponent(_URLSearchParams);
if (this._isiOS || this._isAndroid) {
url = `bjcasino://get/message${_decodeURI ? `?${_decodeURI}` : ""}`;
} else {
url = `http://220.134.195.1:17456/phone.html${_decodeURI ? `?${_decodeURI}` : ""}`;
}
}
if (this._isiOS || this._isAndroid) {
window.open(url, "_self");
} else {
window.open(url, "_blank");
}
}
//#endregion // jianmiau-Out
case 10: {
URLscheme["patch"] = "http://192.168.5.36/Source/_BJ_Source/BJ-Out/";
break;
}
// 108-Dev
case 11: {
URLscheme["patch"] = "http://192.168.5.108/BJ-Internal-Dev/";
break;
}
// 108-Release
case 12: {
URLscheme["patch"] = "http://192.168.5.108/BJ-Internal-Release/";
break;
}
// 108-Submit
case 13: {
URLscheme["patch"] = "http://192.168.5.108/BJ-Submit/";
break;
}
// 108-Out
case 14: {
URLscheme["patch"] = "http://192.168.5.108/BJ-Out/";
break;
}
default: {
break;
}
// case 0: {
// break;
// }
// default: {
// URLscheme["patch"] = document.getElementById("patch").options[patch].label;
// break;
// }
}
let url = "";
let gameUrl = "220.134.195.1:17456";
if (!isWan) {
gameUrl = "192.168.5.108:7456";
}
if (iscustom) {
let URLscheme = new URL(location.href);
if (this._isiOS || this._isAndroid) {
url = `bjcasino://get/message${URLscheme.search}`;
} else {
url = `http://${gameUrl}/phone.html${URLscheme.search}`;
}
} else {
let _URLSearchParams = new URLSearchParams(URLscheme).toString();
let _decodeURI = decodeURIComponent(_URLSearchParams);
if (this._isiOS || this._isAndroid) {
url = `bjcasino://get/message${_decodeURI ? `?${_decodeURI}` : ""}`;
} else {
url = `http://${gameUrl}/phone.html${_decodeURI ? `?${_decodeURI}` : ""}`;
}
}
if (this._isiOS || this._isAndroid) {
window.open(url, "_self");
} else {
window.open(url, "_blank");
}
}
//#endregion
} }

11
src/script/Tools.ts Normal file
View File

@ -0,0 +1,11 @@
export class Tools {
//#region Custom
public static Sleep(ms: any): Promise<unknown> {
return new Promise(resolve => setTimeout(resolve, ms));
}
//#endregion
}

View File

@ -1,28 +1,28 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "esnext", "target": "esnext",
"useDefineForClassFields": true, "useDefineForClassFields": true,
"module": "esnext", "module": "esnext",
"moduleResolution": "node", "moduleResolution": "node",
"strict": true, // "strict": true,
"jsx": "preserve", "jsx": "preserve",
"sourceMap": true, "sourceMap": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"esModuleInterop": true, "esModuleInterop": true,
"lib": [ "lib": [
"esnext", "esnext",
"dom" "dom"
] ]
}, },
"include": [ "include": [
"src/**/*.ts", "src/**/*.ts",
"src/**/*.d.ts", "src/**/*.d.ts",
"src/**/*.tsx", "src/**/*.tsx",
"src/**/*.vue" "src/**/*.vue"
], ],
"references": [ "references": [
{ {
"path": "./tsconfig.node.json" "path": "./tsconfig.node.json"
} }
] ]
} }