generated from tailored/router-template
temp
This commit is contained in:
@@ -344,7 +344,7 @@ class XhsClient {
|
||||
const state = stateMatch[1].replace(/undefined/g, '""');
|
||||
if (state !== '{}') {
|
||||
const noteDict = transformJsonKeys(JSON.parse(state));
|
||||
return noteDict.note.note_detail_map[noteId].note;
|
||||
return { code: 0, data: noteDict.note.note_detail_map[noteId].note };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,8 +355,12 @@ class XhsClient {
|
||||
throw new DataFetchError(html);
|
||||
} catch (error) {
|
||||
console.error('Error fetching note:', error);
|
||||
fs.writeFileSync('a.html', html);
|
||||
throw error;
|
||||
return {
|
||||
code: 500,
|
||||
msg: '请求失败',
|
||||
error: error.message,
|
||||
data: null,
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user