diff --git a/proj/map/asset/js/.main.js.swp b/proj/map/asset/js/.main.js.swp index 9b49cfb..e8fe97f 100644 Binary files a/proj/map/asset/js/.main.js.swp and b/proj/map/asset/js/.main.js.swp differ diff --git a/proj/map/asset/js/main.js b/proj/map/asset/js/main.js index a1af285..cb018b3 100644 --- a/proj/map/asset/js/main.js +++ b/proj/map/asset/js/main.js @@ -44,24 +44,11 @@ Vue.component('Accordeon', { const jsonurl = "https://ed.brz9.dev/proj/map/asset/json/db.json" -async function getJson(url) { - let obj = await fetch(url) - let txt = await obj.text() - let json = JSON.parse(txt) - return json -} - -let db2 = getJson(jsonurl) - +var jdb fetch(jsonurl) - .then(result => result.json()) - .then((output) => { - let jdb = output; - -}).catch(err => console.error(err)); - - + .then(res => res.json()) + .then(data => jdb = data) let vm = new Vue({ el: '#root',