mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-07 08:42:49 +08:00
🧪 完善类型
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
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 = {
|
||||
/* 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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user