This commit is contained in:
@@ -216,26 +216,10 @@
|
||||
return dateStr.split('T')[0] || '-';
|
||||
};
|
||||
|
||||
<<<<<<< HEAD
|
||||
const resolveAssetRealName = (assetData) => {
|
||||
const cards = Array.isArray(assetData?.cards) ? assetData.cards : [];
|
||||
|
||||
if (cards.length === 1) {
|
||||
return !!cards[0]?.real_name_at;
|
||||
}
|
||||
|
||||
if (cards.length > 1) {
|
||||
const currentCard = cards.find(card => card.is_current);
|
||||
return !!currentCard?.real_name_at;
|
||||
}
|
||||
|
||||
return assetData?.real_name_status === 1;
|
||||
=======
|
||||
const resolveCurrentCard = (cards = []) => {
|
||||
if (cards.length === 1) return cards[0];
|
||||
if (cards.length > 1) return cards.find(card => card.is_current) || null;
|
||||
return null;
|
||||
>>>>>>> 368c0d75e7860196ca0a353b2154e2c257b7c4fb
|
||||
};
|
||||
|
||||
const loadAssetInfo = async () => {
|
||||
@@ -258,15 +242,9 @@
|
||||
deviceInfo.expireDate = formatDate(data.current_package_expires_at);
|
||||
deviceInfo.iccid = data.iccid || '-';
|
||||
deviceInfo.walletBalance = data.wallet_balance ?? 0;
|
||||
<<<<<<< HEAD
|
||||
isRealName.value = resolveAssetRealName(data);
|
||||
realNameStatus.value = isRealName.value ? '已实名' : '未实名';
|
||||
=======
|
||||
const currentCard = resolveCurrentCard(data.cards || []);
|
||||
const realNameStatusCode = currentCard?.real_name_status ?? data.real_name_status;
|
||||
isRealName.value = realNameStatusCode === 1;
|
||||
realNameStatus.value = realNameStatusCode === 1 ? '已实名' : '未实名';
|
||||
>>>>>>> 368c0d75e7860196ca0a353b2154e2c257b7c4fb
|
||||
isRealName.value = !!currentCard?.real_name_at || currentCard?.real_name_status === 1 || data.real_name_status === 1;
|
||||
realNameStatus.value = isRealName.value ? '已实名' : '未实名';
|
||||
boundPhone.value = data.bound_phone || '';
|
||||
alreadyBindPhone.value = !!data.bound_phone;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user