blabla article display and nav
This commit is contained in:
@@ -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)
|
||||
})
|
||||
},
|
||||
|
@@ -16,7 +16,7 @@ export default {
|
||||
// mutations
|
||||
mutations : {
|
||||
setPagetitle (state, title) {
|
||||
// console.log('Common, setPagetitle', title);
|
||||
console.log('Common, setPagetitle', title);
|
||||
state.pagetitle = title
|
||||
}
|
||||
},
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user