mirror of
https://github.com/certd/certd.git
synced 2026-05-16 21:27:34 +08:00
perf: 动态加载验证码script
This commit is contained in:
@@ -7,6 +7,15 @@ import { useSettingStore } from "/@/store/settings";
|
||||
import { request } from "/src/api/service";
|
||||
import { notification } from "ant-design-vue";
|
||||
|
||||
import { loadScript } from "vue-plugin-load-script";
|
||||
const loaded = ref(false);
|
||||
async function loadCaptchaScript() {
|
||||
// 加载验证码js
|
||||
await loadScript("https://static.geetest.com/v4/gt4.js");
|
||||
loaded.value = true;
|
||||
}
|
||||
loadCaptchaScript();
|
||||
|
||||
defineOptions({
|
||||
name: "GeetestCaptcha",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user