
es6
fed_jiao
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
es6相关知识点
Let 和const命令变量的解构赋值字符串的扩展字符串的新增方法正则的扩展数值的扩展函数的扩展数组的扩展对象的扩展对象的新增方法symbolset和Map数据结构ProxyReflectPromise对象Iterator和for…of循环Generator函数的语法Generator函数的异步应用async函数class的基本语法class的继承module的语法Module的加载实现编辑风格读懂规格异步遍历器ArrayBuffer最新提案Deco.原创 2021-06-03 14:52:29 · 142 阅读 · 0 评论 -
省经纬度数据constants.js
const constants = { // 省经纬度数据 GEO_COORD_MAP: { 西藏: [91.11, 29.97], 上海: [121.48, 31.22], 福建: [119.3, 26.08], 广东: [113.23, 23.16], 山西: [112.53, 37.87], 云南: [102.73, 25.04],...原创 2019-11-28 15:43:39 · 568 阅读 · 0 评论 -
项目中 md5加密方法
/** @func md5* @explain md5加密*//* eslint-disable camelcase,no-param-reassign */export function md5(string) { function md5_RotateLeft(lValue, iShiftBits) { return (lValue << iShiftBits)...原创 2018-07-03 14:52:27 · 721 阅读 · 0 评论 -
测试数据全局打印console.log() ===> log()
//测试数据全局打印window.log = function (message) { if (process.env.NODE_ENV === 'development'){ console.log(message) }}原创 2018-07-03 14:36:02 · 528 阅读 · 0 评论 -
项目中 http响应拦截器
// 超时时间axios.defaults.timeout = 5000;// http请求拦截器axios.interceptors.request.use(config => { // MintUI Loading方法 // Indicator.open(); return config;}, error => { // Indicator.close();...原创 2018-07-03 14:34:17 · 1417 阅读 · 0 评论 -
封装axios请求
// 封装axios请求export default { post(url, data) { return new Promise((resolve, reject) => { axios({ method: 'post', url: ajaxURL[url]...原创 2018-07-03 14:32:24 · 775 阅读 · 0 评论 -
获取,设置,删除sessionStorage或localStorage存储数据
//获取sessionStorage存储数据export const getCache = name => { if (!name) return return window.sessionStorage.getItem(name)}//设置sessionStorage存储数据export const setCache = (name, content) => { i...原创 2018-07-03 14:26:21 · 27445 阅读 · 0 评论 -
设置cookie里的值,获取cookie里的值,删除cookie里的值
/* * @func setCookie * @explain 设置cookie里的值 */ export function setCookie(name, value, iDay) { let oDate = new Date(); oDate.setDate(oDate.getDate() + iDay); document.cookie = name + '=' +...原创 2018-07-03 14:24:41 · 2076 阅读 · 0 评论 -
js es6判断是否微信浏览器
/** @func isWeiXin* @explain 判断是否微信浏览器*/export function isWeiXin() { let ua = window.navigator.userAgent; if (ua.match(/MicroMessenger/i) == 'MicroMessenger') { return true; } ...原创 2018-07-03 14:23:48 · 962 阅读 · 0 评论 -
发送请求时,序列化提交信息为表单提交的格式
/** @func serialization* @explain 序列化提交信息为表单提交的格式*/export function serialization(bodyObj) { let temp = ''; for (let name in bodyObj) { if (bodyObj.hasOwnProperty(name) && bodyObj[...原创 2018-07-03 14:23:02 · 439 阅读 · 0 评论