chore: release v1.0.3
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -184,7 +184,7 @@ details[open] .faq-q .icon { transform: rotate(45deg); }
|
||||
<h1>从入库到出库,<br/><em>一套系统</em>管到底。</h1>
|
||||
<p class="lead">岩美酒库管理系统,为酒行与酒店设计的库存、审核、财务一体化平台。审核驱动业务流,库存与账款自动同步,五端无缝接入。</p>
|
||||
<div class="d-flex gap-12 mb-28">
|
||||
<a href="/app/" class="btn btn-primary btn-lg">免费试用 30 天<i data-lucide="arrow-right" class="icon"></i></a>
|
||||
<a href="/register/" class="btn btn-primary btn-lg">免费试用 30 天<i data-lucide="arrow-right" class="icon"></i></a>
|
||||
<a href="/app/" class="btn btn-secondary btn-lg"><i data-lucide="play-circle" class="icon"></i>观看演示</a>
|
||||
</div>
|
||||
<div class="d-flex items-center gap-18 text-muted fs-sm">
|
||||
@@ -537,7 +537,7 @@ details[open] .faq-q .icon { transform: rotate(45deg); }
|
||||
<li class="d-flex items-start gap-8 fs-sm text-gray-7"><i data-lucide="check" class="icon-sm text-brand flex-shrink-0 mt-2"></i>Web 端 + 移动端</li>
|
||||
<li class="d-flex items-start gap-8 fs-sm text-gray-7"><i data-lucide="check" class="icon-sm text-brand flex-shrink-0 mt-2"></i>邮件技术支持</li>
|
||||
</ul>
|
||||
<a href="/app/" class="btn btn-secondary w-full justify-center mt-auto">免费开通</a>
|
||||
<a href="/register/" class="btn btn-secondary w-full justify-center mt-auto">免费开通</a>
|
||||
</div>
|
||||
<div class="price-card featured card d-flex flex-col" style="padding:32px 28px">
|
||||
<div class="fs-sm text-muted fw-5 mb-4">标准方案</div>
|
||||
@@ -618,7 +618,7 @@ details[open] .faq-q .icon { transform: rotate(45deg); }
|
||||
<p>30 天免费试用,无需绑卡。任何时间可取消,已录入数据保留 90 天。</p>
|
||||
</div>
|
||||
<div class="d-flex flex-col gap-12 items-start">
|
||||
<a href="/app/" class="btn btn-primary btn-lg">立即开通试用<i data-lucide="arrow-right" class="icon"></i></a>
|
||||
<a href="/register/" class="btn btn-primary btn-lg">立即开通试用<i data-lucide="arrow-right" class="icon"></i></a>
|
||||
<a href="/app/" class="btn btn-secondary btn-lg"><i data-lucide="phone" class="icon"></i>预约 1 对 1 演示</a>
|
||||
<span class="fs-sm" style="color:#99A3B3">销售热线 {{ site.support.phone }} · 工作日 9:00-18:00</span>
|
||||
</div>
|
||||
|
||||
+85
-38
@@ -14,10 +14,13 @@ pageStyle: |
|
||||
.form-row { margin-bottom: var(--space-5); }
|
||||
.form-label { display: block; font-size: var(--text-sm); font-weight: 500; color: var(--neutral-700); margin-bottom: var(--space-1-5); }
|
||||
.form-label .req { color: var(--error-500); margin-left: 2px; }
|
||||
.form-input, .form-textarea { width: 100%; padding: var(--space-2-5) var(--space-3); border: 1px solid var(--neutral-300); border-radius: var(--radius-md); font-size: var(--text-md); font-family: inherit; background: var(--neutral-0); color: var(--neutral-900); transition: border-color .15s, box-shadow .15s; box-sizing: border-box; }
|
||||
.form-input, .form-textarea { width: 100%; padding: var(--space-2-5) var(--space-3); border: 1.5px solid var(--neutral-300); border-radius: var(--radius-md); font-size: var(--text-md); font-family: inherit; background: var(--neutral-0); color: var(--neutral-900); transition: border-color .15s, box-shadow .15s; box-sizing: border-box; }
|
||||
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
|
||||
.form-input.error, .form-textarea.error { border-color: var(--error-500); box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
|
||||
.form-textarea { resize: vertical; min-height: 80px; }
|
||||
.form-helper { font-size: var(--text-xs); color: var(--neutral-400); margin-top: var(--space-1); }
|
||||
.field-error { font-size: var(--text-xs); color: var(--error-600); margin-top: 4px; display: none; }
|
||||
.field-error.visible { display: block; }
|
||||
.reg-submit { width: 100%; padding: var(--space-3) var(--space-4); font-size: var(--text-md); font-weight: 600; margin-top: var(--space-2); }
|
||||
.reg-login-hint { text-align: center; margin-top: var(--space-4); font-size: var(--text-sm); color: var(--neutral-500); }
|
||||
.reg-login-hint a { color: var(--brand-600); }
|
||||
@@ -61,24 +64,28 @@ pageStyle: |
|
||||
<div class="form-row">
|
||||
<label class="form-label" for="shop_name">店铺名称<span class="req">*</span></label>
|
||||
<input class="form-input" type="text" id="shop_name" placeholder="例:强朋友名酒行" autocomplete="organization" />
|
||||
<div class="field-error" id="err-shop_name"></div>
|
||||
<div class="form-helper">您的酒行正式名称,将显示在所有单据和商品标签上</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label class="form-label" for="address">门店地址<span class="req">*</span></label>
|
||||
<input class="form-input" type="text" id="address" placeholder="例:贵州省贵阳市云岩区中华北路 88 号" autocomplete="street-address" />
|
||||
<div class="field-error" id="err-address"></div>
|
||||
<div class="form-helper">实际经营地址,打印标签和单据时展示</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label class="form-label" for="manager_name">负责人姓名<span class="req">*</span></label>
|
||||
<input class="form-input" type="text" id="manager_name" placeholder="例:张三" autocomplete="name" />
|
||||
<div class="field-error" id="err-manager_name"></div>
|
||||
<div class="form-helper">主要负责人真实姓名,也是首个管理员账号的姓名</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label class="form-label" for="phone">联系电话<span class="req">*</span></label>
|
||||
<input class="form-input" type="tel" id="phone" placeholder="例:0851-12345678" autocomplete="tel" />
|
||||
<div class="field-error" id="err-phone"></div>
|
||||
<div class="form-helper">对外联系电话,打印商品标签时会展示</div>
|
||||
</div>
|
||||
|
||||
@@ -96,18 +103,21 @@ pageStyle: |
|
||||
<div class="form-row">
|
||||
<label class="form-label" for="username">用户名<span class="req">*</span></label>
|
||||
<input class="form-input" type="text" id="username" placeholder="例:admin" autocomplete="username" />
|
||||
<div class="field-error" id="err-username"></div>
|
||||
<div class="form-helper">登录账号(3–30 位,字母/数字/下划线),创建后不可修改</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label class="form-label" for="password">密码<span class="req">*</span></label>
|
||||
<input class="form-input" type="password" id="password" placeholder="至少 6 位" autocomplete="new-password" />
|
||||
<div class="field-error" id="err-password"></div>
|
||||
<div class="form-helper">至少 6 位,建议字母数字组合</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label class="form-label" for="password_confirm">确认密码<span class="req">*</span></label>
|
||||
<input class="form-input" type="password" id="password_confirm" placeholder="再次输入密码" autocomplete="new-password" />
|
||||
<div class="field-error" id="err-password_confirm"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -115,7 +125,7 @@ pageStyle: |
|
||||
<i data-lucide="store" class="icon"></i>
|
||||
立即注册
|
||||
</button>
|
||||
<p class="reg-login-hint">已有账号?<a href="https://jiu.51yanmei.com/app/">直接登录</a></p>
|
||||
<p class="reg-login-hint">已有账号?<a href="/app/">直接登录</a></p>
|
||||
</div>
|
||||
|
||||
<!-- 注册成功面板 -->
|
||||
@@ -152,7 +162,7 @@ pageStyle: |
|
||||
</div>
|
||||
|
||||
<p class="success-note">如忘记门店编码,登录后可在「系统设置 → 关于」中查看。</p>
|
||||
<a href="https://jiu.51yanmei.com/app/" class="btn btn-primary" style="display:inline-flex;align-items:center;gap:8px;">
|
||||
<a href="/app/" class="btn btn-primary" style="display:inline-flex;align-items:center;gap:8px;">
|
||||
<i data-lucide="log-in" class="icon"></i>前往登录
|
||||
</a>
|
||||
</div>
|
||||
@@ -162,49 +172,86 @@ pageStyle: |
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
var API_URL = 'https://jiu.51yanmei.com/api/v1/public/register';
|
||||
var API_URL = window.location.origin + '/api/v1/public/register';
|
||||
|
||||
function $(id) { return document.getElementById(id); }
|
||||
|
||||
function showError(msg) {
|
||||
function getVal(id) { return $(id).value.trim(); }
|
||||
|
||||
function setFieldError(id, msg) {
|
||||
var input = $(id);
|
||||
var errEl = $('err-' + id);
|
||||
if (msg) {
|
||||
input.classList.add('error');
|
||||
if (errEl) { errEl.textContent = msg; errEl.classList.add('visible'); }
|
||||
} else {
|
||||
input.classList.remove('error');
|
||||
if (errEl) { errEl.textContent = ''; errEl.classList.remove('visible'); }
|
||||
}
|
||||
}
|
||||
|
||||
function clearAllErrors() {
|
||||
['shop_name','address','manager_name','phone','username','password','password_confirm'].forEach(function(id) {
|
||||
setFieldError(id, '');
|
||||
});
|
||||
}
|
||||
|
||||
// 用户修改字段后清除该字段的错误提示
|
||||
['shop_name','address','manager_name','phone','username','password','password_confirm'].forEach(function(id) {
|
||||
var el = $(id);
|
||||
if (el) el.addEventListener('input', function() { setFieldError(id, ''); });
|
||||
});
|
||||
|
||||
function validate() {
|
||||
clearAllErrors();
|
||||
var ok = true;
|
||||
var firstErr = null;
|
||||
|
||||
function require(id, msg) {
|
||||
if (!getVal(id)) { setFieldError(id, msg); if (!firstErr) firstErr = id; ok = false; }
|
||||
}
|
||||
|
||||
require('shop_name', '请填写店铺名称');
|
||||
require('address', '请填写门店地址');
|
||||
require('manager_name', '请填写负责人姓名');
|
||||
require('phone', '请填写联系电话');
|
||||
|
||||
var username = getVal('username');
|
||||
if (!username) {
|
||||
setFieldError('username', '请填写用户名'); if (!firstErr) firstErr = 'username'; ok = false;
|
||||
} else if (username.length < 3 || username.length > 30) {
|
||||
setFieldError('username', '用户名长度须在 3–30 位之间'); if (!firstErr) firstErr = 'username'; ok = false;
|
||||
} else if (!/^[a-zA-Z0-9_]+$/.test(username)) {
|
||||
setFieldError('username', '用户名只能包含字母、数字和下划线'); if (!firstErr) firstErr = 'username'; ok = false;
|
||||
}
|
||||
|
||||
var password = $('password').value;
|
||||
if (!password) {
|
||||
setFieldError('password', '请填写密码'); if (!firstErr) firstErr = 'password'; ok = false;
|
||||
} else if (password.length < 6) {
|
||||
setFieldError('password', '密码至少 6 位'); if (!firstErr) firstErr = 'password'; ok = false;
|
||||
}
|
||||
|
||||
var confirm = $('password_confirm').value;
|
||||
if (!confirm) {
|
||||
setFieldError('password_confirm', '请再次输入密码'); if (!firstErr) firstErr = 'password_confirm'; ok = false;
|
||||
} else if (password && password !== confirm) {
|
||||
setFieldError('password_confirm', '两次输入的密码不一致'); if (!firstErr) firstErr = 'password_confirm'; ok = false;
|
||||
}
|
||||
|
||||
if (firstErr) { $(firstErr).focus(); $(firstErr).scrollIntoView({ behavior: 'smooth', block: 'center' }); }
|
||||
return ok;
|
||||
}
|
||||
|
||||
function showTopError(msg) {
|
||||
var el = $('reg-error');
|
||||
el.textContent = msg;
|
||||
el.classList.add('visible');
|
||||
el.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
||||
}
|
||||
|
||||
function clearError() {
|
||||
var el = $('reg-error');
|
||||
el.textContent = '';
|
||||
el.classList.remove('visible');
|
||||
}
|
||||
|
||||
function getVal(id) { return $(id).value.trim(); }
|
||||
|
||||
function validate() {
|
||||
var shopName = getVal('shop_name');
|
||||
var address = getVal('address');
|
||||
var manager = getVal('manager_name');
|
||||
var phone = getVal('phone');
|
||||
var username = getVal('username');
|
||||
var password = getVal('password');
|
||||
var confirm = getVal('password_confirm');
|
||||
|
||||
if (!shopName) { showError('请填写店铺名称'); $('shop_name').focus(); return false; }
|
||||
if (!address) { showError('请填写门店地址'); $('address').focus(); return false; }
|
||||
if (!manager) { showError('请填写负责人姓名'); $('manager_name').focus(); return false; }
|
||||
if (!phone) { showError('请填写联系电话'); $('phone').focus(); return false; }
|
||||
if (!username) { showError('请填写用户名'); $('username').focus(); return false; }
|
||||
if (username.length < 3 || username.length > 30) { showError('用户名长度须在 3–30 位之间'); $('username').focus(); return false; }
|
||||
if (!/^[a-zA-Z0-9_]+$/.test(username)) { showError('用户名只能包含字母、数字和下划线'); $('username').focus(); return false; }
|
||||
if (!password) { showError('请填写密码'); $('password').focus(); return false; }
|
||||
if (password.length < 6) { showError('密码至少 6 位'); $('password').focus(); return false; }
|
||||
if (password !== confirm) { showError('两次输入的密码不一致'); $('password_confirm').focus(); return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
$('reg-btn').addEventListener('click', function() {
|
||||
clearError();
|
||||
$('reg-error').classList.remove('visible');
|
||||
if (!validate()) return;
|
||||
|
||||
var btn = $('reg-btn');
|
||||
@@ -234,7 +281,7 @@ pageStyle: |
|
||||
if (msg.indexOf('Duplicate') !== -1 || msg.indexOf('duplicate') !== -1) {
|
||||
msg = '该用户名在此门店已存在,请换一个用户名';
|
||||
}
|
||||
showError(msg);
|
||||
showTopError(msg);
|
||||
btn.disabled = false;
|
||||
btn.classList.remove('btn-loading');
|
||||
btn.innerHTML = '<i data-lucide="store" class="icon"></i>立即注册';
|
||||
@@ -252,7 +299,7 @@ pageStyle: |
|
||||
panel.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
})
|
||||
.catch(function() {
|
||||
showError('网络异常,请检查网络连接后重试');
|
||||
showTopError('网络异常,请检查网络连接后重试');
|
||||
btn.disabled = false;
|
||||
btn.classList.remove('btn-loading');
|
||||
btn.innerHTML = '<i data-lucide="store" class="icon"></i>立即注册';
|
||||
|
||||
Reference in New Issue
Block a user