diff --git a/customer-vue/src/api/order.js b/customer-vue/src/api/order.js index 7cccf7b..5ed1612 100644 --- a/customer-vue/src/api/order.js +++ b/customer-vue/src/api/order.js @@ -8,5 +8,21 @@ export default { } } return axios.get(process.env.VUE_APP_ORDER_API_URL + "/order/history", options); - } + }, + addItemToBasket(item) { + item.itemOptionIds =[]; + for (const itemId of item.otherOptions) { + item.itemOptionIds.push(itemId) + } + item.itemOptionIds.push(item.requireOption) + return axios.post(process.env.VUE_APP_ORDER_API_URL+'/order/item', item); + }, + saveOrder(order){ + //만약 동시요청으로 장바구니가 두개 생겨버린다면? + return axios.post(process.env.VUE_APP_ORDER_API_URL + "/order/orders", order); + }, + getOrder() { + return axios.get(process.env.VUE_APP_ORDER_API_URL + "/order/orders"); + }, + } \ No newline at end of file diff --git a/customer-vue/src/api/store.js b/customer-vue/src/api/store.js index ab10acc..90062da 100644 --- a/customer-vue/src/api/store.js +++ b/customer-vue/src/api/store.js @@ -23,8 +23,14 @@ export default { longitude: longitude, } } - return axios.get(process.env.VUE_APP_CUSTOMER_SERVICE_BASEURL+'/store-service/api/customer/store/favorite',options) + return axios.get(process.env.VUE_APP_CUSTOMER_SERVICE_BASEURL+'/store-service/api/customer/store/favorite',options) }, + getCategoryList(){ + return axios.get(process.env.VUE_APP_CUSTOMER_SERVICE_BASEURL+'/store-service/category/'); + }, + fetchItem(itemId){ + return axios.get(process.env.VUE_APP_STORE_API_URL+'/item/'+itemId) + }, requestCategoriesWithItem(storeId) { const options = { params: { diff --git a/customer-vue/src/components/AppNavigation.vue b/customer-vue/src/components/AppNavigation.vue index a6456a2..85e7734 100644 --- a/customer-vue/src/components/AppNavigation.vue +++ b/customer-vue/src/components/AppNavigation.vue @@ -4,6 +4,7 @@ dense color="white" elevation="1" + > mdi-arrow-left diff --git a/customer-vue/src/router/router.js b/customer-vue/src/router/router.js index 382d246..a3afd88 100644 --- a/customer-vue/src/router/router.js +++ b/customer-vue/src/router/router.js @@ -65,6 +65,16 @@ const routes = [ name: 'login', component: () => import('../views/LoginPage') }, + { + path: "/item/:itemId", + name: 'itemDetail', + component: () => import('../views/ItemDetail') + }, + { + path: "/order", + name: 'orderPage', + component: () => import('../views/OrderPage') + }, ] }, { diff --git a/customer-vue/src/views/HomeView.vue b/customer-vue/src/views/HomeView.vue index 2ce4121..160486a 100644 --- a/customer-vue/src/views/HomeView.vue +++ b/customer-vue/src/views/HomeView.vue @@ -1,5 +1,5 @@