优化间距

This commit is contained in:
weichengwu 2025-11-22 10:55:58 +08:00
parent 84935b146f
commit 2aba907e54
1 changed files with 119 additions and 119 deletions

View File

@ -14,124 +14,124 @@
</div> </div>
<!-- 表单区域 --> <!-- 表单区域 -->
<div class="p-4 -mt-10 z-10 relative"> <div class="p-4 -mt-10 z-10 relative">
<div <div
class="relative overflow-hidden rounded-2xl border border-[#FFD7DF] bg-gradient-to-br from-[#FFF7F9] via-white to-[#FFE4EA] shadow-[0_12px_32px_rgba(232,66,77,0.08)] p-6 sm:p-7 backdrop-blur-sm"> class="relative overflow-hidden rounded-2xl border border-[#FFD7DF] bg-gradient-to-br from-[#FFF7F9] via-white to-[#FFE4EA] shadow-[0_12px_32px_rgba(232,66,77,0.08)] p-6 sm:p-7 backdrop-blur-sm">
<div class="absolute -right-10 -top-16 h-40 w-40 rounded-full bg-[#FFE3EA] blur-3xl opacity-70"></div> <div class="absolute -right-10 -top-16 h-40 w-40 rounded-full bg-[#FFE3EA] blur-3xl opacity-70"></div>
<div class="absolute -left-14 -bottom-16 h-40 w-40 rounded-full bg-[#FFD6E2] blur-3xl opacity-60"></div> <div class="absolute -left-14 -bottom-16 h-40 w-40 rounded-full bg-[#FFD6E2] blur-3xl opacity-60"></div>
<div class="relative z-10"> <div class="relative z-10">
<!-- 标题 --> <!-- 标题 -->
<div class="flex items-center justify-center text-xl text-[#E8424D] mb-6"> <div class="flex items-center justify-center text-xl text-[#E8424D] mb-6">
<img src="/爱心点缀1.png" alt="" class="h-5"> <img src="/爱心点缀1.png" alt="" class="h-5">
<span class="px-2">领取专属喜礼</span> <span class="px-2">领取专属喜礼</span>
<img src="/爱心点缀2.png" alt="" class="h-5"> <img src="/爱心点缀2.png" alt="" class="h-5">
</div> </div>
<div> <div>
<div v-if="![2, 3].includes(activityInfo.status)"> <div v-if="![2, 3].includes(activityInfo.status)">
<!-- 手机号输入 --> <!-- 手机号输入 -->
<div class="mb-5 flex items-center gap-3 border border-gray-200 rounded-lg px-4 bg-white/85 shadow-[0_6px_14px_rgba(232,66,77,0.06)]"> <div class="mb-5 flex items-center gap-3 border border-gray-200 rounded-lg px-4 bg-white/85 shadow-[0_6px_14px_rgba(232,66,77,0.06)]">
<input :disabled="formData.verifyCode" v-model="formData.phone" type="tel" placeholder="请输入手机号码" <input :disabled="formData.verifyCode" v-model="formData.phone" type="tel" placeholder="请输入手机号码"
maxlength="11" class="outline-none focus:border-[#E8424D] transition-colors flex-1 h-14 w-full" /> maxlength="11" class="outline-none focus:border-[#E8424D] transition-colors flex-1 h-14 w-full" />
<button @click="formData.verifyCode ? clearPhone() : sendVerificationCode()" <button @click="formData.verifyCode ? clearPhone() : sendVerificationCode()"
:disabled="countdown > 0 || formData.phone.length !== 11" :disabled="countdown > 0 || formData.phone.length !== 11"
class="h-11 rounded-lg text-sm! text-[#E8424D]! transition-all disabled:text-[#8a8a8a]!"> class="h-11 rounded-lg text-sm! text-[#E8424D]! transition-all disabled:text-[#8a8a8a]!">
{{ countdown > 0 ? `${countdown}秒后重发` : formData.verifyCode ? '清除' : '获取验证码' }} {{ countdown > 0 ? `${countdown}秒后重发` : formData.verifyCode ? '清除' : '获取验证码' }}
</button> </button>
</div> </div>
<!-- 验证码输入 --> <!-- 验证码输入 -->
<div class="mb-5 flex items-center gap-3 border border-gray-200 rounded-lg px-4 bg-white/85 shadow-[0_6px_14px_rgba(232,66,77,0.06)]"> <div class="mb-5 flex items-center gap-3 border border-gray-200 rounded-lg px-4 bg-white/85 shadow-[0_6px_14px_rgba(232,66,77,0.06)]">
<input :disabled="formData.verifyCode" v-model="formData.smsCode" type="text" placeholder="请输入验证码" <input :disabled="formData.verifyCode" v-model="formData.smsCode" type="text" placeholder="请输入验证码"
maxlength="6" class="outline-none focus:border-[#E8424D] transition-colors flex-1 h-14 w-full" /> maxlength="6" class="outline-none focus:border-[#E8424D] transition-colors flex-1 h-14 w-full" />
<button v-if="!formData.verifyCode" @click="verifyCode" :disabled="formData.smsCode.length !== 6" <button v-if="!formData.verifyCode" @click="verifyCode" :disabled="formData.smsCode.length !== 6"
class="h-8 px-4 bg-[#E8424D]! text-white! rounded-lg text-sm! transition-all hover:opacity-90 active:scale-98 disabled:bg-[#8a8a8a]!"> class="h-8 px-4 bg-[#E8424D]! text-white! rounded-lg text-sm! transition-all hover:opacity-90 active:scale-98 disabled:bg-[#8a8a8a]!">
验证 验证
</button> </button>
</div> </div>
</div> </div>
<div v-if="formData.verifyCode && !formData.qrCode"> <div v-if="formData.verifyCode && !formData.qrCode">
<!-- 结婚证信息 --> <!-- 结婚证信息 -->
<div class="mb-6"> <div class="mb-6">
<div class="text-base text-gray-800 mb-3 font-medium flex items-center justify-between"> <div class="text-base text-gray-800 mb-3 font-medium flex items-center justify-between">
<span>结婚证信息:</span> <span>结婚证信息:</span>
<div v-if="formData.marriageNo" class="text-xs" @click="resetMarriageInfo">重新扫描</div> <div v-if="formData.marriageNo" class="text-xs" @click="resetMarriageInfo">重新扫描</div>
</div> </div>
<div v-if="!formData.marriageNo" <div v-if="!formData.marriageNo"
class="border border-dashed border-gray-200 rounded-lg p-5 flex items-center justify-center bg-white/80"> class="border border-dashed border-gray-200 rounded-lg p-5 flex items-center justify-center bg-white/80">
<div class="relative inline-block" @click="handleScanClick"> <div class="relative inline-block" @click="handleScanClick">
<img src="/扫描.png" alt="" class="h-20"> <img src="/扫描.png" alt="" class="h-20">
</div> </div>
</div> </div>
<div v-if="formData.marriageNo" <div v-if="formData.marriageNo"
class="w-full flex flex-col items-start border border-gray-200 rounded-lg p-5 bg-white/85 shadow-[0_6px_14px_rgba(232,66,77,0.06)]"> class="w-full flex flex-col items-start border border-gray-200 rounded-lg p-5 bg-white/85 shadow-[0_6px_14px_rgba(232,66,77,0.06)]">
<div> <div>
<span class="inline-block w-25 text-right">结婚证字号</span> <span class="inline-block w-25 text-right">结婚证字号</span>
<span class="pl-2">{{ formData.marriageNo }}</span> <span class="pl-2">{{ formData.marriageNo }}</span>
</div> </div>
<div class="mt-2"> <div class="mt-2">
<span class="inline-block w-25 text-right">男方姓名</span> <span class="inline-block w-25 text-right">男方姓名</span>
<span class="pl-2">{{ formData.husbandName }}</span> <span class="pl-2">{{ formData.husbandName }}</span>
</div> </div>
<div class="mt-2"> <div class="mt-2">
<span class="inline-block w-25 text-right">女方姓名</span> <span class="inline-block w-25 text-right">女方姓名</span>
<span class="pl-2">{{ formData.wifeName }}</span> <span class="pl-2">{{ formData.wifeName }}</span>
</div> </div>
</div> </div>
</div> </div>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<button @click="submitForm" :disabled="!formData.marriageNo" <button @click="submitForm" :disabled="!formData.marriageNo"
class="w-full h-14 bg-gradient-to-r from-[#E8424D]! to-[#FF7A7A]! text-white! rounded-full text-lg font-bold transition-all hover:opacity-90 active:scale-98 disabled:from-[#8a8a8a]! disabled:to-[#8a8a8a]!"> class="w-full h-14 bg-gradient-to-r from-[#E8424D]! to-[#FF7A7A]! text-white! rounded-full text-lg font-bold transition-all hover:opacity-90 active:scale-98 disabled:from-[#8a8a8a]! disabled:to-[#8a8a8a]!">
<div class="text-lg">提交领取喜礼</div> <div class="text-lg">提交领取喜礼</div>
</button> </button>
</div> </div>
<div v-if="formData.qrCode"> <div v-if="formData.qrCode">
<div> <div>
<h3 class="text-base text-gray-800 mb-1 font-bold">您已成功领取喜礼</h3> <h3 class="text-base text-gray-800 mb-1 font-bold">您已成功领取喜礼</h3>
<span class="text-sm text-gray-600">下面是您的专属核销二维码请在领取站点出示给工作人员扫码核销</span> <span class="text-sm text-gray-600">下面是您的专属核销二维码请在领取站点出示给工作人员扫码核销</span>
</div> </div>
<div class="mt-4 flex justify-center items-center relative"> <div class="mt-4 flex justify-center items-center relative">
<div v-if="formData.status == 1" <div v-if="formData.status == 1"
class="h-[210px] w-[210px] bg-white/90 rounded-md flex justify-center items-center absolute"> class="h-[210px] w-[210px] bg-white/90 rounded-md flex justify-center items-center absolute">
<span class="text-[#E8424D] text-lg font-bold">二维码已核销</span> <span class="text-[#E8424D] text-lg font-bold">二维码已核销</span>
</div> </div>
<qrcode-vue :value="formData.qrCode" :size="200" level="H" render-as="canvas" /> <qrcode-vue :value="formData.qrCode" :size="200" level="H" render-as="canvas" />
</div> </div>
</div> </div>
</div> </div>
<div v-if="activityInfo.status === 2"> <div v-if="activityInfo.status === 2">
<!-- 活动结束状态 --> <!-- 活动结束状态 -->
<div class="mt-6 p-4 border border-[#E8424D] bg-[#FFF5F5] rounded-lg text-center"> <div class="mt-6 p-4 border border-[#E8424D] bg-[#FFF5F5] rounded-lg text-center">
<div class="text-[#E8424D] text-lg font-semibold mb-2">活动已结束</div> <div class="text-[#E8424D] text-lg font-semibold mb-2">活动已结束</div>
<div class="text-gray-600 text-sm">{{ activityInfo.activityName }}活动已结束感谢您的参与敬请期待下一次活动</div> <div class="text-gray-600 text-sm">{{ activityInfo.activityName }}活动已结束感谢您的参与敬请期待下一次活动</div>
<div class="mt-4 text-xs text-gray-500">活动时间{{ activityInfo.activityStartTime }} - {{ <div class="mt-4 text-xs text-gray-500">活动时间{{ activityInfo.activityStartTime }} - {{
activityInfo.activityEndTime }}</div> activityInfo.activityEndTime }}</div>
</div> </div>
</div> </div>
<div v-else-if="activityInfo.status === 3"> <div v-else-if="activityInfo.status === 3">
<!-- 活动失败状态 --> <!-- 活动失败状态 -->
<div class="mt-6 p-4 border border-[#FF7A7A] bg-[#FFF5F5] rounded-lg text-center"> <div class="mt-6 p-4 border border-[#FF7A7A] bg-[#FFF5F5] rounded-lg text-center">
<div class="text-[#FF7A7A] text-lg font-semibold mb-2">活动获取失败</div> <div class="text-[#FF7A7A] text-lg font-semibold mb-2">活动获取失败</div>
<div class="text-gray-600 text-sm">活动获取失败请稍后重试</div> <div class="text-gray-600 text-sm">活动获取失败请稍后重试</div>
<div class="mt-4 text-xs text-gray-500">活动时间--</div> <div class="mt-4 text-xs text-gray-500">活动时间--</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 使用说明 --> <!-- 使用说明 -->
<div class="p-4" v-if="![2, 3].includes(activityInfo.status)"> <div class="p-4 pt-0" v-if="![2, 3].includes(activityInfo.status)">
<div <div
class="relative overflow-hidden rounded-2xl border border-[#FFD7DF] bg-gradient-to-br from-[#FFF7F9] via-white to-[#FFE4EA] shadow-[0_12px_32px_rgba(232,66,77,0.08)]"> class="relative overflow-hidden rounded-2xl border border-[#FFD7DF] bg-gradient-to-br from-[#FFF7F9] via-white to-[#FFE4EA] shadow-[0_12px_32px_rgba(232,66,77,0.08)]">
<div class="absolute -right-10 -top-16 h-40 w-40 rounded-full bg-[#FFE3EA] blur-3xl opacity-70"></div> <div class="absolute -right-10 -top-16 h-40 w-40 rounded-full bg-[#FFE3EA] blur-3xl opacity-70"></div>
@ -151,9 +151,9 @@
</div> </div>
</div> </div>
<div class="relative px-5 pb-5"> <div class="relative px-5 pb-5">
<div class="bg-white/90 backdrop-blur-sm rounded-xl p-4 shadow-[0_10px_24px_rgba(232,66,77,0.08)]"> <div class="bg-white/90 backdrop-blur-sm rounded-xl p-4 shadow-[0_10px_24px_rgba(232,66,77,0.08)]">
<div class="space-y-4"> <div class="space-y-4">
<div class="flex items-start gap-3"> <div class="flex items-start gap-3">
<div class="h-9 w-9 shrink-0 rounded-full bg-gradient-to-br from-[#E8424D] to-[#FF7A7A] text-white flex items-center justify-center font-bold shadow-md"> <div class="h-9 w-9 shrink-0 rounded-full bg-gradient-to-br from-[#E8424D] to-[#FF7A7A] text-white flex items-center justify-center font-bold shadow-md">
1 1