feat: 后端补齐前端所需模块 + 后台登录页品牌化重构

后端(补齐前端已入口但无接口的模块):
- Coupon 控制器:center 领券中心 / my 我的券(未使用·已使用·已过期+计数)/ receive 领取
  含库存与过期校验、重复领取拦截、领券后自动发消息
- Message 控制器:index 列表(分类筛选)/ read 单条已读 / readAll 全部已读 / unread 角标
  支持 user 与 master 两种归属

前端(对应页面,全部接真接口):
- pages/address/list  服务地址:列表 / 新增·编辑弹层 / 设为默认 / 删除
- pages/coupon/coupon 领券中心 + 我的券(双 Tab + 状态筛选 + 计数)
- pages/message/message 消息中心:分类 / 未读圆点 / 点开自动已读 / 全部已读 / 跳订单
- mine.vue 三个入口(地址·优惠券·消息)由「开发中」改为真实路由
- merchant/workbench 服务地址入口接真实路由
- 首页 TabBar「消息」接入消息中心
- api.js 新增 coupon/message 共 7 个接口

后台登录页(UI 与前端主色调统一):
- 左侧橙金渐变品牌区:logo 徽标 + 「优匠优服」立体字 + slogan + 460万+/99.9%/1762万 平台实力 + 保障条
- 右侧白色登录卡:橙色渐变按钮、圆角输入框、错误提示条
- 保留 FastAdmin 全部挂钩(token/验证码/keeplogin/@AdminLoginFormBegin 等 14 项)

验证:5 套用例 178 项断言全通过(47+65+27+24+15),配置自检 8/8
这个提交包含在:
linda
2026-10-28 16:51:45 +08:00
父节点 2af4cf72b5
当前提交 4734724ed2
共有 12 个文件被更改,包括 890 次插入 和 125 次删除

251
server/application/admin/view/index/login.html 可执行文件 -> 普通文件
查看文件

