1234567891011121314151617181920212223242526272829303132333435363738 |
- // 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-es3'
- export default {
- namespaced: true,
- // initial state
- state: {
- pricing: {}
- },
- // getters
- getters: {},
- // mutations
- mutations: {
- setPricing (state, page) {
- state.pricing = page
- }
- },
- // actions
- actions: {
- getPricing ({ dispatch, commit, state }) {
- REST.get('/pricing_rest?_format=json', {})
- .then(({ data }) => {
- console.log('pricing REST: data', data)
- commit('setPricing', data)
- })
- .catch((error) => {
- console.warn('Issue with pricing', error)
- Promise.reject(error)
- })
- }
- }
- }
|