feat(search): search addok link ok

This commit is contained in:
tykayn 2020-12-17 22:14:19 +01:00 committed by Baptiste Lemoine
parent be7cfff8d9
commit 4361812e62
5 changed files with 30 additions and 42 deletions

View File

@ -174,21 +174,21 @@ export default {
if (!name.length) { if (!name.length) {
this.data = [] this.data = []
} }
// this.isFetching = true this.isFetching = true
// axios this.$axios
// .get(`https://demo.addok.xyz/search/?q=${name}`) .get(`https://api-adresse.data.gouv.fr/search?&type=poi&q=${name}`)
// .then(({ data }) => { .then(({ data }) => {
// console.log('data', data) console.log('data', data)
// this.data = [] this.data = []
// data.results.forEach((item) => this.data.push(item)) data.results.forEach((item) => this.data.push(item))
// }) })
// .catch((error) => { .catch((error) => {
// this.data = [] this.data = []
// throw error throw error
// }) })
// .finally(() => { .finally(() => {
// this.isFetching = false this.isFetching = false
// }) })
// axios // axios
// .get(`https://api.openstreetmap.org/api/0.6/node/6126513555`) // .get(`https://api.openstreetmap.org/api/0.6/node/6126513555`)
// .then(({ data }) => { // .then(({ data }) => {

View File

@ -7,9 +7,7 @@
> >
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item" href="/"> <a class="navbar-item" href="/">
<img <img src="~assets/OSM-FR.svg" alt="logo osm" />
src='~assets/OSM-FR.svg'
alt='logo osm' >
Sur OSM Sur OSM
</a> </a>
@ -23,10 +21,13 @@
<section class="main-content columns"> <section class="main-content columns">
<aside class="column is-2 section"> <aside class="column is-2 section">
<!-- <p class="menu-label is-hidden-touch">General</p>--> <!-- <p class="menu-label is-hidden-touch">General</p>-->
<ul class="menu-list"> <ul class="menu-list">
<li v-for="(item, key) of items" :key="key"> <li v-for="(item, key) of items" :key="key">
<nuxt-link :to="item.to" exact-active-class="has-background-success"> <nuxt-link
:to="item.to"
exact-active-class="has-background-success"
>
<b-icon :icon="item.icon" /> {{ item.title }} <b-icon :icon="item.icon" /> {{ item.title }}
</nuxt-link> </nuxt-link>
</li> </li>

View File

@ -2,7 +2,9 @@
<section class="section"> <section class="section">
<h1>à propos</h1> <h1>à propos</h1>
<p> <p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid aperiam corporis eum natus odio recusandae sapiente sunt suscipit voluptate, voluptatem! Animi culpa debitis illo, ipsam magnam nihil nobis quo sint? Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquid aperiam
corporis eum natus odio recusandae sapiente sunt suscipit voluptate,
voluptatem! Animi culpa debitis illo, ipsam magnam nihil nobis quo sint?
</p> </p>
</section> </section>
</template> </template>

View File

@ -1,6 +1,6 @@
<template> <template>
<section class="section"> <section class="section">
<!-- <h1 class="title">{{ $t('message') }}</h1>--> <!-- <h1 class="title">{{ $t('message') }}</h1>-->
<h1 class="title is-1">OSM Mon Commerce</h1> <h1 class="title is-1">OSM Mon Commerce</h1>
<search-input></search-input> <search-input></search-input>
</section> </section>

View File

@ -3,11 +3,7 @@
"target": "ES2018", "target": "ES2018",
"module": "ESNext", "module": "ESNext",
"moduleResolution": "Node", "moduleResolution": "Node",
"lib": [ "lib": ["ESNext", "ESNext.AsyncIterable", "DOM"],
"ESNext",
"ESNext.AsyncIterable",
"DOM"
],
"esModuleInterop": true, "esModuleInterop": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"allowJs": true, "allowJs": true,
@ -17,21 +13,10 @@
"experimentalDecorators": true, "experimentalDecorators": true,
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"~/*": [ "~/*": ["./*"],
"./*" "@/*": ["./*"]
],
"@/*": [
"./*"
]
}, },
"types": [ "types": ["@types/node", "@nuxt/types"]
"@types/node",
"@nuxt/types"
]
}, },
"exclude": [ "exclude": ["node_modules", ".nuxt", "dist"]
"node_modules",
".nuxt",
"dist"
]
} }