@@ -4,139 +4,148 @@
{include file="common/meta" /}
<style type="text/css">
body {
color: #999;
background-color: #f1f4fd;
background-size: cover;
* { box-sizing: border-box; }
body { margin: 0; color: #333; background: #FFF7F0;
font-family: -apple-system, "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
a { color: #E36B0C; }
.login-page { min-height: 100vh; display: flex; }
/* ---------- 左侧品牌区 ---------- */
.brand { position: relative; width: 54%; min-height: 100vh; overflow: hidden; color: #fff;
padding: 0 72px; display: flex; flex-direction: column; justify-content: center;
background: linear-gradient(160deg, #FFB85C 0%, #F98D25 46%, #ED6F0E 100%); }
.brand .deco { position: absolute; border-radius: 50%; background: rgba(255,255,255,.13); }
.brand .d1 { width: 520px; height: 520px; right: -180px; top: -200px; }
.brand .d2 { width: 320px; height: 320px; left: -120px; bottom: -120px; background: rgba(255,255,255,.10); }
.brand .d3 { width: 160px; height: 160px; right: 90px; bottom: 90px; background: rgba(255,255,255,.08); }
.logo-mark { position: relative; width: 64px; height: 64px; border-radius: 18px;
background: rgba(255,255,255,.94); color: #EE7412; font-size: 34px; font-weight: 800;
display: flex; align-items: center; justify-content: center;
box-shadow: 0 10px 24px rgba(170,70,10,.22); }
.wordmark { position: relative; margin-top: 30px; font-size: 60px; font-weight: 800;
letter-spacing: 10px; line-height: 1.1; color: #fff;
text-shadow: 0 2px 0 #E9721A, 0 5px 0 #D9630E, 0 10px 24px rgba(150,60,0,.35); }
.slogan { position: relative; margin-top: 18px; font-size: 17px;
letter-spacing: 4px; color: rgba(255,255,255,.92); }
.stats { position: relative; display: flex; margin-top: 54px; }
.stat { margin-right: 56px; }
.stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: 1px; }
.stat span { display: block; margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.85); letter-spacing: 1px; }
.brand-tip { position: relative; margin-top: 46px; font-size: 13px;
color: rgba(255,255,255,.82); letter-spacing: 1px; }
/* ---------- 右侧表单区 ---------- */
.panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-screen { width: 100%; max-width: 380px; }
.login-screen .well { padding: 40px 34px 32px; background: #fff; border: none; border-radius: 20px;
box-shadow: 0 18px 48px rgba(226,120,26,.16); }
.panel-title { margin: 0 0 6px; font-size: 24px; font-weight: 700; color: #1F1F1F; }
.panel-sub { margin: 0 0 26px; font-size: 13px; color: #9A9A9A; }
#login-form .input-group { display: flex; margin-bottom: 16px; }
#login-form .input-group-addon { width: 46px; flex: none; background: #FFF7F0;
border: 1px solid #F2E3D6; border-right: none; border-radius: 12px 0 0 12px;
color: #E07A2E; display: flex; align-items: center; justify-content: center; }
#login-form .form-control { flex: 1; height: 46px; padding: 0 14px; font-size: 14px;
border: 1px solid #F2E3D6; border-radius: 0 12px 12px 0; box-shadow: none; }
#login-form .input-group .form-control:not(:last-child) { border-radius: 0; }
#login-form .form-control:focus { border-color: #F5861F; outline: none; }
#login-form .btn-submit { width: 100%; height: 48px; margin-top: 6px; border: none; border-radius: 24px;
color: #fff; font-size: 16px; font-weight: 700; letter-spacing: 2px; cursor: pointer;
background: linear-gradient(135deg, #FFA93F 0%, #F0710D 100%);
box-shadow: 0 10px 22px rgba(240,113,13,.32); }
#login-form .btn-submit:hover { filter: brightness(1.04); }
#login-form .checkbox { margin: 2px 0 16px; color: #8A8A8A; font-size: 13px; }
#errtips { margin-bottom: 14px; padding: 10px 14px; border-radius: 10px;
background: #FFF1EF; color: #E8331B; font-size: 13px; }
.foot { margin-top: 22px; text-align: center; font-size: 12px; color: #B9B9B9; line-height: 20px; }
#profile-img, #profile-name { display: none !important; }
@media (max-width: 900px) {
.login-page { flex-direction: column; }
.brand { width: 100%; min-height: auto; padding: 40px 28px 34px; }
.wordmark { margin-top: 18px; font-size: 38px; letter-spacing: 6px; }
.stats { margin-top: 26px; }
.stat { margin-right: 30px; }
.stat b { font-size: 22px; }
.brand-tip { margin-top: 24px; }
.panel { padding: 26px 20px 40px; }
}
a {
color: #444;
}
.login-screen {
max-width: 430px;
padding: 0;
margin: 100px auto 0 auto;
}
.login-screen .well {
border-radius: 3px;
-webkit-box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
background: rgba(255, 255, 255, 1);
border: none;
/*overflow: hidden;*/
padding: 0;
}
@media (max-width: 767px) {
.login-screen {
padding: 0 20px;
}
}
.profile-img-card {
width: 100px;
height: 100px;
display: block;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
margin: -93px auto 30px;
border: 5px solid #fff;
}
.profile-name-card {
text-align: center;
}
.login-head {
background: #899fe1;
border-radius: 3px 3px 0 0;
}
.login-form {
padding: 40px 30px;
position: relative;
z-index: 99;
}
#login-form {
margin-top: 20px;
}
#login-form .input-group {
margin-bottom: 15px;
}
#login-form .form-control {
font-size: 13px;
}
</style>
<!--@formatter:off-->
{if $background}
<style type="text/css">
body{
background-image: url('{$background|htmlentities}');
}
</style>
<style type="text/css">
.brand { background-image: url('{$background|htmlentities}'); background-size: cover; background-position: center; }
</style>
{/if}
<!--@formatter:on-->
</head>
<body>
<div class="container">
<div class="login-wrapper">
<div class="login-page">
<!-- 左侧:品牌 + 平台实力 -->
<div class="brand">
<div class="deco d1"></div>
<div class="deco d2"></div>
<div class="deco d3"></div>
<div class="logo-mark">优</div>
<div class="wordmark">优匠优服</div>
<div class="slogan">专业师傅 · 上门到家</div>
<div class="stats">
<div class="stat"><b>460万+</b><span>专业师傅</span></div>
<div class="stat"><b>99.9%</b><span>区域覆盖到村镇</span></div>
<div class="stat"><b>1762万</b><span>成功订单</span></div>
</div>
<div class="brand-tip">平台认证 · 先行赔付 · 极速上门 · 售后无忧</div>
</div>
<!-- 右侧:登录表单 -->
<div class="panel">
<div class="login-screen">
<div class="well">
<div class="login-head">
<img src="__CDN__/assets/img/login-head.png" style="width:100%;"/>
</div>
<div class="login-form">
<img id="profile-img" class="profile-img-card" src="__CDN__/assets/img/avatar.png"/>
<p id="profile-name" class="profile-name-card"></p>
<p class="panel-title">平台管理后台</p>
<p class="panel-sub">请使用管理员账号登录</p>
<form action="" method="post" id="login-form">
<!--@AdminLoginFormBegin-->
<div id="errtips" class="hide"></div>
{:token()}
<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></div>
<input type="text" class="form-control" id="pd-form-username" placeholder="{:__('Username')}" name="username" autocomplete="off" value="" data-rule="{:__('Username')}:required;username"/>
</div>
<img id="profile-img" class="profile-img-card" src="__CDN__/assets/img/avatar.png"/>
<p id="profile-name" class="profile-name-card"></p>
<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span></div>
<input type="password" class="form-control" id="pd-form-password" placeholder="{:__('Password')}" name="password" autocomplete="off" value="" data-rule="{:__('Password')}:required;password"/>
</div>
<!--@CaptchaBegin-->
{if $Think.config.fastadmin.login_captcha}
<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></div>
<input type="text" name="captcha" class="form-control" placeholder="{:__('Captcha')}" data-rule="{:__('Captcha')}:required;length({$Think.config.captcha.length|htmlentities})" autocomplete="off"/>
<span class="input-group-addon" style="padding:0;border:none;cursor:pointer;">
<img src="{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha" width="100" height="30" onclick="this.src = '{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha&r=' + Math.random();"/>
</span>
</div>
{/if}
<!--@CaptchaEnd-->
{if $keeyloginhours>0}
<div class="form-group checkbox">
<label class="inline" for="keeplogin" data-toggle="tooltip" title="{:__('The duration of the session is %s hours', $keeyloginhours)}">
<input type="checkbox" name="keeplogin" id="keeplogin" value="1"/>
{:__('Keep login')}
</label>
</div>
{/if}
<div class="form-group">
<button type="submit" class="btn btn-success btn-lg btn-block" style="background:#708eea;">{:__('Sign in')}</button>
</div>
<!--@AdminLoginFormEnd-->
</form>
</div>
<form action="" method="post" id="login-form">
<!--@AdminLoginFormBegin-->
<div id="errtips" class="hide"></div>
{:token()}
<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></div>
<input type="text" class="form-control" id="pd-form-username" placeholder="{:__('Username')}" name="username" autocomplete="off" value="" data-rule="{:__('Username')}:required;username"/>
</div>
<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span></div>
<input type="password" class="form-control" id="pd-form-password" placeholder="{:__('Password')}" name="password" autocomplete="off" value="" data-rule="{:__('Password')}:required;password"/>
</div>
<!--@CaptchaBegin-->
{if $Think.config.fastadmin.login_captcha}
<div class="input-group">
<div class="input-group-addon"><span class="glyphicon glyphicon-option-horizontal" aria-hidden="true"></span></div>
<input type="text" name="captcha" class="form-control" placeholder="{:__('Captcha')}" data-rule="{:__('Captcha')}:required;length({$Think.config.captcha.length|htmlentities})" autocomplete="off"/>
<span class="input-group-addon" style="width:106px;border:1px solid #F2E3D6;border-left:none;border-radius:0 12px 12px 0;background:#fff;padding:0;cursor:pointer;">
<img src="{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha" width="100" height="30" onclick="this.src = '{:rtrim('__PUBLIC__', '/')}/index.php?s=/captcha&r=' + Math.random();"/>
</span>
</div>
{/if}
<!--@CaptchaEnd-->
{if $keeyloginhours>0}
<div class="form-group checkbox">
<label class="inline" for="keeplogin" data-toggle="tooltip" title="{:__('The duration of the session is %s hours', $keeyloginhours)}">
<input type="checkbox" name="keeplogin" id="keeplogin" value="1"/>
{:__('Keep login')}
</label>
</div>
{/if}
<button type="submit" class="btn-submit">{:__('Sign in')}</button>
<!--@AdminLoginFormEnd-->
</form>
<div class="foot">优匠优服 · 让手艺人有活干,让家有温度<br/>© {:date('Y')} 优匠优服 平台管理后台</div>
</div>
</div>
</div>