This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user