mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-08 08:48:11 +08:00
🧪 完善类型
This commit is contained in:
@@ -10,7 +10,5 @@
|
|||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
<script src="https://static.geetest.com/static/js/gt.0.4.9.js"></script>
|
|
||||||
<script src="https://static.geetest.com/v4/gt4.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
</transition>
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
// import "https://static.geetest.com/static/js/gt.0.4.9.js";
|
import "https://static.geetest.com/static/js/gt.0.4.9.js";
|
||||||
// import "https://static.geetest.com/v4/gt4.js";
|
import "https://static.geetest.com/v4/gt4.js";
|
||||||
import { ref, useTemplateRef, watch } from "vue";
|
import { ref, useTemplateRef, watch } from "vue";
|
||||||
|
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
@@ -66,6 +66,7 @@ async function displayBox(
|
|||||||
product: "custom",
|
product: "custom",
|
||||||
area: "#verify",
|
area: "#verify",
|
||||||
width: "250px",
|
width: "250px",
|
||||||
|
api_server: "https://api.geetest.com",
|
||||||
},
|
},
|
||||||
(captchaObj: TGApp.BBS.Geetest.GeetestCaptcha) => {
|
(captchaObj: TGApp.BBS.Geetest.GeetestCaptcha) => {
|
||||||
if (geetestEl.value === null) return;
|
if (geetestEl.value === null) return;
|
||||||
@@ -91,6 +92,7 @@ async function displayBox(
|
|||||||
nextWidth: "250px",
|
nextWidth: "250px",
|
||||||
lang: "zho",
|
lang: "zho",
|
||||||
userInfo: JSON.stringify({ session_id: raw?.session_id }),
|
userInfo: JSON.stringify({ session_id: raw?.session_id }),
|
||||||
|
protocol: "https",
|
||||||
},
|
},
|
||||||
(captchaObj: TGApp.BBS.Geetest.GeetestCaptcha) => {
|
(captchaObj: TGApp.BBS.Geetest.GeetestCaptcha) => {
|
||||||
if (geetestEl.value === null) return;
|
if (geetestEl.value === null) return;
|
||||||
|
|||||||
6
src/types/BBS/Geetest.d.ts
vendored
6
src/types/BBS/Geetest.d.ts
vendored
@@ -67,7 +67,7 @@ declare namespace TGApp.BBS.Geetest {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 极验验证的请求方法-请求参数
|
* 极验验证的请求方法-请求参数
|
||||||
* @since Beta v0.7.1
|
* @since Beta v0.8.7
|
||||||
*/
|
*/
|
||||||
type InitGeetestParams = {
|
type InitGeetestParams = {
|
||||||
/* gt */
|
/* gt */
|
||||||
@@ -84,6 +84,8 @@ declare namespace TGApp.BBS.Geetest {
|
|||||||
width: string;
|
width: string;
|
||||||
/* 覆盖区域 */
|
/* 覆盖区域 */
|
||||||
area: string;
|
area: string;
|
||||||
|
/* API服务器地址 */
|
||||||
|
api_server: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,6 +105,8 @@ declare namespace TGApp.BBS.Geetest {
|
|||||||
userInfo: unknown;
|
userInfo: unknown;
|
||||||
/* 语言 */
|
/* 语言 */
|
||||||
lang: string;
|
lang: string;
|
||||||
|
/* 协议头 */
|
||||||
|
protocol: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user