优化公众号回复

This commit is contained in:
2026-09-16 18:15:58 +08:00
parent f386899625
commit 1224735aa8
6 changed files with 200 additions and 31 deletions
@@ -29,8 +29,8 @@
<div v-else class="bind-box">
<p class="tip">绑定微信后,可通过公众号接收系统提醒与公告推送。</p>
<el-steps :active="bindStep" simple class="bind-steps">
<el-step title="扫码关注公众号" />
<el-step title="公众号回复验证码" />
<el-step title="关注公众号" />
<el-step title="获取验证码(扫码或发送「验证码」)" />
<el-step title="输入验证码完成绑定" />
</el-steps>
<div class="bind-area">
@@ -45,7 +45,7 @@
<el-button type="primary" size="small" :loading="confirming" @click="handleConfirm">
完成绑定
</el-button>
<p class="tip">扫码关注后公众号会自动回复 6 位验证码({{ ttlText }})。</p>
<p class="tip">两种方式任选:① 扫描左侧二维码(未关注会自动关注);② 在公众号内发送「验证码」。都会回复 6 位验证码({{ ttlText }}),在上方输入即可绑定。</p>
</div>
</div>
</div>
@@ -133,10 +133,7 @@ const handleStart = async () => {
};
const handleConfirm = async () => {
if (!scene.value) {
ElMessage.warning("请先获取绑定二维码并扫码关注");
return;
}
// scene 可为空:在公众号内发送「验证码」获取时无需二维码,后端按验证码认领会话
if (!code.value.trim()) {
ElMessage.warning("请输入公众号回复的验证码");
return;