][2]
如图 如何才能做到websocket的请求像图1一样发送而不是像图2一样分多次请求发送?
目前我是写在一个方法里面,通过点击事件修改其中的window['index']参数。
'args':{
symbol:uniq(window['symbolArr'])[window['index']],
numberOfRows:300,
periodType: 1,
dateStart:null,
dateEnd:null
}
$('.cate').on('tap',function () {
console.log($(this).index());
window['index'] = $(this).index();
getHistoryInformation();
});
这样就要多次调用这个方法
可是如果我在方法里面该window['index']的值却改不掉
求大神指点