blabla article display and nav

This commit is contained in:
2019-07-25 21:23:23 +02:00
parent f2d8c15c25
commit f5e18e9c20
12 changed files with 454 additions and 112 deletions

View File

@@ -8,6 +8,7 @@ export default {
// initial state
state : {
contenttype:null,
items: [],
page: 0,
// infinteState will come from vue-infinite-loading plugin
@@ -34,7 +35,17 @@ export default {
// actions
actions : {
getItems({ dispatch, commit, state }){
REST.get(`/blabla_rest?_format=json&page=${state.page}`, {})
// if(!state.contenttype){
// REST.get('/entity/node_type/article?_format=json', {})
// .then(({ data }) => {
// console.log('blabla REST contenttype : data', data);
// })
// .catch(( error ) => {
// console.warn('Issue with blabla contenttype', error)
// Promise.reject(error)
// })
// }
return REST.get(`/blabla_rest?_format=json&page=${state.page}`, {})
.then(({ data }) => {
console.log('blabla REST: data', data)
if(data.length){
@@ -48,7 +59,7 @@ export default {
}
})
.catch(( error ) => {
console.warn('Issue with blabla', error)
console.warn('Issue with blabla getitems', error)
Promise.reject(error)
})
},

View File

@@ -16,7 +16,7 @@ export default {
// mutations
mutations : {
setPagetitle (state, title) {
// console.log('Common, setPagetitle', title);
console.log('Common, setPagetitle', title);
state.pagetitle = title
}
},

View File

@@ -142,9 +142,9 @@ export default {
let item = {
uuid: uuid,
title: attrs.title,
description: attrs.field_short_description,
field_short_description: attrs.field_short_description,
body: attrs.body,
reference: attrs.field_reference,
field_reference: attrs.field_reference,
}
// get images included values