fix: android choose invoice

This commit is contained in:
Tom Xu 2021-06-04 09:31:14 +08:00
parent 1425924c10
commit 96c7bce27d

View File

@ -212,10 +212,12 @@ export function chooseInvoice(data = {}) {
if (resp.errCode === 0) {
if (Platform.OS === 'android') {
const cardItemList = JSON.parse(resp.cardItemList);
resp.cards = cardItemList.map((item) => ({
cardId: item.card_id,
encryptCode: item.encrypt_code,
}));
resp.cards = cardItemList
? cardItemList.map((item) => ({
cardId: item.card_id,
encryptCode: item.encrypt_code,
}))
: [];
}
resolve(resp);
} else {