query
This commit is contained in:
@@ -3,14 +3,8 @@
|
|||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
loadComponent: () => {
|
loadComponent: () =>
|
||||||
// Branch: ?id=<orderId> means legacy SBP merchant flow.
|
import('./pages/fastcheck-page/fastcheck-page').then((m) => m.FastcheckPage)
|
||||||
const hasLegacyId = typeof window !== 'undefined'
|
|
||||||
&& new URLSearchParams(window.location.search).has('id');
|
|
||||||
return hasLegacyId
|
|
||||||
? import('./pages/legacy-pay-page/legacy-pay-page').then((m) => m.LegacyPayPage)
|
|
||||||
: import('./pages/fastcheck-page/fastcheck-page').then((m) => m.FastcheckPage);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'about',
|
path: 'about',
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
maxlength="20"
|
maxlength="20"
|
||||||
/>
|
/>
|
||||||
<a class="btn btn--ghost" href="https://qr.vitanova.network/" target="_blank" rel="noopener" aria-label="Создать новый fastCHECK">{{ 'fastcheck.number_new' | translate }}</a>
|
<a class="btn btn--ghost" [href]="newQrUrl()" target="_blank" rel="noopener" aria-label="Создать новый fastCHECK">{{ 'fastcheck.number_new' | translate }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
transition: opacity .15s, transform .1s, background .15s;
|
transition: opacity .15s, transform .1s, background .15s;
|
||||||
|
appearance: none;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
|
|
||||||
&--ghost {
|
&--ghost {
|
||||||
@@ -159,6 +160,7 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
transition: background .15s;
|
transition: background .15s;
|
||||||
|
appearance: none;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
|
|
||||||
&:hover { background: #e2e8f0; }
|
&:hover { background: #e2e8f0; }
|
||||||
|
|||||||
@@ -51,6 +51,15 @@ export class FastcheckPage {
|
|||||||
error = signal<string>('');
|
error = signal<string>('');
|
||||||
amountLoading = signal<boolean>(false);
|
amountLoading = signal<boolean>(false);
|
||||||
|
|
||||||
|
// Pass-through partner id from ?id= used by the "New" button link.
|
||||||
|
partnerId = signal<string>('');
|
||||||
|
newQrUrl = computed(() => {
|
||||||
|
const id = this.partnerId();
|
||||||
|
return id
|
||||||
|
? `https://qr.vitanova.network/?id=${encodeURIComponent(id)}`
|
||||||
|
: 'https://qr.vitanova.network/';
|
||||||
|
});
|
||||||
|
|
||||||
popupOpen = signal<boolean>(false);
|
popupOpen = signal<boolean>(false);
|
||||||
popupLoading = signal<boolean>(false);
|
popupLoading = signal<boolean>(false);
|
||||||
popupError = signal<string>('');
|
popupError = signal<string>('');
|
||||||
@@ -98,8 +107,13 @@ export class FastcheckPage {
|
|||||||
this.codeEnabled.set(true);
|
this.codeEnabled.set(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const params = new URLSearchParams(window.location.search);
|
||||||
|
|
||||||
|
// ?id=<partnerId> — just propagated to the "New" button URL.
|
||||||
|
this.partnerId.set(params.get('id') ?? '');
|
||||||
|
|
||||||
// ?iid=xxxxxx-xxxxxx-xxxxxx — auto-fill and trigger lookup
|
// ?iid=xxxxxx-xxxxxx-xxxxxx — auto-fill and trigger lookup
|
||||||
const iidParam = new URLSearchParams(window.location.search).get('iid') ?? '';
|
const iidParam = params.get('iid') ?? '';
|
||||||
if (iidParam && !created) {
|
if (iidParam && !created) {
|
||||||
const digits = iidParam.replace(/\D/g, '').slice(0, 18);
|
const digits = iidParam.replace(/\D/g, '').slice(0, 18);
|
||||||
const groups: string[] = [];
|
const groups: string[] = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user