export const COMPONENT_MAP_NAME: { [key: string]: string } = { tradeId: '订单号', buyerNick: '买家昵称', receiveMobile: '收件人手机号', alipayAccount: '支付宝账号', expressLogisticsCode: '快递物流单号', enterprisePaymentTid: '打款订单号' } export const uuid = () => { return 'xxxxxxxx'.replace(/[xy]/g, function (c) { const r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8 return v.toString(16) }) } export const getUrlParam = (name: string) => { const reg = new RegExp(`(^|&)${name}=([^&]*)(&|$)`) const r = window.location.hash.split('?')[1].match(reg) if (r != null) { return decodeURIComponent(r[2]) } return '' }