From 97edac97a941f012ae5522fd851e5c052c15ddbe Mon Sep 17 00:00:00 2001 From: miaowuawa <2484667023@qq.com> Date: Mon, 14 Jul 2025 23:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/jinzhu/security.go | 2 +- web/src/components/compose.vue | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/dao/jinzhu/security.go b/internal/dao/jinzhu/security.go index 18a8ccae..5d931f42 100644 --- a/internal/dao/jinzhu/security.go +++ b/internal/dao/jinzhu/security.go @@ -48,7 +48,7 @@ func (s *securitySrv) UsePhoneCaptcha(captcha *ms.Captcha) error { // SendPhoneCaptcha 发送短信验证码 func (s *securitySrv) SendPhoneCaptcha(phone string) error { - expire := time.Duration(5) + expire := 5 * time.Minute // 发送验证码 captcha := strconv.Itoa(s.rand.Intn(900000) + 100000) diff --git a/web/src/components/compose.vue b/web/src/components/compose.vue index 5c41c254..841b6ff6 100644 --- a/web/src/components/compose.vue +++ b/web/src/components/compose.vue @@ -616,7 +616,8 @@ const submitPost = () => { imageContents.value = []; videoContents.value = []; attachmentContents.value = []; - visitType.value = defaultVisitType.value; + // 始终将可见性重置为"公开" + visitType.value = VisibilityEnum.PUBLIC; }) .catch((err) => { submitting.value = false; @@ -637,7 +638,8 @@ onMounted(() => { } else { defaultVisitType.value = VisibilityEnum.PRIVATE; } - visitType.value = defaultVisitType.value; + // 始终将可见性设置为"公开" + visitType.value = VisibilityEnum.PUBLIC; });