hookehuyr

style(CheckoutPage): 优化支付失败页面的响应式布局

调整了支付失败页面的样式,使其在不同屏幕尺寸下显示更加一致。增加了断点处理,优化了按钮和文本的间距、大小以及悬停效果,提升用户体验。
...@@ -47,27 +47,29 @@ ...@@ -47,27 +47,29 @@
47 </div> 47 </div>
48 48
49 <!-- 支付失败提示 --> 49 <!-- 支付失败提示 -->
50 - <div v-else-if="paymentStatus === 'failed'" class="h-screen flex flex-col items-center justify-center px-4"> 50 + <div v-else-if="paymentStatus === 'failed'" class="h-screen flex flex-col items-center justify-center px-4 sm:px-6 lg:px-8">
51 - <FrostedGlass class="p-6 rounded-xl text-center"> 51 + <FrostedGlass class="w-full max-w-sm sm:max-w-md lg:max-w-lg p-6 sm:p-8 rounded-2xl text-center">
52 - <div class="w-20 h-20 bg-red-50 rounded-full flex items-center justify-center mx-auto mb-4"> 52 + <div class="w-20 h-20 sm:w-24 sm:h-24 bg-red-50 rounded-full flex items-center justify-center mx-auto mb-2 sm:mb-4">
53 - <svg xmlns="http://www.w3.org/2000/svg" class="h-10 w-10 text-red-500" fill="none" viewBox="0 0 24 24" stroke="currentColor"> 53 + <svg xmlns="http://www.w3.org/2000/svg" class="h-10 w-10 sm:h-12 sm:w-12 text-red-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
54 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> 54 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
55 </svg> 55 </svg>
56 </div> 56 </div>
57 - <h2 class="text-2xl font-bold mb-2">支付失败</h2> 57 + <h2 class="text-xl sm:text-2xl font-bold mb-2 sm:mb-3">支付失败</h2>
58 - <p class="text-gray-600 mb-6">{{ paymentError || '支付过程中出现错误,请重试' }}</p> 58 + <p class="text-sm sm:text-base text-gray-600 mb-6 sm:mb-8 px-2 sm:px-4">{{ paymentError || '支付过程中出现错误,请重试' }}</p>
59 - <button 59 + <div class="space-y-2 sm:space-y-3 max-w-xs mx-auto">
60 - @click="handleSubmit" 60 + <button
61 - class="w-full bg-gradient-to-r from-red-500 to-red-600 text-white py-3 rounded-xl font-medium mb-3" 61 + @click="handleSubmit"
62 - > 62 + class="w-full bg-gradient-to-r from-red-500 to-red-600 text-white py-3 sm:py-3.5 rounded-xl font-medium text-base sm:text-lg hover:from-red-600 hover:to-red-700 transition-colors"
63 - 重新支付 63 + >
64 - </button> 64 + 重新支付
65 - <button 65 + </button>
66 - @click="handleBackToHome" 66 + <button
67 - class="w-full bg-gray-100 text-gray-700 py-3 rounded-xl font-medium" 67 + @click="handleBackToHome"
68 - > 68 + class="w-full bg-gray-100 text-gray-700 py-3 sm:py-3.5 rounded-xl font-medium text-base sm:text-lg hover:bg-gray-200 transition-colors"
69 - 返回首页 69 + >
70 - </button> 70 + 返回首页
71 + </button>
72 + </div>
71 </FrostedGlass> 73 </FrostedGlass>
72 </div> 74 </div>
73 75
......