docs: annotate all shared frontend modules in Chinese
This commit is contained in:
1 parent
2be21c1c62
commit
408f8e5c98
55 files changed
+349
No files matched your search
@@ -1,3 +1,4 @@
|
||||
/** 邮件/手机验证码发送:复用人机验证,成功后倒计时,组件销毁清理定时器。 */
|
||||
import { onScopeDispose } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { useApi } from "~/lib/auth.js";
|
||||
@@ -11,6 +12,7 @@ function i(i) {
|
||||
function u() {
|
||||
c &&= (clearInterval(c), null);
|
||||
}
|
||||
// 默认为 60 秒;重复启动先清旧定时器,防止多次递减造成提前结束。
|
||||
function d() {
|
||||
l ||
|
||||
(u(),
|
||||
@@ -22,6 +24,7 @@ function i(i) {
|
||||
onScopeDispose(() => {
|
||||
((l = !0), u());
|
||||
});
|
||||
/** e 为 email 或手机场景,t 为收件账号,n 为账号缺失提示;发送中/倒计时中直接忽略。 */
|
||||
async function f(e, t, n) {
|
||||
if (l || o.value || s.value > 0) return;
|
||||
if (((i.error.value = ``), !t)) {
|
||||
@@ -58,6 +61,7 @@ function i(i) {
|
||||
phone: t,
|
||||
});
|
||||
}
|
||||
// 发送成功才开始倒计时;已消费的人机验证失效/刷新,不能在下一次发送时复用。
|
||||
(d(),
|
||||
!l &&
|
||||
i.captcha.needed.value &&
|
||||
|
||||
Reference in new issue
Block a user