fix: carrier_type
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m33s
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 1m33s
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view class="card device-status-card">
|
||||
<view class="card-header mb-md flex-row-sb">
|
||||
<view class="title">设备信息</view>
|
||||
<view class="tag-apple tag-success">{{ getOperator(deviceInfo.currentIccid) }}</view>
|
||||
<view class="tag-apple tag-success">{{ deviceInfo.carrier_name || '-' }}</view>
|
||||
</view>
|
||||
<view class="device-info flex-col-g16">
|
||||
<view class="info-row flex-row-sb">
|
||||
@@ -54,10 +54,6 @@
|
||||
|
||||
defineEmits(['authentication']);
|
||||
|
||||
const getOperator = (iccid) => {
|
||||
return '中国电信';
|
||||
};
|
||||
|
||||
const getSignalText = (rssi) => rssi || '强';
|
||||
|
||||
const statusText = computed(() => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -36,7 +36,7 @@ export const useUserStore = () => {
|
||||
};
|
||||
|
||||
const setUserInfo = (userInfo) => {
|
||||
state.userInfo = userInfo;
|
||||
Object.assign(state.userInfo, userInfo);
|
||||
uni.setStorageSync('userInfo', userInfo);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user