From d0f032aa1c2e4fcdad4d9777a7d7afb1c0b734c3 Mon Sep 17 00:00:00 2001 From: luo Date: Thu, 30 Jul 2026 15:01:54 +0800 Subject: [PATCH] fix: ui --- pages/auth/auth.vue | 7 +++---- pages/order-list/order-list.vue | 2 +- pages/switch/switch.vue | 22 +++++++++++++++++----- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/pages/auth/auth.vue b/pages/auth/auth.vue index d1ec493..fcbac57 100644 --- a/pages/auth/auth.vue +++ b/pages/auth/auth.vue @@ -168,10 +168,9 @@ width: 112rpx; height: 112rpx; flex-shrink: 0; - padding: 10rpx; + padding: 0; box-sizing: border-box; border-radius: 24rpx; - background: var(--up-primary-light); } .slot-visual { @@ -202,7 +201,7 @@ } .iccid-value-text { - flex: 1; + flex: 0 1 auto; min-width: 0; color: var(--text-secondary); font-size: 24rpx; @@ -232,7 +231,7 @@ .copy-front { right: 2rpx; bottom: 2rpx; background: var(--bg-primary); } .card-actions { - width: 240rpx; + width: 100%; margin-top: 20rpx; } diff --git a/pages/order-list/order-list.vue b/pages/order-list/order-list.vue index 04a82bf..a54938b 100644 --- a/pages/order-list/order-list.vue +++ b/pages/order-list/order-list.vue @@ -53,7 +53,7 @@ @tap.stop="showOrderPaymentMethods(item)"> 立即支付 - diff --git a/pages/switch/switch.vue b/pages/switch/switch.vue index 4811df0..6396cef 100644 --- a/pages/switch/switch.vue +++ b/pages/switch/switch.vue @@ -137,11 +137,24 @@ loading.value = false; }; - const switchOperator = async (item) => { + const switchOperator = (item) => { + if (switching.value) return; + uni.showModal({ + title: '确认切换', + content: `确定要切换到${getCarrier(item.carrier_type).name}吗?切换后预计 3-5 分钟生效。`, + cancelText: '取消', + confirmText: '确认切换', + success: ({ confirm }) => { + if (confirm) executeSwitch(item); + } + }); + }; + + const executeSwitch = async (item) => { switching.value = true; try { await deviceApi.switchCard(userStore.state.identifier, item.iccid); - uni.showToast({ title: '切换成功,3-5分钟后生效', icon: 'success' }); + uni.showToast({ title: '切换成功,3-5分钟后生效', icon: 'none' }); loadCards(); } catch (e) { console.error('切换运营商失败', e); @@ -203,10 +216,9 @@ width: 112rpx; height: 112rpx; flex-shrink: 0; - padding: 10rpx; + padding: 0; box-sizing: border-box; border-radius: 24rpx; - background: var(--up-primary-light); } .slot-visual { @@ -244,7 +256,7 @@ } .iccid-value-text { - flex: 1; + flex: 0 1 auto; min-width: 0; color: var(--text-secondary); font-size: 24rpx;