Merge pull request 'Dev' (#45) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 29s
Salon SIT 自动发布 / deploy (push) Successful in 3m23s

Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/45
This commit was merged in pull request #45.
This commit is contained in:
2026-09-06 17:42:24 +08:00
6 changed files with 89 additions and 9 deletions
+3 -2
View File
@@ -27,8 +27,9 @@
<text class="field-label">验证码</text>
<view class="code-row">
<input class="code-input" value="{{form.code}}" data-field="code" bindinput="onInput" type="number" placeholder="请输入验证码" />
<button class="code-btn" loading="{{codeLoading}}" disabled="{{codeLoading || countdown > 0}}" bindtap="sendLoginCode">
{{countdown > 0 ? countdown + 's' : '获取验证码'}}
<button class="code-btn {{countdown > 0 ? 'counting' : ''}}" loading="{{codeLoading}}" disabled="{{codeLoading || countdown > 0}}" bindtap="sendLoginCode">
<text wx:if="{{countdown > 0}}">重新获取 {{countdown}}s</text>
<text wx:else>获取验证码</text>
</button>
</view>
</view>
+7 -1
View File
@@ -84,7 +84,13 @@
color: #6f8f83;
font-size: 24rpx;
font-weight: 700;
text-align: right;
text-align: center;
white-space: nowrap;
}
.code-btn.counting {
color: #aaa39a;
font-weight: 500;
}
.agreement-row,
+3 -2
View File
@@ -7,8 +7,9 @@
<view class="field">
<text class="field-label">验证码</text>
<input value="{{form.code}}" data-field="code" bindinput="onInput" placeholder="请输入验证码" />
<button class="code-btn" loading="{{codeLoading}}" disabled="{{codeLoading || countdown > 0}}" bindtap="sendCode">
{{countdown > 0 ? countdown + 's' : '获取验证码'}}
<button class="code-btn {{countdown > 0 ? 'counting' : ''}}" loading="{{codeLoading}}" disabled="{{codeLoading || countdown > 0}}" bindtap="sendCode">
<text wx:if="{{countdown > 0}}">重新获取 {{countdown}}s</text>
<text wx:else>获取验证码</text>
</button>
</view>
<view class="field">
+10 -4
View File
@@ -1,11 +1,17 @@
.code-btn {
width: 148rpx;
min-width: 148rpx;
max-width: 148rpx;
width: 180rpx;
min-width: 180rpx;
max-width: 180rpx;
height: 56rpx;
padding: 0;
color: #6f8f83;
font-size: 24rpx;
font-weight: 700;
text-align: right;
text-align: center;
white-space: nowrap;
}
.code-btn.counting {
color: #aaa39a;
font-weight: 500;
}
@@ -0,0 +1,38 @@
-- Salon 短信验证码模板编码映射调整
-- 版本:0.0.1
-- 说明:MessageHub 已配置阿里云 100001-100005 与 Spug SPUG_SMS_VERIFY_1-4 模板。
START TRANSACTION;
UPDATE t_messagehub_push_config
SET template_code = CASE scene_code
WHEN 'USER_REGISTER_SMS_CODE' THEN '100001'
WHEN 'USER_LOGIN_SMS_CODE' THEN '100001'
WHEN 'USER_RESET_PASSWORD_SMS_CODE' THEN '100003'
WHEN 'USER_BIND_PHONE_SMS_CODE' THEN '100004'
WHEN 'USER_CHANGE_PHONE_SMS_CODE' THEN '100002'
WHEN 'USER_CHANGE_PASSWORD_SMS_CODE' THEN '100003'
END,
send_method = 'ALIYUN_SMS_VERIFY',
update_time = NOW()
WHERE platform = 'SMS'
AND source_system = 'jayucloud-salon'
AND scene_code IN (
'USER_REGISTER_SMS_CODE',
'USER_LOGIN_SMS_CODE',
'USER_RESET_PASSWORD_SMS_CODE',
'USER_BIND_PHONE_SMS_CODE',
'USER_CHANGE_PHONE_SMS_CODE',
'USER_CHANGE_PASSWORD_SMS_CODE'
)
AND is_delete = 0;
COMMIT;
SELECT scene_code, template_code, send_method
FROM t_messagehub_push_config
WHERE platform = 'SMS'
AND source_system = 'jayucloud-salon'
AND scene_code LIKE 'USER_%_SMS_CODE'
AND is_delete = 0
ORDER BY scene_code;
@@ -0,0 +1,28 @@
# Salon 小程序验证码倒计时设计
## 目标
优化登录页和注册页验证码按钮的倒计时视觉表现,采用简洁、克制的表单按钮样式,保持现有发送接口、60 秒倒计时和错误提示逻辑不变。
## 交互设计
- 未发送时显示“获取验证码”,使用当前页面品牌强调色,可点击。
- 请求发送中沿用现有加载状态,按钮不可重复点击。
- 发送成功后显示“重新获取 59s”形式的倒计时文案,文字弱化且不可点击。
- 倒计时数字使用固定宽度,避免秒数变化造成按钮抖动。
- 倒计时结束后恢复为“重新获取”,文字恢复强调色并允许点击。
## 适用范围
- `JC-Salon-WeChat/pages/login` 验证码登录。
- `JC-Salon-WeChat/pages/register` 注册验证码。
## 非目标
- 不修改验证码接口、倒计时秒数、错误处理和页面布局结构。
- 不引入新的组件或第三方依赖。
## 验证
- 检查登录页和注册页发送前、发送中、倒计时中、倒计时结束四种状态。
- 确认按钮宽度稳定、文案不溢出、倒计时结束后可再次发送。