diff --git a/src/api/giftCard.ts b/src/api/giftCard.ts
new file mode 100644
index 0000000..00e060a
--- /dev/null
+++ b/src/api/giftCard.ts
@@ -0,0 +1,6 @@
+import useAxios from "@/utils/useAxios";
+
+
+//customer
+export const registerCodeGiftCard = async (code: string) => await useAxios.post(`/customer/giftcard/use`, {code:code})
+export const registerCodeDiscount = async (code: string) => await useAxios.post(`customer/validateDiscount`, {code:code})
diff --git a/src/router/index.ts b/src/router/index.ts
index 2570c13..3bbb0f2 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -45,6 +45,11 @@ const router = createRouter({
name: 'transactions',
component: () => import('@/views/base/transactions/index.vue')
},
+ {
+ path: 'giftCard',
+ name: 'giftCard',
+ component: () => import('@/views/base/giftCard/index.vue')
+ },
{
path: 'wallet',
name: 'wallet',
diff --git a/src/utils/useAxios.ts b/src/utils/useAxios.ts
index 88254ec..46ae03a 100644
--- a/src/utils/useAxios.ts
+++ b/src/utils/useAxios.ts
@@ -50,9 +50,9 @@ _axios.interceptors.response.use(
return response.data
},
async function (error) {
- // console.log('this is axios error', error)
if (error.response.data && error.response.data.message) {
- checkStatus(error.response.data.message, error.response.status, error.config)
+
+ checkStatus(error.response.data.message, error.response.status, error.config)
}
//console.log('this is error on interceptors.response', error.config.meta)
diff --git a/src/views/base/cart/index.vue b/src/views/base/cart/index.vue
index d52c89a..124be5e 100644
--- a/src/views/base/cart/index.vue
+++ b/src/views/base/cart/index.vue
@@ -14,95 +14,118 @@
-