vue-layout-gitcode 1.8.20 → 1.8.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{GloabarSearch-CsfaqmkP.js → GloabarSearch-DWutXBZ0.js} +3 -3
- package/{MenuItem-BHtAosV9.js → MenuItem-B48J7_bH.js} +1 -1
- package/{ProjectMenuList-CU5JF-qf.js → ProjectMenuList-eMPknWyF.js} +3 -3
- package/{ProjectMenuListV2-CQLWeHkd.js → ProjectMenuListV2-BDrzG4ue.js} +3 -3
- package/{ProjectSearch-Bx_yKm0s.js → ProjectSearch-CSK6qeey.js} +1 -1
- package/{SearchHistoryList-B3c_il4L.js → SearchHistoryList-j9cRlcCi.js} +1 -1
- package/{SearchPrefixTag-B55uF6lG.js → SearchPrefixTag-xrGOwpv6.js} +1 -1
- package/{SearchRecommed-Bz1a-RJg.js → SearchRecommed-BrPLs0fF.js} +2 -2
- package/{SearchScopeList-CkXrQ6Hi.js → SearchScopeList-CuNgQw8w.js} +1 -1
- package/{UserSearch-CThRm6FU.js → UserSearch-C69mULge.js} +1 -1
- package/{index-Bmj0DI0l.js → index-CQGXV6Ps.js} +9 -1
- package/{index-CZiUhHzE.js → index-C_yAfSqS.js} +2 -2
- package/{index-CYat2b__.js → index-DXolqsNi.js} +351 -224
- package/{index-CjlFh9gp.js → index-bBRwqaOi.js} +44 -3
- package/index.js +10 -10
- package/{notice-Dnq7xTYo.js → notice-B8DH0Zm_.js} +1 -1
- package/package.json +2 -2
- package/style.css +1 -1
- package/{transWebUrl-lnkID7Kl.js → transWebUrl-BN2jSeBd.js} +1 -1
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { defineComponent, onMounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
|
|
1
|
+
import { defineComponent, onMounted, onUnmounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
|
|
2
|
+
import { w as getLocaleLang, j as LANG_ZH, x as useLayoutConfig, _ as _export_sfc } from "./index-DXolqsNi.js";
|
|
2
3
|
import { FixedOverlay } from "vue-devui-lal/overlay";
|
|
3
|
-
import { w as useLayoutConfig, _ as _export_sfc } from "./index-CYat2b__.js";
|
|
4
4
|
import "vue-devui-lal/overlay/style.css";
|
|
5
|
+
const TARGET_TEXT = "Click in order:";
|
|
5
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
|
+
...{ name: "tianaiCaptcha" },
|
|
6
8
|
__name: "index",
|
|
7
9
|
emits: ["close", "success"],
|
|
8
10
|
setup(__props, { emit: __emit }) {
|
|
11
|
+
const isZh = getLocaleLang() === LANG_ZH;
|
|
9
12
|
const emits = __emit;
|
|
13
|
+
let timer = null;
|
|
10
14
|
const captchaInit = () => {
|
|
11
15
|
if (!window.initTAC) {
|
|
12
16
|
return;
|
|
@@ -17,16 +21,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
21
|
validCaptchaUrl: `${baseURL}/uc/api/v1/captcha/check`,
|
|
18
22
|
bindEl: "#captcha-box",
|
|
19
23
|
validSuccess: (res, c, tac) => {
|
|
24
|
+
stopTimer();
|
|
20
25
|
tac.destroyWindow();
|
|
21
26
|
emits("success", res.data);
|
|
22
27
|
},
|
|
23
28
|
validFail: (res, c, tac) => {
|
|
24
29
|
tac.reloadCaptcha();
|
|
30
|
+
stopTimer();
|
|
31
|
+
startTimer();
|
|
25
32
|
},
|
|
26
33
|
btnRefreshFun: (el, tac) => {
|
|
27
34
|
tac.reloadCaptcha();
|
|
35
|
+
stopTimer();
|
|
36
|
+
startTimer();
|
|
28
37
|
},
|
|
29
38
|
btnCloseFun: (el, tac) => {
|
|
39
|
+
stopTimer();
|
|
30
40
|
tac.destroyWindow();
|
|
31
41
|
emits("close");
|
|
32
42
|
}
|
|
@@ -35,15 +45,46 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
45
|
logoUrl: null
|
|
36
46
|
// 去除logo
|
|
37
47
|
};
|
|
38
|
-
window.initTAC("https://cdn-static.gitcode.
|
|
48
|
+
window.initTAC("https://cdn-static.gitcode.com/js/tac/", config, style).then((tac) => {
|
|
39
49
|
tac.init();
|
|
50
|
+
}).then(() => {
|
|
51
|
+
replaceEnglishTip();
|
|
40
52
|
}).catch((e) => {
|
|
41
53
|
console.error("初始化tac失败", e);
|
|
42
54
|
});
|
|
43
55
|
};
|
|
56
|
+
const replaceEnglishTip = () => {
|
|
57
|
+
if (isZh) return false;
|
|
58
|
+
const tipDom = document.querySelector("#captcha-box #tianai-captcha-click-track-font");
|
|
59
|
+
if (tipDom && tipDom.textContent !== TARGET_TEXT) {
|
|
60
|
+
tipDom.textContent = TARGET_TEXT;
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
if (tipDom && tipDom.textContent === TARGET_TEXT) {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
};
|
|
68
|
+
const startTimer = () => {
|
|
69
|
+
if (isZh) return;
|
|
70
|
+
stopTimer();
|
|
71
|
+
timer = window.setInterval(() => {
|
|
72
|
+
replaceEnglishTip();
|
|
73
|
+
}, 100);
|
|
74
|
+
};
|
|
75
|
+
const stopTimer = () => {
|
|
76
|
+
if (timer) {
|
|
77
|
+
clearInterval(timer);
|
|
78
|
+
timer = null;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
44
81
|
onMounted(() => {
|
|
82
|
+
startTimer();
|
|
45
83
|
captchaInit();
|
|
46
84
|
});
|
|
85
|
+
onUnmounted(() => {
|
|
86
|
+
stopTimer();
|
|
87
|
+
});
|
|
47
88
|
return (_ctx, _cache) => {
|
|
48
89
|
return openBlock(), createBlock(unref(FixedOverlay), { class: "captcha-overlay" }, {
|
|
49
90
|
default: withCtx(() => _cache[0] || (_cache[0] = [
|
package/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K, M, P, J, S, I, z, U, O, Q, N } from "./index-DXolqsNi.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
K as GitCodeAside,
|
|
4
|
+
M as GitCodeHeader,
|
|
5
|
+
P as GitCodeLayoutEmitter,
|
|
6
|
+
J as Login,
|
|
7
7
|
S as SceneValue,
|
|
8
|
-
|
|
8
|
+
I as ToolsFloat,
|
|
9
9
|
z as currentTheme,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
U as default,
|
|
11
|
+
O as setLayoutConfig,
|
|
12
|
+
Q as setTheme,
|
|
13
|
+
N as useLogin
|
|
14
14
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, createBlock, openBlock, unref, isRef, withCtx, createElementVNode, normalizeClass, createVNode, createTextVNode } from "vue";
|
|
2
|
-
import { i as isPhone, u as useModel } from "./index-
|
|
2
|
+
import { i as isPhone, u as useModel } from "./index-DXolqsNi.js";
|
|
3
3
|
import { Notification } from "vue-devui-lal/notification";
|
|
4
4
|
import { Button } from "vue-devui-lal/button";
|
|
5
5
|
import "vue-devui-lal/notification/style.css";
|
package/package.json
CHANGED