fix verification
This commit is contained in:
@@ -31,6 +31,15 @@
|
|||||||
class="animate-spin h-10"
|
class="animate-spin h-10"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else-if="redirectUrl">
|
||||||
|
<a
|
||||||
|
:href="redirectUrl"
|
||||||
|
target="_blank"
|
||||||
|
class="white-button w-full"
|
||||||
|
>
|
||||||
|
{{ t('verify_id') }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
ref="widgetContainer"
|
ref="widgetContainer"
|
||||||
/>
|
/>
|
||||||
@@ -87,6 +96,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
isCreatingCheckout: false,
|
isCreatingCheckout: false,
|
||||||
isMathLoaded: false,
|
isMathLoaded: false,
|
||||||
|
redirectUrl: '',
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
eidEasyData: {}
|
eidEasyData: {}
|
||||||
}
|
}
|
||||||
@@ -147,14 +157,26 @@ export default {
|
|||||||
}).then(async (resp) => {
|
}).then(async (resp) => {
|
||||||
this.eidEasyData = await resp.json()
|
this.eidEasyData = await resp.json()
|
||||||
|
|
||||||
const eidEasyWidget = document.createElement('eideasy-widget')
|
if (this.eidEasyData.available_methods[0] === 'itsme-qes-signature' &&
|
||||||
|
this.eidEasyData.available_methods.length === 1) {
|
||||||
|
const redirectUrl = new URL('https://id.eideasy.com/sign_contract_external')
|
||||||
|
|
||||||
for (const key in this.widgetSettings) {
|
redirectUrl.searchParams.append('client_id', this.eidEasyData.client_id)
|
||||||
eidEasyWidget[key] = this.widgetSettings[key]
|
redirectUrl.searchParams.append('doc_id', this.eidEasyData.doc_id)
|
||||||
|
redirectUrl.searchParams.append('country', this.countryCode)
|
||||||
|
redirectUrl.searchParams.append('lang', this.locale)
|
||||||
|
|
||||||
|
this.redirectUrl = redirectUrl.toString()
|
||||||
|
} else {
|
||||||
|
const eidEasyWidget = document.createElement('eideasy-widget')
|
||||||
|
|
||||||
|
for (const key in this.widgetSettings) {
|
||||||
|
eidEasyWidget[key] = this.widgetSettings[key]
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$refs.widgetContainer.innerHTML = ''
|
||||||
|
this.$refs.widgetContainer.appendChild(eidEasyWidget)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$refs.widgetContainer.innerHTML = ''
|
|
||||||
this.$refs.widgetContainer.appendChild(eidEasyWidget)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async submit () {
|
async submit () {
|
||||||
|
|||||||
Reference in New Issue
Block a user