From ff19c2a0fb3d1cfdb04f03f563dec6d40d5e5509 Mon Sep 17 00:00:00 2001 From: xiaozhi <1822691309@qq.com> Date: Thu, 10 Sep 2026 10:27:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8D=95=E6=B7=BB=E5=8A=A0=E8=A1=8C?= =?UTF-8?q?=E4=B8=BA=E9=AA=8C=E8=AF=81=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 4 + public/tac/css/tac.css | 7 + public/tac/images/dun.jpeg | Bin 0 -> 8340 bytes public/tac/images/icon.png | Bin 0 -> 3100 bytes public/tac/js/tac.min.js | 1 + public/tac/load.min.js | 1 + src/api/login.ts | 2 +- src/components/Captcha/index.vue | 11 + src/types/global.d.ts | 17 ++ src/views/index.vue | 386 +++---------------------------- 10 files changed, 75 insertions(+), 354 deletions(-) create mode 100644 public/tac/css/tac.css create mode 100644 public/tac/images/dun.jpeg create mode 100644 public/tac/images/icon.png create mode 100644 public/tac/js/tac.min.js create mode 100644 public/tac/load.min.js create mode 100644 src/components/Captcha/index.vue diff --git a/index.html b/index.html index db1c6ca..f757d28 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,7 @@ window.location.href = '/ie.html'; + diff --git a/src/types/global.d.ts b/src/types/global.d.ts index 5cc45d1..a8c9893 100644 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -3,6 +3,23 @@ import { LanguageEnum } from '@/enums/LanguageEnum'; import { NavTypeEnum } from '@/enums/NavTypeEnum'; declare global { + interface Window { + /** + * 天艾验证码初始化方法 + * @param assetPath 静态资源目录,public下tac文件夹填 "/tac" + * @param config 验证码配置项 + */ + initTAC: ( + assetPath: string, + captchaConfig: { + requestCaptchaDataUrl: string; + validCaptchaUrl: string; + bindEl: string; + validSuccess: (res, c, t) => void + } + , style: { logoUrl: null }) => Promise<{ init: () => void; destroyWindow: () => void }>; + } + /** vue Instance */ type ComponentInternalInstance = ComponentInstance; diff --git a/src/views/index.vue b/src/views/index.vue index 7934314..a8c1e39 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,111 +1,44 @@