adata-ui 2.1.32 → 2.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -54,6 +54,8 @@ function onBack(type: 'method' | 'kaspi') {
|
|
|
54
54
|
const userInfo = useState('user-info', () => ({}))
|
|
55
55
|
|
|
56
56
|
function pushReplenishmentEventToDataLayer() {
|
|
57
|
+
window.dataLayer = window.dataLayer || []
|
|
58
|
+
|
|
57
59
|
window.dataLayer?.push({
|
|
58
60
|
event: 'replenishment',
|
|
59
61
|
user_id: `${userInfo.value.id}`,
|
|
@@ -89,8 +91,13 @@ async function directionsBanks(bank: 'kaspi' | 'other', sum: number) {
|
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
else if (bank === 'other') {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
try {
|
|
95
|
+
await payByCard(sum)
|
|
96
|
+
pushReplenishmentEventToDataLayer()
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
console.error(error)
|
|
100
|
+
}
|
|
94
101
|
}
|
|
95
102
|
}
|
|
96
103
|
|
|
@@ -46,8 +46,8 @@ const normalize = (path: string) => {
|
|
|
46
46
|
<component
|
|
47
47
|
v-for="(service, index) in services"
|
|
48
48
|
:key="index"
|
|
49
|
-
:is="normalize(service.short) === normalize(route.path) && pageUrl.hostname.startsWith('pk') ? 'div' : NuxtLinkLocale"
|
|
50
|
-
:to="normalize(service.short) === normalize(route.path) ? '' : service.to"
|
|
49
|
+
:is="normalize(localePath(service.short)) === normalize(route.path) && pageUrl.hostname.startsWith('pk') ? 'div' : NuxtLinkLocale"
|
|
50
|
+
:to="normalize(localePath(service.short)) === normalize(route.path) ? '' : service.to"
|
|
51
51
|
:class="['flex flex-col items-center gap-2 p-2', blockStyles[index]]"
|
|
52
52
|
>
|
|
53
53
|
<div
|
|
@@ -124,6 +124,7 @@ function moveFocus(index: number, to: string) {
|
|
|
124
124
|
:ref="el => otpRefs[index] = el"
|
|
125
125
|
v-model="otp[index]"
|
|
126
126
|
type="text"
|
|
127
|
+
inputmode="numeric"
|
|
127
128
|
maxlength="1"
|
|
128
129
|
class="size-10 rounded bg-deepblue-900/5 text-center text-lg caret-transparent focus:outline-none dark:bg-[#E3E5E80D]"
|
|
129
130
|
:class="{
|
|
@@ -32,30 +32,34 @@ export function usePayment() {
|
|
|
32
32
|
const { amount, id, user_id } = data
|
|
33
33
|
const widget = new tiptop.Widget()
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
await new Promise((resolve, reject) => {
|
|
36
|
+
widget.pay(
|
|
37
|
+
'charge',
|
|
38
|
+
{
|
|
39
|
+
publicId,
|
|
40
|
+
description: t('payment.bank.description'),
|
|
41
|
+
amount: Number.parseInt(amount),
|
|
42
|
+
currency: 'KZT',
|
|
43
|
+
invoiceId: id.toString(),
|
|
44
|
+
accountId: user_id.toString(),
|
|
45
|
+
skin: 'modern',
|
|
46
|
+
data: {
|
|
47
|
+
myProp: 'myProp value',
|
|
48
|
+
rate,
|
|
49
|
+
},
|
|
48
50
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
{
|
|
52
|
+
onSuccess() {
|
|
53
|
+
$toast.success(t('payment.bank.paySuccess'))
|
|
54
|
+
resolve()
|
|
55
|
+
},
|
|
56
|
+
onFail() {
|
|
57
|
+
$toast.error(t('payment.bank.payError'))
|
|
58
|
+
reject(new Error(t('payment.bank.payError')))
|
|
59
|
+
},
|
|
53
60
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
)
|
|
61
|
+
)
|
|
62
|
+
})
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
catch (error) {
|