diff --git a/package.json b/package.json
index bbeb6da..c5f2097 100644
--- a/package.json
+++ b/package.json
@@ -10,11 +10,11 @@
"format": "prettier --write src/"
},
"dependencies": {
+ "@vicons/fa": "^0.12.0",
+ "@vicons/fluent": "^0.12.0",
"@vicons/ionicons4": "^0.12.0",
"@vicons/ionicons5": "^0.12.0",
"@vicons/material": "^0.12.0",
- "@vicons/fa": "^0.12.0",
- "@vicons/fluent": "^0.12.0",
"axios": "^1.7.7",
"highlight.js": "^11.10.0",
"js-cookie": "^3.0.5",
@@ -33,6 +33,7 @@
"vue-native-websocket": "^2.0.15",
"vue-route": "^1.5.1",
"vue-router": "^4.4.5",
+ "vue-turnstile": "^1.0.11",
"vuex": "^4.1.0"
},
"devDependencies": {
diff --git a/src/api/v2/auth/login.api.ts b/src/api/v2/auth/login.api.ts
index 01748d2..fad0b8b 100644
--- a/src/api/v2/auth/login.api.ts
+++ b/src/api/v2/auth/login.api.ts
@@ -2,10 +2,11 @@
import { post } from '@/utils/request'
import base from '@/api/base'
-const login = async (username: string, password: string) => {
+const login = async (username: string, password: string, captcha_response_token: string) => {
const rs = post(`${base.api_v2_url}/auth/login`, {
username: username,
- password: password
+ password: password,
+ captcha_response_token: captcha_response_token
})
return base.buildResponse(await rs)
}
diff --git a/src/views/auth/LoginView.vue b/src/views/auth/LoginView.vue
index d1c1412..e9dd4d6 100644
--- a/src/views/auth/LoginView.vue
+++ b/src/views/auth/LoginView.vue
@@ -43,7 +43,25 @@
>
没有账户?去注册
- 登录
+ 登录
+
+
+ {
+ showTurnstile = false
+ sendErrorMessage(`验证码加载失败,错误代码: ${code}`)
+ }"
+ @unsupported="sendErrorMessage('您的浏览器不支持加载验证码,请更换或升级浏览器后重试')"
+ />
+
@@ -53,7 +71,7 @@