trying to get json from api
This commit is contained in:
@@ -6,12 +6,36 @@
|
||||
<h1>Bibliographie</h1>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { REST } from 'api/rest-axios'
|
||||
|
||||
export default {
|
||||
name: 'Bibliographie',
|
||||
data: () => ({
|
||||
|
||||
})
|
||||
}),
|
||||
beforeCreate () {
|
||||
// ?_format=json
|
||||
REST.get(`/bibliography/works`, {})
|
||||
.then(({ data }) => {
|
||||
console.log('Biblio REST: data', data)
|
||||
// if(data.length){
|
||||
// commit('setItems',data)
|
||||
// // console.log('items.length', this.items.length);
|
||||
// if(state.infiniteLoadingState)
|
||||
// state.infiniteLoadingState.loaded()
|
||||
// }else{
|
||||
// if(state.infiniteLoadingState)
|
||||
// state.infiniteLoadingState.complete()
|
||||
// }
|
||||
})
|
||||
.catch((error) => {
|
||||
console.warn('Issue with operum', error)
|
||||
Promise.reject(error)
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -19,6 +19,7 @@ export default {
|
||||
|
||||
}),
|
||||
beforeCreate () {
|
||||
// ?_format=json
|
||||
REST.get(`/indexOperum`, {})
|
||||
.then(({ data }) => {
|
||||
console.log('operum REST: data', data)
|
||||
|
||||
Reference in New Issue
Block a user