You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

propertyLists.js 484B

12345678910111213141516171819202122
  1. import axios from 'axios';
  2. export default {
  3. namespaced: true,
  4. state: {
  5. properties: [],
  6. },
  7. mutations: {
  8. setProperties(state, properties) {
  9. state.properties = properties;
  10. },
  11. },
  12. getters: {},
  13. actions: {
  14. getProperties({ commit }, item) {
  15. axios
  16. .get(`http://192.168.6.188:5000/Property/property/${item.propertyType}/${item.user}`)
  17. .then(result => commit('setProperties', result.data))
  18. .catch(console.error);
  19. },
  20. },
  21. };