fix: carrier_type
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m33s

This commit is contained in:
sexygoat
2026-04-27 12:33:26 +08:00
parent f86281017a
commit fbf5371086
3 changed files with 13 additions and 8 deletions

View File

@@ -229,9 +229,9 @@
// 流量信息已由 TrafficCard 组件独立获取,这里不再处理
// 当前卡信息
let currentCard = null;
if (data.cards && data.cards.length > 0) {
// 找到当前卡
const currentCard = data.cards.find(card => card.is_current) || data.cards[0];
currentCard = data.cards.find(card => card.is_current) || '';
deviceInfo.currentIccid = currentCard.iccid || '-';
// 卡列表
@@ -245,6 +245,15 @@
deviceInfo.mchList = [];
}
// 运营商信息
const carrierTypeMap = {
CMCC: '中国移动',
CUCC: '中国联通',
CTCC: '中国电信',
CBN: '中国广电'
};
deviceInfo.carrier_name = (currentCard && carrierTypeMap[currentCard.carrier_type]) || '-';
// 设备实时信息
if (data.device_realtime) {
const rt = data.device_realtime;