export function cachePage(e) { let page = {} if (JSON.parse(localStorage.getItem(e))) { page = JSON.parse(localStorage.getItem(e)) page.sum += 1 localStorage.setItem(e, JSON.stringify(page)) } else { page.name = e page.sum = 1 localStorage.setItem(e, JSON.stringify(page)) } } // 乘法计算 export function accMul(arg1, arg2) { let m = 0 let s1 = arg1.toString() let s2 = arg2.toString() try { m += s1.split('.')[1] ? s1.split('.')[1].length : '' } catch (e) {} try { m += s2.split('.')[1] ? s2.split('.')[1].length : '' } catch (e) {} return (Number(s1.replace('.', '')) * Number(s2.replace('.', ''))) / Math.pow(10, m) }