feat: 短信调试日志、Tawk 客服、手机号校验放宽与 Docker 文档
API - 短信发码/验码/创蓝全链路结构化日志(手机号脱敏) - 新增 SMS_DEBUG_LOG_CODE,联调时可输出验证码与 sessionId(对应创蓝批次号) - 注册成功、短信找回密码成功写入审计相关日志 - 放宽手机号归一化:移除区号白名单与 10~15 位长度限制 Player - 公告走马灯滚动周期调整为 35 秒 - 在线客服接入 Tawk.to(tawk.html),登录用户透传昵称/头像/ID - 三语补充 support.connecting 文案 部署与文档 - docker-compose 与 .env.docker.example 增加 SMS_DEBUG_LOG_CODE - 新增 docs/短信调试与日志说明.md、docs/docker 镜像构建导出脚本与说明 - Docker 部署指南补充镜像构建文档链接 - .gitignore 忽略 thebet365-images.tar 与 docker-build.log Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
129
packages/shared/public/tawk.html
Normal file
129
packages/shared/public/tawk.html
Normal file
@@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Tawk.to Container</title>
|
||||
|
||||
<link rel="preconnect" href="https://embed.tawk.to">
|
||||
<link rel="dns-prefetch" href="https://embed.tawk.to">
|
||||
|
||||
<style>
|
||||
body,
|
||||
html {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(180deg, #15120A 0%, #0A0A16 100%);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#tawk-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#loading-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: linear-gradient(180deg, #15120A 0%, #0A0A16 100%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
z-index: 9999;
|
||||
transition: opacity 0.3s ease-out;
|
||||
}
|
||||
|
||||
#loading-overlay.hidden {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: 2px solid rgba(200, 168, 78, 0.3);
|
||||
border-top-color: #c8a84e;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.8s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
font-size: 14px;
|
||||
font-family: system-ui, -apple-system, sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="loading-overlay">
|
||||
<div class="spinner"></div>
|
||||
<div class="loading-text">正在连接客服...</div>
|
||||
</div>
|
||||
|
||||
<div id="tawk-container"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const visitorName = urlParams.get('name') || '';
|
||||
const visitorAvatar = urlParams.get('avatar') || '';
|
||||
const visitorId = urlParams.get('id') || '';
|
||||
const loadingText = urlParams.get('loadingText') || '正在连接客服...';
|
||||
|
||||
const loadingTextElement = document.querySelector('.loading-text');
|
||||
if (loadingTextElement) {
|
||||
loadingTextElement.textContent = loadingText;
|
||||
}
|
||||
|
||||
var Tawk_API = Tawk_API || {};
|
||||
var Tawk_LoadStart = new Date();
|
||||
|
||||
Tawk_API.embedded = 'tawk-container';
|
||||
|
||||
if (visitorName) {
|
||||
Tawk_API.visitor = {
|
||||
name: visitorName,
|
||||
email: visitorId ? visitorId + '@user.com' : undefined
|
||||
};
|
||||
}
|
||||
|
||||
Tawk_API.onLoad = function () {
|
||||
const loadingOverlay = document.getElementById('loading-overlay');
|
||||
if (loadingOverlay) {
|
||||
loadingOverlay.classList.add('hidden');
|
||||
setTimeout(function () {
|
||||
loadingOverlay.style.display = 'none';
|
||||
}, 300);
|
||||
}
|
||||
|
||||
if (visitorAvatar || visitorId) {
|
||||
try {
|
||||
Tawk_API.setAttributes({
|
||||
avatar: visitorAvatar || undefined,
|
||||
userId: visitorId || undefined
|
||||
}, function () { });
|
||||
} catch (e) { }
|
||||
}
|
||||
};
|
||||
|
||||
(function () {
|
||||
var s1 = document.createElement('script'), s0 = document.getElementsByTagName('script')[0];
|
||||
s1.async = true;
|
||||
s1.src = 'https://embed.tawk.to/6a2b9dc1f0b5881c2ac3ed83/1jqt60fto';
|
||||
s1.charset = 'UTF-8';
|
||||
s1.setAttribute('crossorigin', '*');
|
||||
s0.parentNode.insertBefore(s1, s0);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user