05 2020 档案

摘要:1 //节流 2 const throttle=(function(){ 3 var firstTime=0; 4 var timer=null; 5 return function(callback,time=300){ 6 var lastTime=new Date().getTime() 7 阅读全文
posted @ 2020-05-26 22:17 king-xin 阅读(156) 评论(0) 推荐(0)
摘要:1 const eventList = {} 2 //发布 3 const $on = function(eventName,callback){ 4 if(!eventList[eventName]){ 5 eventList[eventName] = []; 6 } 7 8 eventList[ 阅读全文
posted @ 2020-05-26 00:42 king-xin 阅读(156) 评论(0) 推荐(0)
摘要:设置拦截 axios.interceptors.request.use((config) => { if (config.method 'post') { if (!config.isFormData) { config.data = qs.stringify(config.data,{ indic 阅读全文
posted @ 2020-05-14 21:47 king-xin 阅读(1354) 评论(0) 推荐(0)
摘要:import {fetch as fetchPro} from "whatwg-fetch" import qs from "qs" const get=(url,data)=>{ var str=""; for(var key in data){ str+="&"+key+"="+data[key 阅读全文
posted @ 2020-05-12 18:17 king-xin 阅读(160) 评论(0) 推荐(0)
摘要:一、配置 this.state={ tabs:[ { path:"/home", icon:"\ue628", name:"首页", }, { path:"/find", icon:"\ue663", name:"发现", }, { path:"/order", name:"订单", icon:"\ 阅读全文
posted @ 2020-05-11 22:34 king-xin 阅读(470) 评论(0) 推荐(0)
摘要:@charset "utf-8"; /* CSS Document */ html, body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, fieldset, legend, img { margin:0; padding:0; 阅读全文
posted @ 2020-05-11 22:19 king-xin 阅读(248) 评论(0) 推荐(0)