@@ -41,9 +41,10 @@
@@ -56,10 +54,13 @@ const { t } = useI18n()
display: flex;
flex-direction: row;
align-items: center;
- justify-content: space-between;
text-align: center;
padding: 0 16px;
}
+
+ h3 {
+ flex: auto;
+ }
}
.main {
diff --git a/pages/cart.vue b/pages/cart.vue
index c36908b..0fe4f37 100644
--- a/pages/cart.vue
+++ b/pages/cart.vue
@@ -19,7 +19,7 @@ import PayBlock from '../components/PayBlock.vue'
const route = useRoute()
const { cart } = useCart()
-const { contacts } = useCheckout()
+const { checkoutContacts, checkoutPickupPoint } = useCheckout()
onMounted(async () => {
if (!route?.query?.ID)
@@ -32,12 +32,13 @@ onMounted(async () => {
payment_method_title: 'Оплата по реквизитам',
set_paid: true,
billing: {
- first_name: contacts?.value?.name,
- last_name: contacts?.value?.surname,
- phone: contacts?.value?.phone,
- email: contacts?.value?.email,
- address_1: 'ул. Ленина, 1',
- city: 'Москва',
+ first_name: checkoutContacts?.value?.name,
+ last_name: checkoutContacts?.value?.surname,
+ phone: checkoutContacts?.value?.phone,
+ email: checkoutContacts?.value?.email,
+ address_1: checkoutPickupPoint.value?.address?.full_address,
+ postcode: checkoutPickupPoint.value?.address?.postal_code,
+ city: checkoutPickupPoint?.value?.address?.locality,
country: 'RU',
},
transaction_id: route?.query?.ID,
diff --git a/pages/checkout/contacts.vue b/pages/checkout/contacts.vue
index 359ee0f..d224fe9 100644
--- a/pages/checkout/contacts.vue
+++ b/pages/checkout/contacts.vue
@@ -140,14 +140,14 @@
diff --git a/pages/checkout/summary.vue b/pages/checkout/summary.vue
index 76b2960..d5edb58 100644
--- a/pages/checkout/summary.vue
+++ b/pages/checkout/summary.vue
@@ -25,30 +25,7 @@
/>
-
-
- {{ contacts?.name }} {{ contacts?.surname }}
-
-
-
-
- {{ contacts?.name }} {{ contacts?.surname }}
-
-
-
-
- {{ contacts?.name }} {{ contacts?.surname }}
-
-
-
-
- {{ contacts?.name }} {{ contacts?.surname }}
-
-
-
-
- {{ contacts?.name }} {{ contacts?.surname }}
-
+
@@ -66,17 +43,17 @@
- {{ contacts?.name }} {{ contacts?.surname }}
+ {{ checkoutContacts?.name }} {{ checkoutContacts?.surname }}
- {{ contacts?.email }}
+ {{ checkoutContacts?.email }}
- {{ contacts?.phone }}
+ {{ checkoutContacts?.phone }}
@@ -90,7 +67,7 @@ import SummaryCartItem from '../../components/cart/SummaryCartItem.vue'
import PayBlock from '../../components/PayBlock.vue'
const { cart } = useCart()
-const { contacts, setStep } = useCheckout()
+const { checkoutContacts, setStep } = useCheckout()
definePageMeta({
layout: 'checkout',
diff --git a/server/api/yandex_pvz.ts b/server/api/yandex_pvz.ts
index cfc5df4..bd6ca1e 100644
--- a/server/api/yandex_pvz.ts
+++ b/server/api/yandex_pvz.ts
@@ -1,13 +1,14 @@
+import type { YandexPvzResponse } from '~/server/shared/types/yandex_pvz'
import axios from 'axios'
import { defineEventHandler, readBody } from 'h3'
-export default defineEventHandler(async (event) => {
+export default defineEventHandler(async (event): Promise