diff --git a/owner-vue/src/api/store.js b/owner-vue/src/api/store.js new file mode 100644 index 0000000..9dfa558 --- /dev/null +++ b/owner-vue/src/api/store.js @@ -0,0 +1,34 @@ +import axios from "axios"; + +export default { + getCategoryList(){ + return axios.get(process.env.VUE_APP_OWNER_SERVICE_BASEURL+'/store-service/category'); + }, + putCategoryList(data){ + return this.$axios({ + method:'put', + url:process.env.VUE_APP_OWNER_SERVICE_BASEURL+'/store-service/category', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json;charset=UTF-8' + }, + data: data, + responseType:'json' + }) + }, + getItemById(itemId){ + return axios.get(process.env.VUE_APP_OWNER_SERVICE_BASEURL+'/store-service/item/'+itemId) + }, + saveItem(method, itemData){ + return axios({ + method:method, + url: process.env.VUE_APP_OWNER_SERVICE_BASEURL+'/store-service/item', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json;charset=UTF-8' + }, + data: itemData, + responseType:'json' + }) + }, +} \ No newline at end of file diff --git a/owner-vue/src/views/Category.vue b/owner-vue/src/views/Category.vue index 95c0f43..799ff17 100644 --- a/owner-vue/src/views/Category.vue +++ b/owner-vue/src/views/Category.vue @@ -56,6 +56,7 @@