feat(v3.4.14): mini-user store UX, brand config, client settings
Store list/detail package flow, configurable WeChat mini brand assets and customer service, shop H5 home refresh. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,29 +32,29 @@ export interface AppConfig {
|
||||
userH5Url: string;
|
||||
}
|
||||
|
||||
/** 推广码 / C 端 H5 默认落地页(未配置 USER_H5_URL 时使用) */
|
||||
/** 推广码 / C 端 H5 默认落地页(系统设置 USER_H5_URL 未配时回退;HQ 可改) */
|
||||
export const DEFAULT_USER_H5_URL = 'https://user.runxian.top/user';
|
||||
|
||||
/** 品牌 Logo OSS 根路径(改环境时只改此处) */
|
||||
/** 品牌 Logo OSS 根路径(默认;系统设置 BRAND_LOGO_OSS_BASE 可覆盖) */
|
||||
export const BRAND_LOGO_OSS_BASE = 'https://dukang-dev.oss-cn-beijing.aliyuncs.com/logo/';
|
||||
|
||||
/** 方形 Logo(首页等品牌展示;商品列表顶栏仍用文字标题) */
|
||||
/** 方形 Logo(默认;系统设置 BRAND_LOGO_URL 可覆盖) */
|
||||
export const BRAND_LOGO_URL = `${BRAND_LOGO_OSS_BASE}logo.png`;
|
||||
|
||||
/** 长方形 Logo(含文字,登录等场景) */
|
||||
/** 长方形 Logo(默认;系统设置 BRAND_LOGO_WIDE_URL 可覆盖) */
|
||||
export const BRAND_LOGO_WIDE_URL = `${BRAND_LOGO_OSS_BASE}logo1.png`;
|
||||
|
||||
/** 仅图标 Logo(默认头像:未微信授权时) */
|
||||
/** 仅图标 Logo(默认;系统设置 BRAND_LOGO_MARK_URL 可覆盖) */
|
||||
export const BRAND_LOGO_MARK_URL = `${BRAND_LOGO_OSS_BASE}logo2.png`;
|
||||
|
||||
/** 小程序静态资源(资质公示等) */
|
||||
/** 小程序静态资源根路径(默认;系统设置 MINI_USER_STATIC_OSS_BASE 可覆盖) */
|
||||
export const MINI_USER_STATIC_OSS_BASE =
|
||||
'https://dukang-dev.oss-cn-beijing.aliyuncs.com/static/mini-user/';
|
||||
|
||||
/** 「我的」页资质公示长图 */
|
||||
/** 「我的」页资质公示长图(默认;系统设置 QUALIFICATION_DISCLOSURE_URL 可覆盖) */
|
||||
export const QUALIFICATION_DISCLOSURE_URL = `${MINI_USER_STATIC_OSS_BASE}qualification-disclosure.png`;
|
||||
|
||||
/** 总部客服电话(C 端联系客服) */
|
||||
/** 总部客服电话(默认;系统设置 CUSTOMER_SERVICE_PHONE 可覆盖) */
|
||||
export const CUSTOMER_SERVICE_PHONE = '13203801799';
|
||||
|
||||
/**
|
||||
@@ -64,6 +64,46 @@ export const CUSTOMER_SERVICE_PHONE = '13203801799';
|
||||
export const CUSTOMER_SERVICE_WECOM_URL =
|
||||
'https://work.weixin.qq.com/kfid/kfc8b88659a1dffa8cd';
|
||||
|
||||
/** 从 env / 系统设置解析的 C 端品牌与客服展示配置(缺省回退常量) */
|
||||
export type ClientBrandRuntime = {
|
||||
userH5Url: string;
|
||||
brandLogoOssBase: string;
|
||||
brandLogoUrl: string;
|
||||
brandLogoWideUrl: string;
|
||||
brandLogoMarkUrl: string;
|
||||
miniUserStaticOssBase: string;
|
||||
qualificationDisclosureUrl: string;
|
||||
customerServicePhone: string;
|
||||
};
|
||||
|
||||
export function resolveClientBrandRuntime(
|
||||
env?: Record<string, string | undefined>,
|
||||
): ClientBrandRuntime {
|
||||
const e = readEnv(env);
|
||||
const brandBase = (e.BRAND_LOGO_OSS_BASE || BRAND_LOGO_OSS_BASE).trim().replace(/\/*$/, '/');
|
||||
const staticBase = (e.MINI_USER_STATIC_OSS_BASE || MINI_USER_STATIC_OSS_BASE)
|
||||
.trim()
|
||||
.replace(/\/*$/, '/');
|
||||
return {
|
||||
userH5Url: (e.USER_H5_URL || DEFAULT_USER_H5_URL).replace(/\/$/, ''),
|
||||
brandLogoOssBase: brandBase,
|
||||
brandLogoUrl: (e.BRAND_LOGO_URL || '').trim() || `${brandBase}logo.png`,
|
||||
brandLogoWideUrl: (e.BRAND_LOGO_WIDE_URL || '').trim() || `${brandBase}logo1.png`,
|
||||
brandLogoMarkUrl: (e.BRAND_LOGO_MARK_URL || '').trim() || `${brandBase}logo2.png`,
|
||||
miniUserStaticOssBase: staticBase,
|
||||
qualificationDisclosureUrl:
|
||||
(e.QUALIFICATION_DISCLOSURE_URL || '').trim() ||
|
||||
`${staticBase}qualification-disclosure.png`,
|
||||
customerServicePhone: (e.CUSTOMER_SERVICE_PHONE || CUSTOMER_SERVICE_PHONE).trim(),
|
||||
};
|
||||
}
|
||||
|
||||
/** Mock 短信固定验证码(系统设置 MOCK_SMS_FIXED_CODE 可覆盖) */
|
||||
export function resolveMockSmsFixedCode(env?: Record<string, string | undefined>): string {
|
||||
const code = (readEnv(env).MOCK_SMS_FIXED_CODE || '').trim();
|
||||
return code || MOCK_SMS_FIXED_CODE;
|
||||
}
|
||||
|
||||
function readEnv(env?: Record<string, string | undefined>) {
|
||||
return (
|
||||
env ??
|
||||
@@ -142,5 +182,5 @@ export function loadAppConfig(env?: Record<string, string | undefined>): AppConf
|
||||
};
|
||||
}
|
||||
|
||||
/** Mock 短信环境固定验证码 */
|
||||
/** Mock 短信环境固定验证码(默认;系统设置 MOCK_SMS_FIXED_CODE 可覆盖) */
|
||||
export const MOCK_SMS_FIXED_CODE = '999888';
|
||||
|
||||
@@ -50,6 +50,18 @@ export type ClientRuntimeConfig = {
|
||||
};
|
||||
/** 小程序最低兼容版本(semver,如 3.4.13);客户端低于此值时提示更新 */
|
||||
minClientVersion?: string | null;
|
||||
/** C 端 H5 落地页(推广码等) */
|
||||
userH5Url?: string;
|
||||
/** 方形品牌 Logo */
|
||||
brandLogoUrl?: string;
|
||||
/** 长方形品牌 Logo(登录) */
|
||||
brandLogoWideUrl?: string;
|
||||
/** 图标 Logo(默认头像) */
|
||||
brandLogoMarkUrl?: string;
|
||||
/** 「我的」资质公示长图 */
|
||||
qualificationDisclosureUrl?: string;
|
||||
/** 总部客服电话 */
|
||||
customerServicePhone?: string;
|
||||
};
|
||||
|
||||
/** 是否展示微信授权入口 */
|
||||
|
||||
Reference in New Issue
Block a user