feat(store): v4.0.18 门店多收款账户与子账号继承二维码
C 端门店列表拼接省市区县地址;门店多银行账户与默认打款账户;子账号独立 sa_ 关联码及统计维度;同步 v4.0.18 开发文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,7 +32,7 @@ type EnterOptionsLike = {
|
||||
function normalizeAssocScene(raw: unknown): string | null {
|
||||
if (raw == null || raw === '') return null;
|
||||
const s = safeDecode(String(raw)).trim();
|
||||
return /^pa_\d+$/.test(s) ? s : null;
|
||||
return /^(pa|sa)_\d+$/.test(s) ? s : null;
|
||||
}
|
||||
|
||||
function extractAssocSceneFromEnterOptions(opts?: EnterOptionsLike | null): string | null {
|
||||
|
||||
@@ -17,6 +17,22 @@ export function storeStarCount(rating?: number | string | null): number {
|
||||
return Math.min(5, Math.max(1, Math.round(n)));
|
||||
}
|
||||
|
||||
/** 省市区县 + 详细地址 拼接;空则回退占位文案 */
|
||||
export function fullStoreAddress(
|
||||
store: {
|
||||
province?: string | null;
|
||||
cityName?: string | null;
|
||||
city?: string | null;
|
||||
district?: string | null;
|
||||
address?: string | null;
|
||||
},
|
||||
fallback = '地址待完善',
|
||||
): string {
|
||||
const city = store.cityName || store.city || '';
|
||||
const text = `${store.province || ''}${city}${store.district || ''}${store.address || ''}`.trim();
|
||||
return text || fallback;
|
||||
}
|
||||
|
||||
export function storeCategoryTags(
|
||||
store: {
|
||||
tags?: unknown;
|
||||
|
||||
Reference in New Issue
Block a user