feat: v3.4.18 门店体验与登录态优化

- mini-user 门店座机电话中间四位脱敏(保留区号与前后位)
- mini-user 套餐详情图增加 1/N 计数与自动轮播
- h5-partner 账号暂停(DISABLED)禁止登录并提示客服
- h5-shop 提现/筛选栏左右留白与页面一致
- h5-shop 休息中核销改为弹「是否开启营业」并支持开张后继续

Co-Authored-By: WorkBuddy <workbuddy@tencent.com>
This commit is contained in:
2026-08-17 21:34:40 +08:00
parent c0ce494732
commit cc750dc1d6
10 changed files with 351 additions and 31 deletions
+59 -7
View File
@@ -29,6 +29,8 @@ export default function RedeemConfirmPage() {
const [storeClosed, setStoreClosed] = useState(false);
const [failCount, setFailCount] = useState(0);
const [showWeakNet, setShowWeakNet] = useState(false);
const [showOpenModal, setShowOpenModal] = useState(false);
const [opening, setOpening] = useState(false);
useEffect(() => {
request<Record<string, unknown>>('SHOP_H5', '/shop/store')
@@ -71,11 +73,7 @@ export default function RedeemConfirmPage() {
});
}, [token]);
async function confirm() {
if (storeClosed) {
setMsg('门店未营业,无法核销');
return;
}
async function doConfirm() {
if (!token.trim()) {
setMsg('请先扫码获取核销码');
return;
@@ -103,6 +101,33 @@ export default function RedeemConfirmPage() {
}
}
async function confirm() {
if (storeClosed) {
setShowOpenModal(true);
return;
}
await doConfirm();
}
async function openStoreAndContinue() {
if (opening) return;
setOpening(true);
try {
await request('SHOP_H5', '/shop/store/status', {
method: 'PUT',
body: JSON.stringify({ status: 'OPEN' }),
});
setStoreClosed(false);
setShowOpenModal(false);
await doConfirm();
} catch (e) {
setShowOpenModal(false);
setMsg(e instanceof Error ? e.message : '开启营业失败');
} finally {
setOpening(false);
}
}
const previewAmount = preview?.amount ?? 0;
const userLabel = preview?.user?.nickname || preview?.user?.phone || '—';
@@ -117,7 +142,7 @@ export default function RedeemConfirmPage() {
<main className="shop-redeem-main">
{storeClosed && (
<p className="shop-redeem-error" style={{ marginBottom: 12 }}></p>
<p className="shop-redeem-error" style={{ marginBottom: 12 }}></p>
)}
<section className="shop-redeem-card">
<div className="shop-redeem-banner">
@@ -189,7 +214,7 @@ export default function RedeemConfirmPage() {
<button
type="button"
className={`shop-redeem-confirm-btn${loading ? ' success' : ''}`}
disabled={loading || storeClosed || !preview}
disabled={loading || !preview}
onClick={() => void confirm()}
>
<span className="material-symbols-outlined shop-fill-icon">
@@ -213,6 +238,33 @@ export default function RedeemConfirmPage() {
</span>
</div>
</main>
{showOpenModal && (
<div className="shop-redeem-modal" role="dialog" aria-modal="true">
<div className="shop-redeem-modal-card">
<h4 className="shop-redeem-modal-title"></h4>
<p className="shop-redeem-modal-desc"></p>
<div className="shop-redeem-modal-actions">
<button
type="button"
className="shop-redeem-modal-cancel"
disabled={opening}
onClick={() => setShowOpenModal(false)}
>
</button>
<button
type="button"
className="shop-redeem-modal-confirm"
disabled={opening}
onClick={() => void openStoreAndContinue()}
>
{opening ? '开启中…' : '确认开启'}
</button>
</div>
</div>
</div>
)}
</div>
);
}