forked from datawhale/whale-town-front
合并主场景和个人小屋
This commit is contained in:
@@ -128,21 +128,15 @@ func handle_send_verification_code_response(success: bool, data: Dictionary, err
|
||||
var error_code = data.get("error_code", "")
|
||||
if error_code == "TEST_MODE_ONLY":
|
||||
result.success = true
|
||||
result.message = "🧪 测试模式:验证码已生成,请查看控制台"
|
||||
result.message = "🧪 测试模式:验证码已生成"
|
||||
result.toast_type = "success"
|
||||
|
||||
# 在控制台显示验证码
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("🔑 测试模式验证码: ", data.data.verification_code)
|
||||
result.message += "\n验证码: " + str(data.data.verification_code)
|
||||
else:
|
||||
result.success = true
|
||||
result.message = "📧 验证码已发送到您的邮箱,请查收"
|
||||
result.toast_type = "success"
|
||||
|
||||
# 开发环境下显示验证码
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("🔑 开发环境验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result = _handle_send_code_error(data, error_info)
|
||||
|
||||
@@ -156,18 +150,15 @@ func handle_send_login_code_response(success: bool, data: Dictionary, error_info
|
||||
var error_code = data.get("error_code", "")
|
||||
if error_code == "TEST_MODE_ONLY":
|
||||
result.success = true
|
||||
result.message = "测试模式:登录验证码已生成,请查看控制台"
|
||||
result.message = "测试模式:登录验证码已生成"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("测试模式登录验证码: ", data.data.verification_code)
|
||||
result.message += "\n验证码: " + str(data.data.verification_code)
|
||||
else:
|
||||
result.success = true
|
||||
result.message = "登录验证码已发送,请查收"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("开发环境登录验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result = _handle_send_login_code_error(data, error_info)
|
||||
|
||||
@@ -214,18 +205,15 @@ func handle_resend_email_verification_response(success: bool, data: Dictionary,
|
||||
var error_code = data.get("error_code", "")
|
||||
if error_code == "TEST_MODE_ONLY":
|
||||
result.success = true
|
||||
result.message = "🧪 测试模式:验证码已重新生成,请查看控制台"
|
||||
result.message = "🧪 测试模式:验证码已重新生成"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("🔑 测试模式重新发送验证码: ", data.data.verification_code)
|
||||
result.message += "\n验证码: " + str(data.data.verification_code)
|
||||
else:
|
||||
result.success = true
|
||||
result.message = "📧 验证码已重新发送到您的邮箱,请查收"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("🔑 开发环境重新发送验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result = _handle_resend_email_verification_error(data, error_info)
|
||||
|
||||
@@ -239,18 +227,15 @@ func handle_forgot_password_response(success: bool, data: Dictionary, error_info
|
||||
var error_code = data.get("error_code", "")
|
||||
if error_code == "TEST_MODE_ONLY":
|
||||
result.success = true
|
||||
result.message = "🧪 测试模式:重置验证码已生成,请查看控制台"
|
||||
result.message = "🧪 测试模式:重置验证码已生成"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("🔑 测试模式重置验证码: ", data.data.verification_code)
|
||||
result.message += "\n验证码: " + str(data.data.verification_code)
|
||||
else:
|
||||
result.success = true
|
||||
result.message = "📧 重置验证码已发送,请查收"
|
||||
result.toast_type = "success"
|
||||
|
||||
if data.has("data") and data.data.has("verification_code"):
|
||||
print("🔑 开发环境重置验证码: ", data.data.verification_code)
|
||||
else:
|
||||
result = _handle_forgot_password_error(data, error_info)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user