From 17a4415cd2614b4ea463701b20085a1efbeca694 Mon Sep 17 00:00:00 2001 From: unknown <1251316345@qq.com> Date: Fri, 27 Feb 2026 20:15:07 +0800 Subject: [PATCH] mpbile .gitigore app chat login register theme --- .gitignore | 3 ++- app.py | 1 - templates/chat.html | 6 ++++++ templates/login.html | 3 +-- templates/register.html | 3 +-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 44d1b60..cc7b536 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ venv/ *.egg-info/ dist/ build/ -node_modules/ \ No newline at end of file +node_modules/ +model/ \ No newline at end of file diff --git a/app.py b/app.py index 1185e3f..b5c0a7a 100644 --- a/app.py +++ b/app.py @@ -1789,7 +1789,6 @@ def api_send_sms(): resp_data = {'success': True, 'message': '验证码发送成功'} model = result.get('Model', {}) if model.get('VerifyCode'): - resp_data['mockCode'] = model['VerifyCode'] print(f'验证码: {model["VerifyCode"]}') return jsonify(resp_data) else: diff --git a/templates/chat.html b/templates/chat.html index 226dcd4..e4f3e0d 100644 --- a/templates/chat.html +++ b/templates/chat.html @@ -922,6 +922,12 @@ function markRead(roomId) { // ========== 创建群聊 ========== async function showCreateGroup() { document.getElementById('createGroupModal').classList.remove('hidden'); + // 重置弹窗标题和按钮(防止被邀请好友功能覆盖) + document.querySelector('#createGroupModal h3').textContent = '创建群聊'; + const createBtn = document.querySelector('#createGroupModal .bg-primary'); + createBtn.textContent = '创建'; + createBtn.onclick = createGroup; + document.getElementById('groupName').value = ''; const res = await fetch('/api/user/friends'); const data = await res.json(); const list = document.getElementById('friendListForGroup'); diff --git a/templates/login.html b/templates/login.html index c83acd3..a561de7 100644 --- a/templates/login.html +++ b/templates/login.html @@ -102,8 +102,7 @@ async function handleSendSms() { if (data.success) { countdown = 60; countdownTimer = setInterval(() => { countdown--; btn.textContent = countdown > 0 ? countdown+'s后重发' : '获取验证码'; if(countdown<=0){clearInterval(countdownTimer);btn.disabled=false;} }, 1000); - if (data.mockCode) alert('验证码已发送: ' + data.mockCode); - else alert('验证码已发送'); + alert('验证码已发送'); } else { alert(data.message); btn.disabled = false; if(data.refreshCaptcha) fetchCaptcha('phone'); } } catch(e) { alert('发送失败,请确保后端已启动'); btn.disabled = false; } fetchCaptcha('phone'); diff --git a/templates/register.html b/templates/register.html index 701aa81..427df13 100644 --- a/templates/register.html +++ b/templates/register.html @@ -148,8 +148,7 @@ async function handleSendSmsPhone() { btn.textContent = countdown > 0 ? countdown+'s后重发' : '获取验证码'; if(countdown<=0){clearInterval(timer);btn.disabled=false;} }, 1000); - if (data.mockCode) alert('验证码已发送: ' + data.mockCode); - else alert('验证码已发送'); + alert('验证码已发送'); } else { alert(data.message); btn.disabled = false;