Browse Source

Retirado o hard code de fetch de dados do painel

vuejs_painel
AlGouvea 3 years ago
parent
commit
8c882e0f86
  1. 7
      frontend/src/__apps/painel/main.js

7
frontend/src/__apps/painel/main.js

@ -88,9 +88,14 @@ const v = new Vue({ // eslint-disable-line
}
return texto
},
converterUrl (url) {
url = url.slice(-4)
url = '/painel/' + url + '/dados'
return url
},
fetchData () {
// TODO: how to get no hardcoded URL?
$.get('/painel/2867/dados', function (response) {
$.get(this.converterUrl(window.location.pathname), function (response) {
this.brasao = response.brasao
this.painel_aberto = response.status_painel
this.sessao_finalizada = response.sessao_finalizada

Loading…
Cancel
Save