In a page, you need to access the route as follows:
http://server/user/getinfo
http://server/shop/getlist
http://server/shop/getLoveShop
http://server/ad/5
Assuming that the ajax route-by-route execution will be like this: $.get('http://server/user/getinfo','',function(res){<br>
},'json');<br>
$.get('http://server/shop/getlist','',function(res){<br>
},'json');<br>
$.get('http://server/user/getinfo','',function(res){<br>
},'json');<br>
$.get('http://server/shop/getLoveShop','',function(res){<br>
},'json');<br>
$.get('http://server/ad/5','',function(res){<br>
},'json');
There will definitely be no problem in executing this way.
I want to optimize these routing accesses and centralize them for execution in an AJAX.
The execution method is as follows:
var str = 'route[]=/user/getinfo&';
str+='route[]=/shop/getlis&';
str+='route[]=/shop/getLoveShop&';
str+='route[]=/ad/5';
$.post('/route/call' , str,function(res){
},'json');
I want to combine them to execute so many routing access commands at one time, but now I don’t know how to achieve it.