update db
This commit is contained in:
parent
5e650021d4
commit
3a44654e01
Binary file not shown.
Binary file not shown.
|
@ -80,9 +80,10 @@ let vm = new Vue({
|
||||||
el: '#root',
|
el: '#root',
|
||||||
data: {
|
data: {
|
||||||
currentLang: 'fr',
|
currentLang: 'fr',
|
||||||
db : {},
|
fdata: {},
|
||||||
dburl : "https://ed.brz9.dev/proj/map/asset/json/db.json",
|
dburl : "https://ed.brz9.dev/proj/map/asset/json/db.json",
|
||||||
db : {
|
db : {},
|
||||||
|
db2 : {
|
||||||
restaurants : {
|
restaurants : {
|
||||||
id : "resto",
|
id : "resto",
|
||||||
type : "list",
|
type : "list",
|
||||||
|
@ -197,12 +198,21 @@ let vm = new Vue({
|
||||||
created: function(){
|
created: function(){
|
||||||
console.log("about to call getJDB")
|
console.log("about to call getJDB")
|
||||||
// this.getJDB();
|
// this.getJDB();
|
||||||
|
fetch("http://localhost:3000/db")
|
||||||
|
.then(res => res.json())
|
||||||
|
.then(data => this.db = data)
|
||||||
|
.catch(err => console.log(err.message))
|
||||||
console.log("after getJDB call")
|
console.log("after getJDB call")
|
||||||
|
this.setlang('fr');
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
console.log("mounting");
|
console.log("mounting");
|
||||||
this.setlang('fr');
|
this.setlang('fr');
|
||||||
console.log("mounted");
|
console.log("mounted");
|
||||||
|
this.setlang('fr');
|
||||||
|
},
|
||||||
|
updated: function() {
|
||||||
|
this.setlang('fr');
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
console.log("hello from map.js")
|
||||||
|
|
||||||
var maxZoomLevel = 6
|
var maxZoomLevel = 6
|
||||||
var tileSize = 256
|
var tileSize = 256
|
||||||
|
|
||||||
|
|
|
@ -2,29 +2,75 @@
|
||||||
"db" : {
|
"db" : {
|
||||||
"restaurants" : {
|
"restaurants" : {
|
||||||
"id" : "resto",
|
"id" : "resto",
|
||||||
"nameFR" : "Restaurants",
|
"type" : "list",
|
||||||
"nameEN" : "Restaurants",
|
"nameFR" : "Restaurant",
|
||||||
|
"nameEN" : "Restaurant",
|
||||||
"nameIT" : "Ristoranti",
|
"nameIT" : "Ristoranti",
|
||||||
"sub" : {
|
"sub" : {
|
||||||
"italiens" : {
|
"italiens" : {
|
||||||
"id": "restoital",
|
"id": "restoital",
|
||||||
|
"type" : "list",
|
||||||
"nameFR" : "Italien",
|
"nameFR" : "Italien",
|
||||||
"nameEN" : "Italian",
|
"nameEN" : "Italian",
|
||||||
"nameIT" : "Italiano",
|
"nameIT" : "Italiano",
|
||||||
|
"sub" : {
|
||||||
"SanTelmo" : {
|
"SanTelmo" : {
|
||||||
"name": "San Telmo"
|
"id": "santelmo",
|
||||||
|
"type" : "item",
|
||||||
|
"name": "Sant Elmo",
|
||||||
|
"img": "https://ed.brz9.dev/proj/map/asset/img/santelmo.jpg",
|
||||||
|
"txtFR": "Français Adipisicing live-edge fam velit. Messenger bag poke laboris aesthetic viral do semiotics authentic est selfies.",
|
||||||
|
"txtEN": "English Adipisicing live-edge fam velit. Messenger bag poke laboris aesthetic viral do semiotics authentic est selfies.",
|
||||||
|
"txtIT": "Italiano Adipisicing live-edge fam velit. Messenger bag poke laboris aesthetic viral do semiotics authentic est selfies.",
|
||||||
|
"card" : {
|
||||||
|
"tabs" : {
|
||||||
|
"menu" : {
|
||||||
|
"priceRange" : "18-32€",
|
||||||
|
"dishes" : {
|
||||||
|
"divola" : {
|
||||||
|
"name" : "Pizza Divola"
|
||||||
|
},
|
||||||
|
"regina" : {
|
||||||
|
"name" : "Pizza Regina"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"time" : {
|
||||||
|
"monAM" : "11h30-14h00",
|
||||||
|
"monPM" : "18h30-22h00"
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"Salsamenteria" : {
|
"Salsamenteria" : {
|
||||||
"name": "Salsamenteria di Parma"
|
"id" : "salsamenteria",
|
||||||
|
"type" : "item",
|
||||||
|
"name" : "Salsamenteria di Parma",
|
||||||
|
"img" : "https://ed.brz9.dev/proj/map/asset/img/salsamentiera.jpg",
|
||||||
|
"txtFR" : "Français Adipisicing live-edge fam velit. Messenger bag poke laboris aesthetic viral do semiotics authentic est selfies.",
|
||||||
|
"txtEN" : "English Adipisicing live-edge fam velit. Messenger bag poke laboris aesthetic viral do semiotics authentic est selfies.",
|
||||||
|
"txtIT" : "Italiano Adipisicing live-edge fam velit. Messenger bag poke laboris aesthetic viral do semiotics authentic est selfies."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vege" : {
|
"vege" : {
|
||||||
"id" : "restovege",
|
"id" : "restovege",
|
||||||
|
"type" : "list",
|
||||||
"nameFR" : "Végétarien",
|
"nameFR" : "Végétarien",
|
||||||
"nameEN" : "Vegan",
|
"nameEN" : "Vegan",
|
||||||
"nameIT" : "Vegetariano",
|
"nameIT" : "Vegetariano",
|
||||||
|
"sub" : {
|
||||||
"SanTelmo" : {
|
"SanTelmo" : {
|
||||||
|
"id": "santelmo",
|
||||||
|
"type" : "item",
|
||||||
"name": "San Telmo"
|
"name": "San Telmo"
|
||||||
|
},
|
||||||
|
"Salsamenteria" : {
|
||||||
|
"id": "salsamenteria",
|
||||||
|
"type" : "item",
|
||||||
|
"name" : "Salsamenteria di Parma"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,3 +78,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -28,22 +28,23 @@
|
||||||
<main>
|
<main>
|
||||||
<div id="list">
|
<div id="list">
|
||||||
|
|
||||||
<Accordeon v-bind:list="db.restaurants"></Accordeon>
|
<Accordeon v-bind:list="db.db.restaurants"></Accordeon>
|
||||||
|
|
||||||
<section class="void"></section>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script src="asset/leaflet/leaflet.js"></script>
|
|
||||||
<script src="asset/js/vue.min.js"></script>
|
|
||||||
|
|
||||||
<script src="asset/js/main.js"></script>
|
|
||||||
<script src="asset/js/map.js"></script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
<script src="asset/js/vue.min.js"></script>
|
||||||
|
<script src="asset/leaflet/leaflet.js"></script>
|
||||||
|
<script src="./asset/vu-leaflet/node_modules/vue2-leaflet"></script>
|
||||||
|
<script src="asset/js/main.js"></script>
|
||||||
|
|
||||||
|
<script src="asset/js/map.js"></script>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue