🧪 完善类型

This commit is contained in:
BTMuli
2025-11-21 18:15:20 +08:00
parent 17f5a87e31
commit 954fb1a1e8
3 changed files with 9 additions and 5 deletions

View File

@@ -10,7 +10,5 @@
<body>
<div id="app"></div>
<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>
</html>

View File

@@ -15,8 +15,8 @@
</transition>
</template>
<script setup lang="ts">
// 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/static/js/gt.0.4.9.js";
import "https://static.geetest.com/v4/gt4.js";
import { ref, useTemplateRef, watch } from "vue";
const show = ref<boolean>(false);
@@ -66,6 +66,7 @@ async function displayBox(
product: "custom",
area: "#verify",
width: "250px",
api_server: "https://api.geetest.com",
},
(captchaObj: TGApp.BBS.Geetest.GeetestCaptcha) => {
if (geetestEl.value === null) return;
@@ -91,6 +92,7 @@ async function displayBox(
nextWidth: "250px",
lang: "zho",
userInfo: JSON.stringify({ session_id: raw?.session_id }),
protocol: "https",
},
(captchaObj: TGApp.BBS.Geetest.GeetestCaptcha) => {
if (geetestEl.value === null) return;

View File

@@ -67,7 +67,7 @@ declare namespace TGApp.BBS.Geetest {
/**
* 极验验证的请求方法-请求参数
* @since Beta v0.7.1
* @since Beta v0.8.7
*/
type InitGeetestParams = {
/* gt */
@@ -84,6 +84,8 @@ declare namespace TGApp.BBS.Geetest {
width: string;
/* 覆盖区域 */
area: string;
/* API服务器地址 */
api_server: string;
};
/**
@@ -103,6 +105,8 @@ declare namespace TGApp.BBS.Geetest {
userInfo: unknown;
/* 语言 */
lang: string;
/* 协议头 */
protocol: string;
};
/**