重构物流客服模块并完善会话接待工作台
- 拆分应用工厂、业务服务与路由,保留原有 HTTP/SSE 和存储入口 - 分离页面资源,重排客服工作台并完善响应式导航、草稿和附件交互 - 整理维护脚本、请求示例和贡献指南,移除启动脚本中的密钥配置 - 上传文件改为仅本地保留,补充隔离的后端与前端回归验证 验证:46 项 Python 测试通过,含 14 个已有子测试;12 个 Node 前端场景通过。
This commit is contained in:
+35
-28
@@ -1,33 +1,40 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>登录 - 客服后台</title>
|
||||
<style>
|
||||
body{font-family:sans-serif;background:#f0f2f5;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;}
|
||||
.box{background:#fff;padding:40px;border-radius:12px;box-shadow:0 2px 12px rgba(0,0,0,0.1);width:320px;}
|
||||
h2{text-align:center;color:#18479c;margin-bottom:24px;}
|
||||
input{width:100%;padding:10px;border:1px solid #ddd;border-radius:6px;margin-bottom:12px;font-size:14px;box-sizing:border-box;}
|
||||
button{width:100%;padding:10px;background:#2978e8;color:#fff;border:none;border-radius:6px;font-size:14px;cursor:pointer;}
|
||||
.err{color:#dc2626;font-size:13px;text-align:center;display:none;}
|
||||
</style>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>登录 · 柏悦客服工作台</title>
|
||||
<link rel="icon" href="{{ url_for('static', filename='fa.jpg') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/theme.css') }}">
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/admin_login.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="box">
|
||||
<h2>🔒 客服后台登录</h2>
|
||||
<input type="text" id="user" placeholder="账号">
|
||||
<input type="password" id="pwd" placeholder="密码">
|
||||
<p class="err" id="err">账号或密码错误</p>
|
||||
<button onclick="login()">登录</button>
|
||||
</div>
|
||||
<script>
|
||||
function login(){
|
||||
var u=document.getElementById("user").value;
|
||||
var p=document.getElementById("pwd").value;
|
||||
fetch("/admin/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:u,password:p})})
|
||||
.then(function(r){if(r.ok){location.href="/admin/dashboard"}else{document.getElementById("err").style.display="block"}});
|
||||
}
|
||||
document.getElementById("pwd").addEventListener("keydown",function(e){if(e.key==="Enter")login()});
|
||||
</script>
|
||||
<body class="auth-page">
|
||||
<main class="auth-shell">
|
||||
<section class="auth-story" aria-label="柏悦物流客服中心">
|
||||
<a class="brand" href="/"><span class="brand-mark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4 7 8-4 8 4v10l-8 4-8-4Z"/><path d="m4 7 8 4 8-4M12 11v10M8 5l8 4"/></svg></span><span><span class="brand-name">柏悦物流</span><span class="brand-caption">BAIYUE LOGISTICS</span></span></a>
|
||||
<div class="story-copy"><div class="eyebrow">CONNECT EVERY JOURNEY</div><h1>让每一程物流,<br>都有及时的回应。</h1><p>从咨询到交付,把客户沟通集中在一个工作台,让服务始终有条不紊。</p></div>
|
||||
<div class="service-points">
|
||||
<div class="service-point"><span aria-hidden="true">01</span><div><strong>会话集中管理</strong><p>接待客户咨询,查看历史沟通内容</p></div></div>
|
||||
<div class="service-point"><span aria-hidden="true">02</span><div><strong>人工与智能协作</strong><p>衔接处理报价、轨迹与物流异常咨询</p></div></div>
|
||||
<div class="service-point"><span aria-hidden="true">03</span><div><strong>消息及时流转</strong><p>关注未读会话,跟进离线留言</p></div></div>
|
||||
</div>
|
||||
<div class="route-line"><span>起点</span><i aria-hidden="true"></i><span>运输途中</span><i aria-hidden="true"></i><span>每一次抵达</span></div>
|
||||
</section>
|
||||
<section class="auth-content">
|
||||
<a class="brand mobile-brand" href="/"><span class="brand-mark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m4 7 8-4 8 4v10l-8 4-8-4Z"/><path d="m4 7 8 4 8-4M12 11v10M8 5l8 4"/></svg></span><span><span class="brand-name">柏悦物流</span><span class="brand-caption">BAIYUE LOGISTICS</span></span></a>
|
||||
<div class="box">
|
||||
<div class="eyebrow">客服中心</div><h2>欢迎回来</h2><p class="login-description">请使用您的客服账号,登录柏悦物流工作台。</p>
|
||||
<form id="loginForm" novalidate>
|
||||
<label class="field-label" for="user">客服账号</label><div class="field-wrap"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" aria-hidden="true"><circle cx="12" cy="8" r="4"/><path d="M4 21v-2a8 8 0 0 1 16 0v2"/></svg><input type="text" id="user" placeholder="请输入客服账号" autocomplete="username" required></div>
|
||||
<label class="field-label" for="pwd">登录密码</label><div class="field-wrap"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" aria-hidden="true"><rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3M12 14v3"/></svg><input type="password" id="pwd" placeholder="请输入登录密码" autocomplete="current-password" required></div>
|
||||
<p class="err" id="err" role="alert" hidden></p>
|
||||
<button id="loginButton" type="submit">登录工作台 →</button>
|
||||
</form>
|
||||
<a class="login-back" href="/">← 返回客户服务入口</a>
|
||||
</div>
|
||||
<footer class="auth-footer">柏悦物流 · 客服工作台</footer>
|
||||
</section>
|
||||
</main>
|
||||
<script src="{{ url_for('static', filename='js/admin_login.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user