anxiao_web/pages/starrating/js/orgApi/getStationInfo.js

42 lines
877 B
JavaScript
Raw Normal View History

2024-07-24 09:22:32 +08:00
import { brigade,stationurl } from "../../../../public/js/url.js";
function getstationcount(){
var data={
"brigade":brigade
}
var url=stationurl+"/firectrl/client/getstationcount";
return axios({
method: 'post',
url:url,
data:data
})
}
function getstationlist(data){
var url=stationurl+"/firectrl/client/getstationlist";
return axios({
method: 'post',
url:url,
data:data
})
}
function stationInfoPageReq(result){
var count=500;
var page=Math.ceil(result/count);
var stationlist=[];
for(let i=0;i<page;i++){
var obj={
"brigade":brigade,
"pagesize":count,
"pageindex":i,
}
stationlist.push(getstationlist(obj));
}
return Promise.all(stationlist);
}
export {
getstationcount,
stationInfoPageReq
}