var $ = { parms:function(obj){ var str = ''; for(var k in obj){ str +=k+'='+obj[k]+'&'; } str = str.slice(,-); return str; }, ajax:function(options){ var type = options.type; var url = options.url||''; var data = options.data||''; data = this.parms(d…
export let createStore = (reducer)=>{ //定义默认的state let state; //定义默认的action let actionTypes = "@@redux/INIT"+Math.random(); let initAction = {type:actionTypes} //将所以需要监听的函数放在这个里面 let listeners = [] //定义getState函数 let getState = ()=>state;…
export let createStore = (reducer)=>{ //定义默认的state let state = {}; //定义默认的action let actionTypes = "@@redux/INIT"+Math.random(); let initAction = {type:actionTypes} //将所以需要监听的函数放在这个里面 let listeners = [] //定义getState函数 let getState = ()=>st…