This commit is contained in:
pro.boooooo
2023-03-09 14:11:11 +01:00
parent aaf5fa3aba
commit 563864e461
3 changed files with 31 additions and 18 deletions

View File

@@ -195,12 +195,13 @@ export default class Model {
}
/**
* Retourne la liste d'etablissement
* @return { json } les donnees demandees en JSON
* Retourne la liste d'etablissement.
* @param { int } howMany Combien d'etablissement il y a
* @return { json } Les donnees demandees en JSON.
* */
getModelData3() {
getModelData3(howMany) {
if(!localStorage.getItem(`sec-etab-${this.state.page.cat}-${this.state.page.scat}-${this.state.page.tcat}`)) {
const link = `${this.state.api.link}&rows=100` +
const link = `${this.state.api.link}&rows=${howMany}` +
`&facet=${this.state.api.facet.filiaire}` +
`&facet=${this.state.api.facet.formation}` +
`&facet=${this.state.api.facet.spec}` +
@@ -208,12 +209,8 @@ export default class Model {
`&refine.${this.state.api.facet.formation}=${this.state.page.scat}` +
`&refine.${this.state.api.facet.spec}=${this.state.page.tcat}`
console.log(link)
return fetch(link)
.then((res) => {
console.log(res)
return res.json()
})
.then((data) => {