From 30df8e0321e0ffb72ea18f3235d7e2070ebfd19b Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 1 Nov 2022 23:41:07 +0700 Subject: [PATCH] fix(route): keyword lb (#11197) --- lib/v2/smzdm/keyword.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/v2/smzdm/keyword.js b/lib/v2/smzdm/keyword.js index 0c2635975..c286a763b 100644 --- a/lib/v2/smzdm/keyword.js +++ b/lib/v2/smzdm/keyword.js @@ -6,15 +6,16 @@ const timezone = require('@/utils/timezone'); module.exports = async (ctx) => { const keyword = ctx.params.keyword; - const response = await got(`https://search.smzdm.com/`, { + const response = await got(`https://search.smzdm.com`, { headers: { - Referer: `https://search.smzdm.com/?c=home&s=${encodeURI(keyword)}&order=time&v=b`, + Referer: `https://search.smzdm.com/?c=home&s=${encodeURIComponent(keyword)}&order=time&v=a`, }, searchParams: { c: 'home', s: keyword, order: 'time', - v: 'b', + v: 'a', + mx_v: 'a', }, }); @@ -25,7 +26,7 @@ module.exports = async (ctx) => { ctx.state.data = { title: `${keyword} - 什么值得买`, - link: `https://search.smzdm.com/?c=home&s=${encodeURI(keyword)}&order=time&v=b`, + link: `https://search.smzdm.com/?c=home&s=${encodeURIComponent(keyword)}&order=time`, item: list && list.toArray().map((item) => {