hookehuyr

fix(支付弹窗): 调整支付弹窗高度并优化关闭逻辑

将支付弹窗的高度从90%调整为50%,并移除不必要的关闭图标。在支付失败时,直接关闭弹窗而不是显示错误提示,以提升用户体验。
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
16 </FrostedGlass> 16 </FrostedGlass>
17 </div> 17 </div>
18 18
19 -
20 <div v-else-if="!orderComplete" class="pb-20"> 19 <div v-else-if="!orderComplete" class="pb-20">
21 <!-- Order Summary --> 20 <!-- Order Summary -->
22 <div class="p-4 bg-gradient-to-r from-green-500/10 to-blue-500/10"> 21 <div class="p-4 bg-gradient-to-r from-green-500/10 to-blue-500/10">
...@@ -253,17 +252,17 @@ ...@@ -253,17 +252,17 @@
253 v-model:show="showPayment" 252 v-model:show="showPayment"
254 position="bottom" 253 position="bottom"
255 round 254 round
256 - closeable 255 + :style="{ height: '50%' }"
257 - close-icon-position="top-right"
258 - :style="{ height: '90%' }"
259 > 256 >
260 <div class="bg-gradient-to-r from-green-500/10 to-blue-500/10 h-full"> 257 <div class="bg-gradient-to-r from-green-500/10 to-blue-500/10 h-full">
261 <WechatPayment 258 <WechatPayment
262 v-if="showPayment && orderId" 259 v-if="showPayment && orderId"
263 :order-id="orderId" 260 :order-id="orderId"
261 + cancelBtnText="关闭"
264 @success="handlePaymentSuccess" 262 @success="handlePaymentSuccess"
265 @failed="handlePaymentFailed" 263 @failed="handlePaymentFailed"
266 @processing="handlePaymentProcessing" 264 @processing="handlePaymentProcessing"
265 + @cancel="showPayment = false"
267 > 266 >
268 <template #success-action> 267 <template #success-action>
269 <button 268 <button
...@@ -275,10 +274,10 @@ ...@@ -275,10 +274,10 @@
275 </template> 274 </template>
276 <template #failed-action> 275 <template #failed-action>
277 <button 276 <button
278 - @click="handleBackToHome" 277 + @click="showPayment = false"
279 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" 278 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"
280 > 279 >
281 - 返回首页 280 + 关闭
282 </button> 281 </button>
283 </template> 282 </template>
284 </WechatPayment> 283 </WechatPayment>
......
...@@ -162,9 +162,7 @@ ...@@ -162,9 +162,7 @@
162 v-model:show="showPaymentPopup" 162 v-model:show="showPaymentPopup"
163 position="bottom" 163 position="bottom"
164 round 164 round
165 - closeable 165 + :style="{ height: '50%' }"
166 - close-icon-position="top-right"
167 - :style="{ height: '90%' }"
168 > 166 >
169 <div class="bg-gradient-to-r from-green-500/10 to-blue-500/10 h-full"> 167 <div class="bg-gradient-to-r from-green-500/10 to-blue-500/10 h-full">
170 <WechatPayment 168 <WechatPayment
...@@ -173,7 +171,16 @@ ...@@ -173,7 +171,16 @@
173 @success="handlePaymentSuccess" 171 @success="handlePaymentSuccess"
174 @failed="handlePaymentFailed" 172 @failed="handlePaymentFailed"
175 @processing="handlePaymentProcessing" 173 @processing="handlePaymentProcessing"
176 - /> 174 + >
175 + <template #failed-action>
176 + <button
177 + @click="showPaymentPopup = false"
178 + 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"
179 + >
180 + 关闭
181 + </button>
182 + </template>
183 + </WechatPayment>
177 </div> 184 </div>
178 </van-popup> 185 </van-popup>
179 </AppLayout> 186 </AppLayout>
...@@ -316,7 +323,7 @@ const handlePaymentSuccess = () => { ...@@ -316,7 +323,7 @@ const handlePaymentSuccess = () => {
316 323
317 // 处理支付失败 324 // 处理支付失败
318 const handlePaymentFailed = (error) => { 325 const handlePaymentFailed = (error) => {
319 - showToast(error || '支付失败') 326 + // showToast(error || '支付失败')
320 } 327 }
321 328
322 // 处理支付处理中 329 // 处理支付处理中
......