added showrooms pages, made page-title color
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
|
@@ -16,7 +16,7 @@ export default {
|
||||
// mutations
|
||||
mutations : {
|
||||
setPagetitle (state, title) {
|
||||
console.log('Common, setPagetitle', title);
|
||||
// console.log('Common, setPagetitle', title);
|
||||
state.pagetitle = title
|
||||
}
|
||||
},
|
||||
|
@@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user