This commit is contained in:
@@ -168,10 +168,9 @@
|
|||||||
width: 112rpx;
|
width: 112rpx;
|
||||||
height: 112rpx;
|
height: 112rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding: 10rpx;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
background: var(--up-primary-light);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.slot-visual {
|
.slot-visual {
|
||||||
@@ -202,7 +201,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.iccid-value-text {
|
.iccid-value-text {
|
||||||
flex: 1;
|
flex: 0 1 auto;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
@@ -232,7 +231,7 @@
|
|||||||
.copy-front { right: 2rpx; bottom: 2rpx; background: var(--bg-primary); }
|
.copy-front { right: 2rpx; bottom: 2rpx; background: var(--bg-primary); }
|
||||||
|
|
||||||
.card-actions {
|
.card-actions {
|
||||||
width: 240rpx;
|
width: 100%;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
@tap.stop="showOrderPaymentMethods(item)">
|
@tap.stop="showOrderPaymentMethods(item)">
|
||||||
立即支付
|
立即支付
|
||||||
</button>
|
</button>
|
||||||
<button v-if="item.payment_status !== 1" class="order-action-button primary-action-button"
|
<button v-if="item.payment_status === 2" class="order-action-button primary-action-button"
|
||||||
@tap.stop="startOrderRenewal(item)">立即续费</button>
|
@tap.stop="startOrderRenewal(item)">立即续费</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -137,11 +137,24 @@
|
|||||||
loading.value = false;
|
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;
|
switching.value = true;
|
||||||
try {
|
try {
|
||||||
await deviceApi.switchCard(userStore.state.identifier, item.iccid);
|
await deviceApi.switchCard(userStore.state.identifier, item.iccid);
|
||||||
uni.showToast({ title: '切换成功,3-5分钟后生效', icon: 'success' });
|
uni.showToast({ title: '切换成功,3-5分钟后生效', icon: 'none' });
|
||||||
loadCards();
|
loadCards();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('切换运营商失败', e);
|
console.error('切换运营商失败', e);
|
||||||
@@ -203,10 +216,9 @@
|
|||||||
width: 112rpx;
|
width: 112rpx;
|
||||||
height: 112rpx;
|
height: 112rpx;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding: 10rpx;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
background: var(--up-primary-light);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.slot-visual {
|
.slot-visual {
|
||||||
@@ -244,7 +256,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.iccid-value-text {
|
.iccid-value-text {
|
||||||
flex: 1;
|
flex: 0 1 auto;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|||||||
Reference in New Issue
Block a user