added showrooms pages, made page-title color

This commit is contained in:
2019-07-24 17:20:44 +02:00
parent 77154f04a3
commit f2d8c15c25
18 changed files with 1668 additions and 258 deletions

View File

@@ -4,6 +4,7 @@ import Common from './modules/common'
import User from './modules/user'
import Search from './modules/search'
import Blabla from './modules/blabla'
import Showrooms from './modules/showrooms'
// https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart
@@ -13,6 +14,7 @@ export default new Vuex.Store({
Common,
User,
Search,
Blabla
Blabla,
Showrooms
}
})

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

@@ -0,0 +1,38 @@
import { JSONAPI } from 'vuejs/api/json-axios'
import { REST } from 'vuejs/api/rest-axios'
import { MA } from 'vuejs/api/ma-axios'
import qs from 'querystring'
export default {
namespaced: true,
// initial state
state : {
items: [],
},
// getters
getters : {},
// mutations
mutations : {
setItems (state, items) {
state.items = state.items.concat(items)
}
},
// actions
actions : {
getItems({ dispatch, commit, state }){
REST.get(`/showrooms_rest?_format=json`, {})
.then(({ data }) => {
console.log('showrooms REST: data', data)
commit('setItems',data)
})
.catch(( error ) => {
console.warn('Issue with showrooms', error)
Promise.reject(error)
})
}
}
}