This commit is contained in:
@@ -58,6 +58,7 @@ COPY docker/nginx.conf /etc/nginx/conf.d/default.conf
|
|||||||
COPY --from=builder /build/dist/build/h5 /usr/share/nginx/html
|
COPY --from=builder /build/dist/build/h5 /usr/share/nginx/html
|
||||||
COPY MP_verify_yU2Z8mp831jh6QX7.txt /usr/share/nginx/html/MP_verify_yU2Z8mp831jh6QX7.txt
|
COPY MP_verify_yU2Z8mp831jh6QX7.txt /usr/share/nginx/html/MP_verify_yU2Z8mp831jh6QX7.txt
|
||||||
COPY MP_verify_0UoX8yClVgREjgPj.txt /usr/share/nginx/html/MP_verify_0UoX8yClVgREjgPj.txt
|
COPY MP_verify_0UoX8yClVgREjgPj.txt /usr/share/nginx/html/MP_verify_0UoX8yClVgREjgPj.txt
|
||||||
|
COPY MP_verify_4E1dVbOcZ9KzTzoc.txt /usr/share/nginx/html/MP_verify_4E1dVbOcZ9KzTzoc.txt
|
||||||
|
|
||||||
# 暴露端口
|
# 暴露端口
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
@@ -9,11 +9,11 @@
|
|||||||
<view class="card" v-for="item in list" :key="item.iccid">
|
<view class="card" v-for="item in list" :key="item.iccid">
|
||||||
<view class="flex-row-g20">
|
<view class="flex-row-g20">
|
||||||
<view class="logo">
|
<view class="logo">
|
||||||
<image :src="getLogo(item.category).logo" mode="aspectFit"></image>
|
<image :src="getCarrier(item.carrier_type).logo" mode="aspectFit"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-col-g20">
|
<view class="flex-col-g20">
|
||||||
<view class="iccid">ICCID: {{ item.iccid }}</view>
|
<view class="iccid">ICCID: {{ item.iccid }}</view>
|
||||||
<view class="operator">运营商: {{ getLogo(item.category).name }}</view>
|
<view class="operator">运营商: {{ getCarrier(item.carrier_type).name }}</view>
|
||||||
<view class="slot">卡槽位: {{ item.slot_position || '-' }}</view>
|
<view class="slot">卡槽位: {{ item.slot_position || '-' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import { assetApi, deviceApi, realnameApi } from '@/api/index.js';
|
import { assetApi, realnameApi } from '@/api/index.js';
|
||||||
import { useUserStore } from '@/store/index.js';
|
import { useUserStore } from '@/store/index.js';
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@@ -50,15 +50,25 @@
|
|||||||
let currentModalIccid = ref('');
|
let currentModalIccid = ref('');
|
||||||
let currentCard = ref(null);
|
let currentCard = ref(null);
|
||||||
|
|
||||||
let opratorList = reactive([
|
const carrierMap = {
|
||||||
{ category: '124', logo: 'https://img2.baidu.com/it/u=139558247,3893370039&fm=253&fmt=auto?w=529&h=500', name: '中国电信' },
|
CMCC: '中国移动',
|
||||||
{ category: '125', logo: 'https://img1.baidu.com/it/u=2816777816,1756344384&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500', name: '中国联通' },
|
CUCC: '中国联通',
|
||||||
{ category: '126', logo: 'https://img2.baidu.com/it/u=915783975,1594870591&fm=253&fmt=auto&app=120&f=PNG?w=182&h=182', name: '中国移动' }
|
CTCC: '中国电信',
|
||||||
]);
|
CBN: '中国广电'
|
||||||
|
};
|
||||||
|
|
||||||
const getLogo = (category) => {
|
const carrierLogoMap = {
|
||||||
const operator = opratorList.find(item => item.category === category);
|
CMCC: 'https://img2.baidu.com/it/u=915783975,1594870591&fm=253&fmt=auto&app=120&f=PNG?w=182&h=182',
|
||||||
return operator || opratorList[0];
|
CUCC: 'https://img1.baidu.com/it/u=2816777816,1756344384&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500',
|
||||||
|
CTCC: 'https://img2.baidu.com/it/u=139558247,3893370039&fm=253&fmt=auto?w=529&h=500',
|
||||||
|
CBN: 'https://img1.baidu.com/it/u=3160680953,3401650303&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500'
|
||||||
|
};
|
||||||
|
|
||||||
|
const getCarrier = (carrierType) => {
|
||||||
|
return {
|
||||||
|
name: carrierMap[carrierType] || '-',
|
||||||
|
logo: carrierLogoMap[carrierType] || carrierLogoMap.CMCC
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadCards = async () => {
|
const loadCards = async () => {
|
||||||
@@ -66,28 +76,22 @@
|
|||||||
try {
|
try {
|
||||||
const assetData = await assetApi.getInfo(userStore.state.identifier);
|
const assetData = await assetApi.getInfo(userStore.state.identifier);
|
||||||
|
|
||||||
// 判断是否为设备
|
|
||||||
if (assetData.asset_type === 'device') {
|
if (assetData.asset_type === 'device') {
|
||||||
// 是设备,调用设备卡列表接口
|
list.splice(0, list.length, ...(assetData.cards || []).map(card => ({
|
||||||
const data = await deviceApi.getCards(userStore.state.identifier);
|
|
||||||
if (data.cards && data.cards.length > 0) {
|
|
||||||
list.splice(0, list.length, ...data.cards.map(card => ({
|
|
||||||
iccid: card.iccid,
|
iccid: card.iccid,
|
||||||
category: getCarrierCategory(card.carrier_name),
|
carrier_type: card.carrier_type,
|
||||||
slot_position: card.slot_position,
|
slot_position: card.slot_position,
|
||||||
isRealName: card.real_name_status === 1
|
isRealName: card.real_name_status === 1
|
||||||
})));
|
})));
|
||||||
}
|
} else if (assetData.identifier) {
|
||||||
} else {
|
|
||||||
// 不是设备(单卡),直接使用 asset info 数据
|
|
||||||
if (assetData.identifier) {
|
|
||||||
list.splice(0, list.length, {
|
list.splice(0, list.length, {
|
||||||
iccid: assetData.identifier,
|
iccid: assetData.identifier,
|
||||||
category: getCarrierCategory(assetData.carrier_name),
|
carrier_type: assetData.carrier_type,
|
||||||
slot_position: 1,
|
slot_position: 1,
|
||||||
isRealName: assetData.real_name_status === 1
|
isRealName: assetData.real_name_status === 1
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
|
list.splice(0, list.length);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error('加载卡列表失败', e);
|
console.error('加载卡列表失败', e);
|
||||||
@@ -95,14 +99,6 @@
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getCarrierCategory = (carrierName) => {
|
|
||||||
if (!carrierName) return '126';
|
|
||||||
if (carrierName.includes('电信')) return '124';
|
|
||||||
if (carrierName.includes('联通')) return '125';
|
|
||||||
if (carrierName.includes('移动')) return '126';
|
|
||||||
return '126';
|
|
||||||
};
|
|
||||||
|
|
||||||
const toReal = async (card) => {
|
const toReal = async (card) => {
|
||||||
currentCard.value = card;
|
currentCard.value = card;
|
||||||
currentModalIccid.value = card.iccid;
|
currentModalIccid.value = card.iccid;
|
||||||
|
|||||||
Reference in New Issue
Block a user