diff --git a/lib/v2/36kr/index.js b/lib/v2/36kr/index.js index 1c33fd9908..04dc4cb394 100644 --- a/lib/v2/36kr/index.js +++ b/lib/v2/36kr/index.js @@ -27,7 +27,8 @@ module.exports = async (ctx) => { const data = JSON.parse(response.data.match(/"itemList":(\[.*?\])/)[1]); - let items = data.slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 30) + let items = data + .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 30) .filter((item) => item.itemType !== 0) .map((item) => { item = item.templateMaterial ?? item; @@ -54,11 +55,11 @@ module.exports = async (ctx) => { const key = CryptoJS.enc.Utf8.parse('efabccee-b754-4c'); const content = JSON.parse( CryptoJS.AES.decrypt(cipherTextList[1], key, { - mode: CryptoJS.mode.ECB, - padding: CryptoJS.pad.Pkcs7, - }) - .toString(CryptoJS.enc.Utf8) - .toString() + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7, + }) + .toString(CryptoJS.enc.Utf8) + .toString() ).articleDetail.articleDetailData.data; item.description = content.widgetContent; } else {