摘要:
/** * object转化成url拼接样式 * @param obj 需要转化的参数 */ const objToUrl = obj => { let arr = []; for(let i in obj){ if (obj.hasOwnProperty(i)) { arr.push(encode 阅读全文
摘要:
export const getParamsToString = (obj) => { let str = ''; for (const key in obj) { str += `${key}=${obj[key]}&`; } return str.substr(0, str.length - 1 阅读全文
摘要:
// get请求 export const get = ({ url, params = {}, headers = {}, title = '加载中' }) => new Promise((resolve, reject) => { loading.open(title); axios.get(u 阅读全文
摘要:
// 校验身份证 export const checkNumber = (number) => { const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; return reg.test(number); }; // 根据身份证,获取 出生年月 阅读全文
摘要:
export const formatTime = (time) => { if (!time) { return ''; } const y = time.substr(0, 4); const m = time.substr(4, 2); const d = time.substr(6, 2); 阅读全文
摘要:
引用: <script type="text/javascript" src="/public/js/cryptoJs/core-min.js"></script> <script type="text/javascript" src="/public/js/cryptoJs/enc-base64- 阅读全文