fix(route): keyword lb (#11197)
This commit is contained in:
parent
e1fd9ca1e3
commit
30df8e0321
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue