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:
@@ -38,6 +38,7 @@ export default function ProductCarousel({
|
||||
<Swiper
|
||||
className={prefix}
|
||||
circular={slides.length > 1}
|
||||
{...(variant === 'detail' && slides.length > 1 ? { autoplay: true, interval: 3500 } : {})}
|
||||
onChange={(e) => setActiveIndex(e.detail.current)}
|
||||
>
|
||||
{slides.map((src, index) => (
|
||||
@@ -66,6 +67,9 @@ export default function ProductCarousel({
|
||||
))}
|
||||
</View>
|
||||
) : null}
|
||||
{variant === 'detail' && slides.length > 1 ? (
|
||||
<View className={`${prefix}-counter`}>{activeIndex + 1}/{slides.length}</View>
|
||||
) : null}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ function normalizeContactPhone(raw: string): string {
|
||||
}
|
||||
|
||||
/**
|
||||
* 脱敏展示:手机 138****8000;座机保留区号,如 0379-****888。
|
||||
* 脱敏展示:手机 138****8000;座机隐藏本地号中间四位,如 0379-12****78。
|
||||
* 门店详情电话展示用(拨号仍走 toDialablePhone 明文)。
|
||||
*/
|
||||
export function maskPhone(phone: string) {
|
||||
@@ -45,9 +45,16 @@ export function maskPhone(phone: string) {
|
||||
const areaLen = digits.startsWith('01') || digits.startsWith('02') ? 3 : 4;
|
||||
const area = digits.slice(0, areaLen);
|
||||
const local = digits.slice(areaLen);
|
||||
const keepTail = Math.min(4, Math.max(2, local.length - 4));
|
||||
const maskedLocal =
|
||||
local.length <= 4 ? '*'.repeat(local.length) : `${'*'.repeat(local.length - keepTail)}${local.slice(-keepTail)}`;
|
||||
// 隐藏本地号中间四位(保留区号,本号前后各留若干位):0379-12345678 → 0379-12****78
|
||||
let maskedLocal: string;
|
||||
if (local.length <= 4) {
|
||||
maskedLocal = '*'.repeat(local.length);
|
||||
} else {
|
||||
const keep = local.length - 4;
|
||||
const head = Math.max(1, Math.floor(keep / 2));
|
||||
const tail = keep - head;
|
||||
maskedLocal = `${local.slice(0, head)}${'*'.repeat(4)}${local.slice(local.length - tail)}`;
|
||||
}
|
||||
const joiner = main.includes('-') ? '-' : '';
|
||||
return ext ? `${area}${joiner}${maskedLocal}-${ext}` : `${area}${joiner}${maskedLocal}`;
|
||||
}
|
||||
|
||||
@@ -57,6 +57,20 @@
|
||||
background: var(--color-heritage-red);
|
||||
}
|
||||
|
||||
.detail-carousel-counter {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
z-index: 2;
|
||||
padding: 2px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 999px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.product-detail-info {
|
||||
padding: var(--space-md) var(--space-page) var(--space-lg);
|
||||
}
|
||||
|
||||
@@ -74,6 +74,21 @@
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* 套餐详情图右下角 1/N 计数(detail 变体复用 .detail-carousel-counter) */
|
||||
.detail-carousel-counter {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
z-index: 2;
|
||||
padding: 2px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
color: #fff;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
border-radius: 999px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.store-detail-info-card {
|
||||
margin: 0 var(--space-page) 16px;
|
||||
position: relative;
|
||||
|
||||
Reference in New Issue
Block a user