/** 代理门户:催付款 / 邀请话术文案 */ import { brandCopy } from '@/utils/brandCopy' export function buildPendingPaymentReminderText(opts: { customerName?: string pendingCount?: number agentName?: string }): string { const name = (opts.customerName || '客户').trim() const count = Math.max(0, Number(opts.pendingCount) || 0) const agent = (opts.agentName || '您的渠道顾问').trim() const countPart = count > 0 ? `目前有 ${count} 票运单待付款` : '您有运单待付款' return ( `【物流提醒】您好${name !== '客户' ? `,${name}` : ''},` + `${countPart},请尽快登录系统完成支付,以免影响出货。` + `如有疑问可联系${agent}。` ) } export type AgentInviteTemplateKey = 'wechat' | 'moments' | 'formal' export const AGENT_INVITE_TEMPLATES: Array<{ key: AgentInviteTemplateKey label: string build: (agentCode: string, inviteUrl: string) => string }> = [ { key: 'wechat', label: '微信私聊', build: (code, url) => `嗨,推荐你用这个渠道寄国际件,注册就送专属通道:${url}\n我的代理编号:${code}`, }, { key: 'moments', label: '朋友圈', build: (code, url) => `国际物流靠谱渠道分享|扫码/点开即可注册下单\n${url}\n编号 ${code}(备注来找我可跟进)`, }, { key: 'formal', label: '商务简介', build: (code, url) => `【${brandCopy.navName} Express 渠道邀请】请通过专属链接完成注册绑定:${url}\n代理编号:${code}\n注册后即可查价下单,运单派送完成后按约定结算返佣。`, }, ]