18 lines
477 B
TypeScript
18 lines
477 B
TypeScript
/** 合伙人端客服热线(可后续改为环境变量) */
|
|
export const PARTNER_SUPPORT_PHONE = '400-000-0000';
|
|
|
|
export function dialPhone(phone: string) {
|
|
const normalized = phone.replace(/\s+/g, '');
|
|
if (!normalized) return false;
|
|
window.location.href = `tel:${normalized}`;
|
|
return true;
|
|
}
|
|
|
|
export function contactSupport() {
|
|
return dialPhone(PARTNER_SUPPORT_PHONE);
|
|
}
|
|
|
|
export function contactPartnerPhone(phone?: string) {
|
|
return dialPhone(phone ?? '');
|
|
}
|